BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: return OnProcessAttach(hinstDLL); case DLL_PROCESS_DETACH: return OnProcessDetach(hinstDLL); } return TRUE; }
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID) { switch (reason) { case DLL_PROCESS_ATTACH: return OnProcessAttach((HINSTANCE)_AtlBaseModule.GetModuleInstance()); case DLL_PROCESS_DETACH: return OnProcessDetach(); case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: break; } return TRUE; }
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: OnProcessAttach() ; break ; case DLL_THREAD_ATTACH: OnThreadAttach() ; break ; case DLL_THREAD_DETACH: OnThreadDetach() ; break ; case DLL_PROCESS_DETACH: OnProcessDetach() ; break; } return TRUE; }