IQueueCallbackWrite::OnWrite method

[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.

Syntax


void  OnWrite(
  [in]  IWDFIoQueue   *pWdfQueue,
  [in]  IWDFIoRequest *pWdfRequest,
  [in]  SIZE_T        NumOfBytesToWrite
);

Parameters

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.

Return value

None

Remarks

A driver registers the IQueueCallbackWrite interface when the driver calls the IWDFDevice::CreateIoQueue method to create an I/O queue or to configure the default I/O queue.

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.

The driver can call the IWDFIoRequest::GetWriteParameters and IWDFIoRequest::GetInputMemory methods to retrieve information about the request and the write buffer.

Requirements

Header

Wudfddi.h (include Wudfddi.h)

See also

IQueueCallbackWrite
IWDFDevice::CreateIoQueue
IWDFIoQueue
IWDFIoRequest
WDF_REQUEST_TYPE

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft