EvtIoCanceledOnQueue

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

構文

EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE EvtIoCanceledOnQueue;

VOID EvtIoCanceledOnQueue(
  __in  WDFQUEUE Queue,
  __in  WDFREQUEST Request
)
{ ... }

パラメーター

Queue [in]

A handle to an I/O queue object.

Request [in]

A handle to a request object.

戻り値

None

解説

A driver registers an EvtIoCanceledOnQueue callback function when it calls the WdfIoQueueCreate method. For more information about calling WdfIoQueueCreate, see Creating I/O Queues.

If a driver registers an EvtIoCanceledOnQueue callback function for an I/O queue, the framework calls the callback function in the following situations:

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

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

The framework calls an EvtIoCanceledOnQueue 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 EvtIoCanceledOnQueue callback function for:

  • A request in a queue that uses sequential dispatching, even if the driver currently owns another request from the queue.

  • A request in a queue for which the driver has set NumberOfPresentedRequests, even if the driver currently owns the maximum number of requests.

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

The EvtIoCanceledOnQueue callback function can be called at IRQL <= DISPATCH_LEVEL, unless the ExecutionLevel member of the device or driver's WDF_OBJECT_ATTRIBUTES structure is set to WdfExecutionLevelPassive.

If the IRQL is PASSIVE_LEVEL, the framework calls the callback function within a critical region.

The function type is declared in Wdfio.h, as follows.

typedef VOID
  (EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE) (
    IN WDFQUEUE  Queue,
    IN WDFREQUEST  Request
    );

To define an EvtIoCanceledOnQueue callback function that is named MyIoCanceledOnQueue, you must first provide a function declaration that SDV and other verification tools require, as follows:

EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE  MyIoCanceledOnQueue;

Then, implement your callback function as follows:

VOID
 MyIoCanceledOnQueue (
    IN WDFQUEUE  Queue,
    IN WDFREQUEST  Request
    )
  {...}

要件

バージョン

Supported by version 1.0 and later versions of KMDF.

ヘッダー

Wdfio.h (includeWdf.h)

IRQL

<= DISPATCH_LEVEL (see Remarks section)

参照

WdfIoQueueCreate
WdfRequestForwardToIoQueue

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft