QOSEnumerateFlows function (qos2.h)

The QOSEnumerateFlows function enumerates all existing flows.

Syntax

ExternC BOOL QOSEnumerateFlows(
  [in]      HANDLE QOSHandle,
  [in, out] PULONG Size,
  [out]     PVOID  Buffer
);

Parameters

[in] QOSHandle

Handle to the QOS subsystem returned by QOSCreateHandle.

[in, out] Size

Indicates the size of the Buffer parameter, in bytes.

On function return, if successful, this parameter will specify the number of bytes copied into Buffer.

If this call fails with ERROR_INSUFFICIENT_BUFFER, this parameter will indicate the minimum required Buffer size in order to successfully complete this operation.

[out] Buffer

Pointer to an array of QOS_FlowId flow identifiers. A QOS_FlowId is an unsigned 32-bit integer.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is 0. To get extended error information, call GetLastError. Some possible error codes follow.

Return code Description
ERROR_INVALID_HANDLE
The QOSHandle parameter is invalid.
ERROR_INSUFFICIENT_BUFFER
Buffer is too small. On output, Size will contain the minimum required buffer size. This function should then be called again with a buffer of the indicated size.
ERROR_INVALID_PARAMETER
The DestAddr parameter is invalid.
ERROR_NOT_ENOUGH_MEMORY
Indicates that a memory allocation failed.
ERROR_NO_SYSTEM_RESOURCES
There are insufficient resources to carry out the operation.
ERROR_IO_DEVICE
The request could not be performed because of an I/O device error.
ERROR_DEVICE_REINITIALIZATION_NEEDED
The indicated device requires reinitialization due to hardware errors. The application should clean up and call QOSCreateHandle again.

Remarks

Successfully calling this function requires administrative privileges

Calling the QOSEnumerateFlows function retrieves a list of QOS_FlowIds currently active on the QOS subsystem. These QOS_FlowIds could then be used to call the QOSQueryFlow function in order to gain more information on individual flows.

This function has call-twice semantics. First call to get the Buffer size, then call again (with an appropriately sized Buffer if the first call failed with ERROR_INSUFFICIENT_BUFFER) to retrieve the list of flows. The second call may fail again with ERROR_INSUFFICIENT_BUFFER if new flows ere added since the first call.

Flows from another process cannot be modified.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header qos2.h (include Qos2.h)
Library Qwave.lib
DLL Qwave.dll

See also

Quality Windows Audio/Video Experience (qWAVE)