diff options
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r-- | src/Mount/Mount.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 512989ef..37e486a9 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -1324,9 +1324,9 @@ static void LaunchVolCreationWizard (HWND hwndDlg, const char *arg) }
if (!CreateProcess (NULL, (LPSTR) t, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
}
else
{
CloseHandle (pi.hProcess);
@@ -1351,9 +1351,9 @@ static void LaunchVolExpander (HWND hwndDlg) if (!FileExists(t))
Error ("VOL_EXPANDER_NOT_FOUND", hwndDlg); // Display a user-friendly error message and advise what to do
else if (((int)ShellExecuteA (NULL, (!IsAdmin() && IsUacSupported()) ? "runas" : "open", t, NULL, NULL, SW_SHOW)) <= 32)
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
}
}
}
@@ -1407,9 +1407,9 @@ void LoadDriveLetters (HWND hwndDlg, HWND hTree, int drive) if (bResult == FALSE)
{
KillTimer (MainDlg, TIMER_ID_MAIN);
- handleWin32Error (hTree);
+ handleWin32Error (hTree, SRC_POS);
AbortProcessSilent();
}
LastKnownLogicalDrives = dwUsedDrives = GetLogicalDrives ();
@@ -3881,9 +3881,9 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa StringCbPrintfA (srcPath, sizeof(srcPath), "%s\\VeraCrypt.exe", appDir);
StringCbPrintfA (dstPath, sizeof(dstPath), "%s\\VeraCrypt\\VeraCrypt.exe", dstDir);
if (!TCCopyFile (srcPath, dstPath))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
goto stop;
}
// Wizard
@@ -3892,9 +3892,9 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa StringCbPrintfA (srcPath, sizeof(srcPath), "%s\\VeraCrypt Format.exe", appDir);
StringCbPrintfA (dstPath, sizeof(dstPath), "%s\\VeraCrypt\\VeraCrypt Format.exe", dstDir);
if (!TCCopyFile (srcPath, dstPath))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
goto stop;
}
}
@@ -3902,18 +3902,18 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa StringCbPrintfA (srcPath, sizeof(srcPath), "%s\\veracrypt.sys", appDir);
StringCbPrintfA (dstPath, sizeof(dstPath), "%s\\VeraCrypt\\veracrypt.sys", dstDir);
if (!TCCopyFile (srcPath, dstPath))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
goto stop;
}
// Driver x64
StringCbPrintfA (srcPath, sizeof(srcPath), "%s\\veracrypt-x64.sys", appDir);
StringCbPrintfA (dstPath, sizeof(dstPath), "%s\\VeraCrypt\\veracrypt-x64.sys", dstDir);
if (!TCCopyFile (srcPath, dstPath))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
goto stop;
}
if (GetPreferredLangId () && strcmp (GetPreferredLangId (), "en") != 0)
@@ -4178,9 +4178,9 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, char *szFileName, int pin) if (!VolumePathExists (szFileName))
{
if (!MultipleMountOperationInProgress)
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
status = FALSE;
goto ret;
}
@@ -4430,9 +4430,9 @@ retry: if (bResult == FALSE)
{
NormalCursor();
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
return FALSE;
}
if (unmount.nReturnCode == ERR_SUCCESS
@@ -4797,9 +4797,9 @@ static void ChangePassword (HWND hwndDlg) }
if (!VolumePathExists (szFileName))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
return;
}
bSysEncPwdChangeDlgMode = FALSE;
@@ -5118,9 +5118,9 @@ static void DecryptNonSysDevice (HWND hwndDlg, BOOL bResolveAmbiguousSelection, prop.driveNo = (char) HIWORD (lLetter) - 'A';
if (!DeviceIoControl (hDriver, TC_IOCTL_GET_VOLUME_PROPERTIES, &prop, sizeof (prop), &prop, sizeof (prop), &bytesReturned, NULL))
{
- handleWin32Error (MainDlg);
+ handleWin32Error (MainDlg, SRC_POS);
return;
}
scPath = WideToSingleString ((wchar_t *) prop.wszVolume);
@@ -5445,9 +5445,9 @@ static void WipeCache (HWND hwndDlg, BOOL silent) if (hwndDlg == NULL)
return;
if (bResult == FALSE)
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
else
{
EnableDisableButtons (hwndDlg);
@@ -5715,9 +5715,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa InitDialog (hwndDlg);
if (!ComServerMain ())
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
exit (1);
}
exit (0);
}
@@ -5784,9 +5784,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa BOOL EffectiveVolumeTrueCryptMode = CmdVolumeTrueCryptMode;
if (!VolumePathExists (szFileName))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
}
else
{
/* Priority is given to command line parameters
@@ -8189,11 +8189,11 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, char *lpszComm status = DriverAttach ();
if (status != 0)
{
if (status == ERR_OS_ERROR)
- handleWin32Error (NULL);
+ handleWin32Error (NULL, SRC_POS);
else
- handleError (NULL, status);
+ handleError (NULL, status, SRC_POS);
AbortProcess ("NODRIVER");
}
@@ -8559,9 +8559,9 @@ static void SaveDefaultKeyFilesParam (HWND hwnd) f = fopen (GetConfigPath (TC_APPD_FILENAME_DEFAULT_KEYFILES), "w");
if (f == NULL)
{
- handleWin32Error (MainDlg);
+ handleWin32Error (MainDlg, SRC_POS);
return;
}
XmlWriteHeader (f);
@@ -8728,9 +8728,9 @@ int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, const char *lps if (!lpszVolume)
{
nStatus = ERR_OUTOFMEMORY;
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
return nStatus;
}
volume.VolumeIsOpen = FALSE;
@@ -8753,9 +8753,9 @@ int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, const char *lps }
if (!VolumePathExists (lpszVolume))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
goto ret;
}
Info ("EXTERNAL_VOL_HEADER_BAK_FIRST_INFO", hwndDlg);
@@ -8793,9 +8793,9 @@ int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, const char *lps if ((type == TC_VOLUME_TYPE_NORMAL && askVol->CryptoInfo->hiddenVolume)
|| (type == TC_VOLUME_TYPE_HIDDEN && !askVol->CryptoInfo->hiddenVolume))
{
CloseVolume (askVol);
- handleError (hwndDlg, ERR_PASSWORD_WRONG);
+ handleError (hwndDlg, ERR_PASSWORD_WRONG, SRC_POS);
continue;
}
RandSetHashFunction (askVol->CryptoInfo->pkcs5);
@@ -8822,9 +8822,9 @@ int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, const char *lps if (nStatus != ERR_PASSWORD_WRONG)
goto error;
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
}
}
noHidden:
@@ -8936,9 +8936,9 @@ error: _close (fBackup);
SetLastError (dwError);
if (nStatus != 0)
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
burn (&VolumePassword, sizeof (VolumePassword));
burn (&VolumePkcs5, sizeof (VolumePkcs5));
burn (&VolumePin, sizeof (VolumePin));
@@ -8976,9 +8976,9 @@ int RestoreVolumeHeader (HWND hwndDlg, const char *lpszVolume) if (!lpszVolume)
{
nStatus = ERR_OUTOFMEMORY;
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
return nStatus;
}
switch (IsSystemDevicePath (lpszVolume, hwndDlg, TRUE))
@@ -9007,9 +9007,9 @@ int RestoreVolumeHeader (HWND hwndDlg, const char *lpszVolume) }
if (!VolumePathExists (lpszVolume))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
return 0;
}
BOOL restoreInternalBackup;
@@ -9064,9 +9064,9 @@ int RestoreVolumeHeader (HWND hwndDlg, const char *lpszVolume) if (nStatus != ERR_PASSWORD_WRONG)
goto error;
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
}
if (volume.CryptoInfo->LegacyVolume)
{
@@ -9272,9 +9272,9 @@ int RestoreVolumeHeader (HWND hwndDlg, const char *lpszVolume) if (nStatus != ERR_PASSWORD_WRONG)
goto error;
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
}
BOOL hiddenVol = restoredCryptoInfo->hiddenVolume;
@@ -9362,9 +9362,9 @@ error: }
SetLastError (dwError);
if (nStatus != 0)
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
burn (&VolumePassword, sizeof (VolumePassword));
burn (&VolumePkcs5, sizeof (VolumePkcs5));
burn (&VolumePin, sizeof (VolumePin));
@@ -9485,9 +9485,9 @@ static BOOL CALLBACK PerformanceSettingsDlgProc (HWND hwndDlg, UINT msg, WPARAM SetDriverConfigurationFlag (TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION, disableHW);
DWORD bytesReturned;
if (!DeviceIoControl (hDriver, TC_IOCTL_REREAD_DRIVER_CONFIG, NULL, 0, NULL, 0, &bytesReturned, NULL))
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
EnableHwEncryption (!disableHW);
uint32 cpuFreeCount = 0;
|