Forum: Win32/Win64 API (native code)
by Remko,
25. Mär 2010
You should check for errors...
hVolume := FindFirstVolumeW(VolumeName, CharCount);
if hVolume = INVALID_HANDLE_VALUE then
...
As far as I recall GetDriveType should return the type for non mounted volumes as well, does my ChDrvLetter program show it? If so then GetDriveType works ;-)
Forum: Win32/Win64 API (native code)
by Remko,
25. Mär 2010
Use FindFirstVolume then step through all available volumes with FindNextVolume.
See also http://www.remkoweijnen.nl/blog/2008/12/10/converting-a-volume-name-to-a-device-name/ and http://www.remkoweijnen.nl/blog/2008/12/09/commandline-tool-to-change-drive-letter-assignment/