Device-defined index of the descriptor for a USB scanner

Discussion in 'Windows Vista Drivers' started by Dcls, Jul 3, 2007.

  1. Dcls

    Dcls Guest


    I am writing a user-mode driver for a USB scanner, adapted from the wiascanr

    I want to use the IO Control code IOCTL_GET_USB_DESCRIPTOR.

    In DeviceIoControl parameters, I need lpInBuffer, which is a pointer to the

    typedef struct _USBSCAN_GET_DESCRIPTOR {
    IN UCHAR DescriptorType;
    IN UCHAR Index;
    IN USHORT LanguageId;

    In this structure, Index "specifies the device-defined index of the
    descriptor that is to be retrieved."

    Where can I find this value?

    Thank you!
    Dcls, Jul 3, 2007
    1. Advertisements

  2. Dcls

    Dcls Guest

    After some research, I think we can only use for DescriptorType:


    In order to read USB_INTERFACE_DESCRIPTOR for instance, we have to read
    USB_CONFIGURATION_DESCRIPTOR (2 times, the first is to know the total length)
    and the following bytes...
    Dcls, Jul 4, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.