summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/Alarms/src/alarmlist.cpp5
-rw-r--r--plugins/AssocMgr/src/assoclist.cpp16
-rw-r--r--plugins/AutoShutdown/src/main.cpp1
-rw-r--r--plugins/AutoShutdown/src/settingsdlg.cpp16
-rw-r--r--plugins/AutoShutdown/src/settingsdlg.h1
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp10
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp11
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp5
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp14
-rw-r--r--plugins/ChangeKeyboardLayout/src/hook_events.cpp6
-rw-r--r--plugins/ChangeKeyboardLayout/src/stdafx.h2
-rw-r--r--plugins/Cln_skinedit/src/main.cpp18
-rw-r--r--plugins/CountryFlags/src/ip2country.cpp7
-rw-r--r--plugins/DbChecker/src/main.cpp4
-rw-r--r--plugins/Exchange/src/services.cpp9
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp13
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp2
-rw-r--r--plugins/IEHistory/src/services.cpp10
-rw-r--r--plugins/IEHistory/src/services.h1
-rw-r--r--plugins/Import/src/main.cpp5
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp22
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp6
-rw-r--r--plugins/NoHistory/src/dllmain.cpp8
-rw-r--r--plugins/OpenFolder/src/openFolder.cpp5
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp4
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp5
-rw-r--r--plugins/Quotes/src/Forex.cpp5
-rw-r--r--plugins/StatusManager/src/KeepStatus/keepstatus.cpp24
-rw-r--r--plugins/StatusManager/src/StartupStatus/ss_profiles.cpp15
-rw-r--r--plugins/StatusManager/src/StartupStatus/startupstatus.cpp20
-rw-r--r--plugins/StatusManager/src/StartupStatus/startupstatus.h1
-rw-r--r--plugins/TabSRMM/src/srmm.cpp1
-rw-r--r--plugins/TabSRMM/src/stdafx.h1
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp4
-rw-r--r--plugins/TipperYM/src/tipper.cpp14
-rw-r--r--plugins/UserGuide/src/main.cpp4
-rw-r--r--plugins/UserInfoEx/src/commonheaders.cpp10
-rw-r--r--plugins/UserInfoEx/src/stdafx.h2
-rw-r--r--plugins/UserInfoEx/src/svc_email.cpp4
-rw-r--r--plugins/Variables/src/variables.cpp24
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp3
-rw-r--r--plugins/WhenWasIt/src/services.cpp34
-rw-r--r--plugins/WhenWasIt/src/services.h1
-rw-r--r--plugins/ZeroNotification/src/main.cpp5
-rw-r--r--plugins/wbOSD/src/main.cpp2
-rw-r--r--plugins/wbOSD/src/stdafx.h1
-rw-r--r--plugins/wbOSD/src/wbOSD.cpp2
-rw-r--r--protocols/AimOscar/src/aim.cpp2
-rw-r--r--protocols/AimOscar/src/links.cpp9
-rw-r--r--protocols/AimOscar/src/links.h1
-rw-r--r--protocols/IRCG/src/services.cpp14
-rw-r--r--protocols/MSN/src/msn_links.cpp5
-rw-r--r--protocols/MSN/src/msn_menu.cpp13
53 files changed, 93 insertions, 334 deletions
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp
index a8c04b7d42..0ea5f59810 100755
--- a/plugins/Alarms/src/alarmlist.cpp
+++ b/plugins/Alarms/src/alarmlist.cpp
@@ -12,7 +12,7 @@ DWORD timer_id;
static SYSTEMTIME last_check, last_saved_check;
-HANDLE hAlarmTriggeredEvent, hAddAlarmService;
+HANDLE hAlarmTriggeredEvent;
bool startup = true;
@@ -798,7 +798,7 @@ void InitList()
LoadAlarms();
hAlarmTriggeredEvent = CreateHookableEvent(ME_ALARMS_TRIGGERED);
- hAddAlarmService = CreateServiceFunction(MS_ALARMS_ADDALARM, AddAlarmService);
+ CreateServiceFunction(MS_ALARMS_ADDALARM, AddAlarmService);
InitAlarmWin();
@@ -817,7 +817,6 @@ void DeinitList()
KillTimer(0, timer_id);
DestroyHookableEvent(hAlarmTriggeredEvent);
- DestroyServiceFunction(hAddAlarmService);
SaveAlarms(); // we may have erased some 'cause they were once-offs that were triggeredf
}
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp
index b8273c7903..873283fea4 100644
--- a/plugins/AssocMgr/src/assoclist.cpp
+++ b/plugins/AssocMgr/src/assoclist.cpp
@@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Options
extern HINSTANCE hInst;
static HANDLE hHookOptInit;
-// Services
-static HANDLE hServiceAddFile, hServiceRemoveFile, hServiceAddUrl, hServiceRemoveUrl;
/************************* Assoc List *****************************/
@@ -943,10 +941,10 @@ void InitAssocList(void)
nAssocListCount = 0;
// Services
- hServiceAddFile = CreateServiceFunction(MS_ASSOCMGR_ADDNEWFILETYPE, ServiceAddNewFileType);
- hServiceRemoveFile = CreateServiceFunction(MS_ASSOCMGR_REMOVEFILETYPE, ServiceRemoveFileType);
- hServiceAddUrl = CreateServiceFunction(MS_ASSOCMGR_ADDNEWURLTYPE, ServiceAddNewUrlType);
- hServiceRemoveUrl = CreateServiceFunction(MS_ASSOCMGR_REMOVEURLTYPE, ServiceRemoveUrlType);
+ CreateServiceFunction(MS_ASSOCMGR_ADDNEWFILETYPE, ServiceAddNewFileType);
+ CreateServiceFunction(MS_ASSOCMGR_REMOVEFILETYPE, ServiceRemoveFileType);
+ CreateServiceFunction(MS_ASSOCMGR_ADDNEWURLTYPE, ServiceAddNewUrlType);
+ CreateServiceFunction(MS_ASSOCMGR_REMOVEURLTYPE, ServiceRemoveUrlType);
// Notify Shell
nNotifyTimerID = 0;
@@ -995,12 +993,6 @@ void UninitAssocList(void)
// Options
UnhookEvent(hHookOptInit);
- // Services
- DestroyServiceFunction(hServiceAddFile);
- DestroyServiceFunction(hServiceRemoveFile);
- DestroyServiceFunction(hServiceAddUrl);
- DestroyServiceFunction(hServiceRemoveUrl);
-
// Assoc List
BYTE fOnlyWhileRunning = db_get_b(NULL, "AssocMgr", "OnlyWhileRunning", SETTING_ONLYWHILERUNNING_DEFAULT);
for (int i = 0; i < nAssocListCount; ++i) {
diff --git a/plugins/AutoShutdown/src/main.cpp b/plugins/AutoShutdown/src/main.cpp
index 4da45e527e..2d68004d38 100644
--- a/plugins/AutoShutdown/src/main.cpp
+++ b/plugins/AutoShutdown/src/main.cpp
@@ -92,7 +92,6 @@ extern "C" __declspec(dllexport) int Load(void)
extern "C" __declspec(dllexport) int Unload(void)
{
UninitOptions();
- UninitSettingsDlg(); /* before UninitWatcher() */
UninitWatcher(); /* before UninitFrame() */
UninitFrame();
UninitShutdownSvc();
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp
index 58e3911e07..15bcc187c5 100644
--- a/plugins/AutoShutdown/src/settingsdlg.cpp
+++ b/plugins/AutoShutdown/src/settingsdlg.cpp
@@ -21,11 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-/* Menu Item */
-static HANDLE hServiceMenuCommand;
-
/* Services */
-static HANDLE hServiceShowDlg;
static HWND hwndSettingsDlg;
extern HINSTANCE hInst;
@@ -482,20 +478,12 @@ static INT_PTR MenuItemCommand(WPARAM, LPARAM)
void InitSettingsDlg(void)
{
/* Menu Item */
- hServiceMenuCommand = CreateServiceFunction("AutoShutdown/MenuCommand", MenuItemCommand);
+ CreateServiceFunction("AutoShutdown/MenuCommand", MenuItemCommand);
hMainMenuItem = hTrayMenuItem = NULL;
SetShutdownMenuItem(false);
/* Hotkey */
AddHotkey();
/* Services */
hwndSettingsDlg = NULL;
- hServiceShowDlg = CreateServiceFunction(MS_AUTOSHUTDOWN_SHOWSETTINGSDIALOG, ServiceShowSettingsDialog);
-}
-
-void UninitSettingsDlg(void)
-{
- /* Menu Item */
- DestroyServiceFunction(hServiceMenuCommand);
- /* Services */
- DestroyServiceFunction(hServiceShowDlg);
+ CreateServiceFunction(MS_AUTOSHUTDOWN_SHOWSETTINGSDIALOG, ServiceShowSettingsDialog);
}
diff --git a/plugins/AutoShutdown/src/settingsdlg.h b/plugins/AutoShutdown/src/settingsdlg.h
index 87f9e6a9f9..1521812f30 100644
--- a/plugins/AutoShutdown/src/settingsdlg.h
+++ b/plugins/AutoShutdown/src/settingsdlg.h
@@ -27,5 +27,4 @@ void SetShutdownToolbarButton(bool fActive);
/* Misc */
void InitSettingsDlg(void);
-void UninitSettingsDlg(void);
int ToolbarLoaded(WPARAM,LPARAM);
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp
index 791278c898..d5422b632f 100644
--- a/plugins/AutoShutdown/src/watcher.cpp
+++ b/plugins/AutoShutdown/src/watcher.cpp
@@ -32,7 +32,6 @@ static HANDLE hHookSettingChanged;
/* Weather Shutdown */
static HANDLE hHookWeatherUpdated;
/* Services */
-static HANDLE hServiceStartWatcher, hServiceStopWatcher, hServiceIsEnabled;
static HANDLE hEventWatcherChanged;
/* Misc */
static HANDLE hHookModulesLoaded;
@@ -342,9 +341,9 @@ void InitWatcher(void)
hHookWeatherUpdated = NULL;
/* Services */
hEventWatcherChanged = CreateHookableEvent(ME_AUTOSHUTDOWN_WATCHERCHANGED);
- hServiceStartWatcher = CreateServiceFunction(MS_AUTOSHUTDOWN_STARTWATCHER, ServiceStartWatcher);
- hServiceStopWatcher = CreateServiceFunction(MS_AUTOSHUTDOWN_STOPWATCHER, ServiceStopWatcher);
- hServiceIsEnabled = CreateServiceFunction(MS_AUTOSHUTDOWN_ISWATCHERENABLED, ServiceIsWatcherEnabled);
+ CreateServiceFunction(MS_AUTOSHUTDOWN_STARTWATCHER, ServiceStartWatcher);
+ CreateServiceFunction(MS_AUTOSHUTDOWN_STOPWATCHER, ServiceStopWatcher);
+ CreateServiceFunction(MS_AUTOSHUTDOWN_ISWATCHERENABLED, ServiceIsWatcherEnabled);
}
void UninitWatcher(void)
@@ -366,9 +365,6 @@ void UninitWatcher(void)
/* Weather Shutdown */
UnhookEvent(hHookWeatherUpdated); /* does NULL check */
/* Services */
- DestroyServiceFunction(hServiceStartWatcher);
- DestroyServiceFunction(hServiceStopWatcher);
- DestroyServiceFunction(hServiceIsEnabled);
DestroyHookableEvent(hEventWatcherChanged);
/* Misc */
UnhookEvent(hHookModulesLoaded);
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index 1f7e86af19..8b42954c44 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -27,7 +27,6 @@ HINSTANCE hInst;
HCURSOR hCurSplitNS, hCurSplitWE;
HANDLE g_hMainThread = NULL;
-HANDLE hServiceShowContactHistory, hServiceDeleteAllContactHistory, hServiceExecuteTask;
HANDLE *hEventIcons = NULL;
int iconsNum = 3;
HANDLE hToolbarButton;
@@ -253,9 +252,9 @@ extern "C" int __declspec(dllexport) Load(void)
hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
hCurSplitWE = LoadCursor(NULL, IDC_SIZEWE);
- hServiceShowContactHistory = CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY, ShowContactHistory);
- hServiceDeleteAllContactHistory = CreateServiceFunction(MS_HISTORY_DELETEALLCONTACTHISTORY, HistoryWindow::DeleteAllUserHistory);
- hServiceExecuteTask = CreateServiceFunction(MS_HISTORY_EXECUTE_TASK, ExecuteTaskService);
+ CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY, ShowContactHistory);
+ CreateServiceFunction(MS_HISTORY_DELETEALLCONTACTHISTORY, HistoryWindow::DeleteAllUserHistory);
+ CreateServiceFunction(MS_HISTORY_EXECUTE_TASK, ExecuteTaskService);
Options::instance = new Options();
@@ -274,10 +273,6 @@ extern "C" int __declspec(dllexport) Unload(void)
CloseHandle(g_hMainThread);
g_hMainThread = NULL;
- DestroyServiceFunction(hServiceShowContactHistory);
- DestroyServiceFunction(hServiceDeleteAllContactHistory);
- DestroyServiceFunction(hServiceExecuteTask);
-
HistoryWindow::Deinit();
DestroyCursor(hCurSplitNS);
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index 02e0ac70de..df57ea1998 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -22,7 +22,6 @@
HINSTANCE g_hInstance;
CLIST_INTERFACE *pcli;
HGENMENU g_hMenuItem;
-HANDLE g_hHideService;
HWINEVENTHOOK g_hWinHook;
HWND g_hListenWindow, g_hDlgPass, hOldForegroundWindow;
HWND_ITEM *g_pMirWnds; // a pretty simple linked list
@@ -708,7 +707,7 @@ extern "C" int __declspec(dllexport) Load(void)
Icon_Register(g_hInstance, "BossKey", iconList, _countof(iconList));
- g_hHideService = CreateServiceFunction(MS_BOSSKEY_HIDE, BossKeyHideMiranda); // Create service
+ CreateServiceFunction(MS_BOSSKEY_HIDE, BossKeyHideMiranda); // Create service
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
return 0;
@@ -721,8 +720,6 @@ extern "C" int __declspec(dllexport) Unload(void)
if (g_hWinHook != 0)
UnhookWinEvent(g_hWinHook);
- DestroyServiceFunction(g_hHideService);
-
if (g_hListenWindow)
{
WTSUnRegisterSessionNotification(g_hListenWindow);
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 2b1b4ce00b..0814711a6e 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -27,7 +27,6 @@ int hLangpack;
DWORD timer_id = 0;
-HANDLE hContactReturnedAction, hContactStillAbsentAction, hMissYouAction, hMenuMissYouClick;
HGENMENU hContactMenu;
HICON hIcon;
@@ -648,11 +647,6 @@ int ContactAdded(WPARAM hContact, LPARAM)
int onShutdown(WPARAM, LPARAM)
{
- DestroyServiceFunction(hContactReturnedAction);
- DestroyServiceFunction(hContactStillAbsentAction);
- DestroyServiceFunction(hMissYouAction);
- DestroyServiceFunction(hMenuMissYouClick);
-
IcoLib_ReleaseIcon(hIcon);
return 0;
}
@@ -664,10 +658,10 @@ extern "C" int __declspec(dllexport) Load(void)
InitOptions();
- hContactReturnedAction = CreateServiceFunction("BuddyExpectator/actionReturned", ContactReturnedAction);
- hContactStillAbsentAction = CreateServiceFunction("BuddyExpectator/actionStillAbsent", ContactStillAbsentAction);
- hMissYouAction = CreateServiceFunction("BuddyExpectator/actionMissYou", MissYouAction);
- hMenuMissYouClick = CreateServiceFunction("BuddyExpectator/actionMissYouClick", MenuMissYouClick);
+ CreateServiceFunction("BuddyExpectator/actionReturned", ContactReturnedAction);
+ CreateServiceFunction("BuddyExpectator/actionStillAbsent", ContactStillAbsentAction);
+ CreateServiceFunction("BuddyExpectator/actionMissYou", MissYouAction);
+ CreateServiceFunction("BuddyExpectator/actionMissYouClick", MenuMissYouClick);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
index 6f1451a5bb..f281d863b4 100644
--- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp
+++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
@@ -128,9 +128,9 @@ int ModulesLoaded(WPARAM, LPARAM)
// Хук на нажатие клавиши
kbHook_All = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)Keyboard_Hook, NULL, GetCurrentThreadId());
- hChangeLayout = CreateServiceFunction(MS_CKL_CHANGELAYOUT, APIChangeLayout);
- hGetLayoutOfText = CreateServiceFunction(MS_CKL_GETLAYOUTOFTEXT, APIGetLayoutOfText);
- hChangeTextLayout = CreateServiceFunction(MS_CKL_CHANGETEXTLAYOUT, APIChangeTextLayout);
+ CreateServiceFunction(MS_CKL_CHANGELAYOUT, APIChangeLayout);
+ CreateServiceFunction(MS_CKL_GETLAYOUTOFTEXT, APIGetLayoutOfText);
+ CreateServiceFunction(MS_CKL_CHANGETEXTLAYOUT, APIChangeTextLayout);
RegPopupActions();
diff --git a/plugins/ChangeKeyboardLayout/src/stdafx.h b/plugins/ChangeKeyboardLayout/src/stdafx.h
index b1a3bac5f5..05f8314376 100644
--- a/plugins/ChangeKeyboardLayout/src/stdafx.h
+++ b/plugins/ChangeKeyboardLayout/src/stdafx.h
@@ -90,8 +90,6 @@ typedef struct
extern HINSTANCE hInst;
-extern HANDLE hChangeLayout, hGetLayoutOfText, hChangeTextLayout;
-
extern HICON hPopupIcon, hCopyIcon;
extern LPCTSTR ptszKeybEng;
diff --git a/plugins/Cln_skinedit/src/main.cpp b/plugins/Cln_skinedit/src/main.cpp
index 4ea0912429..a532871ec1 100644
--- a/plugins/Cln_skinedit/src/main.cpp
+++ b/plugins/Cln_skinedit/src/main.cpp
@@ -895,12 +895,11 @@ static INT_PTR SkinEdit_Invoke(WPARAM, LPARAM lParam)
return (INT_PTR)psd->hwndSkinEdit;
}
-static HANDLE hSvc_invoke = 0, hSvc_fillby = 0;
static int LoadModule()
{
- hSvc_invoke = CreateServiceFunction(MS_CLNSE_INVOKE, SkinEdit_Invoke);
- hSvc_fillby = CreateServiceFunction(MS_CLNSE_FILLBYCURRENTSEL, SkinEdit_FillByCurrentSel);
+ CreateServiceFunction(MS_CLNSE_INVOKE, SkinEdit_Invoke);
+ CreateServiceFunction(MS_CLNSE_FILLBYCURRENTSEL, SkinEdit_FillByCurrentSel);
return 0;
}
@@ -912,21 +911,12 @@ extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- return(LoadModule());
-}
-
-static int ShutdownProc(WPARAM, LPARAM)
-{
- if (hSvc_invoke)
- DestroyServiceFunction(hSvc_invoke);
- if (hSvc_fillby)
- DestroyServiceFunction(hSvc_fillby);
- return 0;
+ return LoadModule();
}
extern "C" int __declspec(dllexport) Unload(void)
{
- return ShutdownProc(0, 0);
+ return 0;
}
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD, LPVOID)
diff --git a/plugins/CountryFlags/src/ip2country.cpp b/plugins/CountryFlags/src/ip2country.cpp
index b3411d8ec9..1612d05c6d 100644
--- a/plugins/CountryFlags/src/ip2country.cpp
+++ b/plugins/CountryFlags/src/ip2country.cpp
@@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern HINSTANCE hInst;
extern int nCountriesCount;
extern struct CountryListEntry *countries;
-static HANDLE hServiceIpToCountry;
/************************* Bin Records ****************************/
@@ -304,7 +303,7 @@ void InitIpToCountry(void)
nDataRecordsCount=0;
dataRecords=NULL;
/* Services */
- hServiceIpToCountry=CreateServiceFunction(MS_FLAGS_IPTOCOUNTRY,ServiceIpToCountry);
+ CreateServiceFunction(MS_FLAGS_IPTOCOUNTRY,ServiceIpToCountry);
#ifdef BINCONV
mir_forkthread(BinConvThread,NULL);
#endif
@@ -312,7 +311,5 @@ void InitIpToCountry(void)
void UninitIpToCountry(void)
{
- mir_free(dataRecords); /* does NULL check */
- /* Servcies */
- DestroyServiceFunction(hServiceIpToCountry);
+ mir_free(dataRecords);
}
diff --git a/plugins/DbChecker/src/main.cpp b/plugins/DbChecker/src/main.cpp
index 80ff103a0c..a1ed63a1f9 100644
--- a/plugins/DbChecker/src/main.cpp
+++ b/plugins/DbChecker/src/main.cpp
@@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HINSTANCE hInst;
int hLangpack = 0;
bool bServiceMode, bLaunchMiranda, bShortMode, bAutoExit;
-HANDLE hService;
DbToolOptions opts = { 0 };
@@ -82,12 +81,11 @@ extern "C" __declspec(dllexport) int Load(void)
mir_getLP(&pluginInfoEx);
CreateServiceFunction(MS_DB_CHECKPROFILE, CheckProfile);
- hService = CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
+ CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
return 0;
}
extern "C" __declspec(dllexport) int Unload(void)
{
- DestroyServiceFunction(hService);
return 0;
}
diff --git a/plugins/Exchange/src/services.cpp b/plugins/Exchange/src/services.cpp
index 092cb34e13..a5e73c702e 100644
--- a/plugins/Exchange/src/services.cpp
+++ b/plugins/Exchange/src/services.cpp
@@ -29,17 +29,10 @@ int InitServices()
int DestroyServices()
{
- DestroyServiceFunction(MS_EXCHANGE_CHECKEMAIL);
return 0;
}
int CheckEmailService(WPARAM, LPARAM)
{
-/*
- if (!exchangeServer.IsConnected())
- {
- exchangeServer.Connect(1); //force connection attempt
- }
- return exchangeServer.Check(TRUE); */
return ThreadCheckEmail(TRUE);
-} \ No newline at end of file
+}
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index ae85f49aa6..9c42b738db 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -22,7 +22,6 @@ CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
-HANDLE hServiceUpload, hServiceShowManager, hServiceContactMenu, hServiceMainMenu;
HGENMENU hMenu, hMainMenu, hSubMenu[ServerList::FTP_COUNT], hMainSubMenu[ServerList::FTP_COUNT];
extern UploadDialog *uDlg;
@@ -396,10 +395,10 @@ extern "C" int __declspec(dllexport) Load(void)
HookEvent(ME_SYSTEM_PRESHUTDOWN, Shutdown);
HookEvent(ME_OPT_INITIALISE, Options::InitOptions);
- hServiceUpload = CreateServiceFunction(MS_FTPFILE_UPLOAD, UploadService);
- hServiceShowManager = CreateServiceFunction(MS_FTPFILE_SHOWMANAGER, ShowManagerService);
- hServiceContactMenu = CreateServiceFunction(MS_FTPFILE_CONTACTMENU, ContactMenuService);
- hServiceMainMenu = CreateServiceFunction(MS_FTPFILE_MAINMENU, MainMenuService);
+ CreateServiceFunction(MS_FTPFILE_UPLOAD, UploadService);
+ CreateServiceFunction(MS_FTPFILE_SHOWMANAGER, ShowManagerService);
+ CreateServiceFunction(MS_FTPFILE_CONTACTMENU, ContactMenuService);
+ CreateServiceFunction(MS_FTPFILE_MAINMENU, MainMenuService);
InitIcolib();
InitHotkeys();
@@ -412,9 +411,5 @@ extern "C" int __declspec(dllexport) Load(void)
extern "C" int __declspec(dllexport) Unload(void)
{
- DestroyServiceFunction(hServiceUpload);
- DestroyServiceFunction(hServiceShowManager);
- DestroyServiceFunction(hServiceContactMenu);
- DestroyServiceFunction(hServiceMainMenu);
return 0;
}
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index 057a3e639c..2697d2309a 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -95,8 +95,6 @@ extern "C" int __declspec(dllexport) Load(void)
extern "C" int __declspec(dllexport) Unload()
{
- DestroyServices();
-
WindowList_Broadcast(hOpenWindowsList, WM_CLOSE, 0, 0);
WindowList_Destroy(hOpenWindowsList);
return 0;
diff --git a/plugins/IEHistory/src/services.cpp b/plugins/IEHistory/src/services.cpp
index a907a4e218..7197f2a4d5 100644
--- a/plugins/IEHistory/src/services.cpp
+++ b/plugins/IEHistory/src/services.cpp
@@ -21,17 +21,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
#include "services.h"
-HANDLE hShowHistory;
-
int InitServices()
{
- hShowHistory = CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY, ShowContactHistoryService);
- return 0;
-}
-
-int DestroyServices()
-{
- DestroyServiceFunction(hShowHistory);
+ CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY, ShowContactHistoryService);
return 0;
}
diff --git a/plugins/IEHistory/src/services.h b/plugins/IEHistory/src/services.h
index f9d8492236..aa1f0c39cf 100644
--- a/plugins/IEHistory/src/services.h
+++ b/plugins/IEHistory/src/services.h
@@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "dlgHandlers.h"
int InitServices();
-int DestroyServices();
INT_PTR ShowContactHistoryService(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp
index 4020f5da87..8f6b875f1a 100644
--- a/plugins/Import/src/main.cpp
+++ b/plugins/Import/src/main.cpp
@@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int nImportOptions;
-static HANDLE hImportService = NULL;
-
HINSTANCE hInst;
INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
@@ -117,7 +115,7 @@ extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- hImportService = CreateServiceFunction(IMPORT_SERVICE, ImportCommand);
+ CreateServiceFunction(IMPORT_SERVICE, ImportCommand);
CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
RegisterIcons();
@@ -145,6 +143,5 @@ extern "C" __declspec(dllexport) int Load(void)
extern "C" __declspec(dllexport) int Unload(void)
{
- DestroyServiceFunction(hImportService);
return 0;
}
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 6e55f2a8e3..2924c50a2f 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -33,7 +33,7 @@ boolean volatile Plugin_Terminated = false;
mir_cs checkthreadCS;
HGENMENU hMenuHandle = NULL;
-HANDLE hMenuService = NULL, hCheckEvent = NULL, hCheckHook = NULL, hHookModulesLoaded = NULL, hHookPreShutdown = NULL, hOptInit = NULL;
+HANDLE hCheckEvent = NULL;
static HWND hTimerWnd = (HWND)NULL;
static UINT TID = (UINT)2006;
@@ -1690,12 +1690,12 @@ extern "C" int __declspec(dllexport) Load(void)
if (!(hCheckEvent = CreateHookableEvent("LotusNotify/Check"))) //check if there is another copy of plugin running
second = TRUE;
- hCheckHook = HookEvent("LotusNotify/Check", eventCheck); //hook function to menu click event
+ HookEvent("LotusNotify/Check", eventCheck); //hook function to menu click event
if (!second) //if its first plugin instance
{
//function that will be called on menu click
- hMenuService = CreateServiceFunction("LotusNotify/MenuCommand", PluginMenuCommand);
+ CreateServiceFunction("LotusNotify/MenuCommand", PluginMenuCommand);
CMenuItem mi;
SET_UID(mi, 0x4519458, 0xb55a, 0x4e22, 0xac, 0x95, 0x5e, 0xa4, 0x4d, 0x92, 0x65, 0x65);
@@ -1730,12 +1730,9 @@ extern "C" int __declspec(dllexport) Load(void)
Skin_AddSound("LotusNotify", LPGENW("Lotus Notify"), LPGENW("New Lotus document detected"));
- hOptInit = HookEvent(ME_OPT_INITIALISE, LotusNotifyOptInit); //register service to hook option call
- assert(hOptInit);
- hHookModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, modulesloaded); //hook event that all plugins are loaded
- assert(hHookModulesLoaded);
- hHookPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, preshutdown);
- assert(hHookPreShutdown);
+ HookEvent(ME_OPT_INITIALISE, LotusNotifyOptInit); //register service to hook option call
+ HookEvent(ME_SYSTEM_MODULESLOADED, modulesloaded); //hook event that all plugins are loaded
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, preshutdown);
log(L"Load: ok");
return 0;
@@ -1747,12 +1744,7 @@ extern "C" int __declspec(dllexport) Unload()
Plugin_Terminated = true;
mir_cslock lck(checkthreadCS);
- if (hMenuService) DestroyServiceFunction(hMenuService);
- if (hCheckEvent) DestroyHookableEvent(hCheckEvent);
- if (hOptInit) UnhookEvent(hOptInit);
- if (hCheckHook) UnhookEvent(hCheckHook);
- if (hHookModulesLoaded) UnhookEvent(hHookModulesLoaded);
- if (hHookPreShutdown) UnhookEvent(hHookPreShutdown);
+ DestroyHookableEvent(hCheckEvent);
log(L"Unload: ok");
logUnregister();
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index fa54d48e23..a05e146a39 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -29,7 +29,7 @@ LIST<DBEVENT> eventListXStatus(10);
LIST<DBEVENT> eventListStatus(10);
LIST<DBEVENT> eventListSMsg(10);
-HANDLE hStatusModeChange, hServiceMenu, hHookContactStatusChanged, hToolbarButton;
+HANDLE hStatusModeChange, hHookContactStatusChanged, hToolbarButton;
HGENMENU hEnableDisableMenu;
STATUS StatusList[STATUS_COUNT];
@@ -1193,14 +1193,12 @@ extern "C" int __declspec(dllexport) Load(void)
evtype.flags = DETF_HISTORY | DETF_MSGWINDOW;
DbEvent_RegisterType(&evtype);
- hServiceMenu = CreateServiceFunction(MS_STATUSCHANGE_MENUCOMMAND, EnableDisableMenuCommand);
-
+ CreateServiceFunction(MS_STATUSCHANGE_MENUCOMMAND, EnableDisableMenuCommand);
return 0;
}
extern "C" int __declspec(dllexport) Unload(void)
{
DestroyHookableEvent(hHookContactStatusChanged);
- DestroyServiceFunction(hServiceMenu);
return 0;
}
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 3d95c96dd8..ebf869ffdf 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -9,7 +9,6 @@ static int SrmmMenu_ProcessEvent(WPARAM wParam, LPARAM lParam);
static int SrmmMenu_ProcessIconClick(WPARAM wParam, LPARAM lParam);
HGENMENU hMenuToggle, hMenuClear;
-HANDLE hServiceToggle, hServiceClear;
mir_cs list_cs;
@@ -282,16 +281,13 @@ extern "C" __declspec (dllexport) int Load()
HookEvent(ME_DB_EVENT_ADDED, OnDatabaseEventAdd);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
- hServiceToggle = CreateServiceFunction(MS_NOHISTORY_TOGGLE, ServiceToggle);
- hServiceClear = CreateServiceFunction(MS_NOHISTORY_CLEAR, ServiceClear);
+ CreateServiceFunction(MS_NOHISTORY_TOGGLE, ServiceToggle);
+ CreateServiceFunction(MS_NOHISTORY_CLEAR, ServiceClear);
return 0;
}
extern "C" __declspec (dllexport) int Unload(void)
{
- DestroyServiceFunction(hServiceToggle);
- DestroyServiceFunction(hServiceClear);
-
RemoveReadEvents();
return 0;
}
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp
index 9765e517a6..4bb1a12aa4 100644
--- a/plugins/OpenFolder/src/openFolder.cpp
+++ b/plugins/OpenFolder/src/openFolder.cpp
@@ -2,7 +2,7 @@
int hLangpack = 0;
HINSTANCE hInst;
-HANDLE hServiceOpenFolder, hButtonTopToolbar;
+HANDLE hButtonTopToolbar;
PLUGININFOEX pluginInfoEx =
{
@@ -79,7 +79,7 @@ extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfoEx);
- hServiceOpenFolder = CreateServiceFunction(MS_OPENFOLDER_OPEN, MenuCommand_OpenFolder);
+ CreateServiceFunction(MS_OPENFOLDER_OPEN, MenuCommand_OpenFolder);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
@@ -112,6 +112,5 @@ extern "C" int __declspec(dllexport) Load()
extern "C" int __declspec(dllexport) Unload()
{
- DestroyServiceFunction(hServiceOpenFolder);
return 0;
}
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 19a818d1bd..7f9dec64c7 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -25,7 +25,6 @@ DWORD gMirandaVersion;
HNETLIBUSER g_hNetlibUser;
HANDLE hModulesLoaded, hTabsrmmButtonPressed;
HANDLE hPrebuildContactMenu;
-HANDLE hServiceContactMenu;
HGENMENU hContactMenu;
HGENMENU hWebPageMenus[PasteToWeb::pages];
HANDLE hOptionsInit;
@@ -408,7 +407,7 @@ extern "C" int __declspec(dllexport) Load(void)
hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
hOptionsInit = HookEvent(ME_OPT_INITIALISE, Options::InitOptions);
hTabsrmmButtonPressed = NULL;
- hServiceContactMenu = CreateServiceFunction(MS_PASTEIT_CONTACTMENU, ContactMenuService);
+ CreateServiceFunction(MS_PASTEIT_CONTACTMENU, ContactMenuService);
contactWindows = new std::map<MCONTACT, HWND>();
return 0;
}
@@ -421,7 +420,6 @@ extern "C" int __declspec(dllexport) Unload(void)
if (hWindowEvent != NULL)
UnhookEvent(hWindowEvent);
- DestroyServiceFunction(hServiceContactMenu);
Netlib_CloseHandle(g_hNetlibUser);
if (hTabsrmmButtonPressed != NULL)
UnhookEvent(hTabsrmmButtonPressed);
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index d6b05ccb77..b4e00128f5 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -44,7 +44,6 @@ int hLangpack = 0;
HANDLE hModulesLoaded = NULL;
HANDLE hEventAdded = NULL;
HANDLE hHotkeyPressed = NULL;
-HANDLE hQSShowDialog = NULL;
long main_dialog_open = 0;
HWND hwndMain = NULL;
@@ -81,7 +80,7 @@ extern "C" __declspec(dllexport) int Load()
mir_getLP(&pluginInfo);
pcli = Clist_GetInterface();
- hQSShowDialog = CreateServiceFunction(MS_QC_SHOW_DIALOG, ShowDialog);
+ CreateServiceFunction(MS_QC_SHOW_DIALOG, ShowDialog);
// hooks
hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
@@ -96,8 +95,6 @@ extern "C" __declspec(dllexport) int Unload(void)
DeInitOptions();
- DestroyServiceFunction(hQSShowDialog);
-
UnhookEvent(hModulesLoaded);
UnhookEvent(hEventAdded);
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index a33c542419..32ffb684a8 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -276,11 +276,6 @@ int QuotesEventFunc_OptInitialise(WPARAM wp, LPARAM/* lp*/)
return 0;
}
-inline int Quotes_DestroyServiceFunction(HANDLE h)
-{
- return DestroyServiceFunction(h);
-}
-
inline int Quotes_UnhookEvent(HANDLE h)
{
return UnhookEvent(h);
diff --git a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
index 1cc209f0c7..01b63728a0 100644
--- a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
+++ b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
@@ -32,12 +32,7 @@ struct TimerInfo {
HANDLE hMainThread = 0;
unsigned long mainThreadId = 0;
-HANDLE hKSModuleLoadedHook = NULL,
- hConnectionEvent = NULL,
- hStopRecon = NULL,
- hEnableProto = NULL,
- hIsProtoEnabled = NULL,
- hAnnounceStat = NULL;
+HANDLE hConnectionEvent = NULL;
static mir_cs GenTimerCS, GenStatusCS, CheckContinueslyCS;
@@ -1219,14 +1214,14 @@ void KeepStatusLoad()
MUUID muidLast = MIID_LAST;
hKSLangpack = GetPluginLangId(muidLast, 0);
- hKSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, KSModuleLoaded);
+ HookEvent(ME_SYSTEM_MODULESLOADED, KSModuleLoaded);
CreateHookableEvent(ME_KS_CONNECTIONEVENT);
- hStopRecon = CreateServiceFunction(MS_KS_STOPRECONNECTING, StopReconnectingService);
- hEnableProto = CreateServiceFunction(MS_KS_ENABLEPROTOCOL, EnableProtocolService);
- hIsProtoEnabled = CreateServiceFunction(MS_KS_ISPROTOCOLENABLED, IsProtocolEnabledService);
- hAnnounceStat = CreateServiceFunction(MS_KS_ANNOUNCESTATUSCHANGE, AnnounceStatusChangeService);
+ CreateServiceFunction(MS_KS_STOPRECONNECTING, StopReconnectingService);
+ CreateServiceFunction(MS_KS_ENABLEPROTOCOL, EnableProtocolService);
+ CreateServiceFunction(MS_KS_ISPROTOCOLENABLED, IsProtocolEnabledService);
+ CreateServiceFunction(MS_KS_ANNOUNCESTATUSCHANGE, AnnounceStatusChangeService);
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, THREAD_SET_CONTEXT, FALSE, 0);
mainThreadId = GetCurrentThreadId();
@@ -1237,12 +1232,5 @@ void KeepStatusUnload()
if (hMainThread)
CloseHandle(hMainThread);
- DestroyServiceFunction(hStopRecon);
- DestroyServiceFunction(hEnableProto);
- DestroyServiceFunction(hIsProtoEnabled);
- DestroyServiceFunction(hAnnounceStat);
-
DestroyHookableEvent(hConnectionEvent);
-
- UnhookEvent(hKSModuleLoadedHook);
}
diff --git a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
index 5cb311b605..4dad85be05 100644
--- a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
+++ b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
@@ -25,7 +25,6 @@ extern HINSTANCE hInst;
extern int protoCount;
static int menuprofiles[MAX_MMITEMS];
-static HANDLE hProfileServices[MAX_MMITEMS];
static int mcount = 0;
static PROFILECE *pce = NULL;
@@ -34,7 +33,6 @@ static int pceCount = 0;
static UINT_PTR releaseTtbTimerId = 0;
static HANDLE hTBModuleLoadedHook;
-static HANDLE hLoadAndSetProfileService;
static HANDLE hMessageHook = NULL;
static HWND hMessageWindow = NULL;
@@ -72,7 +70,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
char servicename[128];
mir_snprintf(servicename, "%s%d", MS_SS_MENUSETPROFILEPREFIX, mcount);
- hProfileServices[mcount] = CreateServiceFunctionParam(servicename, profileService, mcount);
+ CreateServiceFunctionParam(servicename, profileService, mcount);
mi.name.w = profilename;
mi.position = 2000100000 + mcount;
@@ -310,13 +308,7 @@ int SSLoadMainOptions()
int LoadProfileModule()
{
- hLoadAndSetProfileService = CreateServiceFunction(MS_SS_LOADANDSETPROFILE, LoadAndSetProfile);
- return 0;
-}
-
-int UnloadProfileModule()
-{
- DestroyServiceFunction(hLoadAndSetProfileService);
+ CreateServiceFunction(MS_SS_LOADANDSETPROFILE, LoadAndSetProfile);
return 0;
}
@@ -333,9 +325,6 @@ int InitProfileModule()
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);
diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
index 7376d1a03c..442c707f9d 100644
--- a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
+++ b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
@@ -480,11 +480,6 @@ int SSModuleLoaded(WPARAM, LPARAM)
return 0;
}
-HANDLE hSSModuleLoadedHook = NULL,
- hGetProfileService,
- hGetProfileCountService,
- hGetProfileNameService;
-
static INT_PTR SrvGetProfile(WPARAM wParam, LPARAM lParam)
{
return GetProfile((int)wParam, *(TSettingsList*)lParam);
@@ -495,7 +490,7 @@ void StartupStatusLoad()
MUUID muidLast = MIID_LAST;
hSSLangpack = GetPluginLangId(muidLast, 0);
- hSSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, SSModuleLoaded);
+ HookEvent(ME_SYSTEM_MODULESLOADED, SSModuleLoaded);
if (db_get_b(NULL, SSMODULENAME, SETTING_SETPROFILE, 1) ||
db_get_b(NULL, SSMODULENAME, SETTING_OFFLINECLOSE, 0))
@@ -511,9 +506,9 @@ void StartupStatusLoad()
}
// Create service functions; the get functions are created here; they don't rely on commonstatus
- hGetProfileService = CreateServiceFunction(MS_SS_GETPROFILE, SrvGetProfile);
- hGetProfileCountService = CreateServiceFunction(MS_SS_GETPROFILECOUNT, GetProfileCount);
- hGetProfileNameService = CreateServiceFunction(MS_SS_GETPROFILENAME, GetProfileName);
+ CreateServiceFunction(MS_SS_GETPROFILE, SrvGetProfile);
+ CreateServiceFunction(MS_SS_GETPROFILECOUNT, GetProfileCount);
+ CreateServiceFunction(MS_SS_GETPROFILENAME, GetProfileName);
LoadProfileModule();
}
@@ -524,11 +519,4 @@ void StartupStatusUnload()
KillModuleMenus(hSSLangpack);
DeinitProfilesModule();
- UnloadProfileModule();
-
- DestroyServiceFunction(hGetProfileService);
- DestroyServiceFunction(hGetProfileCountService);
- DestroyServiceFunction(hGetProfileNameService);
-
- UnhookEvent(hSSModuleLoadedHook);
}
diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.h b/plugins/StatusManager/src/StartupStatus/startupstatus.h
index 5d04c24cf5..9dd738c346 100644
--- a/plugins/StatusManager/src/StartupStatus/startupstatus.h
+++ b/plugins/StatusManager/src/StartupStatus/startupstatus.h
@@ -154,7 +154,6 @@ void RemoveTopToolbarButtons();
int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam);
int LoadProfileModule();
-int UnloadProfileModule();
int InitProfileModule();
int DeinitProfilesModule();
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index 0c71228430..9c2de2c656 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -91,7 +91,6 @@ extern "C" int __declspec(dllexport) Unload(void)
Skin->UnloadAeroTabs();
CleanTempFiles();
delete Skin;
- DestroyServiceFunction(hTypingNotify);
delete sendLater;
delete sendQueue;
return iRet;
diff --git a/plugins/TabSRMM/src/stdafx.h b/plugins/TabSRMM/src/stdafx.h
index b7fad5cf5f..b9b6827200 100644
--- a/plugins/TabSRMM/src/stdafx.h
+++ b/plugins/TabSRMM/src/stdafx.h
@@ -219,7 +219,6 @@ extern NEN_OPTIONS nen_options;
extern HINSTANCE g_hInst;
extern CSkinItem SkinItems[];
extern TContainerData *pFirstContainer, *pLastActiveContainer;
-extern HANDLE hTypingNotify;
extern ButtonSet g_ButtonSet;
extern HANDLE g_hEvent;
extern RECT rcLastStatusBarClick;
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 42a3238131..f3757364e5 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -1,7 +1,5 @@
#include "stdafx.h"
-HANDLE hTypingNotify;
-
static HGENMENU hDisableMenu = nullptr;
static MWindowList hPopupsList = nullptr;
@@ -531,7 +529,7 @@ int TN_ModuleInit()
mir_snwprintf(szStop, TranslateT("...has stopped typing."));
if (PluginConfig.g_bPopupAvail && ShowMenu) {
- hTypingNotify = CreateServiceFunction("TypingNotify/EnableDisableMenuCommand", EnableDisableMenuCommand);
+ CreateServiceFunction("TypingNotify/EnableDisableMenuCommand", EnableDisableMenuCommand);
CMenuItem mi;
SET_UID(mi, 0xe18fd2cf, 0xcf90, 0x459e, 0xb6, 0xe6, 0x70, 0xec, 0xad, 0xc6, 0x73, 0xef);
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp
index 2350634fd2..98950da04b 100644
--- a/plugins/TipperYM/src/tipper.cpp
+++ b/plugins/TipperYM/src/tipper.cpp
@@ -29,7 +29,6 @@ HFONT hFontTitle, hFontLabels, hFontValues, hFontTrayTitle;
// hooked here so it's in the main thread
HANDLE hAvChangeEvent, hShowTipEvent, hHideTipEvent, hAckEvent, hFramesSBShow, hFramesSBHide;
HANDLE hSettingChangedEvent, hEventDeleted;
-HANDLE hShowTipService, hShowTipWService, hHideTipService;
HANDLE hReloadFonts = NULL;
HANDLE hFolderChanged, hSkinFolder;
@@ -282,10 +281,6 @@ int Shutdown(WPARAM, LPARAM)
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();
@@ -340,12 +335,9 @@ extern "C" int __declspec(dllexport) Load(void)
InitOptions();
// for compatibility with mToolTip status tooltips
- hShowTipService = CreateServiceFunction("mToolTip/ShowTip", ShowTip);
-
- hShowTipWService = CreateServiceFunction("mToolTip/ShowTipW", ShowTipW);
-
- hHideTipService = CreateServiceFunction("mToolTip/HideTip", HideTip);
-
+ CreateServiceFunction("mToolTip/ShowTip", ShowTip);
+ CreateServiceFunction("mToolTip/ShowTipW", ShowTipW);
+ CreateServiceFunction("mToolTip/HideTip", HideTip);
CreateServiceFunction("mToolTip/ReloadSkin", ReloadSkin);
hEventPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, Shutdown);
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp
index e991bd97b2..97641a2370 100644
--- a/plugins/UserGuide/src/main.cpp
+++ b/plugins/UserGuide/src/main.cpp
@@ -2,7 +2,6 @@
HINSTANCE hInst;
-HANDLE hShowGuide;
int hLangpack;
PLUGININFOEX pluginInfo = {
@@ -80,7 +79,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- hShowGuide = CreateServiceFunction("UserGuide/ShowGuide", ShowGuideFile);
+ CreateServiceFunction("UserGuide/ShowGuide", ShowGuideFile);
CMenuItem mi;
SET_UID(mi, 0x6787c12d, 0xdc85, 0x409d, 0xaa, 0x6c, 0x1f, 0xfe, 0x5f, 0xe8, 0xc1, 0x18);
@@ -96,6 +95,5 @@ extern "C" __declspec(dllexport) int Load(void)
extern "C" __declspec(dllexport) int Unload(void)
{
- DestroyServiceFunction(hShowGuide);
return 0;
} \ No newline at end of file
diff --git a/plugins/UserInfoEx/src/commonheaders.cpp b/plugins/UserInfoEx/src/commonheaders.cpp
index 4a169f82ab..69488a542f 100644
--- a/plugins/UserInfoEx/src/commonheaders.cpp
+++ b/plugins/UserInfoEx/src/commonheaders.cpp
@@ -159,13 +159,3 @@ unsigned int hashSetting_M2(const wchar_t * key)
#ifdef _DEBUG
#pragma optimize( "", on )
#endif
-
-INT_PTR myDestroyServiceFunction(const char * key) {
- //DestroyServiceFunction always return 0 therfore we must call ServiceExists to enshure it is delete
- if (!ServiceExists(key)) return 0;
- DestroyServiceFunction((HANDLE)(INT_PTR)hashSetting(key)); //old hash
- if (!ServiceExists(key)) return 0;
- DestroyServiceFunction((HANDLE)(INT_PTR)hashSetting_M2(key)); //new MurmurHash2
- if (!ServiceExists(key)) return 0;
- return 1;
-}
diff --git a/plugins/UserInfoEx/src/stdafx.h b/plugins/UserInfoEx/src/stdafx.h
index 45ae00f299..b8605c48ea 100644
--- a/plugins/UserInfoEx/src/stdafx.h
+++ b/plugins/UserInfoEx/src/stdafx.h
@@ -208,8 +208,6 @@ extern struct CountryListEntry *countries;
DWORD hashSetting(LPCSTR szStr); //old miranda hash
-INT_PTR myDestroyServiceFunction(const char * key);
-
static FORCEINLINE BOOL IsProtoOnline(LPSTR pszProto)
{
return pszProto && pszProto[0] && CallProtoService(pszProto, PS_GETSTATUS, NULL, NULL) >= ID_STATUS_ONLINE;
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp
index c47c9c5ac8..949a6cee5a 100644
--- a/plugins/UserInfoEx/src/svc_email.cpp
+++ b/plugins/UserInfoEx/src/svc_email.cpp
@@ -254,8 +254,8 @@ void SvcEMailLoadModule()
SvcEMailEnableExtraIcons();
if (db_get_b(NULL, MODNAME, SET_EXTENDED_EMAILSERVICE, TRUE)) {
// create own email send command
- if (!myDestroyServiceFunction(MS_EMAIL_SENDEMAIL))
- CreateServiceFunction(MS_EMAIL_SENDEMAIL, MenuCommand);
+ DestroyServiceFunction(MS_EMAIL_SENDEMAIL);
+ CreateServiceFunction(MS_EMAIL_SENDEMAIL, MenuCommand);
}
}
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp
index a6db523926..d5d9690372 100644
--- a/plugins/Variables/src/variables.cpp
+++ b/plugins/Variables/src/variables.cpp
@@ -21,14 +21,6 @@
/* some handles */
static HANDLE
- hFormatStringService,
- hRegisterVariableService,
- hGetMMIService,
- hShowHelpService,
- hShowHelpExService,
- hGetIconService;
-
-static HANDLE
hOptionsHook = NULL,
hIconsChangedHook = NULL;
@@ -422,19 +414,19 @@ int LoadVarModule()
return -1;
setParseOptions(NULL);
- hFormatStringService = CreateServiceFunction(MS_VARS_FORMATSTRING, formatStringService);
- hRegisterVariableService = CreateServiceFunction(MS_VARS_REGISTERTOKEN, registerToken);
+ CreateServiceFunction(MS_VARS_FORMATSTRING, formatStringService);
+ CreateServiceFunction(MS_VARS_REGISTERTOKEN, registerToken);
// help dialog
hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
- hShowHelpService = CreateServiceFunction(MS_VARS_SHOWHELP, showHelpService);
- hShowHelpExService = CreateServiceFunction(MS_VARS_SHOWHELPEX, showHelpExService);
+ CreateServiceFunction(MS_VARS_SHOWHELP, showHelpService);
+ CreateServiceFunction(MS_VARS_SHOWHELPEX, showHelpExService);
Icon_Register(hInst, LPGEN("Variables"), &icon, 1);
hIconsChangedHook = HookEvent(ME_SKIN2_ICONSCHANGED, iconsChanged);
- hGetIconService = CreateServiceFunction(MS_VARS_GETSKINITEM, getSkinItemService);
+ CreateServiceFunction(MS_VARS_GETSKINITEM, getSkinItemService);
hOptionsHook = HookEvent(ME_OPT_INITIALISE, OptionsInit);
// register internal tokens
@@ -472,12 +464,6 @@ int UnloadVarModule()
if (hIconsChangedHook != NULL)
UnhookEvent(hIconsChangedHook);
- DestroyServiceFunction(hRegisterVariableService);
- DestroyServiceFunction(hFormatStringService);
- DestroyServiceFunction(hGetMMIService);
- DestroyServiceFunction(hShowHelpService);
- DestroyServiceFunction(hShowHelpExService);
- DestroyServiceFunction(hGetIconService);
DestroyCursor(hCurSplitNS);
deinitContactModule();
deinitTokenRegister();
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index ee26949b6d..f321c71a0c 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -154,9 +154,6 @@ extern "C" int __declspec(dllexport) Unload()
Log("%s", "Unhooking events ...");
UnhookEvents();
- Log("%s", "Destroying service functions ...");
- DestroyServices();
-
Log("%s", "Leaving function " __FUNCTION__);
return 0;
}
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp
index 90585fe508..9db7956f2a 100644
--- a/plugins/WhenWasIt/src/services.cpp
+++ b/plugins/WhenWasIt/src/services.cpp
@@ -22,13 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define COMMENT_CHAR '#'
-HANDLE hsCheckBirthdays;
-HANDLE hsShowList;
-HANDLE hsAddBirthday;
-HANDLE hsRefreshUserDetails;
-HANDLE hsImportBirthdays;
-HANDLE hsExportBirthdays;
-
int bShouldCheckBirthdays = 0;
int bBirthdayFound = 0;
@@ -57,27 +50,12 @@ int InitServices()
commonData.cDlgTimeout = db_get_w(NULL, ModuleName, "DlgTimeout", POPUP_TIMEOUT);
commonData.notifyFor = db_get_b(NULL, ModuleName, "NotifyFor", 0);
- hsCheckBirthdays = CreateServiceFunction(MS_WWI_CHECK_BIRTHDAYS, CheckBirthdaysService);
- hsShowList = CreateServiceFunction(MS_WWI_LIST_SHOW, ShowListService);
- hsAddBirthday = CreateServiceFunction(MS_WWI_ADD_BIRTHDAY, AddBirthdayService);
- hsRefreshUserDetails = CreateServiceFunction(MS_WWI_REFRESH_USERDETAILS, RefreshUserDetailsService);
- hsImportBirthdays = CreateServiceFunction(MS_WWI_IMPORT_BIRTHDAYS, ImportBirthdaysService);
- hsExportBirthdays = CreateServiceFunction(MS_WWI_EXPORT_BIRTHDAYS, ExportBirthdaysService);
-
- Log("%s", "Leaving function " __FUNCTION__);
- return 0;
-}
-
-int DestroyServices()
-{
- Log("%s", "Entering function " __FUNCTION__);
-
- DestroyServiceFunction(hsCheckBirthdays);
- DestroyServiceFunction(hsShowList);
- DestroyServiceFunction(hsAddBirthday);
- DestroyServiceFunction(hsRefreshUserDetails);
- DestroyServiceFunction(hsImportBirthdays);
- DestroyServiceFunction(hsExportBirthdays);
+ CreateServiceFunction(MS_WWI_CHECK_BIRTHDAYS, CheckBirthdaysService);
+ CreateServiceFunction(MS_WWI_LIST_SHOW, ShowListService);
+ CreateServiceFunction(MS_WWI_ADD_BIRTHDAY, AddBirthdayService);
+ CreateServiceFunction(MS_WWI_REFRESH_USERDETAILS, RefreshUserDetailsService);
+ CreateServiceFunction(MS_WWI_IMPORT_BIRTHDAYS, ImportBirthdaysService);
+ CreateServiceFunction(MS_WWI_EXPORT_BIRTHDAYS, ExportBirthdaysService);
Log("%s", "Leaving function " __FUNCTION__);
return 0;
diff --git a/plugins/WhenWasIt/src/services.h b/plugins/WhenWasIt/src/services.h
index 25d1c453b8..1787f96ef5 100644
--- a/plugins/WhenWasIt/src/services.h
+++ b/plugins/WhenWasIt/src/services.h
@@ -36,7 +36,6 @@ extern int bShouldCheckBirthdays;
extern int bBirthdayFound;
int InitServices();
-int DestroyServices();
int NotifyContactBirthday(MCONTACT hContact, time_t now, int daysInAdvance);
int NotifyMissedContactBirthday(MCONTACT hContact, time_t now, int daysAfter);
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp
index 9860853228..26e8677049 100644
--- a/plugins/ZeroNotification/src/main.cpp
+++ b/plugins/ZeroNotification/src/main.cpp
@@ -13,7 +13,7 @@ https://miranda-ng.org/
HINSTANCE hInst;
-static HANDLE hEventSoundSettingChange, hEventStatusModeChange, hEventOptionsInitialize, hAckEvent, hSoundMenu;
+static HANDLE hEventSoundSettingChange, hEventStatusModeChange, hEventOptionsInitialize, hAckEvent;
HGENMENU noSoundMenu;
int hLangpack;
@@ -231,7 +231,7 @@ extern "C" __declspec(dllexport) int Load(void)
//The menu item - begin
if (!db_get_b(NULL, MODNAME, "HideMenu", 1)) {
- hSoundMenu = CreateServiceFunction(MODNAME "/MenuCommand", NoSoundMenuCommand);
+ CreateServiceFunction(MODNAME "/MenuCommand", NoSoundMenuCommand);
CMenuItem mi;
mi.position = -0x7FFFFFFF;
@@ -257,6 +257,5 @@ extern "C" __declspec(dllexport) int Unload(void)
UnhookEvent(hEventSoundSettingChange);
UnhookEvent(hEventOptionsInitialize);
UnhookEvent(hAckEvent);
- DestroyServiceFunction(hSoundMenu);
return 0;
} \ No newline at end of file
diff --git a/plugins/wbOSD/src/main.cpp b/plugins/wbOSD/src/main.cpp
index a4ee1541bb..ad1213f930 100644
--- a/plugins/wbOSD/src/main.cpp
+++ b/plugins/wbOSD/src/main.cpp
@@ -12,7 +12,6 @@ Distributed under GNU's GPL 2 or later
HINSTANCE hI;
HWND g_hWnd = 0;
-HANDLE hservosda;
int hLangpack = 0;
CLIST_INTERFACE *pcli;
HANDLE hHookedInit, hProtoAck, hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged;
@@ -63,7 +62,6 @@ extern "C" __declspec(dllexport) int Unload()
UnhookEvent(hContactStatusChanged);
UnhookEvent(hHookedInit);
- DestroyServiceFunction(hservosda);
DestroyHookableEvent(hHookContactStatusChanged);
return 0;
}
diff --git a/plugins/wbOSD/src/stdafx.h b/plugins/wbOSD/src/stdafx.h
index 3c301b30a1..b3652aca22 100644
--- a/plugins/wbOSD/src/stdafx.h
+++ b/plugins/wbOSD/src/stdafx.h
@@ -113,5 +113,4 @@ void loadDBSettings(plgsettings *ps);
extern HINSTANCE hI;
extern HWND g_hWnd;
-extern HANDLE hservosda;
extern HANDLE hHookedInit, hProtoAck, hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged; \ No newline at end of file
diff --git a/plugins/wbOSD/src/wbOSD.cpp b/plugins/wbOSD/src/wbOSD.cpp
index b48bfd6ee0..5034133a09 100644
--- a/plugins/wbOSD/src/wbOSD.cpp
+++ b/plugins/wbOSD/src/wbOSD.cpp
@@ -288,7 +288,7 @@ int MainInit(WPARAM, LPARAM)
SetLayeredWindowAttributes(g_hWnd, db_get_dw(NULL, THIS_MODULE, "bkclr", DEFAULT_BKCLR), db_get_b(NULL, THIS_MODULE, "alpha", DEFAULT_ALPHA), (db_get_b(NULL, THIS_MODULE, "transparent", DEFAULT_TRANPARENT) ? LWA_COLORKEY : 0) | LWA_ALPHA);
- hservosda = CreateServiceFunction("OSD/Announce", OSDAnnounce);
+ CreateServiceFunction("OSD/Announce", OSDAnnounce);
HookEvent(ME_DB_EVENT_ADDED, HookedNewEvent);
diff --git a/protocols/AimOscar/src/aim.cpp b/protocols/AimOscar/src/aim.cpp
index 56ee8e3943..c169e47aa4 100644
--- a/protocols/AimOscar/src/aim.cpp
+++ b/protocols/AimOscar/src/aim.cpp
@@ -116,7 +116,6 @@ extern "C" int __declspec(dllexport) Load(void)
InitIcons();
InitExtraIcons();
-
return 0;
}
@@ -125,6 +124,5 @@ extern "C" int __declspec(dllexport) Load(void)
extern "C" int __declspec(dllexport) Unload(void)
{
- aim_links_destroy();
return 0;
}
diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp
index f16fd3131b..13671e8518 100644
--- a/protocols/AimOscar/src/links.cpp
+++ b/protocols/AimOscar/src/links.cpp
@@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-static HANDLE hServiceParseLink;
-
extern OBJLIST<CAimProto> g_Instances;
static int SingleHexToDecimal(wchar_t c)
@@ -168,11 +166,6 @@ void aim_links_init(void)
{
static const char szService[] = "AIM/ParseAimLink";
- hServiceParseLink = CreateServiceFunction(szService, ServiceParseAimLink);
+ CreateServiceFunction(szService, ServiceParseAimLink);
AssocMgr_AddNewUrlTypeT("aim:", TranslateT("AIM link protocol"), hInstance, IDI_AOL, szService, 0);
}
-
-void aim_links_destroy(void)
-{
- DestroyServiceFunction(hServiceParseLink);
-}
diff --git a/protocols/AimOscar/src/links.h b/protocols/AimOscar/src/links.h
index 2aac49447b..5eb95a9eab 100644
--- a/protocols/AimOscar/src/links.h
+++ b/protocols/AimOscar/src/links.h
@@ -19,6 +19,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LINKS_H
void aim_links_init();
-void aim_links_destroy();
#endif
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index 8e56330c58..df95b79dbc 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -63,7 +63,6 @@ void CIrcProto::InitMainMenus(void)
/////////////////////////////////////////////////////////////////////////////////////////
static HGENMENU hUMenuChanSettings, hUMenuWhois, hUMenuDisconnect, hUMenuIgnore;
-static HANDLE hMenuChanSettings, hMenuWhois, hMenuDisconnect, hMenuIgnore;
static CIrcProto* IrcGetInstanceByHContact(MCONTACT hContact)
{
@@ -127,7 +126,7 @@ void InitContactMenus(void)
mir_strcpy(d, IRC_UM_CHANSETTINGS);
mi.position = 500090002;
hUMenuChanSettings = Menu_AddContactMenuItem(&mi);
- hMenuChanSettings = CreateServiceFunction(temp, IrcMenuChanSettings);
+ CreateServiceFunction(temp, IrcMenuChanSettings);
SET_UID(mi, 0x778eb1f6, 0x73c4, 0x4951, 0xb2, 0xca, 0xa1, 0x69, 0x94, 0x7b, 0xb7, 0x87);
mi.name.a = LPGEN("&WhoIs info");
@@ -135,7 +134,7 @@ void InitContactMenus(void)
mir_strcpy(d, IRC_UM_WHOIS);
mi.position = 500090001;
hUMenuWhois = Menu_AddContactMenuItem(&mi);
- hMenuWhois = CreateServiceFunction(temp, IrcMenuWhois);
+ CreateServiceFunction(temp, IrcMenuWhois);
SET_UID(mi, 0x1c51ae05, 0x9eee, 0x4887, 0x88, 0x96, 0x55, 0xd2, 0xdd, 0xf9, 0x25, 0x6f);
mi.name.a = LPGEN("Di&sconnect");
@@ -143,7 +142,7 @@ void InitContactMenus(void)
mir_strcpy(d, IRC_UM_DISCONNECT);
mi.position = 500090001;
hUMenuDisconnect = Menu_AddContactMenuItem(&mi);
- hMenuDisconnect = CreateServiceFunction(temp, IrcMenuDisconnect);
+ CreateServiceFunction(temp, IrcMenuDisconnect);
SET_UID(mi, 0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
mi.name.a = LPGEN("&Add to ignore list");
@@ -151,7 +150,7 @@ void InitContactMenus(void)
mir_strcpy(d, IRC_UM_IGNORE);
mi.position = 500090002;
hUMenuIgnore = Menu_AddContactMenuItem(&mi);
- hMenuIgnore = CreateServiceFunction(temp, IrcMenuIgnore);
+ CreateServiceFunction(temp, IrcMenuIgnore);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, IrcPrebuildContactMenu);
}
@@ -162,11 +161,6 @@ void UninitContactMenus(void)
Menu_RemoveItem(hUMenuWhois);
Menu_RemoveItem(hUMenuDisconnect);
Menu_RemoveItem(hUMenuIgnore);
-
- DestroyServiceFunction(hMenuChanSettings);
- DestroyServiceFunction(hMenuWhois);
- DestroyServiceFunction(hMenuDisconnect);
- DestroyServiceFunction(hMenuIgnore);
}
INT_PTR __cdecl CIrcProto::OnDoubleclicked(WPARAM, LPARAM lParam)
diff --git a/protocols/MSN/src/msn_links.cpp b/protocols/MSN/src/msn_links.cpp
index ab0802bcb1..590be7fe48 100644
--- a/protocols/MSN/src/msn_links.cpp
+++ b/protocols/MSN/src/msn_links.cpp
@@ -25,8 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "m_assocmgr.h"
-static HANDLE hServiceParseLink;
-
static MCONTACT GetContact(wchar_t *arg, wchar_t **pemail, CMsnProto *proto)
{
wchar_t* email = NULL;
@@ -143,12 +141,11 @@ void MsnLinks_Init(void)
{
static const char szService[] = "MSN/ParseMsnimLink";
- hServiceParseLink = CreateServiceFunction(szService, ServiceParseMsnimLink);
+ CreateServiceFunction(szService, ServiceParseMsnimLink);
AssocMgr_AddNewUrlTypeT("msnim:", TranslateT("MSN Link Protocol"), g_hInst, IDI_MSN, szService, 0);
}
void MsnLinks_Destroy(void)
{
- DestroyServiceFunction(hServiceParseLink);
CallService(MS_ASSOCMGR_REMOVEURLTYPE, 0, (LPARAM)"msnim:");
}
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index 9c37f90f5a..f11e6726eb 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -25,8 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
static HGENMENU hBlockMenuItem, hLiveSpaceMenuItem, hNetmeetingMenuItem, hChatInviteMenuItem, hOpenInboxMenuItem;
-HANDLE hNetMeeting, hBlockCom, hSendHotMail, hInviteChat, hViewProfile;
-
// Block command callback function
INT_PTR CMsnProto::MsnBlockCommand(WPARAM hContact, LPARAM)
{
@@ -245,7 +243,7 @@ void MSN_InitContactMenu(void)
SET_UID(mi, 0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
mir_strcpy(tDest, MSN_BLOCK);
- hBlockCom = CreateServiceFunction(servicefunction, MsnMenuBlockCommand);
+ CreateServiceFunction(servicefunction, MsnMenuBlockCommand);
mi.position = -500050000;
mi.hIcolibItem = GetIconHandle(IDI_MSNBLOCK);
mi.name.a = LPGEN("&Block");
@@ -253,7 +251,7 @@ void MSN_InitContactMenu(void)
SET_UID(mi, 0x7f7e4c24, 0x821c, 0x450f, 0x93, 0x76, 0xbe, 0x65, 0xe9, 0x2f, 0xb6, 0xc2);
mir_strcpy(tDest, MSN_VIEW_PROFILE);
- hViewProfile = CreateServiceFunction(servicefunction, MsnMenuViewProfile);
+ CreateServiceFunction(servicefunction, MsnMenuViewProfile);
mi.position = -500050003;
mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
mi.name.a = LPGEN("View &Profile");
@@ -261,7 +259,7 @@ void MSN_InitContactMenu(void)
SET_UID(mi,0x25a007c0, 0x8dc7, 0x4284, 0x8a, 0x5e, 0x2, 0x83, 0x17, 0x5d, 0x52, 0xea);
mir_strcpy(tDest, "/SendHotmail");
- hSendHotMail = CreateServiceFunction(servicefunction, MsnMenuSendHotmail);
+ CreateServiceFunction(servicefunction, MsnMenuSendHotmail);
mi.position = -2000010005;
mi.flags = CMIF_HIDDEN;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
@@ -277,9 +275,4 @@ void MSN_RemoveContactMenus(void)
Menu_RemoveItem(hLiveSpaceMenuItem);
Menu_RemoveItem(hChatInviteMenuItem);
Menu_RemoveItem(hOpenInboxMenuItem);
-
- DestroyServiceFunction(hBlockCom);
- DestroyServiceFunction(hSendHotMail);
- DestroyServiceFunction(hInviteChat);
- DestroyServiceFunction(hViewProfile);
}