Windows 7 How to get drive letter of USB device on Win7

at2009

New Member
Joined
Sep 2, 2009
Using WMDM I have created a small application to read portable device information, my application works fine on vista and XP but has one problem on Win7.

Problem: I am not able to get drive letter of USB device.

I am calling GetName of IWMDMDevice interface, on XP & VISTA this API returns device name which has a drive letter e.g.
XP: "Removable Disk ( E: ) "
Vista: "Removable Disk ( E: )"
Win7: "Kingston"
Can some one help me how to get drive letter of USB device on Win7. Thanks in advance.
If am asking this question in wrong forum then pls do suggest me where should I post my query.
 
You'll probably need to use 'computer management' and the storage snap-in..
This link will tell you how: Link Removed - Invalid URL
 
My requirement is to get drive letter using WMDM or WPD, using GetLogicalDriveStrings and GetVolumeInformation I can get drive letter but problem is, my application uses WMDM interfaces to scan devices and read their attribute. If I use these API then in case of multiple device of same type(brand) there is no way I can map correct device to corresponding drive letter.
 
Back
Top Bottom