QOSCancel function (qos2.h)

The QOSCancel function cancels a pending overlapped operation, like QOSSetFlow.

Syntax

ExternC BOOL QOSCancel(
  [in] HANDLE       QOSHandle,
  [in] LPOVERLAPPED Overlapped
);

Parameters

[in] QOSHandle

Handle to the QOS subsystem returned by QOSCreateHandle.

[in] Overlapped

Pointer to the OVERLAPPED structure used in the operation to be canceled.

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_INVALID_PARAMETER
The Overlapped parameter is invalid.
ERROR_NOT_ENOUGH_MEMORY
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.
ERROR_ADAP_HDW_ERR
A network adapter hardware error occurred.

Remarks

This function would never be called with a NULLOverlapped parameter.

Successfully canceled operations complete normal completion mechanisms and return ERROR_OPERATION_ABORTED as their completion return code.

Closing a handle with the QOSCloseHandle will automatically abort all pending operations issued with that handle. If the handle is closed while a QOSCancel is still in progress, the call will complete with ERROR_OPERATION_ABORTED as the return code.

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)