From a905c9c3f92fd54f37a5466649ac378db69e7cb0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 14:29:31 +0300 Subject: all protocols rewritten to CMPluginBase --- plugins/Quotes/src/Forex.cpp | 18 ++++++++++++------ plugins/Quotes/src/stdafx.h | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'plugins/Quotes') diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 28e645cdea..7a99cd754d 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -315,12 +315,6 @@ EXTERN_C int __declspec(dllexport) Load(void) Quotes_IconsInit(); Quotes_InitExtraIcons(); - PROTOCOLDESCRIPTOR pd = { 0 }; - pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE; - pd.szName = QUOTES_PROTOCOL_NAME; - pd.type = PROTOTYPE_VIRTUAL; - Proto_RegisterModule(&pd); - CreateProtoServiceFunction(QUOTES_PROTOCOL_NAME, PS_GETCAPS, QuoteProtoFunc_GetCaps); CreateProtoServiceFunction(QUOTES_PROTOCOL_NAME, PS_GETSTATUS, QuoteProtoFunc_GetStatus); @@ -343,3 +337,15 @@ EXTERN_C __declspec(dllexport) int Unload(void) return 0; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(QUOTES_PROTOCOL_NAME) + { + RegisterProtocol(PROTOTYPE_VIRTUAL); + } +} + g_plugin; diff --git a/plugins/Quotes/src/stdafx.h b/plugins/Quotes/src/stdafx.h index 838c01b6e9..abdfcb6ea4 100644 --- a/plugins/Quotes/src/stdafx.h +++ b/plugins/Quotes/src/stdafx.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3