summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_clistint.h4
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp2
-rw-r--r--plugins/CSList/src/cslist.cpp2
-rw-r--r--plugins/Clist_blind/src/init.cpp2
-rw-r--r--plugins/Clist_modern/src/init.cpp2
-rw-r--r--plugins/Clist_mw/src/init.cpp2
-rw-r--r--plugins/Clist_nicer/src/init.cpp2
-rw-r--r--plugins/FlashAvatars/src/cflash.cpp10
-rw-r--r--plugins/MetaContacts/src/meta_main.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp5
-rw-r--r--plugins/SimpleStatusMsg/src/options.cpp4
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/main.cpp2
-rw-r--r--plugins/StatusPlugins/KeepStatus/main.cpp2
-rw-r--r--plugins/StatusPlugins/StartupStatus/main.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/init.cpp10
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp15
-rw-r--r--plugins/UserInfoEx/src/init.cpp2
-rw-r--r--plugins/YARelay/src/main.cpp2
-rw-r--r--protocols/FacebookRM/src/main.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp4
-rw-r--r--protocols/IcqOscarJ/src/init.cpp3
-rw-r--r--protocols/JabberG/src/jabber.cpp3
-rw-r--r--protocols/Omegle/src/main.cpp5
-rw-r--r--protocols/Twitter/src/main.cpp3
-rw-r--r--src/core/stdaway/main.cpp3
-rw-r--r--src/core/stdclist/src/init.cpp3
-rw-r--r--src/core/stdfile/main.cpp3
-rw-r--r--src/core/stdhelp/main.cpp3
-rw-r--r--src/core/stdidle/main.cpp3
-rw-r--r--src/core/stduihist/main.cpp3
-rw-r--r--src/core/stdurl/main.cpp3
-rw-r--r--src/core/stduserinfo/main.cpp3
-rw-r--r--src/core/stduseronline/main.cpp3
33 files changed, 44 insertions, 77 deletions
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 55fbe34e60..c6f9330c6c 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -481,7 +481,7 @@ extern CLIST_INTERFACE cli, *pcli;
#define MS_CLIST_RETRIEVE_INTERFACE "CList/RetrieveInterface"
-__forceinline CLIST_INTERFACE* mir_getCLI()
-{ return (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
+__forceinline void mir_getCLI()
+{ pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
}
#endif // M_CLISTINT_H__
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index 87bbb5cb6d..df278659e4 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -730,7 +730,6 @@ int MirandaLoaded(WPARAM wParam,LPARAM lParam)
HookEvent(ME_MSG_TOOLBARLOADED, TabsrmmButtonsInit);
HookEvent(ME_MSG_BUTTONPRESSED, TabsrmmButtonPressed);
- pcli = (CLIST_INTERFACE *)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInstance);
GetWindowThreadProcessId(pcli->hwndContactList, &g_dwMirandaPID);
// let's create our secret window
@@ -807,6 +806,7 @@ int MirandaLoaded(WPARAM wParam,LPARAM lParam)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
g_wMaskAdv = db_get_w(NULL,MOD_NAME,"optsmaskadv",0);
g_bOldSetting = db_get_b(NULL, MOD_NAME, "OldSetting", 0);
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index 98f0c86410..54a30b6b82 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -120,7 +120,7 @@ static int OnPreshutdown(WPARAM wparam, LPARAM lparam)
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfoEx);
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
+ mir_getCLI();
// support for ComboBoxEx
INITCOMMONCONTROLSEX icc;
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index 445591c950..8e391ded74 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -141,7 +141,7 @@ static INT_PTR GetStatusMode(WPARAM wParam, LPARAM lParam)
extern "C" int __declspec(dllexport) CListInitialise()
{
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
+ mir_getCLI();
#define CLIST_SWAP(a) pfn##a = pcli->pfn##a; pcli->pfn##a = a
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp
index eee4ba3891..360d4dfebd 100644
--- a/plugins/Clist_modern/src/init.cpp
+++ b/plugins/Clist_modern/src/init.cpp
@@ -143,7 +143,7 @@ extern "C" __declspec(dllexport) int Unload(void)
static HRESULT SubclassClistInterface()
{
// get the contact list interface
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
+ mir_getCLI();
// OVERLOAD CLIST INTERFACE FUNCTIONS
//
diff --git a/plugins/Clist_mw/src/init.cpp b/plugins/Clist_mw/src/init.cpp
index 2d89519ac4..667f23f288 100644
--- a/plugins/Clist_mw/src/init.cpp
+++ b/plugins/Clist_mw/src/init.cpp
@@ -156,7 +156,7 @@ extern "C" int __declspec(dllexport) CListInitialise()
PreloadCLCModule();
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
+ mir_getCLI();
pcli->pfnBuildGroupPopupMenu = BuildGroupPopupMenu;
pcli->pfnCalcEipPosition = CalcEipPosition;
pcli->pfnCheckCacheItem = CheckPDNCE;
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp
index e50687c25f..a812acaeb1 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -278,7 +278,7 @@ extern "C" int __declspec(dllexport) CListInitialise()
PreloadContactListModule();
// get the clist interface
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
+ mir_getCLI();
pcli->pfnBuildGroupPopupMenu = BuildGroupPopupMenu;
pcli->pfnCluiProtocolStatusChanged = CluiProtocolStatusChanged;
pcli->pfnCompareContacts = CompareContacts;
diff --git a/plugins/FlashAvatars/src/cflash.cpp b/plugins/FlashAvatars/src/cflash.cpp
index 7153d41c9f..25dcfb5856 100644
--- a/plugins/FlashAvatars/src/cflash.cpp
+++ b/plugins/FlashAvatars/src/cflash.cpp
@@ -58,6 +58,7 @@ HINSTANCE g_hInst = 0;
int hLangpack;
+CLIST_INTERFACE *pcli;
HANDLE hNetlibUser;
@@ -208,17 +209,15 @@ static void __cdecl loadFlash_Thread(void *p) {
flash->Release();
}
-static void ShowBalloon(TCHAR *title, TCHAR *msg, int icon) {
+static void ShowBalloon(TCHAR *title, TCHAR *msg, int icon)
+{
MIRANDASYSTRAYNOTIFY msn = {0};
msn.cbSize = sizeof(MIRANDASYSTRAYNOTIFY);
msn.dwInfoFlags = icon | NIIF_INTERN_UNICODE;
msn.tszInfo = TranslateTS(msg);
msn.tszInfoTitle = TranslateTS(title);
msn.uTimeout = 5000;
-
- CLIST_INTERFACE* c = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
- if (c)
- c->pfnCListTrayNotify(&msn);
+ pcli->pfnCListTrayNotify(&msn);
}
static void prepareFlash(char* pProto, const TCHAR* pUrl, FLASHAVATAR& fa, IShockwaveFlash* flash)
@@ -615,6 +614,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirand
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
HookEvent(ME_SYSTEM_MODULESLOADED, systemModulesLoaded);
return 0;
diff --git a/plugins/MetaContacts/src/meta_main.cpp b/plugins/MetaContacts/src/meta_main.cpp
index 9c49a7ced9..4b102b16d6 100644
--- a/plugins/MetaContacts/src/meta_main.cpp
+++ b/plugins/MetaContacts/src/meta_main.cpp
@@ -142,7 +142,7 @@ extern "C" __declspec(dllexport) int Unload(void)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInstance);
+ mir_getCLI();
CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(META_PROTO "/Status"));
CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(META_PROTO "/IdleTS"));
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 4aa0db4416..ab72a2a225 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
HINSTANCE g_hInst;
int hLangpack;
+CLIST_INTERFACE *pcli;
PROTOACCOUNTS *accounts;
static int g_iIdleTime = -1;
@@ -2111,11 +2112,11 @@ static INT_PTR sttGetAwayMessage(WPARAM wParam, LPARAM lParam)
return (INT_PTR)res;
}
-
extern "C" int __declspec(dllexport) Load(void)
{
-
mir_getLP(&pluginInfo);
+ mir_getCLI();
+
hwndSAMsgDialog = NULL;
accounts = (PROTOACCOUNTS *)mir_alloc(sizeof(PROTOACCOUNTS));
diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp
index e803be5784..fcb79b0b37 100644
--- a/plugins/SimpleStatusMsg/src/options.cpp
+++ b/plugins/SimpleStatusMsg/src/options.cpp
@@ -22,9 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
static void RebuildStatusMenu(void)
{
- CLIST_INTERFACE* pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
- if (pcli && pcli->version > 4)
- pcli->pfnReloadProtoMenus();
+ pcli->pfnReloadProtoMenus();
}
static LRESULT CALLBACK OptEditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/main.cpp b/plugins/StatusPlugins/AdvancedAutoAway/main.cpp
index a08f18af0c..ac41956d2d 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/main.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/main.cpp
@@ -78,7 +78,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_AUTOAW
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP( &pluginInfoEx );
- pcli = (CLIST_INTERFACE*)CallService( MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
+ mir_getCLI();
autoAwaySettings = new OBJLIST<TAAAProtoSetting>(10, CompareSettings);
diff --git a/plugins/StatusPlugins/KeepStatus/main.cpp b/plugins/StatusPlugins/KeepStatus/main.cpp
index 10cdc9a5df..1baa85e758 100644
--- a/plugins/StatusPlugins/KeepStatus/main.cpp
+++ b/plugins/StatusPlugins/KeepStatus/main.cpp
@@ -77,7 +77,7 @@ INT_PTR AnnounceStatusChangeService(WPARAM wParam, LPARAM lParam);
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP( &pluginInfoEx );
- pcli = (CLIST_INTERFACE*)CallService( MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
+ mir_getCLI();
InitCommonStatus();
diff --git a/plugins/StatusPlugins/StartupStatus/main.cpp b/plugins/StatusPlugins/StartupStatus/main.cpp
index 65488c63a5..690dc1e39b 100644
--- a/plugins/StatusPlugins/StartupStatus/main.cpp
+++ b/plugins/StatusPlugins/StartupStatus/main.cpp
@@ -73,7 +73,7 @@ static INT_PTR SrvGetProfile( WPARAM wParam, LPARAM lParam )
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP( &pluginInfoEx );
- pcli = (CLIST_INTERFACE*)CallService( MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
+ mir_getCLI();
if ( db_get_b(NULL, MODULENAME, SETTING_SETPROFILE, 1) ||
db_get_b(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0))
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index f7c524af3a..4278ebef16 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -15,7 +15,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
#include "headers.h"
BOOL gbDosServiceExist = 0;
@@ -55,12 +54,9 @@ std::wstring gbAuthRepl;
extern TCHAR const * defQuestion;
extern int RemoveTmp(WPARAM,LPARAM);
-
-
/////////////////////////////////////////////////////////////////////////////////////////
// returns plugin's extended information
-
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -137,19 +133,17 @@ HANDLE hEventFilter = 0, hOptInitialise = 0, hSettingChanged = 0;
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
{
- /*if(DLL_PROCESS_ATTACH == fdwReason)
- hInst=hinstDLL;
- return TRUE;*/
hInst = hinstDLL;
return TRUE;
}
-
int hLangpack = 0;
+CLIST_INTERFACE *pcli;
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfoEx);
+ mir_getCLI();
CreateServiceFunction("/RemoveTmp", (MIRANDASERVICE)RemoveTmp);
HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index efef2f9e02..44ad773675 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -67,19 +67,12 @@ bool ProtoInList(std::string proto)
int CreateCListGroup(TCHAR* szGroupName)
{
- int hGroup;
- CLIST_INTERFACE *clint = NULL;
+ int hGroup = CallService(MS_CLIST_GROUPCREATE, 0, 0);
- if (ServiceExists(MS_CLIST_RETRIEVE_INTERFACE))
- clint = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
+ TCHAR* usTmp = szGroupName;
+ pcli->pfnRenameGroup(hGroup, usTmp);
- hGroup = CallService(MS_CLIST_GROUPCREATE, 0, 0);
-
- TCHAR* usTmp = szGroupName;
-
- clint->pfnRenameGroup(hGroup, usTmp);
-
- return hGroup;
+ return hGroup;
}
void DeleteCListGroupsByName(TCHAR* szGroupName)
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp
index e7af317ef7..cc4e12f945 100644
--- a/plugins/UserInfoEx/src/init.cpp
+++ b/plugins/UserInfoEx/src/init.cpp
@@ -180,7 +180,7 @@ extern "C" int __declspec(dllexport) Load(void)
ZeroMemory(&myGlobals, sizeof(MGLOBAL));
// init clist interface
- pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
+ mir_getCLI();
// init new miranda timezone interface
mir_getTMI(&tmi);
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 3386c792da..950cb625b5 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -233,7 +233,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfoEx);
- pcli = mir_getCLI();
+ mir_getCLI();
// Load plugin options from DB
hForwardFrom = (HANDLE)db_get_dw(NULL, "yaRelay", "ForwardFrom", 0);
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp
index ce64e172c7..709d91cbd6 100644
--- a/protocols/FacebookRM/src/main.cpp
+++ b/protocols/FacebookRM/src/main.cpp
@@ -93,9 +93,7 @@ static HANDLE g_hEvents[1];
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
-
- pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
- MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
+ mir_getCLI();
PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "Facebook";
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 74ba0ef628..1fb4216fc4 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -355,8 +355,7 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getXI(&xi);
mir_getLP(&pluginInfo);
-
- pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInstance);
+ mir_getCLI();
// Hook system events
hHookModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, gg_modulesloaded);
@@ -375,7 +374,6 @@ extern "C" int __declspec(dllexport) Load(void)
// Instance list
g_Instances = NULL;
-
return 0;
}
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp
index b7ca1ce204..017025ea03 100644
--- a/protocols/IcqOscarJ/src/init.cpp
+++ b/protocols/IcqOscarJ/src/init.cpp
@@ -98,12 +98,11 @@ int ModuleLoad(WPARAM wParam, LPARAM lParam)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP( &pluginInfo );
+ mir_getCLI();
srand(time(NULL));
_tzset();
- pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
-
// Register the module
PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = ICQ_PROTOCOL_NAME;
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index 6b486a53c8..43190cdfd7 100644
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -228,6 +228,7 @@ extern "C" int __declspec(dllexport) Load()
mir_getXI(&xi);
mir_getTMI(&tmi);
mir_getLP(&pluginInfo);
+ mir_getCLI();
WORD v[4];
CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)v);
@@ -237,8 +238,6 @@ extern "C" int __declspec(dllexport) Load()
setlocale(LC_ALL, "");
- pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
-
// Register protocol module
PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "JABBER";
diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp
index 6c8d5e20ba..04d22d4711 100644
--- a/protocols/Omegle/src/main.cpp
+++ b/protocols/Omegle/src/main.cpp
@@ -91,11 +91,8 @@ static HANDLE g_hEvents[1];
extern "C" int __declspec(dllexport) Load(void)
{
-
mir_getLP(&pluginInfo);
-
- pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
- MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
+ mir_getCLI();
PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "Omegle";
diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp
index 5f84e69c7e..e2c023bada 100644
--- a/protocols/Twitter/src/main.cpp
+++ b/protocols/Twitter/src/main.cpp
@@ -88,8 +88,7 @@ static HANDLE g_hEvents[1];
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
-
- pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
+ mir_getCLI();
PROTOCOLDESCRIPTOR pd = {sizeof(pd)};
pd.szName = "Twitter";
diff --git a/src/core/stdaway/main.cpp b/src/core/stdaway/main.cpp
index 210c8d7971..1f7e8aa9db 100644
--- a/src/core/stdaway/main.cpp
+++ b/src/core/stdaway/main.cpp
@@ -57,8 +57,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
-
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
+ mir_getCLI();
LoadAwayMsgModule();
return 0;
diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp
index 6f7f69a575..b8b542cc35 100644
--- a/src/core/stdclist/src/init.cpp
+++ b/src/core/stdclist/src/init.cpp
@@ -134,8 +134,7 @@ static INT_PTR GetStatusMode(WPARAM wParam, LPARAM lParam)
extern "C" __declspec(dllexport) int CListInitialise()
{
mir_getLP( &pluginInfo );
-
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
+ mir_getCLI();
pcli->pfnPaintClc = PaintClc;
diff --git a/src/core/stdfile/main.cpp b/src/core/stdfile/main.cpp
index 842dc93577..27c81fb044 100644
--- a/src/core/stdfile/main.cpp
+++ b/src/core/stdfile/main.cpp
@@ -62,8 +62,7 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
mir_getTMI(&tmi);
-
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
+ mir_getCLI();
if ( IsWinVer7Plus())
CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_ALL, IID_ITaskbarList3, (void**)&pTaskbarInterface);
diff --git a/src/core/stdhelp/main.cpp b/src/core/stdhelp/main.cpp
index 8f2b6da362..bcccc652ed 100644
--- a/src/core/stdhelp/main.cpp
+++ b/src/core/stdhelp/main.cpp
@@ -59,8 +59,7 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
mir_getTMI(&tmi);
-
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
+ mir_getCLI();
LoadHelpModule();
return 0;
diff --git a/src/core/stdidle/main.cpp b/src/core/stdidle/main.cpp
index 9906dedd38..50a9b58e6f 100644
--- a/src/core/stdidle/main.cpp
+++ b/src/core/stdidle/main.cpp
@@ -72,8 +72,7 @@ extern "C" int __declspec(dllexport) Load(void)
MyMonitorFromWindow = (pfnMyMonitorFromWindow)GetProcAddress(hUser32, "MonitorFromWindow");
MyGetMonitorInfo = (pfnMyGetMonitorInfo)GetProcAddress(hUser32, "GetMonitorInfoW");
-
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
+ mir_getCLI();
LoadIdleModule();
return 0;
diff --git a/src/core/stduihist/main.cpp b/src/core/stduihist/main.cpp
index 5b8893e4d5..97aa626562 100644
--- a/src/core/stduihist/main.cpp
+++ b/src/core/stduihist/main.cpp
@@ -59,8 +59,7 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
mir_getTMI(&tmi);
-
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
+ mir_getCLI();
LoadHistoryModule();
return 0;
diff --git a/src/core/stdurl/main.cpp b/src/core/stdurl/main.cpp
index 2889278111..5b389f6879 100644
--- a/src/core/stdurl/main.cpp
+++ b/src/core/stdurl/main.cpp
@@ -59,8 +59,7 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
mir_getTMI(&tmi);
-
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
+ mir_getCLI();
LoadSendRecvUrlModule();
return 0;
diff --git a/src/core/stduserinfo/main.cpp b/src/core/stduserinfo/main.cpp
index 0f6ab9de42..f75fb42bc6 100644
--- a/src/core/stduserinfo/main.cpp
+++ b/src/core/stduserinfo/main.cpp
@@ -61,8 +61,7 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
mir_getTMI(&tmi);
-
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
+ mir_getCLI();
if ( IsWinVerXPPlus()) {
HINSTANCE hThemeAPI = LoadLibraryA("uxtheme.dll");
diff --git a/src/core/stduseronline/main.cpp b/src/core/stduseronline/main.cpp
index 7dcf6c09f4..2f9a1cdf87 100644
--- a/src/core/stduseronline/main.cpp
+++ b/src/core/stduseronline/main.cpp
@@ -57,8 +57,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_USERON
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
-
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
+ mir_getCLI();
LoadUserOnlineModule();
return 0;