TransportGetInterfaceName

Returns the name of the enumerated interface if supported. Otherwise, it returns the name of the interface that has been set with the TransportSetInterfaceName function for pttNet or pttPipe transport types.

Syntax

PULSE_STATUS TransportGetInterfaceName(
 [in] PPS_TRANSPORT pTransport,
 [in] uint32_t InterfaceIndex,
 [out] char *pcInterfaceNameBuffer,
 [in, out] uint32_t *pcbBufSize
);

Parameters

PPS_TRANSPORT pTransport

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

uint32_t InterfaceIndex

Index of the enumerated interface. The interfaces are enumerated with the TransportEnumerateInterfaces function. The number of enumerated interfaces can be determined using the TransportGetInterfaceCount function. Use an index that is less than the count of enumerated interfaces. Ignored for pttNet and pttPipe transport types.

char *pcInterfaceNameBuffer

A pointer to an ASCII string buffer where the result is to be stored.

uint32_t *pcbBufSize

A pointer to a uint32_t variable that holds the input buffer size in bytes. On return, it contains the size of the output, excluding the NULL-terminating character.

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_INVALID_PARAMETER
0xC0000010
Might happen if:
  • The pTransport argument is NULL.
  • The pcInterfaceNameBuffer argument is NULL.
  • The pcbBufSize argument is NULL.
  • The InterfaceIndex argument is out of range.
  • Remarks

    If the input buffer cannot fit the result, the result will be trimmed to whatever size the input buffer can accommodate, including the NULL-terminating character.