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/SkypeWeb/src/main.cpp | 24 +++++++++++++++--------- protocols/SkypeWeb/src/skype_proto.h | 6 +----- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp index 1ff515f2b4..c390774d13 100644 --- a/protocols/SkypeWeb/src/main.cpp +++ b/protocols/SkypeWeb/src/main.cpp @@ -17,13 +17,17 @@ along with this program. If not, see . #include "stdafx.h" -int &hLangpack(g_plugin.m_hLang); +CMPlugin g_plugin; +CHAT_MANAGER *pci; CLIST_INTERFACE *pcli; +int &hLangpack(g_plugin.m_hLang); + char g_szMirVer[100]; HANDLE g_hCallEvent; -CHAT_MANAGER *pci; -PLUGININFOEX pluginInfo = +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -37,14 +41,16 @@ PLUGININFOEX pluginInfo = { 0x57e90ac6, 0x1067, 0x423b, { 0x8c, 0xa3, 0x70, 0xa3, 0x9d, 0x20, 0xd, 0x4f } } }; -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("SKYPE", pluginInfoEx) { - return &pluginInfo; + SetUniqueId(SKYPE_SETTINGS_ID); } -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} ///////////////////////////////////////////////////////////////////////////////////////// @@ -63,7 +69,7 @@ int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); pci = Chat_GetInterface(); Miranda_GetVersionText(g_szMirVer, sizeof(g_szMirVer)); diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 2950141d96..43db460dfe 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -421,11 +421,7 @@ private: struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN("SKYPE") - { - SetUniqueId(SKYPE_SETTINGS_ID); - } + CMPlugin(); }; #endif //_SKYPE_PROTO_H_ \ No newline at end of file -- cgit v1.2.3