mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-01-03 20:28:12 -06:00
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:
@@ -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;
|
||||
|
||||
@@ -350,6 +350,7 @@ uint32 ReadDriverConfigurationFlags ();
|
||||
uint32 ReadServiceConfigurationFlags ();
|
||||
uint32 ReadEncryptionThreadPoolFreeCpuCountLimit ();
|
||||
BOOL ReadMemoryProtectionConfig ();
|
||||
BOOL WriteMemoryProtectionConfig (BOOL bEnable);
|
||||
BOOL LoadSysEncSettings ();
|
||||
int LoadNonSysInPlaceEncSettings (WipeAlgorithmId *wipeAlgorithm);
|
||||
void RemoveNonSysInPlaceEncNotifications (void);
|
||||
|
||||
@@ -1633,6 +1633,7 @@
|
||||
<entry lang="en" key="EXPANDER_EXTENDING_FILESYSTEM">Extending file system ...\n</entry>
|
||||
<entry lang="en" key="PARTIAL_SYSENC_MOUNT_READONLY">Warning: The system partition you attempted to mount was not fully encrypted. As a safety measure to prevent potential corruption or unwanted modifications, volume '%s' was mounted as read-only.</entry>
|
||||
<entry lang="en" key="IDC_LINK_KEYFILES_EXTENSIONS_WARNING">Important information on using third-party file extensions</entry>
|
||||
<entry lang="en" key="IDC_DISABLE_MEMORY_PROTECTION">Disable memory protection in VeraCrypt</entry>
|
||||
</localization>
|
||||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="VeraCrypt">
|
||||
|
||||
@@ -226,6 +226,7 @@
|
||||
#define IDC_DISABLE_MOUNT_MANAGER 5142
|
||||
#define IDC_KEYFILES_SIZE_UNIT 5143
|
||||
#define IDC_LINK_KEYFILES_EXTENSIONS_WARNING 5144
|
||||
#define IDC_DISABLE_MEMORY_PROTECTION 5145
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
@@ -234,7 +235,7 @@
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 578
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 5145
|
||||
#define _APS_NEXT_CONTROL_VALUE 5146
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user