VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/BootEncryption.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2021-12-04 23:55:41 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2021-12-04 23:59:01 +0100
commita21b2270e8db93d231fa0a3d60776043c9a0f9bc (patch)
treed3de97cc58b1dd4c6b1d62932a6fc5901d1f1226 /src/Common/BootEncryption.cpp
parent0bc3e36f76d8dad33e91cd324bb170c008b26e65 (diff)
downloadVeraCrypt-a21b2270e8db93d231fa0a3d60776043c9a0f9bc.tar.gz
VeraCrypt-a21b2270e8db93d231fa0a3d60776043c9a0f9bc.zip
Windows: Implement TESTSIGNING build configuration that allows running under Windows Vista,7, 8 and 8.1.
Diffstat (limited to 'src/Common/BootEncryption.cpp')
-rw-r--r--src/Common/BootEncryption.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp
index c8fc90bf..c3ce07ab 100644
--- a/src/Common/BootEncryption.cpp
+++ b/src/Common/BootEncryption.cpp
@@ -2218,7 +2218,6 @@ namespace VeraCrypt
#endif // !SETUP
- NtQuerySystemInformationFn NtQuerySystemInformationPtr = NULL;
EfiBootConf::EfiBootConf() : passwordType (0),
passwordMsg ("Password: "),
@@ -2510,14 +2509,13 @@ namespace VeraCrypt
ULONG len;
NTSTATUS res;
WCHAR tempBuf[1024];
+ NtQuerySystemInformationFn NtQuerySystemInformationPtr = (NtQuerySystemInformationFn) GetProcAddress (GetModuleHandle (L"ntdll.dll"), "NtQuerySystemInformation");
memset(tempBuf, 0, sizeof(tempBuf));
// Load NtQuerySystemInformation function point
if (!NtQuerySystemInformationPtr)
{
- NtQuerySystemInformationPtr = (NtQuerySystemInformationFn) GetProcAddress (GetModuleHandle (L"ntdll.dll"), "NtQuerySystemInformation");
- if (!NtQuerySystemInformationPtr)
- throw SystemException (SRC_POS);
+ throw SystemException (SRC_POS);
}
res = NtQuerySystemInformationPtr((SYSTEM_INFORMATION_CLASS)SYSPARTITIONINFORMATION, tempBuf, sizeof(tempBuf), &len);