EvtRequestImpersonate
WdfRequestGetEffectiveIoType method
WdfRequestGetRequestorProcessId method
WdfRequestGetUserModeInitiatedIo method
WdfRequestImpersonate method
WdfRequestIsFromUserModeDriver method
WdfRequestRetrieveActivityId method
WdfRequestSetActivityId method
WdfRequestSetUserModeDriverInitiatedIo method
展开 最小化

EvtRequestCancel

A driver's EvtRequestCancel event callback function handles operations that must be performed when an I/O request is canceled.

语法

EVT_WDF_REQUEST_CANCEL EvtRequestCancel;

VOID EvtRequestCancel(
  __in  WDFREQUEST Request
)
{ ... }

参数

Request [in]

A handle to a framework request object that represents the I/O request that is being canceled.

返回值

None

评论

To register an EvtRequestCancel callback function, the driver must call WdfRequestMarkCancelable or WdfRequestMarkCancelableEx.

Typically, a driver's EvtRequestCancel callback function cancels the specified I/O request by calling WdfRequestComplete with a completion status value of STATUS_CANCELLED.

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

示例

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

typedef VOID
  (EVT_WDF_REQUEST_CANCEL) (
    IN WDFREQUEST  Request
    );

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

EVT_WDF_REQUEST_CANCEL  MyRequestCancel;

Then, implement your callback function as follows:

VOID
 MyRequestCancel (
    IN WDFREQUEST  Request
    )
  {...}

要求

版本

Supported by version 1.0 and later versions of KMDF.

标头

Wdfrequest.h (包括Wdf.h)

IRQL

<=DISPATCH_LEVEL

另请参见

WdfRequestComplete
WdfRequestMarkCancelable
WdfRequestMarkCancelableEx

 

 

社区附加资源

添加
显示:
© 2015 Microsoft