TransportEnumerateInterfaces

Enumerates available interfaces for a given transport. Only available for pttSerial and pttXhci transport types.

Syntax

PULSE_STATUS TransportEnumerateInterfaces(
 [in] PPS_TRANSPORT pTransport,
);

Parameters

PPS_TRANSPORT pTransport

An opaque handle to a transport created by the TransportCreate function.

Return value

If the function succeeds, the return value is PULSE_STATUS_SUCCESS.

If it fails, it returns one of the PULSE_STATUS values. Possible return codes include, but are not limited to, the following:

PULSE_STATUS_NOT_SUPPORTED
0xC0000001
The function is not supported for a given transport type.
PULSE_STATUS_INSUFFICIENT_RESOURCES
0xC0000002
One of the memory allocations failed during initialization.
PULSE_STATUS_INVALID_PARAMETER
0xC0000010
pTransport argument is NULL.
PULSE_STATUS_DEVICE_NOT_FOUND
0xC0000305
Might happen if:
  • Unable to enumerate serial devices for some reason. Try checking "HARDWARE\\DEVICEMAP\\SERIALCOMM" registry key on Windows.
  • Unable to enumerate USB 3 debug devices.
  • Remarks

    Some transport types cannot be enumerated. For instance, you connect to a pipe using its symbolic name. While you could enumerate all pipes on your Windows system, there would be too much noise.
    Another example of something you cannot enumerate is a target network connection because you can connect to any network address and port. One could argue that a PulseDbg discovery protocol could be implemented instead. I agree, but I did not.

    Every time you enumerate a transport, the internal interface list is refreshed. This allows polling for a new debugging device.

    The function can succeed but still return 0 available interfaces. Troubleshooting this case is outside the scope of Pulse SDK.

    Use the TransportGetInterfaceCount function to check the number of enumerated interfaces.