Enumerating all available drive letters in Windows

前端 未结 7 2358
忘掉有多难
忘掉有多难 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:15

    GetLogicalDrives and GetLogicalDriveStrings are not seeing network drives created in a different namespace.

    For example calling the functions from a service running under Local System will not see the network drives created by a logged user.

    This is happening starting with Windows XP. The following article describes this case: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363908(v=vs.85).aspx

    0 讨论(0)
提交回复
热议问题