Bewerken

Delen via


_URB_CONTROL_DESCRIPTOR_REQUEST structure (usb.h)

The _URB_CONTROL_DESCRIPTOR_REQUEST structure is used by USB client drivers to get or set descriptors on a USB device.

Syntax

struct _URB_CONTROL_DESCRIPTOR_REQUEST {
  struct _URB_HEADER   Hdr;
  PVOID                Reserved;
  ULONG                Reserved0;
  ULONG                TransferBufferLength;
  PVOID                TransferBuffer;
  PMDL                 TransferBufferMDL;
  struct _URB          *UrbLink;
  struct _URB_HCD_AREA hca;
  USHORT               Reserved1;
  UCHAR                Index;
  UCHAR                DescriptorType;
  USHORT               LanguageId;
  USHORT               Reserved2;
};

Members

Hdr

Pointer to a _URB_HEADER structure that specifies the URB header information. Hdr.Function must be one of the following:

Hdr.Length must equal sizeof(_URB_CONTROL_DESCRIPTOR_REQUEST).

Reserved

Reserved. Do not use.

Reserved0

Reserved. Do not use.

TransferBufferLength

Specifies the length, in bytes, of the buffer specified in TransferBuffer or described in TransferBufferMDL. The host controller driver returns the number of bytes sent to or read from the pipe in this member.

TransferBuffer

Pointer to a resident buffer for the transfer or is NULL if an MDL is supplied in TransferBufferMDL.

TransferBufferMDL

Pointer to an MDL that describes a resident buffer or is NULL if a buffer is supplied in TransferBuffer. This MDL must be allocated from nonpaged pool.

UrbLink

Reserved. Do not use.

hca

Reserved. Do not use.

Reserved1

Reserved. Do not use.

Index

Specifies the device-defined index of the descriptor that is being retrieved or set.

DescriptorType

Indicates what type of descriptor is being retrieved or set. One of the following values must be specified:

usbspec.h constant Value USB Version
USB_DEVICE_DESCRIPTOR_TYPE 0x01 USB 1.1
USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02 USB 1.1
USB_STRING_DESCRIPTOR_TYPE 0x03 USB 1.1
USB_INTERFACE_DESCRIPTOR_TYPE 0x04 USB 1.1
USB_ENDPOINT_DESCRIPTOR_TYPE 0x05 USB 1.1
USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06 USB 2.0
USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE 0x07 USB 2.0
USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08 USB 2.0
USB_OTG_DESCRIPTOR_TYPE 0x09 USB 3.0
USB_DEBUG_DESCRIPTOR_TYPE 0x0a USB 3.0
USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0b USB 3.0
USB_BOS_DESCRIPTOR_TYPE 0x0f USB 3.0
USB_DEVICE_CAPABILITY_DESCRIPTOR_TYPE 0x10 USB 3.0
USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_TYPE 0x30 USB 3.0
USB_20_HUB_DESCRIPTOR_TYPE 0x29 USB 1.1
USB 2.0
USB_30_HUB_DESCRIPTOR_TYPE 0x2a USB 3.0
USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR_TYPE 0x31 USB 3.1

LanguageId

Specifies the language ID of the descriptor to be retrieved when USB_STRING_DESCRIPTOR_TYPE is set in DescriptorType. This member must be set to zero for any other value in DescriptorType.

Reserved2

Reserved. Do not use.

Remarks

Drivers can use the UsbBuildGetDescriptorRequest service routine to format this URB. If the caller passes a buffer too small to hold all of the data, the bus driver truncates the data to fit in the buffer without error.

When the caller requests the device descriptor, the bus driver returns a USB_DEVICE_DESCRIPTOR data structure.

When the caller requests a configuration descriptor, the bus driver returns the configuration descriptor in a USB_CONFIGURATION_DESCRIPTOR structure, followed by the interface and endpoint descriptors for that configuration. The driver can access the interface and endpoint descriptors as USB_INTERFACE_DESCRIPTOR and USB_ENDPOINT_DESCRIPTOR structures. The bus driver also returns any class-specific or device-specific descriptors. The system provides the USBD_ParseConfigurationDescriptorEx and USBD_ParseDescriptors service routines to find individual descriptors within the buffer.

When the caller requests a string descriptor, the bus driver returns a USB_STRING_DESCRIPTOR structure. The string itself is found in the variable-length bString member of the string descriptor.

The reserved members of this structure must be treated as opaque and are reserved for system use.

Requirements

Requirement Value
Header usb.h (include Usb.h)

See also

URB

USB Structures

USB_CONFIGURATION_DESCRIPTOR

USB_DEVICE_DESCRIPTOR

USB_ENDPOINT_DESCRIPTOR

USB_INTERFACE_DESCRIPTOR

USB_STRING_DESCRIPTOR

_URB_HEADER