Windows: Add setting in main UI and setup wizard to disable memory protection

This can be useful for users who need Accessibility software that may not work when memory protection is active in VeraCrypt
This commit is contained in:
Mounir IDRASSI committed 2023-09-20 09:39:22 +02:00
1 parent b1657e88e4
commit 0f3ae268a4
10 files changed
+69 -20

No files matched your search

+9 -2
View File
@@ -32,8 +32,8 @@
#include <process.h>
#include <Tlhelp32.h>
#endif
#ifdef _WIN32_WINNT >= 0x0602
#include "processthreadsapi.h""
#if _WIN32_WINNT >= 0x0602
#include "processthreadsapi.h"
#endif
#include "Resource.h"
@@ -3256,6 +3256,13 @@ BOOL ReadMemoryProtectionConfig ()
return (config)? TRUE: FALSE;
}
BOOL WriteMemoryProtectionConfig (BOOL bEnable)
{
DWORD config = bEnable? 1: 0;
return WriteLocalMachineRegistryDword (L"SYSTEM\\CurrentControlSet\\Services\\veracrypt", VC_ENABLE_MEMORY_PROTECTION, config);
}
BOOL LoadSysEncSettings ()
{
BOOL status = TRUE;