IQueueCallbackIoCanceledOnQueue::OnIoCanceledOnQueue method (wudfddi.h)

[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]

A driver's OnIoCanceledOnQueue event callback function informs the driver that an I/O request was canceled while it was in an I/O queue.

Syntax

void OnIoCanceledOnQueue(
  [in] IWDFIoQueue   *pWdfQueue,
  [in] IWDFIoRequest *pWdfRequest
);

Parameters

[in] pWdfQueue

A pointer to the IWDFIoQueue interface for the I/O queue that the I/O request was in when it was canceled.

[in] pWdfRequest

A pointer to the IWDFIoRequest interface for the I/O request.

Return value

None

Remarks

A driver registers an I/O queue's IQueueCallbackIoCanceledOnQueue interface and OnIoCanceledOnQueue callback function when the driver calls the IWDFDevice::CreateIoQueue. For more information about how to register the interface, see IQueueCallbackIoCanceledOnQueue.

If a driver registers an OnIoCanceledOnQueue callback function for an I/O queue, the framework calls the callback function if a request handler receives an I/O request from an I/O queue, the driver calls IWDFIoRequest::ForwardToIoQueue or IWDFIoRequest2::Requeue to requeue the request to the I/O queue for which the OnIoCanceledOnQueue callback function is registered, and the associated I/O operation is subsequently canceled.

After the framework calls the OnIoCanceledOnQueue callback function, the driver owns the request object and, therefore, must cancel the request.

The framework does not call the driver's OnIoCanceledOnQueue callback function for I/O requests that the framework has never delivered to the driver.

The framework calls an OnIoCanceledOnQueue callback function as soon as it determines that an I/O request has been canceled, regardless of the dispatching method that the driver has set for the I/O queue. Therefore, the framework can call an OnIoCanceledOnQueue callback function for a request in a queue that uses sequential dispatching, even if the driver currently owns another request from the queue.

For more information about the OnIoCanceledOnQueue callback function, see Canceling I/O Requests.

Requirements

Requirement Value
End of support Unavailable in UMDF 2.0 and later.
Target Platform Desktop
Minimum UMDF version 1.9
Header wudfddi.h (include Wudfddi.h)

See also

IQueueCallbackIoCanceledOnQueue

IWDFDevice::CreateIoQueue

IWDFIoRequest::ForwardToIoQueue