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 --- protocols/EmLanProto/src/amdproto.cpp | 17 ++++++++++++----- protocols/EmLanProto/src/stdafx.h | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'protocols/EmLanProto/src') diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp index 1bcc43a24d..366a508a84 100644 --- a/protocols/EmLanProto/src/amdproto.cpp +++ b/protocols/EmLanProto/src/amdproto.cpp @@ -332,11 +332,6 @@ extern "C" int __declspec(dllexport) __cdecl Load() mir_getLP(&pluginInfo); g_lan = new CMLan(); - PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE }; - pd.szName = PROTONAME; - pd.type = PROTOTYPE_PROTOCOL; - Proto_RegisterModule(&pd); - CreateProtoServiceFunction(PROTONAME, PS_GETCAPS, EMPGetCaps); CreateProtoServiceFunction(PROTONAME, PS_GETNAME, EMPGetName); CreateProtoServiceFunction(PROTONAME, PS_LOADICON, EMPLoadIcon); @@ -367,3 +362,15 @@ extern "C" int __declspec(dllexport) __cdecl Unload() delete g_lan; return 0; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(PROTONAME) + { + RegisterProtocol(PROTOTYPE_PROTOCOL); + } +} + g_plugin; diff --git a/protocols/EmLanProto/src/stdafx.h b/protocols/EmLanProto/src/stdafx.h index 8fefd8f2f8..d80030c4b1 100644 --- a/protocols/EmLanProto/src/stdafx.h +++ b/protocols/EmLanProto/src/stdafx.h @@ -16,6 +16,7 @@ #include #include #include +#include #include "resource.h" #include "version.h" -- cgit v1.2.3