static void check_crashdump(void);
LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo);
# endif
+#define HeapEnableTerminationOnCorruption (HEAP_INFORMATION_CLASS)1
#endif
#ifndef UNDER_CE
#endif
int nCmdShow )
{
- int argc, ret;
+ 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;
argc = parse_cmdline (psz_cmdline, &argv);
#endif
- libvlc_exception_t ex;
- libvlc_exception_init (&ex);
-
/* Initialize libvlc */
libvlc_instance_t *vlc;
- vlc = libvlc_new (argc, (const char **)argv, &ex);
+ vlc = libvlc_new (argc, (const char **)argv);
if (vlc != NULL)
{
libvlc_add_intf (vlc, "globalhotkeys,none");
libvlc_release (vlc);
}
- ret = libvlc_exception_raised (&ex);
- libvlc_exception_clear (&ex);
-
for (int i = 0; i < argc; i++)
free (argv[i]);
(void)hInstance; (void)hPrevInstance; (void)lpCmdLine; (void)nCmdShow;
- return ret;
+ return 0;
}
#if !defined( UNDER_CE ) && !defined( _WIN64 )