0

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?

rng
  • 1
  • 1

1 Answers1

2

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).

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720