[Applies to UMDF 1.x only]
The OnWrite method is called to handle a write request when an application writes information to a device through the Microsoft Win32 WriteFile or WriteFileEx function.
void OnWrite( [in] IWDFIoQueue *pWdfQueue, [in] IWDFIoRequest *pWdfRequest, [in] SIZE_T NumOfBytesToWrite );
- 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.
- NumOfBytesToWrite [in]
The size, in bytes, of the write buffer for the request.
A driver can implement a single OnWrite method for all I/O queues or separate OnWrite methods for each I/O queue.
The OnWrite method receives every write request type from the queue. (The write request type is identified by the WdfRequestWrite value of the WDF_REQUEST_TYPE enumeration type for the request.) The OnWrite method must process each received write request. For more information about how UMDF drivers process I/O requests, see Processing I/O Requests.