MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / FindLoadedDLLsAutomatically

Function FindLoadedDLLsAutomatically

src/windows/CrashDebugger.cpp:323–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323bool FindLoadedDLLsAutomatically()
324{
325 HANDLE ths = ri::CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, 0);
326 if (!ths)
327 return false;
328
329 MODULEENTRY32 me32;
330 me32.dwSize = sizeof(MODULEENTRY32);
331
332 if (!ri::Module32First(ths, &me32))
333 return false;
334
335 do {
336 std::string str = MakeStringFromTString(me32.szModule);
337 uintptr_t base = (uintptr_t) me32.modBaseAddr;
338 size_t size = (size_t) me32.modBaseSize;
339
340 g_loadedModules.push_back ({ str, base, size });
341 }
342 while (ri::Module32Next(ths, &me32));
343
344 CloseHandle(ths);
345 return true;
346}
347
348
349LONG WINAPI DMUnhandledExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo)

Callers 1

SetupCrashDebuggingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected