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/VKontakte/src/main.cpp | 21 +++++++++++++-------- protocols/VKontakte/src/vk_proto.h | 6 +----- 2 files changed, 14 insertions(+), 13 deletions(-) (limited to 'protocols/VKontakte') diff --git a/protocols/VKontakte/src/main.cpp b/protocols/VKontakte/src/main.cpp index 3861ba254d..76edf4e37c 100644 --- a/protocols/VKontakte/src/main.cpp +++ b/protocols/VKontakte/src/main.cpp @@ -18,10 +18,13 @@ along with this program. If not, see . #include "stdafx.h" #include "version.h" -int &hLangpack(g_plugin.m_hLang); +CMPlugin g_plugin; CLIST_INTERFACE *pcli; +int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -35,14 +38,16 @@ PLUGININFOEX pluginInfo = { 0x32579908, 0x724b, 0x467f, {0xad, 0xad, 0x22, 0xb6, 0x35, 0x9a, 0x74, 0x9a}} }; -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("VKontakte", pluginInfoEx) { - return &pluginInfo; + SetUniqueId("ID"); } -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} ///////////////////////////////////////////////////////////////////////////////////////// @@ -53,7 +58,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load() { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); InitIcons(); diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index f1fd68ba43..e1e032e5b9 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -403,9 +403,5 @@ private: struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN("VKontakte") - { - SetUniqueId("ID"); - } + CMPlugin(); }; -- cgit v1.2.3