我需要检索硬盘的物理扇区大小以确定硬盘是否为 Windows XP 中的高级格式。
我尝试使用 STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR
, 但它与 Windows XP 不兼容。我使用的任何方法都会返回 512 而不是 4096,其中包括 WMI,其中返回的唯一值是 512。
我一直在用 C++ 编写代码,如果有人能指出一种可以帮助我找到实际物理扇区大小的方法,我将不胜感激。
最佳答案
根据微软的 MSDN article :
Windows XP, Windows Server 2003, and Windows Server 2003 R2 do not support 512e or 4Kn media. While the system may boot up and be able to operate minimally, there may be unknown scenarios of functionality issues, data loss, or sub-optimal performance. Thus, Microsoft strongly cautions against using 512e media with Windows XP or other products based on the Windows XP codebase (such as Windows Home Server 1.0, Windows Server 2003, Windows Server 2003 R2, Windows XP 64-bit Edition, Windows XP Embedded, Windows Small Business Server 2003, and Windows Small Business Server 2003 R2).
在 Windows XP 下,您将无法获得真实的物理扇区大小,因为操作系统本身假定它为 512 字节。
关于c++ - Windows XP 上高级格式硬盘的物理扇区大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11300978/