Bewerken

Delen via


IoctlReqs rule (kmdf)

The IoctlReqs rule specifies that IOCTL requests must not be passed to inappropriate KMDF request or send device driver interfaces (DDIs).

All requests presented to the driver's EvtIoDeviceControl event callback function are guaranteed to be IOCTL requests. The driver's EvtIoDeviceControl function is declared using the EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL function role type declaration.

These IOCTL requests cannot be sent to the following DDIs that are specific to sending read, write, or IOCTL requests:

WdfUsbTargetPipeSendUrbSynchronously, WdfIoTargetSendReadSynchronously, WdfIoTargetSendWriteSynchronously, WdfIoTargetSendInternalIoctlSynchronously, WdfIoTargetSendInternalIoctlOthersSynchronously, WdfUsbTargetPipeWriteSynchronously, WdfUsbTargetPipeReadSynchronously

Driver model: KMDF

How to test

At compile time

Run Static Driver Verifier and specify the IoctlReqs 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

WdfIoTargetSendInternalIoctlOthersSynchronously WdfIoTargetSendInternalIoctlSynchronously WdfIoTargetSendReadSynchronously WdfIoTargetSendWriteSynchronously WdfUsbTargetPipeReadSynchronously WdfUsbTargetPipeSendUrbSynchronously WdfUsbTargetPipeWriteSynchronously