_URB_CONTROL_DESCRIPTOR_REQUEST structure
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:
- URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE
- URB_FUNCTION_GET_DESCRIPTOR_FROM_ENDPOINT
- URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE
- URB_FUNCTION_SET_DESCRIPTOR_TO_DEVICE
- URB_FUNCTION_SET_DESCRIPTOR_TO_ENDPOINT
- URB_FUNCTION_SET_DESCRIPTOR_TO_INTERFACE
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:
- USB_DEVICE_DESCRIPTOR_TYPE
- USB_CONFIGURATION_DESCRIPTOR_TYPE
- USB_STRING_DESCRIPTOR_TYPE
- 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
Header |
|
---|
See also
- URB
- _URB_HEADER
- USB_CONFIGURATION_DESCRIPTOR
- USB_DEVICE_DESCRIPTOR
- USB_ENDPOINT_DESCRIPTOR
- USB_INTERFACE_DESCRIPTOR
- USB_STRING_DESCRIPTOR
- USB Structures
Send comments about this topic to Microsoft
Build date: 12/5/2013