From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- plugins/ContactsPlus/src/main.cpp | 22 +++++++++++++++------- plugins/ContactsPlus/src/stdafx.h | 4 +--- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'plugins/ContactsPlus/src') diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index b114990165..2a6504324e 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -36,7 +36,9 @@ gAckList g_aAckData; HGENMENU hContactMenuItem; -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +static PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -49,6 +51,17 @@ PLUGININFOEX pluginInfo = { { 0x0324785E, 0x74CE, 0x4600, { 0xB7, 0x81, 0x85, 0x17, 0x73, 0xB3, 0xEF, 0xC5 } } }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} + +///////////////////////////////////////////////////////////////////////////////////////// + static int HookDBEventAdded(WPARAM hContact, LPARAM hDbEvent) { //process the event @@ -185,14 +198,9 @@ static INT_PTR ServiceReceiveCommand(WPARAM, LPARAM lParam) return 0; } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfo; -} - extern "C" __declspec(dllexport) int Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); InitCommonControls(); diff --git a/plugins/ContactsPlus/src/stdafx.h b/plugins/ContactsPlus/src/stdafx.h index 5fce404385..839827bc9b 100644 --- a/plugins/ContactsPlus/src/stdafx.h +++ b/plugins/ContactsPlus/src/stdafx.h @@ -54,9 +54,7 @@ struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(MODULENAME) - {} + CMPlugin(); }; #define MS_CONTACTS_SEND "ContactsTransfer/SendContacts" -- cgit v1.2.3