Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
WDF defines several methods that a driver can use to create and format I/O requests. The following table summarizes these methods:
| KMDF method | Action |
|---|---|
WdfIoTargetFormatRequestForIoctl |
Similar to manually formatting the next I/O stack location. |
| Similar to IoBuildAsynchronousFsdRequest. | |
WdfIoTargetSendIoctlSynchronously |
Similar to IoBuildDeviceIoControlRequest, followed by IoCallDriver. |
| Similar to IoBuildSynchronousFsdRequest, followed by IoCallDriver. | |
| Similar to IoCancelIrp for a PIRP that was sent with IoCallDriver. The framework provides locks to ensure that the PIRP is not completed or freed between the calls to IoCallDriver and IoCancelIrp. | |
| WdfRequestCreate | Similar to IoAllocateIrp. Creates a new WDFREQUEST object, sets attributes, and returns handle to caller. |
| WdfRequestFormatRequestUsingCurrentType | Similar to IoForwardIrpSynchronously but does not call IoCallDriver; driver must call WdfRequestSend. |
| WdfRequestSend | Similar to IoForwardIrpSynchronously but does not call IoCallDriver; driver must call WdfRequestSend. |
To send a request to another device stack, a WDF driver uses a remote I/O target. For information about how to initialize a remote I/O target, see Initializing a General I/O Target.
To get the completion status for an asynchronous request or for any request that is sent by calling WdfRequestSend, the driver calls WdfRequestGetStatus. For a synchronous request, it can retrieve status immediately. For an asynchronous request, the driver’s I/O completion callback typically retrieves status. For more information about sending requests synchronously or asynchronously, see Sending I/O Requests to General I/O Targets.