MCPcopy Create free account
hub / github.com/aardappel/treesheets / CustomStackWalker

Class CustomStackWalker

lobster/include/StackWalker/StackWalkerHelpers.cpp:23–39  ·  view source on GitHub ↗

Specialized stackwalker-output classes

Source from the content-addressed store, hash-verified

21
22// Specialized stackwalker-output classes
23class CustomStackWalker : public StackWalker {
24 public:
25 virtual void OnOutput(LPCSTR szText) {
26 auto hAppend = CreateFile(TEXT(s_szExceptionLogFileName),
27 FILE_APPEND_DATA, // open for writing
28 FILE_SHARE_READ, // allow multiple readers
29 NULL, // no security
30 OPEN_ALWAYS, // open or create
31 FILE_ATTRIBUTE_NORMAL, // normal file
32 NULL); // no attr. template
33 WriteFile(hAppend, szText, strlen(szText), nullptr, nullptr);
34 CloseHandle(hAppend);
35 }
36
37 // Don't care about all the module ouput.
38 void OnLoadModule(LPCSTR, LPCSTR, DWORD64, DWORD, DWORD, LPCSTR, LPCSTR, ULONGLONG) {}
39};
40
41// For more info about "PreventSetUnhandledExceptionFilter" see:
42// "SetUnhandledExceptionFilter" and VC8

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected