MCPcopy Create free account
hub / github.com/beefytech/Beef / DllMain

Function DllMain

IDEHelper/DebugManager.cpp:595–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593
594#ifdef BF_PLATFORM_WINDOWS
595BOOL WINAPI DllMain(
596 HANDLE hDllHandle,
597 DWORD dwReason,
598 LPVOID lpreserved)
599{
600 if (dwReason == DLL_PROCESS_ATTACH)
601 {
602 BpInit("127.0.0.1", "Beef IDE");
603 BpSetThreadName("Main");
604 BfpThread_SetName(NULL, "Main", NULL);
605
606 llvm::install_fatal_error_handler(BfFatalErrorHandler, NULL);
607
608 //_CRTDBG_CHECK_EVERY_16_DF
609 //_CRTDBG_CHECK_ALWAYS_DF
610 //_CRTDBG_DELAY_FREE_MEM_DF
611
612 //_CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF /*| _CRTDBG_CHECK_ALWAYS_DF*/);
613 _CrtSetAllocHook(BfAllocHook);
614 }
615
616 if (dwReason == -123)
617 {
618 BpDump();
619 }
620
621 return TRUE;
622}
623#endif //BF_PLATFORM_WINDOWS
624
625//////

Callers

nothing calls this directly

Calls 4

BpInitFunction · 0.85
BpSetThreadNameFunction · 0.85
BpDumpFunction · 0.85
BfpThread_SetNameFunction · 0.50

Tested by

no test coverage detected