Platform SDK: Quality of Service

TcEnumerateInterfaces

The TcEnumerateInterfaces function enumerates all traffic control–enabled network interfaces. Clients are notified of interface changes through the ClNotifyHandler function.

DWORD TcEnumerateInterfaces(
  HANDLE ClientHandle,
  OUT PULONG pBufferSize,
  PTC_IFC_DESCRIPTOR InterfaceBuffer 
);

Parameters

ClientHandle
[in] Handle used by traffic control to identify the client. Clients receive handles when registering with traffic control through the TcRegisterClient function.
pBufferSize
[in, out] Pointer to a value indicating the size of the buffer. For input, this value is the size of the buffer, in bytes, allocated by the caller. For output, this value is the actual size of the buffer, in bytes, used or needed by traffic control. A value of zero on output indicates that no traffic control interfaces are available, indicating that the QOS Packet Scheduler is not installed.
InterfaceBuffer
[out] Pointer to the buffer containing the returned list of interface descriptors.

Return Values

Successful completion returns the device name of the interface.

Error code Description
NO_ERROR The function executed without errors.
ERROR_INVALID_HANDLE The client handle is invalid.
ERROR_INVALID_PARAMETER One of the parameters is NULL.
ERROR_INSUFFICIENT_BUFFER The buffer is too small to enumerate all interfaces. If this error is returned, the correct (required) size of the buffer is passed back in pBufferSize.
ERROR_NOT_ENOUGH_MEMORY The system is out of memory.

Remarks

The client calling the TcEnumerateInterfaces function must first allocate a buffer, then pass the buffer to traffic control through InterfaceBuffer. Traffic control returns a pointer to an array of interface descriptors in InterfaceBuffer. Each interface descriptor contains two elements:

The network address list descriptor includes the media type, as well as a list of network addresses. The media type determines how the network address list should be interpreted:

Note  Use of the TcEnumerateInterfaces function requires administrative privilege.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Traffic.h.
  Library: Use Traffic.lib.

See Also

TcRegisterClient, ClNotifyHandler