// usbspec.h
typedef struct _USB_DEVICE_DESCRIPTOR {
UCHAR bLength;
UCHAR bDescriptorType;
USHORT bcdUSB;
UCHAR bDeviceClass;
UCHAR bDeviceSubClass;
UCHAR bDeviceProtocol;
UCHAR bMaxPacketSize0;
USHORT idVendor;
USHORT idProduct;
USHORT bcdDevice;
UCHAR iManufacturer;
UCHAR iProduct;
UCHAR iSerialNumber;
UCHAR bNumConfigurations;
} USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR;
View the official Windows Driver Kit DDI referenceNo description available.
The USB_DEVICE_DESCRIPTOR structure is used by USB client drivers to retrieve a USB-defined device descriptor. The members of this structure are described in the Universal Serial Bus 3.1 Specification available at USB Document Library. See section 9.6.1.
bLengthSpecifies the length, in bytes, of this descriptor.
bDescriptorTypeSpecifies the descriptor type. Must be set to USB_DEVICE_DESCRIPTOR_TYPE.
bcdUSBIdentifies the version of the USB specification that this descriptor structure complies with. This value is a binary-coded decimal number.
bDeviceClassSpecifies the class code of the device as assigned by the USB specification group.
bDeviceSubClassSpecifies the subclass code of the device as assigned by the USB specification group.
bDeviceProtocolSpecifies the protocol code of the device as assigned by the USB specification group.
bMaxPacketSize0Specifies the maximum packet size, in bytes, for endpoint zero of the device. The value must be set to 8, 16, 32, or 64.
idVendorSpecifies the vendor identifier for the device as assigned by the USB specification committee.
idProductSpecifies the product identifier. This value is assigned by the manufacturer and is device-specific.
bcdDeviceIdentifies the version of the device. This value is a binary-coded decimal number.
iManufacturerSpecifies a device-defined index of the string descriptor that provides a string containing the name of the manufacturer of this device.
iProductSpecifies a device-defined index of the string descriptor that provides a string that contains a description of the device.
iSerialNumberSpecifies a device-defined index of the string descriptor that provides a string that contains a manufacturer-determined serial number for the device.
bNumConfigurationsSpecifies the total number of possible configurations for the device.
This structure is used to hold a retrieved USB-defined device descriptor. This information can then be used to further configure or retrieve information about the device. Device descriptors are retrieved by submitting a get-descriptor URB.
The iManufacturer, iProduct, and iSerialNumber values, when returned from the host controller driver, contain index values into an array of string descriptors maintained by the device. To retrieve these strings, a string descriptor request can be sent to the device using these index values.
_URB_CONTROL_DESCRIPTOR_REQUEST