// wdfusb.h
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;
View the official Windows Driver Kit DDI referenceNo description available.
[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.
UsbdStatusThe USBD_STATUS-typed status value that the I/O target returned.
TypeA WDF_USB_REQUEST_TYPE-typed values that identifies the request type.
ParametersParameters.DeviceStringParameters.DeviceString.BufferIf the driver has called WdfUsbTargetDeviceFormatRequestForString, this member contains the driver-supplied handle to the memory object that receives the Unicode string.
Parameters.DeviceString.LangIDIf the driver has called WdfUsbTargetDeviceFormatRequestForString, this member contains the driver-supplied language identifier.
Parameters.DeviceString.StringIndexIf the driver has called WdfUsbTargetDeviceFormatRequestForString, this member contains the driver-supplied string index.
Parameters.DeviceString.RequiredSizeIf 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.DeviceControlTransferParameters.DeviceControlTransfer.BufferIf the driver has called WdfUsbTargetDeviceFormatRequestForControlTransfer, this member contains the driver-supplied handle to the memory object that receives input or output data.
Parameters.DeviceControlTransfer.SetupPacketIf the driver has called WdfUsbTargetDeviceFormatRequestForControlTransfer, this member contains the address of the WDF_USB_CONTROL_SETUP_PACKET structure that the driver supplied.
Parameters.DeviceControlTransfer.LengthIf 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.DeviceUrbParameters.DeviceUrb.BufferIf the driver has called WdfUsbTargetDeviceFormatRequestForUrb, this member contains the driver-supplied handle to the memory object that contains a URB structure.
Parameters.PipeWriteParameters.PipeWrite.BufferIf the driver has called WdfUsbTargetPipeFormatRequestForWrite, this member contains the driver-supplied handle to the memory object that was written to the pipe.
Parameters.PipeWrite.LengthIf 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.OffsetIf the driver has called WdfUsbTargetPipeFormatRequestForWrite, this member contains the driver-supplied buffer offset.
Parameters.PipeReadParameters.PipeRead.BufferIf 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.LengthIf 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.OffsetIf the driver has called WdfUsbTargetPipeFormatRequestForRead, this member contains the driver-supplied buffer offset.
Parameters.PipeUrbParameters.PipeUrb.BufferIf the driver has called WdfUsbTargetPipeFormatRequestForUrb, this member contains the driver-supplied handle to the memory object that contains a URB structure.
The WDF_USB_REQUEST_COMPLETION_PARAMS structure is a member of the WDF_REQUEST_COMPLETION_PARAMS structure.