1
0
Fork 0
mirror of https://github.com/reactos/reactos.git synced 2025-06-02 16:01:58 +00:00
reactos/reactos/lib/sdk/crt/startup/mscdllmain.c
Jérôme Gardou dec26d7804 [MINGWEX]
- mark DllMain as a weak symbol for GCC.
- supply a stubbed DllMain for MSVC.
- DllMain is optional, and some DLLs don't implement it. That doesn't mean that they have no entry point, it means "I have nothing more to initialize than the CRT".

svn path=/trunk/; revision=57171
2012-08-26 23:31:49 +00:00

11 lines
359 B
C

#include <oscalls.h>
#define _DECL_DLLMAIN
#include <process.h>
WINBOOL WINAPI DllMain (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
/* If the DLL provides no DllMain, then chances are that it doesn't bother with thread initialization */
if(dwReason == DLL_PROCESS_ATTACH)
DisableThreadLibraryCalls(hDllHandle);
return TRUE;
}