MCPcopy Create free account
hub / github.com/JochenKalmbach/StackWalker / InitUnhandledExceptionFilter

Function InitUnhandledExceptionFilter

Main/StackWalker/main.cpp:165–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165static void InitUnhandledExceptionFilter()
166{
167 TCHAR szModName[_MAX_PATH];
168 if (GetModuleFileName(NULL, szModName, sizeof(szModName) / sizeof(TCHAR)) != 0)
169 {
170 _tcscpy_s(s_szExceptionLogFileName, szModName);
171 _tcscat_s(s_szExceptionLogFileName, _T(".exp.log"));
172 }
173 if (s_bUnhandledExeptionFilterSet == FALSE)
174 {
175 // set global exception handler (for handling all unhandled exceptions)
176 SetUnhandledExceptionFilter(CrashHandlerExceptionFilter);
177#if defined _M_X64 || defined _M_IX86
178 PreventSetUnhandledExceptionFilter();
179#endif
180 s_bUnhandledExeptionFilterSet = TRUE;
181 }
182}
183#endif // UNHANDLED_EXCEPTION_TEST
184
185#ifdef EXCEPTION_FILTER_TEST

Callers 1

_tmainFunction · 0.85

Calls 1

Tested by

no test coverage detected