mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-24 19:54:25 -04:00
[ui] ask user if they want proceed when conflicting processes are found
* Rufus now checks for processes with handles opened on the drives/volumes before starting the format operation and asks the user if they want to continue. * This mimics Windows' behaviour when formatting drives, and actually uses the same message as the one from shell32.dll.mui. * Closes #773
This commit is contained in:
parent
bed889718e
commit
b4a2c06a2e
8 changed files with 127 additions and 10 deletions
|
@ -276,6 +276,11 @@ static __inline int LoadStringU(HINSTANCE hInstance, UINT uID, LPSTR lpBuffer, i
|
|||
{
|
||||
int ret;
|
||||
DWORD err = ERROR_INVALID_DATA;
|
||||
if (nBufferMax == 0) {
|
||||
// read-only pointer to resource mode is not supported
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
// coverity[returned_null]
|
||||
walloc(lpBuffer, nBufferMax);
|
||||
ret = LoadStringW(hInstance, uID, wlpBuffer, nBufferMax);
|
||||
|
@ -461,6 +466,15 @@ static __inline BOOL DeleteFileU(const char* lpFileName)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static __inline BOOL PathFileExistsU(char* szPath)
|
||||
{
|
||||
BOOL ret;
|
||||
wconvert(szPath);
|
||||
ret = PathFileExistsW(wszPath);
|
||||
wfree(szPath);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static __inline int PathGetDriveNumberU(char* lpPath)
|
||||
{
|
||||
int ret = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue