(This is required by MSDN.)
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
-
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#endif
+#ifdef WIN32
+# include <windows.h>
+#endif
static void version (void)
{
int main (int argc, char *argv[])
{
+#ifdef WIN32
+ SetErrorMode(SEM_FAILCRITICALERRORS);
+#endif
static const struct option opts[] =
{
{ "force", no_argument, NULL, 'f' },
putenv("VLC_DATA_PATH=Z:"TOP_SRCDIR"/share");
#endif
+ SetErrorMode(SEM_FAILCRITICALERRORS);
HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
/* SetProcessDEPPolicy */
return -1;
module_handle_t handle;
- /* FIXME: this is not thread-safe -- Courmisch */
- UINT mode = SetErrorMode (SEM_FAILCRITICALERRORS);
- SetErrorMode (mode|SEM_FAILCRITICALERRORS);
handle = LoadLibraryW (wfile);
- SetErrorMode (mode);
free (wfile);
if( handle == NULL )