Пример #1
0
void UninitSettingsDlg(void)
{
	/* Menu Item */
	DestroyServiceFunction(hServiceMenuCommand);
	/* Services */
	DestroyServiceFunction(hServiceShowDlg);
}
Пример #2
0
int DestroyServices()
{
	DestroyServiceFunction(hsYGMove);
	DestroyServiceFunction(hsYGReset);

	return 0;
}
Пример #3
0
void UninitWatcher(void)
{
	/* remember watcher if running */
	if (!ServiceStopWatcher(0, 0))
		if (db_get_b(NULL, "AutoShutdown", "RememberOnRestart", SETTING_REMEMBERONRESTART_DEFAULT))
			db_set_b(NULL, "AutoShutdown", "RememberOnRestart", SDROR_RUNNING);

	/* Message Shutdown */
	UnhookEvent(hHookEventAdded);
	/* Status Shutdown*/
	UnhookEvent(hHookSettingChanged);
	/* Idle Shutdown */
	UnhookEvent(hHookIdleChanged);
	/* Transfer Shutdown */
	UnhookEvent(hHookProtoAck);
	mir_free(transfers); /* does NULL check */
	/* Weather Shutdown */
	UnhookEvent(hHookWeatherUpdated); /* does NULL check */
	/* Services */
	DestroyServiceFunction(hServiceStartWatcher);
	DestroyServiceFunction(hServiceStopWatcher);
	DestroyServiceFunction(hServiceIsEnabled);
	DestroyHookableEvent(hEventWatcherChanged);
	/* Misc */
	UnhookEvent(hHookModulesLoaded);
}
Пример #4
0
MIRAPI int Unload(void)
{
	int i;

	for (i = SIZEOF(popupServices); i--; )
		DestroyServiceFunction(popupServices[i].handle);

	SrmmMenu_Unload();

	UnhookEvent(hOptionsInitialize);
	UnhookEvent(hModulesLoaded);
	UnhookEvent(hOkToExit);
	UnhookEvent(hEventStatusChanged);
	UnhookEvent(hIconsChanged);
	UnhookEvent(hFontsChanged);
	UnhookEvent(hTBLoaded);

	DestroyServiceFunction(hShowHistory);
	DestroyServiceFunction(hTogglePopup);
	DestroyServiceFunction(hGetStatus);
	DestroyServiceFunction(hSquareFad);

	DeleteObject(fonts.title);
	DeleteObject(fonts.clock);
	DeleteObject(fonts.text);
	DeleteObject(fonts.action);
	DeleteObject(fonts.actionHover);

	DeleteObject(hbmNoAvatar);

	FreeLibrary(hDwmapiDll);
	FreeLibrary(hUserDll);
	FreeLibrary(hMsimgDll);
//	FreeLibrary(hKernelDll);
	FreeLibrary(hGdiDll);

	if(PopUpOptions.SkinPack) mir_free(PopUpOptions.SkinPack);
	mir_free(PopUpOptions.Effect);

	OptAdv_UnregisterVfx();
	UnloadPopupThread();
	UnloadPopupWnd2();
	PopupHistoryUnload();

	UnregisterClass (MAKEINTATOM(g_wndClass.cPopupWnd2),hInst);
	UnregisterClassW(L"PopupEditBox",hInst);
	UnregisterClass (MAKEINTATOM(g_wndClass.cPopupMenuHostWnd),hInst);
	UnregisterClass (MAKEINTATOM(g_wndClass.cPopupThreadManagerWnd),hInst);
	UnregisterClass (MAKEINTATOM(g_wndClass.cPopupPreviewBoxWndclass),hInst);
	UnregisterClass (MAKEINTATOM(g_wndClass.cPopupPlusDlgBox),hInst);

	UnloadGDIPlus();

	UnloadActions();

	CloseHandle(hMainThread);

	return 0;
}
Пример #5
0
static int ShutdownProc(WPARAM wParam, LPARAM lParam)
{
	if (hSvc_invoke)
		DestroyServiceFunction(hSvc_invoke);
	if (hSvc_fillby)
		DestroyServiceFunction(hSvc_fillby);
	return 0;
}
Пример #6
0
extern "C" __declspec (dllexport) int Unload(void)
{
    DestroyServiceFunction(hServiceToggle);
    DestroyServiceFunction(hServiceClear);

    RemoveReadEvents();
    return 0;
}
Пример #7
0
extern "C" int __declspec(dllexport) Unload(void)
{
	UnhookEvent(hCSModuleLoadedHook);

	DestroyServiceFunction(hGetProfileService);
	DestroyServiceFunction(hGetProfileCountService);
	DestroyServiceFunction(hGetProfileNameService);
	return 0;
}
Пример #8
0
void CB_DeInitCustomButtons()
{
	DestroyHookableEvent(hHookToolBarLoadedEvt);
	DestroyHookableEvent(hHookButtonPressedEvt);
	DestroyServiceFunction(hButtonsBarAddButton);
	DestroyServiceFunction(hButtonsBarRemoveButton);
	DestroyServiceFunction(hButtonsBarModifyButton);
	DestroyServiceFunction(hButtonsBarGetButtonState);
	DestroyServiceFunction(hButtonsBarSetButtonState);
}
Пример #9
0
extern "C" __declspec(dllexport) int Unload(void)
{
	DestroyServiceFunction(hService);
	DestroyServiceFunction(hService2);
	DestroyServiceFunction(hService3);
	UnhookEvent(hHook);
	UnhookEvent(hOnButtonPressed);

	return 0;
}
Пример #10
0
int onShutdown(WPARAM, LPARAM)
{
	DestroyServiceFunction(hContactReturnedAction);
	DestroyServiceFunction(hContactStillAbsentAction);
	DestroyServiceFunction(hMissYouAction);
	DestroyServiceFunction(hMenuMissYouClick);

	IcoLib_ReleaseIcon(hIcon);
	return 0;
}
Пример #11
0
int CMPlugin::Unload()
{
	for (int i = 0; i < bLayNum; i++)
		mir_free(ptszLayStrings[i]);

	DestroyServiceFunction(hChangeLayout);
	DestroyServiceFunction(hGetLayoutOfText);
	DestroyServiceFunction(hChangeTextLayout);
	UnhookWindowsHookEx(kbHook_All);
	return 0;
}
Пример #12
0
static void UninitKeyBinding() 
{
	KeyBindingItem *ptr, *ptr2;
	ptr = keyBindingList;
	keyBindingList = NULL;
	for (; ptr != NULL; ptr = ptr2) {
		ptr2 = ptr->next;
		mir_free(ptr->actionName);
		mir_free(ptr->fullActionName);
		mir_free(ptr->actionGroupName);
		mir_free(ptr);
	}
	DestroyServiceFunction(hKeyBindings_Register);
	DestroyServiceFunction(hKeyBindings_Get);
}
Пример #13
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;
}
Пример #14
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;
}
Пример #15
0
extern "C" int __declspec(dllexport) Unload(void)
{
	DestroyHookableEvent(hConnectionEvent);

	UnhookEvent(hCSModuleLoadedHook);

	if (hMainThread)
		CloseHandle(hMainThread);
	DestroyServiceFunction(hStopRecon);
	DestroyServiceFunction(hEnableProto);
	DestroyServiceFunction(hIsProtoEnabled);
	DestroyServiceFunction(hAnnounceStat);

	return 0;
}
Пример #16
0
extern "C" int __declspec(dllexport) Unload(void)
{
	if (hDummyService)
		DestroyServiceFunction(hDummyService);

	return 0;
}
Пример #17
0
int RemoveDialogBoxHook(void)
{
	DestroyServiceFunction(hServiceShowHelp); // does NULL check
	DestroyServiceFunction(hServiceSetContext); // does NULL check
	UnhookWindowsHookEx(hMessageHook);
	if (hKeyboardHook)
		UnhookWindowsHookEx(hKeyboardHook);
	if (hEatNextMouseHook)
		UnhookWindowsHookEx(hEatNextMouseHook);
	DeleteCriticalSection(&csDlgBoxSubclass);
	for (int i = 0; i<dlgBoxSubclassCount; i++)
		SetWindowLongPtr(dlgBoxSubclass[i].hwndDlg, GWLP_WNDPROC, (LONG_PTR)dlgBoxSubclass[i].pfnOldWndProc);
	mir_free(dlgBoxSubclass); // does NULL check

	return 0;
}
Пример #18
0
void FreeTypes()
{
	// Destroy services
	int i;
	for(i = 0; i < MAX_REGS(hServices); ++i)
		DestroyServiceFunction(hServices[i]);

	// Free internal structs
	for(i = 0; i < types.getCount(); i++)
	{
		SPEAK_TYPE *type = types[i];
		mir_free((void *) type->module);
		mir_free((void *) type->name);
		mir_free((void *) type->icon);

		if (type->numTemplates > 0)
		{
			for(int i = 0; i < type->numTemplates; i++)
				mir_free((void *) type->templates[i]);
			mir_free(type->templates);
		}

		mir_free(type);
	}

	types.destroy();
}
Пример #19
0
extern "C" int __declspec(dllexport) Unload(void)
{
	UninitIdleTimer();

	if (g_hWinHook != 0)
		UnhookWinEvent(g_hWinHook);

	DestroyServiceFunction(g_hHideService);

	if (g_hListenWindow)
	{
		WTSUnRegisterSessionNotification(g_hListenWindow);
		DestroyWindow(g_hListenWindow);
	}

	if (hDwmApi)
		FreeLibrary(hDwmApi);

	// free all sessions
	HWND_ITEM *pTemp = g_pMirWnds;
	while (pTemp != NULL)
	{
		HWND_ITEM *pNext = pTemp->next;
		delete pTemp;
		pTemp = pNext;
	}

	delete[] oldStatus;
	delete[] oldStatusMsg;

	return 0;
}
Пример #20
0
CDbxMdb::~CDbxMdb()
{
	// destroy modules
	HeapDestroy(m_hModHeap);

	mdb_env_close(m_pMdbEnv);

	DestroyServiceFunction(hService);
	UnhookEvent(hHook);

	if (m_crypto)
		m_crypto->destroy();

	DestroyHookableEvent(hContactDeletedEvent);
	DestroyHookableEvent(hContactAddedEvent);
	DestroyHookableEvent(hSettingChangeEvent);
	DestroyHookableEvent(hEventMarkedRead);

	DestroyHookableEvent(hEventAddedEvent);
	DestroyHookableEvent(hEventDeletedEvent);
	DestroyHookableEvent(hEventFilterAddedEvent);

	DestroyDbInstance(this);
	mir_free(m_tszProfileName);
}
Пример #21
0
int __cdecl onSystemOKToExit(WPARAM wParam,LPARAM lParam) {

    if(bSavePass) {
	LPSTR tmp = gpg_get_passphrases();
	DBWriteContactSettingString(0,szModuleName,"gpgSave",tmp);
	LocalFree(tmp);
    }
    else {
	DBDeleteContactSetting(0,szModuleName,"gpgSave");
    }
	if(bPGPloaded) pgp_done();
	if(bGPGloaded) gpg_done();
	rsa_done();
	while(iHook--) UnhookEvent(g_hHook[iHook]);
	mir_free(g_hHook);
	while(iService--) DestroyServiceFunction(g_hService[iService]);
	mir_free(g_hService);
	DestroyHookableEvent(g_hEvent[0]);
	DestroyHookableEvent(g_hEvent[1]);
	freeContactList();
	free_rtfconv();
#if defined(_DEBUG) || defined(NETLIB_LOG)
	DeinitNetlib();
#endif
	return 0;
}
Пример #22
0
int DeinitStatusIcons() {
	int i;
	DestroyHookableEvent(hHookIconPressedEvt);
	for(i = 0; i < 3; i++) DestroyServiceFunction(hServiceIcon[i]);
	RemoveAllStatusIcons();
	return 0;
}
Пример #23
0
void MSN_RemoveContactMenus(void)
{
	UnhookEvent(hPrebuildMenuHook);

	MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hBlockMenuItem, 0);
	MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hLiveSpaceMenuItem, 0);
	MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hNetmeetingMenuItem, 0);
	MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hChatInviteMenuItem, 0);
	MSN_CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hOpenInboxMenuItem, 0);

	DestroyServiceFunction(hNetMeeting);
	DestroyServiceFunction(hBlockCom);
	DestroyServiceFunction(hSendHotMail);
	DestroyServiceFunction(hInviteChat);
	DestroyServiceFunction(hViewProfile);
}
Пример #24
0
void MSN_RemoveContactMenus(void)
{
	Menu_RemoveItem(hBlockMenuItem);
	Menu_RemoveItem(hLiveSpaceMenuItem);
#ifdef OBSOLETE
	Menu_RemoveItem(hNetmeetingMenuItem);
	DestroyServiceFunction(hNetMeeting);
#endif
	Menu_RemoveItem(hChatInviteMenuItem);
	Menu_RemoveItem(hOpenInboxMenuItem);

	DestroyServiceFunction(hBlockCom);
	DestroyServiceFunction(hSendHotMail);
	DestroyServiceFunction(hInviteChat);
	DestroyServiceFunction(hViewProfile);
}
Пример #25
0
static int ClcPreshutdown(WPARAM, LPARAM)
{
	cfg::shutDown = TRUE;
	if (hSvc_GetContactStatusMsg)
		DestroyServiceFunction(hSvc_GetContactStatusMsg);
	return 0;
}
Пример #26
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;
}
Пример #27
0
int DeinitProfilesModule()
{
    for ( int i=0; i < mcount; i++ )
        DestroyServiceFunction(hProfileServices[i]);

    if ( pce ) {
        for ( int i=0; i < pceCount; i++ )
            free( pce[i].szProto );
        free( pce );
    }

    UnregisterHotKeys();
    RemoveTopToolbarButtons();

    DestroyServiceFunction(hLoadAndSetProfileService);
    return 0;
}
Пример #28
0
void DeinitMenu() {
	UnhookEvent(hEventMenuBuild);
	DestroyServiceFunction(hServiceMenuRemove);
	DestroyServiceFunction(hServiceMenuDefault);
	DestroyServiceFunction(hServiceMenuEdit);
	DestroyServiceFunction(hServiceMenuAdd);
	DestroyServiceFunction(hServiceMenuConvert);
	DestroyServiceFunction(hServiceMenuOnOff);
	DestroyServiceFunction(hServiceContactMenu);
	DestroyServiceFunction(hServiceToggle);
}
Пример #29
0
int Shutdown(WPARAM, LPARAM)
{
	if (hFramesSBShow) UnhookEvent(hFramesSBShow);
	if (hFramesSBHide) UnhookEvent(hFramesSBHide);
	if (hAvChangeEvent) UnhookEvent(hAvChangeEvent);
	if (hShowTipEvent) UnhookEvent(hShowTipEvent);
	if (hHideTipEvent) UnhookEvent(hHideTipEvent);
	if (hAckEvent) UnhookEvent(hAckEvent);

	if (hShowTipService) DestroyServiceFunction(hShowTipService);
	if (hShowTipWService) DestroyServiceFunction(hShowTipWService);
	if (hHideTipService) DestroyServiceFunction(hHideTipService);

	if (hFolderChanged) UnhookEvent(hFolderChanged);

	DeinitMessagePump();
	DestroySkinBitmap();

	return 0;
}
Пример #30
0
extern "C" __declspec(dllexport) int Unload()
{
	logmsg("Unload");
	UnhookEvent(hProtoAck);
	UnhookEvent(hContactSettingChanged);
	UnhookEvent(hContactStatusChanged);
	UnhookEvent(hHookedInit);

	DestroyServiceFunction(hservosda);
	DestroyHookableEvent(hHookContactStatusChanged);
	return 0;
}