ReqNotCanceledLocal rule (kmdf)

The ReqNotCanceledLocal rule specifies that if a request marked as cancelable is completed in a default I/O queue callback function, the WdfRequestUnmarkCancelable method must be called on the I/O request before completion. The I/O request must be completed, unless the request is canceled before it calls WdfRequestUnmarkCancelable.

If a request that was marked as cancelable by WdfRequestMarkCancelable is completed (by calling WdfRequestComplete, WdfRequestCompleteWithInformation, or WdfRequestCompleteWithPriorityBoost), the WdfRequestUnmarkCancelable method must be called before the I/O request is completed. The request can be completed unless the WdfRequestUnmarkCancelable method returns status that is equal to STATUS_CANCELLED.

The default I/O queue callback functions for a request are EvtIoDefault, EvtIoRead, EvtIoWrite, EvtIoDeviceControl, EvtIoInternalDeviceControl.

Driver modelKMDF

How to test

At compile time

Run Static Driver Verifier and specify the ReqNotCanceledLocal rule.

Use the following steps to run an analysis of your code:
  1. Prepare your code (use role type declarations).
  2. Run Static Driver Verifier.
  3. View and analyze the results.

For more information, see Using Static Driver Verifier to Find Defects in Drivers.

Applies to




Send comments about this topic to Microsoft