mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 03:33:27 -03:00
windows: Call SetProcessDEPPolicy directly
This commit is contained in:
parent
1bd9ffdd44
commit
d8a2992067
1 changed files with 1 additions and 10 deletions
11
src/init.cpp
11
src/init.cpp
|
@ -891,16 +891,7 @@ bool AppInitBasicSetup()
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
// Enable Data Execution Prevention (DEP)
|
// Enable Data Execution Prevention (DEP)
|
||||||
// Minimum supported OS versions: WinXP SP3, WinVista >= SP1, Win Server 2008
|
SetProcessDEPPolicy(PROCESS_DEP_ENABLE);
|
||||||
// A failure is non-critical and needs no further attention!
|
|
||||||
#ifndef PROCESS_DEP_ENABLE
|
|
||||||
// We define this here, because GCCs winbase.h limits this to _WIN32_WINNT >= 0x0601 (Windows 7),
|
|
||||||
// which is not correct. Can be removed, when GCCs winbase.h is fixed!
|
|
||||||
#define PROCESS_DEP_ENABLE 0x00000001
|
|
||||||
#endif
|
|
||||||
typedef BOOL (WINAPI *PSETPROCDEPPOL)(DWORD);
|
|
||||||
PSETPROCDEPPOL setProcDEPPol = (PSETPROCDEPPOL)GetProcAddress(GetModuleHandleA("Kernel32.dll"), "SetProcessDEPPolicy");
|
|
||||||
if (setProcDEPPol != nullptr) setProcDEPPol(PROCESS_DEP_ENABLE);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!SetupNetworking())
|
if (!SetupNetworking())
|
||||||
|
|
Loading…
Add table
Reference in a new issue