]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/init.cpp
moved SEH stuff to crashrpt.cpp
[wxWidgets.git] / src / common / init.cpp
index 4db4aab90d4e9a8194568d51f783af64a71114de..fe406b7be92f1289a74f76eb32490bbdc4314d66 100644 (file)
@@ -426,6 +426,11 @@ int wxEntryReal(int& argc, wxChar **argv)
 // OnFatalException() if necessary
 #if defined(__WXMSW__) && wxUSE_ON_FATAL_EXCEPTION
 
+#ifdef __WXWINCE__
+// For ExitThread
+#include "wx/msw/private.h"
+#endif
+
 extern unsigned long wxGlobalSEHandler();
 
 int wxEntry(int& argc, wxChar **argv)
@@ -436,10 +441,17 @@ int wxEntry(int& argc, wxChar **argv)
     }
     __except ( wxGlobalSEHandler() )
     {
+#ifdef __WXWINCE__
+        ::ExitThread(3); // the same exit code as abort()
+#else
         ::ExitProcess(3); // the same exit code as abort()
+#endif
 
+#if !defined(_MSC_VER) || _MSC_VER < 1300
         // this code is unreachable but put it here to suppress warnings
+        // from some compilers
         return -1;
+#endif
     }
 }