// shutdown sequence void CISXEQ::Shutdown() { MQ2Shutdown(); DisconnectServices(); UnRegisterServices(); UnRegisterTopLevelObjects(); UnRegisterDataTypes(); UnRegisterAliases(); UnRegisterCommands(); }
BOOL Detour_ProcessGameEvents(VOID) { CAutoLock Lock(&gPulseCS); int ret = Heartbeat(); #ifdef ISXEQ if (!pISInterface->ScriptEngineActive()) pISInterface->LavishScriptPulse(); #endif int ret2 = Trampoline_ProcessGameEvents(); #ifndef ISXEQ if(ret==2 && bPluginCS==0) { OutputDebugString("I am loading in ProcessGameEvents"); //we are loading stuff DWORD oldscreenmode = ScreenMode; ScreenMode = 3; InitializeMQ2Commands(); InitializeMQ2Windows(); MQ2MouseHooks(1); Sleep(100); InitializeMQ2KeyBinds(); #ifndef ISXEQ InitializeMQ2Plugins(); #endif ScreenMode = oldscreenmode; SetEvent(hLoadComplete); } else if(ret==1) { OutputDebugString("I am unloading in ProcessGameEvents"); //we are unloading stuff DWORD oldscreenmode = ScreenMode; ScreenMode = 3; WriteChatColor(UnloadedString,USERCOLOR_DEFAULT); DebugSpewAlways("%s", UnloadedString); UnloadMQ2Plugins(); MQ2Shutdown(); DebugSpew("Shutdown completed"); g_Loaded = FALSE; ScreenMode = oldscreenmode; SetEvent(hUnloadComplete); } #endif return ret2; }