IQueueCallbackDeviceIoControl::OnDeviceIoControl method

[Applies to UMDF 1.x only]

The OnDeviceIoControl method is called to handle a device I/O control request when an application performs a specific operation on a device through the Microsoft Win32 OnDeviceIoControl function.

Syntax


void  OnDeviceIoControl(
  [in]  IWDFIoQueue *pWdfQueue,
  [in]  IWDFIoRequest *pWdfRequest,
  [in]  ULONG ControlCode,
  [in]  SIZE_T InBufferSize,
  [in]  SIZE_T OutBufferSize
);

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.

ControlCode [in]

The driver-defined or system-defined I/O control code (IOCTL) that identifies the specific operation to be performed and that is associated with the request.

InBufferSize [in]

The size, in bytes, of the input buffer for the request.

OutBufferSize [in]

The size, in bytes, of the output buffer for the request.

Return value

None

Remarks

A driver registers the IQueueCallbackDeviceIoControl 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 OnDeviceIoControl method for all I/O queues or separate OnDeviceIoControl methods for each I/O queue.

The OnDeviceIoControl method receives every device I/O control request type from a queue. (The request type is identified by the WdfRequestDeviceIoControl value of the WDF_REQUEST_TYPE enumeration type for the request.)

For more information about the driver's methods that are associated with queues and that the framework calls, see I/O Queue Event Callback Functions. The OnDeviceIoControl method must process each received device I/O control request. For more information about how UMDF drivers process I/O requests, see Processing I/O Requests.

The driver can call the IWDFIoRequest::GetDeviceIoControlParameters, IWDFIoRequest::GetInputMemory, and IWDFIoRequest::GetOutputMemory methods to retrieve information about the request and the input and output buffers.

Requirements

Header

Wudfddi.h (include Wudfddi.h)

See also

IQueueCallbackDeviceIoControl
IWDFDevice::CreateIoQueue
IWDFIoQueue
IWDFIoRequest
WDF_REQUEST_TYPE

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft