| 155 | } |
| 156 | |
| 157 | bool CrashHandler::Install() |
| 158 | { |
| 159 | // load dbghelp at install/startup, that way we're not LoadLibrary()'ing after a crash |
| 160 | // .. because that probably wouldn't go down well. |
| 161 | HMODULE mod = StackWalker::LoadDbgHelpLibrary(); |
| 162 | if (mod) |
| 163 | s_dbghelp_module.Adopt(mod); |
| 164 | |
| 165 | SetUnhandledExceptionFilter(ExceptionHandler); |
| 166 | return true; |
| 167 | } |
| 168 | |
| 169 | void CrashHandler::SetWriteDirectory(std::string_view dump_directory) |
| 170 | { |