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 --- src/core/stdmsg/src/srmm.cpp | 18 +++++++++++++++--- src/core/stdmsg/src/stdafx.h | 4 +--- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'src/core/stdmsg') diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp index 183e2bcf08..612e3b59c3 100644 --- a/src/core/stdmsg/src/srmm.cpp +++ b/src/core/stdmsg/src/srmm.cpp @@ -29,7 +29,9 @@ CMPlugin g_plugin; CLIST_INTERFACE *pcli; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -41,22 +43,32 @@ PLUGININFOEX pluginInfo = { { 0x657fe89b, 0xd121, 0x40c2, { 0x8a, 0xc9, 0xb9, 0xfa, 0x57, 0x55, 0xb3, 0x0D } } //{657FE89B-D121-40c2-8AC9-B9FA5755B30D} }; +CMPlugin::CMPlugin() : + PLUGIN(SRMMMOD, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); Load_ChatModule(); return LoadSendRecvMessageModule(); } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Unload(void) { SplitmsgShutdown(); diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 8654d9153d..6f1875347d 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -108,9 +108,7 @@ struct GlobalLogSettings : public GlobalLogSettingsBase struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(SRMMMOD) - {} + CMPlugin(); }; ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3