1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-12 11:28:26 -06:00

Windows: Modifications to build 64-bit versions of VeraCrypt.exe & "VeraCrypt Format.exe".

This commit is contained in:
Mounir IDRASSI
2015-05-22 18:19:13 +02:00
parent c44c1ac9ce
commit 0d23312886
9 changed files with 1292 additions and 20 deletions

View File

@@ -65,12 +65,12 @@ BOOL ReadLocalMachineRegistryString (const char *subKey, char *name, char *str,
return type == REG_SZ;
}
BOOL ReadLocalMachineRegistryStringNonReflected (const char *subKey, char *name, char *str, DWORD *size)
BOOL ReadLocalMachineRegistryStringNonReflected (const char *subKey, char *name, char *str, DWORD *size, BOOL b32bitApp)
{
HKEY hkey = 0;
DWORD type;
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, subKey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey) != ERROR_SUCCESS)
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, subKey, 0, KEY_READ | (b32bitApp? KEY_WOW64_32KEY: KEY_WOW64_64KEY), &hkey) != ERROR_SUCCESS)
return FALSE;
if (RegQueryValueEx (hkey, name, NULL, &type, (BYTE *) str, size) != ERROR_SUCCESS)