Obtaining Information About an I/O Request
Before processing an I/O request, a driver must determine the request type. When a framework-based driver creates I/O queues for a device, it typically sets up the I/O queues and request handlers so that each queue or request handler receives requests of a particular type (read, write, or device I/O control).
After determining the request type, the driver must obtain the request's input and output buffers, if they are needed. For information about obtaining a request's buffers, see Accessing Data Buffers in Framework-Based Drivers.
To provide additional information about an I/O request that a driver has received, the framework request object defines the following methods:
WdfRequestGetIoQueue, which returns a handle to the I/O queue from which the I/O request was delivered.
WdfRequestGetRequestorMode, which returns the processor access mode (user or kernel) of the request's originator.
WdfRequestGetFileObject, which returns a handle to the framework file object that is associated with the request.
WdfRequestWdmGetIrp, which returns the WDM IRP structure that is associated with the request.
WdfRequestGetParameters, which retrieves non-IRP request parameters in WDM format.
After a driver completes an I/O request, other drivers in the driver stack can call additional request object methods to obtain request completion information. For more information about these additional methods, see Completing I/O Requests.