How can I determine the sector size in windows?

后端 未结 8 559
时光取名叫无心
时光取名叫无心 2020-12-22 23:01

How can I determine the Physical Sector Size (e.g. if i have an Advanced Format drive with 4,096 byte sectors rather than the legacy 512 byte sectors) in Wi

8条回答
  •  执念已碎
    2020-12-22 23:33

    If you really want to have it programmatically, you need to send IOCTL_STORAGE_QUERY_PROPERTY providing STORAGE_PROPERTY_QUERY with PropertyId set to StorageAccessAlignmentProperty. This gives both physical and logical sector sizes.

    Note: this only works on Windows Vista and higher.

提交回复
热议问题