From 8586c5101638143e7551db7c72067674a2817b38 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 10 Jan 2016 20:17:30 +0100 Subject: [PATCH] Windows: Avoid wrong update of configuration XML file caused by not using the correct window handle to get some GUI fields content. Some code cleanup. --- src/Common/Dlgcode.c | 6 +++--- src/Common/Dlgcode.h | 2 +- src/ExpandVolume/WinMain.cpp | 2 +- src/Format/Tcformat.c | Bin 634120 -> 634106 bytes src/Mount/Mount.c | 14 +++++++------- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index cc7f0e74..c74b9ef7 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -2251,7 +2251,7 @@ uint32 ReadEncryptionThreadPoolFreeCpuCountLimit () } -BOOL LoadSysEncSettings (HWND hwndDlg) +BOOL LoadSysEncSettings () { BOOL status = TRUE; DWORD size = 0; @@ -3947,7 +3947,7 @@ start: { #ifndef SETUP - LoadSysEncSettings (NULL); + LoadSysEncSettings (); if (!CreateDriverSetupMutex ()) { @@ -10657,7 +10657,7 @@ BOOL InitSecurityTokenLibrary (HWND hwndDlg) try { - SecurityToken::InitLibrary (SecurityTokenLibraryPath, auto_ptr (new PinRequestHandler(hwndDlg)), auto_ptr (new WarningHandler(hwndDlg))); + SecurityToken::InitLibrary (SecurityTokenLibraryPath, auto_ptr (new PinRequestHandler(MainDlg)), auto_ptr (new WarningHandler(MainDlg))); } catch (Exception &e) { diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index 601f7ac7..f3fcc6e0 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -289,7 +289,7 @@ void CloseAppSetupMutex (void); BOOL IsTrueCryptInstallerRunning (void); uint32 ReadDriverConfigurationFlags (); uint32 ReadEncryptionThreadPoolFreeCpuCountLimit (); -BOOL LoadSysEncSettings (HWND hwndDlg); +BOOL LoadSysEncSettings (); int LoadNonSysInPlaceEncSettings (WipeAlgorithmId *wipeAlgorithm); void RemoveNonSysInPlaceEncNotifications (void); void SavePostInstallTasksSettings (int command); diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp index 4c9165d9..546e5339 100644 --- a/src/ExpandVolume/WinMain.cpp +++ b/src/ExpandVolume/WinMain.cpp @@ -242,7 +242,7 @@ void LoadSettings (HWND hwndDlg) { WipeAlgorithmId savedWipeAlgorithm = TC_WIPE_NONE; - LoadSysEncSettings (hwndDlg); + LoadSysEncSettings (); if (LoadNonSysInPlaceEncSettings (&savedWipeAlgorithm) != 0) bInPlaceEncNonSysPending = TRUE; diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 54e0d63e619608c70b255ac60750661109bfe822..ff31cdb4442be9163d9bd3c47c6605e2991f4bfc 100644 GIT binary patch delta 51 zcmeCUrS|Kl+J=^M({FrdjO?F-IvWZVM)*qj?I delta 54 zcmex$Q?28c+J=^MlUKabm~3!PsrkUU_5