Platform SDK: Quality of Service

TcRegisterClient

The TcRegisterClient function is used to register a client with the traffic control interface (TCI). The TcRegisterClient function must be the first function call a client makes to the TCI.

Client registration provides callback routines that allow the TCI to complete either client-initiated operations or asynchronous events. Upon successful registration, the caller of the TcRegisterClient function must be ready to have any of its TCI handlers called. See Entry Points Exposed by Clients of the Traffic Control Interface for more information.

DWORD TcRegisterClient(
  ULONG TciVersion,
  HANDLE ClRegCtx,
  PTCI_CLIENT_FUNC_LIST pClientHandlerList,
  PHANDLE pClientHandle
);

Parameters

TciVersion
[in] Traffic control version expected by the client, included to ensure compatibility between traffic control and the client. Clients can pass CURRENT_TCI_VERSION, defined in Traffic.h.
ClRegCtx
[in] Client registration context. ClRegCtx is returned when the client's notification handler function is called. This can be a container to hold an arbitrary client-defined context for this instance of the interface.
pClientHandlerList
[in] Pointer to a list of client-supplied handlers. Client-supplied handlers are used for notification events and asynchronous completions. Each completion routine is optional, with the exception of the notification handler. Setting the notification handler to NULL will return an ERROR_INVALID_PARAMETER.
pClientHandle
[out] Pointer to the buffer that traffic control uses to return a registration handle to the client.

Return Values

Error code Description
NO_ERROR The function executed without errors.
ERROR_NOT_ENOUGH_MEMORY The system is out of memory.
ERROR_INVALID_PARAMETER One of the parameters is NULL.
ERROR_INCOMPATIBLE_TCI_VERSION The TCI version is wrong.
ERROR_OPEN_FAILED Traffic control failed to open a system device. The likely cause is insufficient privileges.

Note  Use of the TcRegisterClient function requires administrative privilege.

Requirements

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