Platform SDK: Quality of Service

TcOpenInterface

The TcOpenInterface function opens an interface. The TcOpenInterface function identifies and opens an interface based on its text string, which is available from a call to TcEnumerateInterfaces.. Once an interface is opened, the client must be prepared to receive notification regarding the open interface, through traffic control's use of the interface context.

DWORD TcOpenInterface(
  LPTSTR pInterfaceName,
  HANDLE ClientHandle,
  HANDLE ClIfcCtx,
  PHANDLE pIfcHandle
);

Parameters

pInterfaceName
[in] Pointer to the text string identifying the interface to be opened. This text string is part of the information returned in a previous call to TcEnumerateInterfaces.
ClientHandle
[in] Handle used by traffic control to identify the client, obtained through the pClientHandle parameter of the client's call to TcRegisterClient.
ClIfcCtx
[in] Client's interface–context handle for the opened interface. Used as a callback parameter by traffic control when communicating with the client about the opened interface. This can be a container to hold an arbitrary client-defined context for this instance of the interface.
pIfcHandle
[out] Pointer to the buffer where traffic control can return an interface handle. The interface handle returned to pIfcHandle must be used by the client to identify the interface in subsequent calls to traffic control.

Return Values

Error code Description
NO_ERROR The function executed without errors.
ERROR_INVALID_PARAMETER One of the parameters is NULL.
ERROR_NOT_ENOUGH_MEMORY The system is out of memory.
ERROR_NOT_FOUND Traffic control failed to find an interface with the name provided in pInterfaceName.
ERROR_INVALID_HANDLE The client handle is invalid.

Note  Use of the TcOpenInterface 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

TcEnumerateInterfaces, TcRegisterClient, ClNotifyHandler