From b172c4bbc75cdad0e8ccd22292aa671ba43cac45 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 Apr 2018 18:14:33 +0300 Subject: PLUGIN<> to half-automatically calculate the dll's g_hInstance and pass it inside --- protocols/EmLanProto/src/amdproto.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'protocols/EmLanProto/src') diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp index 8305850048..9efd5a1ac3 100644 --- a/protocols/EmLanProto/src/amdproto.cpp +++ b/protocols/EmLanProto/src/amdproto.cpp @@ -362,13 +362,15 @@ extern "C" int __declspec(dllexport) __cdecl Unload() ///////////////////////////////////////////////////////////////////////////////////////// -struct CMPlugin : public CMPluginBase +struct CMPlugin : public PLUGIN { CMPlugin() : - CMPluginBase(PROTONAME) + PLUGIN(PROTONAME) { RegisterProtocol(PROTOTYPE_PROTOCOL); SetUniqueId("Nick"); } } g_plugin; + +extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; -- cgit v1.2.3