]> git.sesse.net Git - vlc/blobdiff - bin/winvlc.c
Update _WIN32_IE to IE 5.01
[vlc] / bin / winvlc.c
index a2d66162523fea27ab86f9176bdc5e71bcadc97e..de71fe832cd68397bd4ed06bc6e63782aada316a 100644 (file)
@@ -36,7 +36,9 @@
 #include <windows.h>
 
 #if !defined(UNDER_CE)
-#   define  _WIN32_IE 0x500
+# ifndef _WIN32_IE
+#   define  _WIN32_IE 0x501
+# endif
 #   include <shlobj.h>
 #   include <tlhelp32.h>
 #   include <wininet.h>
@@ -120,10 +122,31 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
         return 1;
 
     char *argv[argc + 1];
+    BOOL crash_handling = TRUE;
+    int j = 0;
     for (int i = 0; i < argc; i++)
-        argv[i] = FromWide (wargv[i]);
+    {
+        if(!wcscmp(wargv[i], L"--no-crashdump"))
+        {
+            crash_handling = FALSE;
+        }
+        else
+        {
+            argv[j] = FromWide (wargv[i]);
+            j++;
+        }
+    }
+
+    argc = j;
     argv[argc] = NULL;
     LocalFree (wargv);
+
+    if(crash_handling)
+    {
+        check_crashdump();
+        SetUnhandledExceptionFilter(vlc_exception_filter);
+    }
+
 #else
     char **argv, psz_cmdline[wcslen(lpCmdLine) * 4];
 
@@ -137,11 +160,6 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
     libvlc_exception_init (&ex);
     libvlc_exception_init (&dummy);
 
-#if !defined( UNDER_CE )
-    check_crashdump();
-    SetUnhandledExceptionFilter(vlc_exception_filter);
-#endif
-
     /* Initialize libvlc */
     libvlc_instance_t *vlc;
     vlc = libvlc_new (argc - 1, (const char **)argv + 1, &ex);