retrieve vendor id from a removable drive letter

D

dannisaurus

Hello,
I'm trying to read the vendor id from a usb key (Windows XP and
Windows Vista).
So far I've been able to fine the vendor id of each attached device by
iterating through each usb node on the system, by using a combination
of IOCTL_USB_GET_NODE_INFORMATION and
IOCTL_USB_GET_NODE_CONNECTION_INFORMATION and passing it a handle to
the hub I am interested in.

My problem is I need to trace back this usb node to a drive letter, if
it has one. I understand devices like the mouse and keyboard won't
have a drive letter but my usb key will, so I'm not sure if this is
possible or not.

I am writing a function that takes in a drive letter and returns the
vendor id of that drive. If anyone can give me any pointers or
confirm I am on the right track or otherwise, that would be great.

Thank you,
Daniel
 
J

Jim Langston

Hello,
I'm trying to read the vendor id from a usb key (Windows XP and
Windows Vista).
....

My problem is I need to trace back this usb node to a drive letter, if
it has one. ...

No, your problem is you are asking this question in a newsgroup that only
deals with C++ as it pertains to the current standard. Windows specific (or
linux, macintosh, AS/400 etc..) code doesn't belong here but should be asked
in a newsgroup dealing with C or C++ and that OS. Try microsoft.public.*
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top