Reputation: 1
I have to get a list of logical drives. I know I can use GetLogicalDriveStrings but I'm wondering if there's a NT API alternative I can use? Or even SetupAPI?
Upvotes: 0
Views: 217
Reputation: 283773
If you want to correctly handle logical drives that aren't necessarily assigned letters, you'd use FindFirstVolume
/FindNextVolume
and GetVolumePathNamesForVolumeNameW
.
MSDN has a sample named Displaying Volume Paths
If trying to access this information from kernel mode, try the Mount Point Manager (\Device\MountPointManager
).
Upvotes: 2