diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-09-03 23:42:41 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-09-03 23:42:41 +0200 |
commit | 2a6726b00ed51430590e01950a5c0f67ede9e8a9 (patch) | |
tree | 924ff4a717bbe41686f105ad4dd03fe47ae85af7 /src/Setup/Wizard.c | |
parent | 201d09ff5aa69db61643659726b36810d5ac00d4 (diff) | |
download | VeraCrypt-2a6726b00ed51430590e01950a5c0f67ede9e8a9.tar.gz VeraCrypt-2a6726b00ed51430590e01950a5c0f67ede9e8a9.zip |
Windows: Replace legacy file/dir selection APIs with modern IFileDialog interface
We remove usage of GetOpenFileNameW/GetSaveFileNameW/SHBrowseForFolderW which are deprecated by Microsoft
Diffstat (limited to 'src/Setup/Wizard.c')
-rw-r--r-- | src/Setup/Wizard.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Setup/Wizard.c b/src/Setup/Wizard.c index 7de3ef0c..78616abe 100644 --- a/src/Setup/Wizard.c +++ b/src/Setup/Wizard.c @@ -45,8 +45,8 @@ enum wizard_pages HWND hCurPage = NULL; /* Handle to current wizard page */ int nCurPageNo = -1; /* The current wizard page */ -wchar_t WizardDestInstallPath [TC_MAX_PATH]; -wchar_t WizardDestExtractPath [TC_MAX_PATH]; +wchar_t WizardDestInstallPath [TC_MAX_PATH] = { 0 }; +wchar_t WizardDestExtractPath [TC_MAX_PATH] = { 0 }; wchar_t SelfFile [TC_MAX_PATH]; HBITMAP hbmWizardBitmapRescaled = NULL; @@ -646,7 +646,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa switch (lw) { case IDC_BROWSE: - if (BrowseDirectories (hwndDlg, "SELECT_DEST_DIR", WizardDestExtractPath)) + if (BrowseDirectories (hwndDlg, "SELECT_DEST_DIR", WizardDestExtractPath, WizardDestExtractPath)) { if (WizardDestExtractPath [wcslen(WizardDestExtractPath)-1] != L'\\') { @@ -667,7 +667,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa switch (lw) { case IDC_BROWSE: - if (BrowseDirectories (hwndDlg, "SELECT_DEST_DIR", WizardDestInstallPath)) + if (BrowseDirectories (hwndDlg, "SELECT_DEST_DIR", WizardDestInstallPath, WizardDestInstallPath)) { if (WizardDestInstallPath [wcslen(WizardDestInstallPath)-1] != L'\\') { |