As we know we can convert from C: to \Device\HarddiskVolume1 by QueryDosDevice,
is there any way to convert from \Device\HarddiskVolume1 to C: ?
Thanks
Printable View
As we know we can convert from C: to \Device\HarddiskVolume1 by QueryDosDevice,
is there any way to convert from \Device\HarddiskVolume1 to C: ?
Thanks
No, not really. You'll have to write it yourself. Here's how:
1. Get all valid drives in the system with the GetLogicalDriveStrings() call;
2. Go through all of them and convert each using QueryDosDevice() and check if the result matches the beginning of your path. If it does, then you have your conversion.
Thanks for your replyQuote:
Originally Posted by dc_2000
That's what actully i did.
Hey DraculaW,
I saw this post and for the most part this is what I want to do. All I want to do is input the drive letter and get the physical device number. (i.e. input F and get back \Device\HardDisk2\...). Any chance you know how to do this in VB.NET. I can do this in VB6 but no way have I found out in VB.NET. Any help would be appreciated.
gmorris