static INT OnShutdown(WPARAM wParam, LPARAM lParam) { UnhookEvent(ghShutdownHook); if(hPrebuildMenuHook) UnhookEvent(hPrebuildMenuHook); if (hSettingChanged) UnhookEvent(hSettingChanged); if (ghChangedHook) UnhookEvent(ghChangedHook); services.destroy(); DlgContactInfoUnLoadModule(); SvcReminderUnloadModule(); // uninitialize classes CtrlContactUnLoadModule(); CtrlButtonUnloadModule(); SvcConstantsUnloadModule(); UnhookEvent(ghPrebuildStatusMenu); SvcEMailUnloadModule(); SvcFlagsUnloadModule(); SvcGenderUnloadModule(); SvcHomepageUnloadModule(); SvcPhoneUnloadModule(); OptionsUnloadModule(); mir_free(hMenuItemAccount); return 0; }
/** * This function unloads the module. * * @param none * * @return nothing **/ VOID SvcGenderUnloadModule() { // unhook event handlers UnhookEvent(hChangedHook); hChangedHook = NULL; UnhookEvent(hApplyIconHook); hApplyIconHook = NULL; UnhookEvent(hRebuildIconsHook); hRebuildIconsHook = NULL; }
void UninitOptions(void) { /* Option Page */ UnhookEvent(hHookOptInit); /* Trigger */ UnhookEvent(hHookModulesLoaded); }
extern "C" __declspec(dllexport) int Unload(void) { UnhookWindowsHooks(); if (hModulesLoaded) UnhookEvent(hModulesLoaded); if (hMsgEventHook) UnhookEvent(hMsgEventHook); if (hOptionsInitialize) UnhookEvent(hOptionsInitialize); if (hEnableService) DestroyServiceFunction(hEnableService); if (hDisableService) DestroyServiceFunction(hDisableService); if (hStartBlinkService) DestroyServiceFunction(hStartBlinkService); if (hEventsOpenedService) DestroyServiceFunction(hEventsOpenedService); if (hFlashingEventService) DestroyServiceFunction(hFlashingEventService); if (hNormalizeSequenceService) DestroyServiceFunction(hNormalizeSequenceService); // Wait for thread to exit SetEvent(hExitEvent); WaitForSingleObject(hThread, INFINITE); RestoreLEDState(); CloseKeyboardDevice(); destroyProcessList(); destroyProtocolList(); return 0; }
bool SvcGenderEnableExtraIcons(bool bEnable, bool bUpdateDB) { bool bChanged; if (bUpdateDB) { bChanged = g_eiGender != bEnable; db_set_b(NULL, MODNAME, SET_CLIST_EXTRAICON_GENDER2, g_eiGender = bEnable); } else bChanged = g_eiGender = db_get_b(NULL, MODNAME, SET_CLIST_EXTRAICON_GENDER2, 0) != 0; if (g_eiGender) { // Gender checked or dropdown select if (ghExtraIconSvc == INVALID_HANDLE_VALUE) ghExtraIconSvc = ExtraIcon_RegisterIcolib("gender", LPGEN("Gender (uinfoex)"), ICO_COMMON_MALE); // hook events if (hChangedHook == NULL) hChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, (MIRANDAHOOK)OnContactSettingChanged); if (hApplyIconHook == NULL) hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, (MIRANDAHOOK)OnCListApplyIcons); } else { if (hChangedHook) { UnhookEvent(hChangedHook); hChangedHook = NULL; } if (hApplyIconHook) { UnhookEvent(hApplyIconHook); hApplyIconHook = NULL; } } return bChanged; }
bool SvcHomepageEnableExtraIcons(bool bEnable, bool bUpdateDB) { bool bChanged; if (bUpdateDB) { bChanged = g_eiHome != bEnable; db_set_b(NULL, MODNAME, SET_CLIST_EXTRAICON_HOMEPAGE, g_eiHome = bEnable); } else bChanged = g_eiHome = db_get_b(NULL, MODNAME, SET_CLIST_EXTRAICON_HOMEPAGE, DEFVAL_CLIST_EXTRAICON_HOMEPAGE) != 0; if (g_eiHome) { // hook events if (hChangedHook == NULL) hChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, (MIRANDAHOOK)OnContactSettingChanged); if (hApplyIconHook == NULL) hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, (MIRANDAHOOK)OnCListApplyIcons); if (ghExtraIconSvc == INVALID_HANDLE_VALUE) ghExtraIconSvc = ExtraIcon_Register("homepage", LPGEN("Homepage (uinfoex)"), ICO_BTN_GOTO); } else { if (hChangedHook) { UnhookEvent(hChangedHook); hChangedHook = NULL; } if (hApplyIconHook) { UnhookEvent(hApplyIconHook); hApplyIconHook = NULL; } } return bChanged; }
extern "C" __declspec(dllexport) int Unload(void) { UnhookEvent(hHookedNewEvent); UnhookEvent(hHookedOpt); UnhookEvent(hHookedInit); return 0; }
bool SvcPhoneEnableExtraIcons(bool bEnable, bool bUpdateDB) { bool bChanged; if (bUpdateDB) { bChanged = g_eiPhone != bEnable; db_set_b(NULL, MODNAME, SET_CLIST_EXTRAICON_PHONE, g_eiPhone = bEnable); } else bChanged = g_eiPhone = db_get_b(NULL, MODNAME, SET_CLIST_EXTRAICON_PHONE, DEFVAL_CLIST_EXTRAICON_PHONE) != 0; // force module enabled, if extraicon plugin was found if (g_eiPhone) { // hook events if (hChangedHook == NULL) hChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, (MIRANDAHOOK)OnContactSettingChanged); if (hApplyIconHook == NULL) hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, (MIRANDAHOOK)OnCListApplyIcons); if (ghExtraIconSvc == INVALID_HANDLE_VALUE) ghExtraIconSvc = ExtraIcon_Register("sms", LPGEN("Phone (uinfoex)"), ICO_BTN_CELLULAR); } else { if (hChangedHook) { UnhookEvent(hChangedHook); hChangedHook = NULL; } if (hApplyIconHook) { UnhookEvent(hApplyIconHook); hApplyIconHook = NULL; } } return bChanged; }
int UnhookEvents() { UnhookEvent(hModulesLoaded); UnhookEvent(hOptionsInitialize); return 0; }
extern "C" int __declspec(dllexport) Unload(void) { UnhookEvent(hModulesLoaded); UnhookEvent(hPrebuildContactMenu); UnhookEvent(hOptionsInit); if(hWindowEvent != NULL) UnhookEvent(hWindowEvent); DestroyServiceFunction(hServiceContactMenu); Netlib_CloseHandle(g_hNetlibUser); if(hTabsrmmButtonPressed != NULL) UnhookEvent(hTabsrmmButtonPressed); for(int i=0; i < PasteToWeb::pages; ++i) if(pasteToWebs[i] != NULL) { delete pasteToWebs[i]; pasteToWebs[i] = NULL; } if(Options::instance != NULL) { delete Options::instance; Options::instance = NULL; } delete contactWindows; return 0; }
int OnPreShutdown(WPARAM wParam, LPARAM lParam) { if(current_status != ID_STATUS_OFFLINE) LogOut(); UnhookEvent(hIdleEventHook); UnhookEvent(hWindowEventHook); return 0; }
static VOID CALLBACK SetStatusTimed(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime) { KillTimer(NULL, setStatusTimerId); UnhookEvent(hProtoAckHook); UnhookEvent(hCSStatusChangeHook); UnhookEvent(hStatusChangeHook); CallService(MS_CS_SETSTATUSEX, (WPARAM)&startupSettings, 0); }
static void _ExtFrames_UninitServices() { if (ExtFrames.hookSBShowTooltip) UnhookEvent( ExtFrames.hookSBShowTooltip ); if (ExtFrames.hookSBHideTooltip) UnhookEvent( ExtFrames.hookSBHideTooltip ); if (ExtFrames.hookPrebuildFrameMenu) UnhookEvent( ExtFrames.hookPrebuildFrameMenu ); ExtFrames.hookSBShowTooltip = NULL; ExtFrames.hookSBHideTooltip = NULL; ExtFrames.hookPrebuildFrameMenu = NULL; }
int UnhookEvents() { UnhookEvent(hModulesLoaded); UnhookEvent(hOptionsInitialise); UnhookEvent(hPreShutdown); KillTimers(); return 0; }
extern "C" _declspec(dllexport) int Unload(void) { RemoveNotOnListSettings(); UnhookEvent(hOptInitialize); UnhookEvent(hModulesLoaded); UnhookEvent(hDBContactAdded); UnhookEvent(hDBEventAdded); UnhookEvent(hDBEventFilterAdd); return 0; }
extern "C" __declspec(dllexport) int Unload(void) { DestroyServiceFunction(hService); DestroyServiceFunction(hService2); DestroyServiceFunction(hService3); UnhookEvent(hHook); UnhookEvent(hOnButtonPressed); return 0; }
extern "C" int __declspec(dllexport) Unload(void) { DeInitPopups(); DeInitOptions(); UnhookEvent(hModulesLoaded); UnhookEvent(hPreBuildCMenu); UnhookEvent(hSettingChanged); return 0; }
// // Unload() // Called by Miranda when Plugin is unloaded. // extern "C" __declspec(dllexport) int Unload(void) { WindowList_Destroy(hFileList); if(hHookSkinIconsChanged != NULL) UnhookEvent(hHookSkinIconsChanged); UnhookEvent(hHookDbSettingChange); UnhookEvent(hHookContactAdded); return 0; }
extern "C" int __declspec( dllexport ) Unload( void ) { UnhookEvent(hModulesLoaded); UnhookEvent(hModulesLoadedTB); g_MenuUninit(); g_Instances.destroy(); return 0; }
extern "C" int __declspec(dllexport) Unload(void) { if (hTimer) KillTimer(NULL, hTimer); for (int i = 0; i < acc_num; i++) DeleteResults(acc[i].results.next); free(acc); UnhookEvent(hMirandaStarted); UnhookEvent(hOptionsInitial); return 0; }
void FreeGlobals() { int i; if (g_dat) { for (i=0;i<sizeof(g_dat->hIcons)/sizeof(g_dat->hIcons[0]);i++) DestroyIcon(g_dat->hIcons[i]); free(g_dat); } if (g_hDbEvent) UnhookEvent(g_hDbEvent); if (g_hAck) UnhookEvent(g_hAck); }
void DeinitDBFilter() { UnhookEvent(hDBEventPreAdd); hDBEventPreAdd = 0; UnhookEvent(hDBEventAdded); hDBEventAdded = 0; UnhookEvent(hContactSettingChanged); hContactSettingChanged = 0; if (timerId) KillTimer(0, timerId); DeleteTimerProc(0, 0, 0, 0); }
extern "C" int __declspec(dllexport) Unload(void) { if (g_hContactSettingChanged) UnhookEvent(g_hContactSettingChanged); if (g_hProtoContactIsTyping) UnhookEvent(g_hProtoContactIsTyping); if (g_hProtoAck) UnhookEvent(g_hProtoAck); if (g_hOptionsInitialize) UnhookEvent(g_hOptionsInitialize); if (g_hModulesLoaded) UnhookEvent(g_hModulesLoaded); delete g_pTooltipNotify; return 0; }
__declspec(dllexport)int Unload(void) { UnhookEvent(ehdb); if(ehmissed!=NULL) UnhookEvent(ehmissed); UnhookEvent(ehproto[0]); UnhookEvent(ehproto[1]); UnhookEvent(ehmissed_proto); return 0; }
void UnhookEvents(void) { UnhookEvent(g_hModulesLoaded); UnhookEvent(g_hSystemPreShutdown); UnhookEvent(g_hHookContactDblClick); // UnhookEvent(g_hIconsChanged); // UnhookEvent(g_hIconsChanged2); if (g_hSmileyOptionsChanged) UnhookEvent(g_hSmileyOptionsChanged); DeleteCriticalSection(&cs); }
extern "C" __declspec(dllexport) int Unload() { logmsg("Unload"); UnhookEvent(hProtoAck); UnhookEvent(hContactSettingChanged); UnhookEvent(hContactStatusChanged); UnhookEvent(hHookedInit); DestroyServiceFunction(hservosda); DestroyHookableEvent(hHookContactStatusChanged); return 0; }
extern "C" int POPUPS2_API Unload() { if(hEventReloadFont) UnhookEvent(hEventReloadFont); UnhookEvent(hEventPreShutdown); UnhookEvent(hEventModulesLoaded); DeinitNotify(); if(ServiceExists(MS_FONT_REGISTERW)) { DeleteObject(hFontFirstLine); DeleteObject(hFontSecondLine); DeleteObject(hFontTime); } // otherwise, no need to delete the handle return 0; }
static int SRUrlShutdown(WPARAM, LPARAM) { if (hEventContactSettingChange) UnhookEvent(hEventContactSettingChange); if (hContactDeleted) UnhookEvent(hContactDeleted); if (hUrlWindowList) { WindowList_Broadcast(hUrlWindowList, WM_CLOSE, 0, 0); WindowList_Destroy(hUrlWindowList); } return 0; }
int PreShutdown(WPARAM wParam, LPARAM lParam) { if (hwnd2watchedVarsWindow) DestroyWindow(hwnd2watchedVarsWindow); if (hwnd2mainWindow) DestroyWindow(hwnd2mainWindow); if (hwnd2importWindow) DestroyWindow(hwnd2importWindow); UnhookEvent(hSettingsChangedHook); UnhookEvent(hOptInitHook); UnhookEvent(hPreShutdownHook); DestroyServiceFunction(sServicemodeLaunch); DestroyServiceFunction(sMenuCommand); DestroyServiceFunction(sImport); return 0; }
extern "C" int __declspec(dllexport) Unload(void) { UnhookEvent(hModulesLoaded); UnhookEvent(hEventPreShutdown); UnhookEvent(hOptionsInit); UnhookEvent(hPrebuildContactMenu); UnhookEvent(hTabsrmmButtonPressed); DestroyServiceFunction(hServiceUpload); DestroyServiceFunction(hServiceShowManager); DestroyServiceFunction(hServiceContactMenu); DestroyServiceFunction(hServiceMainMenu); return 0; }