summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-08 11:37:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-08 11:37:28 +0000
commit6b05d57a1d02f233409a2e4392e22b7a3a756a8f (patch)
tree81da58d8ee4ed00139cf6da3fcc03a6405ab69be
parent67abd5767f442340f8c98cb08dc0b43ecb5cf783 (diff)
fix for the undocumented MS_CLIST_RETRIEVE_INTERFACE feature
git-svn-id: http://svn.miranda-ng.org/main/trunk@4384 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Clist_modern/src/init.cpp10
-rw-r--r--plugins/Clist_mw/src/init.cpp3
-rw-r--r--plugins/Clist_nicer/src/init.cpp5
-rw-r--r--src/core/stdclist/src/init.cpp1
-rw-r--r--src/modules/clist/clistcore.cpp4
5 files changed, 12 insertions, 11 deletions
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp
index 360d4dfebd..ec23b806a0 100644
--- a/plugins/Clist_modern/src/init.cpp
+++ b/plugins/Clist_modern/src/init.cpp
@@ -82,6 +82,10 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" __declspec(dllexport) int CListInitialise()
{
+ mir_getLP( &pluginInfo );
+ mir_getCLI();
+ mir_getTMI(&tmi);
+
HMODULE hKernel = GetModuleHandleA("kernel32.dll");
fnTryEnterCriticalSection = ( pfnTryEnterCriticalSection )GetProcAddress( hKernel, "TryEnterCriticalSection");
@@ -94,8 +98,6 @@ extern "C" __declspec(dllexport) int CListInitialise()
fnGetAncestor = MyGetAncestor;
g_dwMainThreadID = GetCurrentThreadId();
- mir_getTMI(&tmi);
- mir_getLP( &pluginInfo );
CHECKRES ( PreLoadContactListModule ( ) );
CHECKRES ( SubclassClistInterface ( ) );
@@ -142,9 +144,6 @@ extern "C" __declspec(dllexport) int Unload(void)
static HRESULT SubclassClistInterface()
{
- // get the contact list interface
- mir_getCLI();
-
// OVERLOAD CLIST INTERFACE FUNCTIONS
//
// Naming convention is:
@@ -154,6 +153,7 @@ static HRESULT SubclassClistInterface()
corecli = *pcli;
+ pcli->hInst = g_hInst;
pcli->bDisplayLocked = TRUE;
pcli->pfnCheckCacheItem = cliCheckCacheItem;
diff --git a/plugins/Clist_mw/src/init.cpp b/plugins/Clist_mw/src/init.cpp
index 667f23f288..be7d95d862 100644
--- a/plugins/Clist_mw/src/init.cpp
+++ b/plugins/Clist_mw/src/init.cpp
@@ -153,10 +153,11 @@ extern "C" int __declspec(dllexport) CListInitialise()
OutputDebugStringA("CListInitialise ClistMW\r\n");
mir_getLP( &pluginInfo );
+ mir_getCLI();
PreloadCLCModule();
- mir_getCLI();
+ pcli->hInst = g_hInst;
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 a812acaeb1..6a1852e33e 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -208,8 +208,9 @@ static int fnIconFromStatusMode( const char* szProto, int status, HANDLE hContac
extern "C" int __declspec(dllexport) CListInitialise()
{
- mir_getTMI(&tmi);
mir_getLP( &pluginInfo );
+ mir_getCLI();
+ mir_getTMI(&tmi);
API::onInit();
RegisterCLUIFrameClasses();
@@ -278,7 +279,7 @@ extern "C" int __declspec(dllexport) CListInitialise()
PreloadContactListModule();
// get the clist interface
- mir_getCLI();
+ pcli->hInst = g_hInst;
pcli->pfnBuildGroupPopupMenu = BuildGroupPopupMenu;
pcli->pfnCluiProtocolStatusChanged = CluiProtocolStatusChanged;
pcli->pfnCompareContacts = CompareContacts;
diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp
index b8b542cc35..56774e5d29 100644
--- a/src/core/stdclist/src/init.cpp
+++ b/src/core/stdclist/src/init.cpp
@@ -136,6 +136,7 @@ extern "C" __declspec(dllexport) int CListInitialise()
mir_getLP( &pluginInfo );
mir_getCLI();
+ pcli->hInst = g_hInst;
pcli->pfnPaintClc = PaintClc;
MySetLayeredWindowAttributes = (BOOL(WINAPI *) (HWND, COLORREF, BYTE, DWORD)) GetProcAddress(
diff --git a/src/modules/clist/clistcore.cpp b/src/modules/clist/clistcore.cpp
index d69a1a77db..3979e73cfc 100644
--- a/src/modules/clist/clistcore.cpp
+++ b/src/modules/clist/clistcore.cpp
@@ -62,7 +62,7 @@ static void fnReloadProtoMenus(void)
cli.pfnCluiProtocolStatusChanged(0, 0);
}
-static INT_PTR srvRetrieveInterface(WPARAM, LPARAM lParam)
+static INT_PTR srvRetrieveInterface(WPARAM, LPARAM)
{
int rc;
@@ -211,8 +211,6 @@ static INT_PTR srvRetrieveInterface(WPARAM, LPARAM lParam)
cli.pfnReloadExtraIcons = fnReloadExtraIcons;
cli.pfnSetAllExtraIcons = fnSetAllExtraIcons;
- cli.hInst = (HMODULE)lParam;
-
rc = LoadContactListModule2();
if (rc == 0)
rc = LoadCLCModule();