Physical disk size not correct (IoCtlDiskGetDriveGeometry)
问题 I use the code below to get the physical disk size , but the size returned is not correct. I've checked the size with other tools. The code below reports Total disk space: 8.249.955.840 bytes and it should be Total disk space: 8.254.390.272 bytes How can I retrieve the actual/correct physical disk size? Tested on USB drives and normal hard drives. The code is long, here separate it in parts to show. The structure: [StructLayout(LayoutKind.Sequential)] internal struct DiskGeometry { public