BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: { // Store the module handle of this dll SetCurrentModuleHandle (hModule); RegisterUserMessages (); _beginthreadex (NULL, 0, RollingSpacesThreadProc, NULL, NULL, NULL); } break; case DLL_PROCESS_DETACH: { } break; } return TRUE; }
//----------------------------------------------------------------------------- // Purpose: Force registration on .dll load // FIXME: Should this be a client/server system? //----------------------------------------------------------------------------- CUserMessages::CUserMessages() { // Game specific registration function; RegisterUserMessages(); }