TcQueryInterface function (traffic.h)
The TcQueryInterface function queries traffic control for related per-interface parameters. A traffic control parameter is queried by providing its globally unique identifier (GUID). Setting the NotifyChange parameter to TRUE enables event notification on the specified GUID, after which notification events are sent to a client whenever the queried parameter changes. GUIDs for which clients can request notification are found in the GUID entry; the column titled "Notification" denotes which GUIDs are available for notification.
Syntax
ULONG TcQueryInterface(
[in] HANDLE IfcHandle,
[in] LPGUID pGuidParam,
[in] BOOLEAN NotifyChange,
[in, out] PULONG pBufferSize,
[out] PVOID Buffer
);
Parameters
[in] IfcHandle
Handle associated with the interface to be queried. This handle is obtained by a previous call to the TcOpenInterface function.
[in] pGuidParam
Pointer to the globally unique identifier (GUID) that corresponds to the traffic control parameter being queried.
[in] NotifyChange
Used to request notifications from traffic control for the parameter being queried. If TRUE, traffic control will notify the client, through the ClNotifyHandler function, upon changes to the parameter corresponding to the GUID provided in pGuidParam. Notifications are off by default.
[in, out] pBufferSize
Indicates the size of the buffer, in bytes. For input, this value is the size of the buffer allocated by the caller. For output, this value is the actual size of the buffer, in bytes, used by traffic control.
[out] Buffer
Pointer to a client-allocated buffer into which returned data will be written.
Return value
Note that, with regard to a requested notification state, only a return value of NO_ERROR will result in the application of the requested notification state. If a return value other than NO_ERROR is returned from a call to the TcQueryInterface function, the requested change in notification state will not be accepted.
Return code | Description |
---|---|
|
The function executed without errors. |
|
Invalid interface handle. |
|
Invalid or NULL parameter. |
|
The buffer is too small to store the results. |
|
Querying for the GUID provided is not supported on the provided interface. |
|
The device did not register for this GUID. |
|
The instance name was not found, likely because the interface is in the process of being closed. |
Remarks
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | traffic.h |
Library | Traffic.lib |
DLL | Traffic.dll |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for