Re: How to enumerate USB Mass Storage devices?
- From: Robert Marquardt <robert_marquardt@xxxxxx>
- Date: Sun, 29 May 2005 12:23:16 +0200
Wan-Hi wrote:
I wonder how to close the bridge between the Device Installation functions and the Volume Management functions. When enumerating all devices that expose GUID_DEVINTERFACE_VOLUME the path value in each SP_DEVICE_INTERFACE_DETAIL_DATA begins with STORAGE instead of VOLUME. So I can't use the path value to retrieve the mount points of a specific volume. Why is that so? I can create a file with that value, but can't use it for querying mount points? I tried to go over the Removable Storage Manager by using GetVolumesFromDrive, but that didn't work either.
Feed the original DevicePath you got from SetupDiGetDeviceInterfaceDetail to GetVolumeNameForVolumeMountPoint.
The only thing to do it to add a trailing backslath to the DevicePath first.
If you want to match to drive letters then feed "A:\\" through "Z:\\" to GetVolumeNameForVolumeMountPoint and see if the result matches the above result.
The main drawback is that the Volume Mount Point API is XP only. .
- Follow-Ups:
- Re: How to enumerate USB Mass Storage devices?
- From: Wan-Hi
- Re: How to enumerate USB Mass Storage devices?
- From: Pavel A.
- Re: How to enumerate USB Mass Storage devices?
- References:
- How to enumerate USB Mass Storage devices?
- From: Wan-Hi
- Re: How to enumerate USB Mass Storage devices?
- From: Robert Marquardt
- Re: How to enumerate USB Mass Storage devices?
- From: Wan-Hi
- How to enumerate USB Mass Storage devices?
- Prev by Date: Re: How to enumerate USB Mass Storage devices?
- Next by Date: Re: Stupid
- Previous by thread: Re: How to enumerate USB Mass Storage devices?
- Next by thread: Re: How to enumerate USB Mass Storage devices?
- Index(es):
Relevant Pages
|