View Full Version : Mount a device


MB
02-02-2006, 11:09 PM
Hi,

Scenario:
when a user inserts a device, windows does not assign a drive
letter(this is
intentional,since I want my application to prompt the user to assign
the
drive letter of their choice)

I am trying to assign a drive letter when a device is inserted.
I am aware that I need to use SetVolumeMountPoint() API to set the
drive
letter.But this API requires \\?\\Volume{GUID},which I am not able to
get by
any possible way.
I am using the setupdi* API's.
The information I have with me is the Device Path.
How can I use it in GetVolumeNameForVolumeMountPoint() API.
I have found some help which suggest using the
interfaceDetailData->DevicePath in GetVolumeNameForVolumeMountPoint()
to get
the \\?\Volume{GUID}.But it does'nt seem to work.
can anyone please suggest me on how to do this?
Is there any way I can

Thanks MB.