comparison mplayer.c @ 29641:52e00a25ab71

Hack: set DEP/NX on Windows via SetProcessDEPPolicy. This should really be done via the NXCOMPAT PE flag, but looks like binutils will not get support for it any time soon and not having this security feature enabled is just ridiculous.
author reimar
date Wed, 16 Sep 2009 18:07:19 +0000
parents 9e014b68ecb9
children 0e6de6bc0eec
comparison
equal deleted inserted replaced
29640:f49560a603bf 29641:52e00a25ab71
2604 } 2604 }
2605 } 2605 }
2606 #endif 2606 #endif
2607 2607
2608 #if defined(__MINGW32__) || defined(__CYGWIN__) 2608 #if defined(__MINGW32__) || defined(__CYGWIN__)
2609 {
2610 HMODULE kernel32 = GetModuleHandle("Kernel32.dll");
2611 BOOL WINAPI (*setDEP)(DWORD) = NULL;
2612 if (kernel32)
2613 setDEP = GetProcAddress(kernel32, "SetProcessDEPPolicy");
2614 if (setDEP) setDEP(3);
2615 }
2609 // stop Windows from showing all kinds of annoying error dialogs 2616 // stop Windows from showing all kinds of annoying error dialogs
2610 SetErrorMode(0x8003); 2617 SetErrorMode(0x8003);
2611 // request 1ms timer resolution 2618 // request 1ms timer resolution
2612 timeBeginPeriod(1); 2619 timeBeginPeriod(1);
2613 #endif 2620 #endif