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/YAMN/src/main.cpp | 18 ++++++++++++------ plugins/YAMN/src/stdafx.h | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'plugins/YAMN') diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 8c3b95350a..1e5a26ecb9 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -265,12 +265,6 @@ extern "C" int __declspec(dllexport) Load(void) } } - // Registering YAMN as protocol - PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE }; - pd.szName = YAMN_DBMODULE; - pd.type = PROTOTYPE_VIRTUAL; - Proto_RegisterModule(&pd); - if (nullptr == (NoWriterEV = CreateEvent(nullptr, TRUE, TRUE, nullptr))) return 1; if (nullptr == (WriteToFileEV = CreateEvent(nullptr, FALSE, FALSE, nullptr))) @@ -365,3 +359,15 @@ extern "C" int __declspec(dllexport) Unload(void) delete[] CodePageNamesSupp; return 0; } + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public CMPluginBase +{ + CMPlugin() : + CMPluginBase(YAMN_DBMODULE) + { + RegisterProtocol(PROTOTYPE_VIRTUAL); + } +} + g_plugin; diff --git a/plugins/YAMN/src/stdafx.h b/plugins/YAMN/src/stdafx.h index 9785e95622..813f4848a9 100644 --- a/plugins/YAMN/src/stdafx.h +++ b/plugins/YAMN/src/stdafx.h @@ -29,6 +29,7 @@ #include #include #include +#include #include "main.h" #include "mails/decode.h" -- cgit v1.2.3