[Applies to UMDF 1.x only]
The OnRead method is called to handle a read request when an application reads information from a device through the Microsoft Win32 ReadFile or ReadFileEx function.
void OnRead( [in] IWDFIoQueue *pWdfQueue, [in] IWDFIoRequest *pWdfRequest, [in] SIZE_T NumOfBytesToRead );
- pWdfQueue [in]
A pointer to the IWDFIoQueue interface for the I/O queue object that the request arrives from.
- pWdfRequest [in]
A pointer to the IWDFIoRequest interface that represents the framework request object.
- NumOfBytesToRead [in]
The size, in bytes, of the read buffer for the request.
A driver can implement a single OnRead method for all I/O queues or separate OnRead methods for each I/O queue.
The OnRead method receives every read request type from the queue. (The read request type is identified by the WdfRequestRead value of the WDF_REQUEST_TYPE enumeration type for the request.) The OnRead method must process each received read request. For more information about how UMDF drivers process I/O requests, see Processing I/O Requests.