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 --- protocols/Twitter/src/main.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'protocols/Twitter/src/main.cpp') diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp index afe7e21ae7..15eaa69f1d 100644 --- a/protocols/Twitter/src/main.cpp +++ b/protocols/Twitter/src/main.cpp @@ -22,11 +22,13 @@ along with this program. If not, see . #include "proto.h" #include "theme.h" +CMPlugin g_plugin; CLIST_INTERFACE *pcli; - int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -39,14 +41,16 @@ PLUGININFOEX pluginInfo = { { 0xbc09a71b, 0xb86e, 0x4d33, { 0xb1, 0x8d, 0x82, 0xd3, 0x4, 0x51, 0xdd, 0x3c } } }; -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("Twitter", pluginInfoEx) { - return &pluginInfo; + SetUniqueId(TWITTER_KEY_UN); } -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} ///////////////////////////////////////////////////////////////////////////////////////// @@ -57,7 +61,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); InitIcons(); -- cgit v1.2.3