MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / DllMain

Function DllMain

c/stringzilla.c:366–376  ·  view source on GitHub ↗

Called either from CRT code or out own `_DLLMainCRTStartup`, when a DLL is loaded. */

Source from the content-addressed store, hash-verified

364
365/* Called either from CRT code or out own `_DLLMainCRTStartup`, when a DLL is loaded. */
366BOOL WINAPI DllMain(HINSTANCE hints, DWORD forward_reason, LPVOID lp) {
367 switch (forward_reason) {
368 case DLL_PROCESS_ATTACH:
369 sz_dispatch_table_init(); // Ensure initialization
370 return TRUE;
371 case DLL_THREAD_ATTACH: return TRUE;
372 case DLL_THREAD_DETACH: return TRUE;
373 case DLL_PROCESS_DETACH: return TRUE;
374 }
375 return TRUE;
376}
377
378#if SZ_AVOID_LIBC
379/* Called when the DLL is loaded, and ther is no CRT code. */

Callers 1

_DllMainCRTStartupFunction · 0.85

Calls 1

sz_dispatch_table_initFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…