mirror of
https://github.com/reactos/reactos.git
synced 2025-06-02 16:01:58 +00:00

- 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
11 lines
359 B
C
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;
|
|
}
|