I need to programmatically determine out how many sectors, heads, and cylinders are on a physical disk from Windows XP. Does anyone know the API for determining this? Where might Windows expose this information?
I need to programmatically determine out how many sectors, heads, and cylinders are on
Share
Use DeviceIoControl with control code IOCTL_DISK_GET_DRIVE_GEOMETRY or IOCTL_DISK_GET_DRIVE_GEOMETRY_EX.
There’s sample code in MSDN to do this here.