DllMain |
Description: | |
This shows how to prevent any of the CRT code from executing in a DLL. Usefull for making those tiny DLLs even smaller, and a bit faster. | |
Code: | |
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { /* ... */ return TRUE; } extern "C" BOOL __stdcall _DllMainCRTStartup( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { return DllMain( hinstDLL, fdwReason, lpvReserved ); } | |