X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bin%2Fwinvlc.c;h=b91cea1a791b845ab38f4853a35f2341a36465fe;hb=12ade3e3bc975d5426ba4af155b7372c31093b31;hp=90ed7ce4de1cbea559207622261811dcb451d16d;hpb=c796d10a9a7004a6b2f558c0f4a8847168850a7e;p=vlc diff --git a/bin/winvlc.c b/bin/winvlc.c index 90ed7ce4de..b91cea1a79 100644 --- a/bin/winvlc.c +++ b/bin/winvlc.c @@ -121,6 +121,20 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, int argc; #ifndef UNDER_CE 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); + } + wchar_t **wargv = CommandLineToArgvW (GetCommandLine (), &argc); if (wargv == NULL) return 1;