WDF_USB_REQUEST_COMPLETION_PARAMS structure (wdfusb.h)
[Applies to KMDF and UMDF]
The WDF_USB_REQUEST_COMPLETION_PARAMS structure contains parameters that are associated with the completion of an I/O request for a USB device.
Syntax
typedef struct _WDF_USB_REQUEST_COMPLETION_PARAMS {
USBD_STATUS UsbdStatus;
WDF_USB_REQUEST_TYPE Type;
union {
struct {
WDFMEMORY Buffer;
USHORT LangID;
UCHAR StringIndex;
UCHAR RequiredSize;
} DeviceString;
struct {
WDFMEMORY Buffer;
WDF_USB_CONTROL_SETUP_PACKET SetupPacket;
ULONG Length;
} DeviceControlTransfer;
struct {
WDFMEMORY Buffer;
} DeviceUrb;
struct {
WDFMEMORY Buffer;
size_t Length;
size_t Offset;
} PipeWrite;
struct {
WDFMEMORY Buffer;
size_t Length;
size_t Offset;
} PipeRead;
struct {
WDFMEMORY Buffer;
} PipeUrb;
} Parameters;
} WDF_USB_REQUEST_COMPLETION_PARAMS, *PWDF_USB_REQUEST_COMPLETION_PARAMS;
Members
UsbdStatus
The USBD_STATUS-typed status value that the I/O target returned.
Type
A WDF_USB_REQUEST_TYPE-typed values that identifies the request type.
Parameters
Parameters.DeviceString
Parameters.DeviceString.Buffer
If the driver has called WdfUsbTargetDeviceFormatRequestForString, this member contains the driver-supplied handle to the memory object that receives the Unicode string.
Parameters.DeviceString.LangID
If the driver has called WdfUsbTargetDeviceFormatRequestForString, this member contains the driver-supplied language identifier.
Parameters.DeviceString.StringIndex
If the driver has called WdfUsbTargetDeviceFormatRequestForString, this member contains the driver-supplied string index.
Parameters.DeviceString.RequiredSize
If the driver has called any method that obtains a device's Unicode strings (except WdfUsbTargetDeviceFormatRequestForUrb), this member contains the required size of the buffer that Parameters.DeviceString.Buffer specifies.
If the driver called WdfUsbTargetDeviceFormatRequestForUrb, it can obtain the required size value from the URB whose handle is in Parameters.DeviceUrb.Buffer.
Parameters.DeviceControlTransfer
Parameters.DeviceControlTransfer.Buffer
If the driver has called WdfUsbTargetDeviceFormatRequestForControlTransfer, this member contains the driver-supplied handle to the memory object that receives input or output data.
Parameters.DeviceControlTransfer.SetupPacket
If the driver has called WdfUsbTargetDeviceFormatRequestForControlTransfer, this member contains the address of the WDF_USB_CONTROL_SETUP_PACKET structure that the driver supplied.
Parameters.DeviceControlTransfer.Length
If the driver has called any method that sends a control transfer (except WdfUsbTargetDeviceFormatRequestForUrb), this member contains the number of bytes that were sent or received.
If the driver called WdfUsbTargetDeviceFormatRequestForUrb, it can obtain the length value from the URB whose handle is in Parameters.DeviceUrb.Buffer.
Parameters.DeviceUrb
Parameters.DeviceUrb.Buffer
If the driver has called WdfUsbTargetDeviceFormatRequestForUrb, this member contains the driver-supplied handle to the memory object that contains a URB structure.
Parameters.PipeWrite
Parameters.PipeWrite.Buffer
If the driver has called WdfUsbTargetPipeFormatRequestForWrite, this member contains the driver-supplied handle to the memory object that was written to the pipe.
Parameters.PipeWrite.Length
If the driver has called any method that writes to a pipe (except WdfUsbTargetDeviceFormatRequestForUrb), this member contains the number of bytes that were sent.
If the driver called WdfUsbTargetDeviceFormatRequestForUrb, it can obtain the length value from the URB whose handle is in Parameters.PipeUrb.Buffer.
Parameters.PipeWrite.Offset
If the driver has called WdfUsbTargetPipeFormatRequestForWrite, this member contains the driver-supplied buffer offset.
Parameters.PipeRead
Parameters.PipeRead.Buffer
If the driver has called WdfUsbTargetPipeFormatRequestForRead, this member contains the driver-supplied handle to the memory object that contains data that was read from the pipe.
Parameters.PipeRead.Length
If the driver has called any method that reads from a pipe sends a control transfer (except WdfUsbTargetDeviceFormatRequestForUrb), this member contains the number of bytes that were received.
If the driver called WdfUsbTargetDeviceFormatRequestForUrb, it can obtain the length value from the URB whose handle is in Parameters.PipeUrb.Buffer.
Parameters.PipeRead.Offset
If the driver has called WdfUsbTargetPipeFormatRequestForRead, this member contains the driver-supplied buffer offset.
Parameters.PipeUrb
Parameters.PipeUrb.Buffer
If the driver has called WdfUsbTargetPipeFormatRequestForUrb, this member contains the driver-supplied handle to the memory object that contains a URB structure.
Remarks
The WDF_USB_REQUEST_COMPLETION_PARAMS structure is a member of the WDF_REQUEST_COMPLETION_PARAMS structure.
Requirements
Requirement | Value |
---|---|
Minimum KMDF version | 1.0 |
Minimum UMDF version | 2.0 |
Header | wdfusb.h (include Wdfusb.h) |