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

WdfRequestIsCanceled 方法

The WdfRequestIsCanceled method determines whether the I/O manager has attempted to cancel a specified I/O request.

语法

BOOLEAN WdfRequestIsCanceled(
  [in]  WDFREQUEST Request
);

参数

Request [in]

A handle to a framework request object.

返回值

WdfRequestIsCanceled returns TRUE if the I/O manager has attempted to cancel the specified I/O request. This method returns FALSE for one of the following reasons:

A bug check occurs if the driver supplies an invalid object handle.

评论

If your driver has not called WdfRequestMarkCancelable or WdfRequestMarkCancelableEx to register an EvtRequestCancel callback function, but if you want your driver to determine if the I/O manager has attempted to cancel an I/O request, the driver can call WdfRequestIsCanceled.

A driver can call WdfRequestIsCanceled for a request only if the driver owns the I/O request. If the driver has called WdfRequestMarkCancelable or WdfRequestMarkCancelableEx , it must call WdfRequestUnmarkCancelable before calling WdfRequestIsCanceled.

If WdfRequestIsCanceled returns TRUE, your driver should cancel the request by calling WdfRequestComplete with a Status parameter of STATUS_CANCELLED.

For more information about WdfRequestIsCanceled, see Canceling I/O Requests

示例

The following code example calls WdfRequestComplete if WdfRequestIsCanceled returns TRUE.

if (WdfRequestIsCanceled(request)) {
    WdfRequestComplete(
                       request,
                       STATUS_CANCELLED
                       );
}

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfrequest.h (包括Wdf.h)

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

<=DISPATCH_LEVEL

另请参见

WdfRequestComplete
WdfRequestMarkCancelable
WdfRequestMarkCancelableEx
WdfRequestUnmarkCancelable
EvtRequestCancel

 

 

社区附加资源

添加
显示:
© 2015 Microsoft