On Windows, the standard DLL entry point is called DllMain. The second parameter is a DWORD, ul_reason_for_call.