The WdfIoQueueRetrieveRequestByFileObject method retrieves the next available I/O request, from a specified I/O queue, that is associated with a specified file object.
NTSTATUS WdfIoQueueRetrieveRequestByFileObject( [in] WDFQUEUE Queue, [in] WDFFILEOBJECT FileObject, [out] WDFREQUEST *OutRequest );
- Queue [in]
A handle to a framework queue object.
- FileObject [in]
A handle to a framework file object.
- OutRequest [out]
A pointer to a location that receives a handle to a framework request object. If WdfIoQueueRetrieveRequestByFileObject does not return STATUS_SUCCESS, it does not set the location's value.
WdfIoQueueRetrieveRequestByFileObject returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method might return one of the following values:
The driver supplied an invalid handle.
The framework reached the end of the I/O queue.
The specified I/O queue is configured for the parallel dispatching method.
The specified I/O queue is power-managed and its device is in a low-power state.
This method also might return other NTSTATUS values.
A bug check occurs if the driver supplies an invalid object handle.
A driver that has configured an I/O queue for manual or sequential dispatching might call WdfIoQueueRetrieveRequestByFileObject. For more information about using WdfIoQueueRetrieveRequestByFileObject with the manual or sequential dispatching methods, see Dispatching Methods for I/O Requests.
For more information about the WdfIoQueueRetrieveRequestByFileObject method, see Managing I/O Queues.
The following code example obtains, from a specified I/O queue, a handle to the next framework request object that is associated with a specified framework file object.
WDFREQUEST request; status = WdfIoQueueRetrieveRequestByFileObject( queue, fileObject, &request );
|Available in version 1.0 and later versions of KMDF.|
|Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)|