WDF_USB_REQUEST_COMPLETION_PARAMS structure

[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
DeviceString
Buffer

If the driver has called WdfUsbTargetDeviceFormatRequestForString, this member contains the driver-supplied handle to the memory object that receives the Unicode string.

LangID

If the driver has called WdfUsbTargetDeviceFormatRequestForString, this member contains the driver-supplied language identifier.

StringIndex

If the driver has called WdfUsbTargetDeviceFormatRequestForString, this member contains the driver-supplied string index.

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.

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.

SetupPacket

If the driver has called WdfUsbTargetDeviceFormatRequestForControlTransfer, this member contains the address of the WDF_USB_CONTROL_SETUP_PACKET structure that the driver supplied.

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.

DeviceUrb
Buffer

If the driver has called WdfUsbTargetDeviceFormatRequestForUrb, this member contains the driver-supplied handle to the memory object that contains a URB structure.

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.

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.

Offset

If the driver has called WdfUsbTargetPipeFormatRequestForWrite, this member contains the driver-supplied buffer offset.

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.

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.

Offset

If the driver has called WdfUsbTargetPipeFormatRequestForRead, this member contains the driver-supplied buffer offset.

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

Minimum KMDF version

1.0

Minimum UMDF version

2.0

Header

Wdfusb.h (include Wdfusb.h)

See also

CompletionRoutine
WDF_REQUEST_COMPLETION_PARAMS
WdfRequestGetCompletionParams

 

 

Send comments about this topic to Microsoft

Show: