Search notes:

Windows CRT: dllcrt0.c

_DllMainCRTStartup

dlcrt0.c contains _DllMainCRTStartup which is the default entry point for DLLs.
_DllMainCRTStartup calls DllMain via __DllMainCRTStartup (of which a dummy version is provided in dllmain.c.
_DllMainCRTStartup returns an int` (long?) that is interpreted as a boolean) and is declared as stdcall which is hidden behind the WINAPI macro) :
BOOL WINAPI _DllMainCRTStartup(
        HANDLE  hDllHandle,
        DWORD   dwReason,
        LPVOID  lpreserved
        ) {
        …
}

TODO

In newer versions of Visual Studio, the role of this file seems to gone to vcruntime/dll_dllmain.cpp.

See also

Some CRT sources

Index