| 117 | } |
| 118 | |
| 119 | void InitUnhandledExceptionFilter() |
| 120 | { |
| 121 | TCHAR szModName[_MAX_PATH]; |
| 122 | if (GetModuleFileName(NULL, szModName, sizeof(szModName)/sizeof(TCHAR)) != 0) |
| 123 | { |
| 124 | _tcscpy_s(s_szExceptionLogFileName, szModName); |
| 125 | _tcscat_s(s_szExceptionLogFileName, _T(".exp.log")); |
| 126 | } |
| 127 | if (s_bUnhandledExeptionFilterSet == FALSE) |
| 128 | { |
| 129 | // set global exception handler (for handling all unhandled exceptions) |
| 130 | SetUnhandledExceptionFilter(CrashHandlerExceptionFilter); |
| 131 | #if defined _M_X64 || defined _M_IX86 |
| 132 | PreventSetUnhandledExceptionFilter(); |
| 133 | #endif |
| 134 | s_bUnhandledExeptionFilterSet = TRUE; |
| 135 | } |
| 136 | } |
no test coverage detected