USB_DEVICE_DESCRIPTOR (Structures)
Last changed: egray1@hot.rr.com-24.26.210.211

.
Summary
Used by DeviceIoControl and IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION to get the Device Descriptor of a device on a port on a USB Hub

C# Definition:

[StructLayout(LayoutKind.Sequential, Pack=1)]
struct USB_DEVICE_DESCRIPTOR
{
   public byte bLength;
   public byte bDescriptorType;
   public ushort bcdUSB;
   public byte bDeviceClass;
   public byte bDeviceSubClass;
   public byte bDeviceProtocol;
   public byte bMaxPacketSize0;
   public ushort idVendor;
   public ushort idProduct;
   public ushort bcdDevice;
   public byte iManufacturer;
   public byte iProduct;
   public byte iSerialNumber;
   public byte bNumConfigurations;
}

VB Definition:

Structure USB_DEVICE_DESCRIPTOR
   Public TODO
End Structure

User-Defined Field Types:

None.

Notes:

Is often used as a type inside a USB_NODE_CONNECTION_INFORMATION_EX structure, hence the need for the "Pack=1"

The values for iManufacturer, iProduct, and iSerialNumber are just indexs that are used by the USB_STRING_DESCRIPTOR request

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 ;

Documentation