mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Windows: Fix failure of Screen Readers (Accessibility support) to reader UI by disabling newly introduced memory protection by default and adding a CLI switch (/protectMemory) to enable it when needed. This fixes issue https://github.com/veracrypt/VeraCrypt/issues/536
This commit is contained in:
@@ -6145,6 +6145,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
|
||||
ExtractCommandLine (hwndDlg, (wchar_t *) lParam);
|
||||
|
||||
if (EnableMemoryProtection)
|
||||
{
|
||||
/* Protect this process memory from being accessed by non-admin users */
|
||||
EnableProcessProtection ();
|
||||
}
|
||||
|
||||
if (ComServerMode)
|
||||
{
|
||||
InitDialog (hwndDlg);
|
||||
@@ -9001,6 +9007,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
|
||||
OptionNoSizeCheck,
|
||||
OptionQuickFormat,
|
||||
OptionFastCreateFile,
|
||||
OptionEnableMemoryProtection,
|
||||
};
|
||||
|
||||
argument args[]=
|
||||
@@ -9024,6 +9031,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
|
||||
{ OptionNoSizeCheck, L"/nosizecheck", NULL, FALSE },
|
||||
{ OptionQuickFormat, L"/quick", NULL, FALSE },
|
||||
{ OptionFastCreateFile, L"/fastcreatefile", NULL, FALSE },
|
||||
{ OptionEnableMemoryProtection, L"/protectMemory", NULL, FALSE },
|
||||
|
||||
// Internal
|
||||
{ CommandResumeSysEncLogOn, L"/acsysenc", L"/a", TRUE },
|
||||
@@ -9384,6 +9392,10 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
|
||||
CmdFastCreateFile = TRUE;
|
||||
break;
|
||||
|
||||
case OptionEnableMemoryProtection:
|
||||
EnableMemoryProtection = TRUE;
|
||||
break;
|
||||
|
||||
case OptionHistory:
|
||||
{
|
||||
wchar_t szTmp[8] = {0};
|
||||
|
||||
Reference in New Issue
Block a user