From: ryan01701 on
Using the UCView tool in the WinDDK, I can read the USB descriptors of
devices that are attached even if I do not have a driver installed for them
(show up in Device Manager with yellow exclamation mark).

What is the standard way of doing this programatically? I've only ever
gotten descriptors using calls into the driver (WinUSB or otherwise). Is it
accessible through SetupAPI somehow?

I am specifically interested in getting string descriptors, although I
assume if I can get the device descriptor, I'll be able to get any available
descriptors.

Thanks,

--
Ryan
From: Don Burn on
The sources of USBView are supplied with the WDK, you should have all you
need from these.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr




> -----Original Message-----
> From: ryan01701 [mailto:ryan01701(a)discussions.microsoft.com]
> Posted At: Tuesday, June 15, 2010 8:21 AM
> Posted To: microsoft.public.development.device.drivers
> Conversation: Reading USB descriptors w/o a driver installed?
> Subject: Reading USB descriptors w/o a driver installed?
>
> Using the UCView tool in the WinDDK, I can read the USB descriptors of
> devices
> that are attached even if I do not have a driver installed for them
> (show up
> in Device Manager with yellow exclamation mark).
>
> What is the standard way of doing this programatically? I've only ever
> gotten
> descriptors using calls into the driver (WinUSB or otherwise). Is it
> accessible through SetupAPI somehow?
>
> I am specifically interested in getting string descriptors, although I
> assume
> if I can get the device descriptor, I'll be able to get any available
> descriptors.
>
> Thanks,
>
> --
> Ryan
>
>
> __________ Information from ESET Smart Security, version of virus
> signature
> database 5197 (20100615) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>

From: Wilhelm Noeker on
ryan01701 wrote:

> Using the UCView tool in the WinDDK, I can read the USB descriptors of
> devices that are attached even if I do not have a driver installed for them
> (show up in Device Manager with yellow exclamation mark).
>
> What is the standard way of doing this programatically? I've only ever
> gotten descriptors using calls into the driver (WinUSB or otherwise). Is it
> accessible through SetupAPI somehow?

IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION is what you want. Sample
code is either UsbView (as Don Burn already pointed out), or this
console tool from Intel:
http://www.intel.com/intelpress/usb/examples/DUSBVC.PDF
From: ryan01701 on
"Wilhelm Noeker" wrote:
> IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION is what you want. Sample
> code is either UsbView (as Don Burn already pointed out), or this
> console tool from Intel:
> http://www.intel.com/intelpress/usb/examples/DUSBVC.PDF

This looks like it will work. I assume that I will have to walk the USB
device tree to find the hub to which the device is attached and its port
index in order to properly use this ioctl. That's what I see going on in the
USBView source code.

Thanks,

--
Ryan