diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
commit | 8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch) | |
tree | 03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/ContactsPlus | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/ContactsPlus')
-rw-r--r-- | plugins/ContactsPlus/src/main.cpp | 22 | ||||
-rw-r--r-- | plugins/ContactsPlus/src/stdafx.h | 4 |
2 files changed, 16 insertions, 10 deletions
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<CMPlugin>(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>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODULENAME)
- {}
+ CMPlugin();
};
#define MS_CONTACTS_SEND "ContactsTransfer/SendContacts"
|