0

我必须得到一个逻辑驱动器列表。我知道我可以使用 GetLogicalDriveStrings 但我想知道是否可以使用 NT API 替代方案?甚至是SetupAPI?

4

1 回答 1

2

如果您想正确处理不一定分配字母的逻辑驱动器,您可以使用FindFirstVolume/FindNextVolumeGetVolumePathNamesForVolumeNameW.

MSDN 有一个名为Displaying Volume Paths的示例

如果尝试从内核模式访问此信息,请尝试 Mount Point Manager ( \Device\MountPointManager)。

于 2016-03-17T22:01:47.577 回答