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/Tox/src/main.cpp | 22 ++++++++++++++-------- protocols/Tox/src/tox_proto.h | 6 +----- 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'protocols/Tox/src') diff --git a/protocols/Tox/src/main.cpp b/protocols/Tox/src/main.cpp index 593d598485..8f1b12b730 100644 --- a/protocols/Tox/src/main.cpp +++ b/protocols/Tox/src/main.cpp @@ -1,11 +1,15 @@ #include "stdafx.h" -int &hLangpack(g_plugin.m_hLang); +CMPlugin g_plugin; CHAT_MANAGER *pci; CLIST_INTERFACE *pcli; +int &hLangpack(g_plugin.m_hLang); + HANDLE hProfileFolderPath; -PLUGININFOEX pluginInfo = +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -19,14 +23,16 @@ PLUGININFOEX pluginInfo = {0x272a3e, 0xf5fa, 0x4090, {0x8b, 0x67, 0x3e, 0x62, 0xac, 0x1e, 0xe0, 0xb4}} }; -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("TOX", pluginInfoEx) { - return &pluginInfo; + SetUniqueId(TOX_SETTINGS_ID); } -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} ///////////////////////////////////////////////////////////////////////////////////////// @@ -50,7 +56,7 @@ int OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pci = Chat_GetInterface(); pcli = Clist_GetInterface(); diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index 3a67298871..5af4c0bddf 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -248,11 +248,7 @@ private: struct CMPlugin : public ACCPROTOPLUGIN { - CMPlugin() : - ACCPROTOPLUGIN("TOX") - { - SetUniqueId(TOX_SETTINGS_ID); - } + CMPlugin(); }; #endif //_TOX_PROTO_H_ \ No newline at end of file -- cgit v1.2.3