Open sspring opened 2 years ago
thanks for this contribution @sspring ! could you please add a unit test to ensure this code doesn't regress? None of the active main contributors is a windows user, so this is especially important, as we rely on CI for correctness.
wmi report inaccurate disk size, refer : https://stackoverflow.com/questions/9901792/wmi-win32-diskdrive-to-get-total-sector-on-the-physical-disk-drive
replace Win32_DiskDrive with DeviceIOControl.