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 --- plugins/Quotes/src/Forex.cpp | 19 ++++++++++++------- plugins/Quotes/src/stdafx.h | 7 +------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'plugins/Quotes/src') diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 5d791bee55..9b7b3ffafc 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -3,7 +3,9 @@ #include "stdafx.h" +CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); + HANDLE g_hEventWorkThreadStop; //int g_nStatus = ID_STATUS_OFFLINE; bool g_bAutoUpdate = true; @@ -277,15 +279,11 @@ inline int Quotes_UnhookEvent(HANDLE h) ///////////////////////////////////////////////////////////////////////////////////////// -CMPlugin g_plugin; - -///////////////////////////////////////////////////////////////////////////////////////// - EXTERN_C __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; ///////////////////////////////////////////////////////////////////////////////////////// -PLUGININFOEX Global_pluginInfo = +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -299,16 +297,23 @@ PLUGININFOEX Global_pluginInfo = { 0xe882056d, 0xd1d, 0x4131, { 0x9a, 0x98, 0x40, 0x4c, 0xba, 0xea, 0x6a, 0x9c } } }; +CMPlugin::CMPlugin() : + PLUGIN(QUOTES_PROTOCOL_NAME, pluginInfoEx) +{ + RegisterProtocol(PROTOTYPE_VIRTUAL); + SetUniqueId(DB_STR_QUOTE_SYMBOL); +} + EXTERN_C __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &Global_pluginInfo; + return &pluginInfoEx; } ///////////////////////////////////////////////////////////////////////////////////////// EXTERN_C int __declspec(dllexport) Load(void) { - mir_getLP(&Global_pluginInfo); + mir_getLP(&pluginInfoEx); if (false == CModuleInfo::Verify()) return 1; diff --git a/plugins/Quotes/src/stdafx.h b/plugins/Quotes/src/stdafx.h index ea4fed341e..b8fb295aaa 100644 --- a/plugins/Quotes/src/stdafx.h +++ b/plugins/Quotes/src/stdafx.h @@ -118,10 +118,5 @@ inline tstring quotes_a2t(const char* s) struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(QUOTES_PROTOCOL_NAME) - { - RegisterProtocol(PROTOTYPE_VIRTUAL); - SetUniqueId(DB_STR_QUOTE_SYMBOL); - } + CMPlugin(); }; -- cgit v1.2.3