[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;
}
Structure USB_DEVICE_DESCRIPTOR
Public TODO
End Structure
None.
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 ;