41 #include "gtest/gtest.h"
55 #if GTEST_HAS_SEH && !GTEST_OS_WINDOWS_MOBILE
57 LONG WINAPI ExitWithExceptionCode(
58 struct _EXCEPTION_POINTERS* exception_pointers) {
59 exit(exception_pointers->ExceptionRecord->ExceptionCode);
65 int main(
int argc,
char **argv) {
69 SetErrorMode(SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS);
71 # if GTEST_HAS_SEH && !GTEST_OS_WINDOWS_MOBILE
79 SetUnhandledExceptionFilter(ExitWithExceptionCode);
82 #endif // GTEST_OS_WINDOWS