[misc] introduce hImageOption and ComboBox_GetCurItemData() to simplify code

* Also add retry to ms-sys' write_sectors()
This commit is contained in:
Pete Batard 2020-07-17 21:51:15 +01:00
parent 09d2f2f0ab
commit 4617f91e3b
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
9 changed files with 60 additions and 60 deletions

View file

@ -48,7 +48,7 @@ int64_t write_sectors(HANDLE hDrive, uint64_t SectorSize,
}
LastWriteError = 0;
if(!WriteFile(hDrive, pBuf, Size, &Size, NULL))
if(!WriteFileWithRetry(hDrive, pBuf, Size, &Size, WRITE_RETRIES))
{
LastWriteError = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|GetLastError();
uprintf("write_sectors: Write error %s\n", WindowsErrorString());