Drive letters associated with Virtual Disks

Hi,

I'm writing a program that works with Virtual disks, at the moment using disks mounted from an image file using FTK 3.
I was using queryDosDevice to get all devices attached to the system and then from there figuring what drive letters were associated with the disk. However it doesn't seem possible to get those details for a virtual disk. I do have a physical drive number (//physicaldrivexx) for the disk, is there any way to get the drive letter from this?

Thanks in advance.
Bump! Still struggling.
Is not required for a mounted virtual disk to actually have a drive letter associated with it, it is only guaranteed to have a unique GUID in the system.
Fair enough, but in this case I know that the \\physicaldrive4 is my mounted drive and has 3 partitions f, g, and h, however I need to know this programmatically. I've tried both ways, trying to get a list of drive letters for a physical drive and trying to find the physical disk for a drive letter.
closed account (DSLq5Di1)
http://msdn.microsoft.com/en-us/library/windows/desktop/cc542456
sloppy - have used this previously, doesnt work with mounted disks i.e. virtual disks.
closed account (DSLq5Di1)
Mmm, that is unusual. I had no problems seeing the virtual drives of daemon tools.

I've downloaded FTK Imager 3.1, but when mounting anything I get the error messages "add drive failed" & "unable to mount file system". Grrr!

Give WMI a shot, fool around with some of the scripts provided here and see if you have any luck:-
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394592
What did you try to mount using FTK Imager, I'm currently using E01 files which are disk images. The WMI looks more promising, i'll have to have a crack with that.
Topic archived. No new replies allowed.