【问题标题】:Programmatic way to find the Windows OS volume?以编程方式查找 Windows 操作系统卷?
【发布时间】:2011-06-29 11:12:43
【问题描述】:

我了解不建议假定驱动器号 C: 是为操作系统卷保留的。那么有没有一种直接的方法来回答这个问题 - Windows 操作系统驻留在什么卷上?卷可以是驱动器号或卷 GUID 或任何其他标识卷的方式。请注意,我正在寻找与系统分区不同的操作系统分区。

【问题讨论】:

    标签: c++ c windows


    【解决方案1】:

    GetWindowsDirectory() 然后将路径与_splitpath 分开。

    编辑:将 GetSystemDirectory 更改为 GetWindowsDirectory。实际结果应该是一样的。

    【讨论】:

      猜你喜欢
      • 2016-10-08
      • 2013-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-19
      • 1970-01-01
      • 1970-01-01
      • 2010-09-18
      相关资源
      最近更新 更多