[format] fixed corruption issue when MBR is garbage

* after a bb check, MBR could become garbage
* when that occurs, Windows might interpret a bad partition table and prevent MBR from being properly written
* force a complete zeroing of the whole MBR before partitioning to fix this
* also added error code for bb
This commit is contained in:
Pete Batard 2011-12-06 18:11:38 +00:00
parent 5c2242beaa
commit 480986b0ae
7 changed files with 39 additions and 7 deletions

View file

@ -742,7 +742,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
if (IsChecked(IDC_QUICKFORMAT)) {
SendMessage(hProgress, PBM_SETMARQUEE, FALSE, 0);
SetWindowLongPtr(hProgress, GWL_STYLE, ProgressStyle);
// This is the only way to achieve instantenous progress transition
// This is the only way to achieve instantanenous progress transition
SendMessage(hProgress, PBM_SETRANGE, 0, 101<<16);
SendMessage(hProgress, PBM_SETPOS, 101, 0);
SendMessage(hProgress, PBM_SETRANGE, 0, 100<<16);