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/FacebookRM/src/main.cpp | 19 ++++++++++++------- protocols/FacebookRM/src/proto.h | 6 +----- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'protocols/FacebookRM/src') diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp index 19c1c54331..5283056a17 100644 --- a/protocols/FacebookRM/src/main.cpp +++ b/protocols/FacebookRM/src/main.cpp @@ -22,12 +22,15 @@ along with this program. If not, see . #include "stdafx.h" +CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); std::string g_strUserAgent; DWORD g_mirandaVersion; -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -40,16 +43,18 @@ PLUGININFOEX pluginInfo = { { 0x8432b009, 0xff32, 0x4727, { 0xaa, 0xe6, 0xa9, 0x3, 0x50, 0x38, 0xfd, 0x58 } } }; +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN(FACEBOOK_NAME, pluginInfoEx) +{ + SetUniqueId(FACEBOOK_KEY_ID); +} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { g_mirandaVersion = mirandaVersion; - return &pluginInfo; + return &pluginInfoEx; } -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; - ///////////////////////////////////////////////////////////////////////////////////////// // Interface information @@ -60,7 +65,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); InitIcons(); InitContactMenus(); diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index 56a834df6d..7583c2e43e 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -289,9 +289,5 @@ public: struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN(FACEBOOK_NAME) - { - SetUniqueId(FACEBOOK_KEY_ID); - } + CMPlugin(); }; -- cgit v1.2.3