+ HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
+
+ HINSTANCE h_Kernel32 = LoadLibraryW(L"kernel32.dll");
+ if(h_Kernel32)
+ {
+ BOOL (WINAPI * mySetProcessDEPPolicy)( DWORD dwFlags);
+# define PROCESS_DEP_ENABLE 1
+
+ mySetProcessDEPPolicy = (BOOL WINAPI (*)(DWORD))
+ GetProcAddress(h_Kernel32, "SetProcessDEPPolicy");
+ if(mySetProcessDEPPolicy)
+ mySetProcessDEPPolicy(PROCESS_DEP_ENABLE);
+ FreeLibrary(h_Kernel32);
+ }
+