// wdfrequest.h
VOID WdfRequestFormatRequestUsingCurrentType(
[in] WDFREQUEST Request
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF and UMDF]
The WdfRequestFormatRequestUsingCurrentType method formats a specified I/O request so that the driver can forward it, unmodified, to the driver's local I/O target.
Request
[in]A handle to a framework request object that the driver received from one of its I/O queues.
A bug check occurs if the driver supplies an invalid object handle.
When your driver receives an I/O request, sometimes you will want the driver to forward the request, unmodified, to its local I/O target. To forward such a request, the driver must:
For more information about WdfRequestFormatRequestUsingCurrentType, see Forwarding I/O Requests.
The following code example is an EvtIoDefault callback function that forwards every I/O request that it receives, without modification, to the device's local I/O target.
VOID
MyEvtIoDefault(
WDFQUEUE Queue,
WDFREQUEST Request
)
{
WDF_REQUEST_SEND_OPTIONS options;
NTSTATUS status;
WdfRequestFormatRequestUsingCurrentType(Request);
WDF_REQUEST_SEND_OPTIONS_INIT(
&options,
WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET
);
ret = WdfRequestSend (
Request,
WdfDeviceGetIoTarget(WdfIoQueueGetDevice(Queue)),
&options
);
if (!ret) {
status = WdfRequestGetStatus(Request);
WdfRequestComplete(
Request,
status
);
}
return;
}
WdfRequestWdmFormatUsingStackLocation