* closes #22 (missing CloseHandle for FreeDOS' AUTOEXEC.BAT)
* split rufus and rufus_fd solution files (VS2010)
* error messages small improvements
* since we're on Windows, use .txt extension for README and TODO
This commit is contained in:
Pete Batard 2011-12-16 23:24:16 +00:00
parent 80f12bce4d
commit 5722300063
12 changed files with 50 additions and 30 deletions

View file

@ -122,7 +122,7 @@ HANDLE GetDriveHandle(DWORD DriveIndex, char* DriveLetter, BOOL bWriteAccess, BO
}
if ((bLockDrive) && (!DeviceIoControl(hDrive, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, &size, NULL))) {
uprintf("Could not get exclusive access to %s: %s\n", logical_drive, WindowsErrorString());
uprintf("Could not get exclusive access to %s %s\n", logical_drive, WindowsErrorString());
safe_closehandle(hDrive);
goto out;
}

View file

@ -409,6 +409,7 @@ BOOL ExtractFreeDOS(const char* path)
if (hFile == INVALID_HANDLE_VALUE) {
uprintf("Unable to create 'AUTOEXEC.BAT': %s.\n", WindowsErrorString());
}
safe_closehandle(hFile);
return TRUE;
}

View file

@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 278
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.0.3.99"
CAPTION "Rufus v1.0.4.100"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,236,50,14
@ -65,7 +65,7 @@ BEGIN
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL,
"SysLink",WS_TABSTOP,46,47,114,9
LTEXT "Version 1.0.3 (Build 99)",IDC_STATIC,46,19,78,8
LTEXT "Version 1.0.4 (Build 100)",IDC_STATIC,46,19,78,8
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP
EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL
LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
@ -170,8 +170,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,99
PRODUCTVERSION 1,0,3,99
FILEVERSION 1,0,4,100
PRODUCTVERSION 1,0,4,100
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -188,13 +188,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.0.3.99"
VALUE "FileVersion", "1.0.4.100"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.0.3.99"
VALUE "ProductVersion", "1.0.4.100"
END
END
BLOCK "VarFileInfo"

View file

@ -205,7 +205,8 @@ const char* StrError(DWORD error_code)
case ERROR_WRITE_FAULT:
return "Write error";
case ERROR_OPEN_FAILED:
return "Could not open media";
return "Could not open media. It may be in use by another process.\n"
"Please re-plug the media and try again";
case ERROR_PARTITION_FAILURE:
return "Error while partitioning drive";
case ERROR_CANNOT_COPY:
@ -217,7 +218,7 @@ const char* StrError(DWORD error_code)
case ERROR_BADBLOCKS_FAILURE:
return "Bad blocks check didn't complete";
default:
uprintf("StrError: hit default - %08X\n", error_code);
uprintf("Unknown error: %08X\n", error_code);
SetLastError(error_code);
return WindowsErrorString();
}