diff options
| author | Chun Kuan Lee <[email protected]> | 2019-01-23 21:37:44 +0800 |
|---|---|---|
| committer | Chun Kuan Lee <[email protected]> | 2019-01-23 21:37:44 +0800 |
| commit | d8a299206780b38959d732cbe40ba1dd25834f0e (patch) | |
| tree | 6205b8ab7d5ee9dfb469b76b0cbc3c68133cc75b /src/init.cpp | |
| parent | windows: Set _WIN32_WINNT to 0x0601 (Windows 7) (diff) | |
| download | discoin-d8a299206780b38959d732cbe40ba1dd25834f0e.tar.xz discoin-d8a299206780b38959d732cbe40ba1dd25834f0e.zip | |
windows: Call SetProcessDEPPolicy directly
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/init.cpp b/src/init.cpp index 77d050561..a6a8b7fde 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -891,16 +891,7 @@ bool AppInitBasicSetup() #endif #ifdef WIN32 // Enable Data Execution Prevention (DEP) - // Minimum supported OS versions: WinXP SP3, WinVista >= SP1, Win Server 2008 - // 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); + SetProcessDEPPolicy(PROCESS_DEP_ENABLE); #endif if (!SetupNetworking()) |