Enumerating all available drive letters in Windows

前端 未结 7 2399
忘掉有多难
忘掉有多难 2020-11-29 09:15

I want to enumerate all available drive letters (which aren\'t already taken) in Windows using VC++.

How can I do this?

7条回答
  •  时光取名叫无心
    2020-11-29 10:00

    GetLogicalDriveStrings can get you just the list of currently used drive letters.

    GetVolumeInformation can be used to get more information about a specific drive.

提交回复
热议问题