From 5ebe9c34375bce857ad3160abba67d6ed2beadaf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 17 May 2018 21:05:17 +0300 Subject: MirLua, MirOTR, New_GPG, OpenSSL, SecureIM -> CMplugin --- plugins/OpenSSL/src/main.cpp | 23 ++++++++++++++++------- plugins/OpenSSL/src/stdafx.h | 3 --- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'plugins/OpenSSL/src') diff --git a/plugins/OpenSSL/src/main.cpp b/plugins/OpenSSL/src/main.cpp index 05416b7eb6..36c5691730 100644 --- a/plugins/OpenSSL/src/main.cpp +++ b/plugins/OpenSSL/src/main.cpp @@ -23,9 +23,18 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadSslModule(void); void UnloadSslModule(void); -HINSTANCE hInst; +struct CMPlugin : public PLUGIN +{ + CMPlugin() : + PLUGIN(nullptr) + {} +} +g_plugin; + int hLangpack; +///////////////////////////////////////////////////////////////////////////////////////// + PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -39,19 +48,17 @@ PLUGININFOEX pluginInfo = { { 0xb649702c, 0x13de, 0x408a, { 0xb6, 0xc2, 0xfb, 0x8f, 0xed, 0x2a, 0x2c, 0x90 } } }; -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) -{ - hInst = hinstDLL; - return TRUE; -} - extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfo; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SSL, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { mir_getLP(&pluginInfo); @@ -59,6 +66,8 @@ extern "C" int __declspec(dllexport) Load(void) return LoadSslModule(); } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Unload(void) { UnloadSslModule(); diff --git a/plugins/OpenSSL/src/stdafx.h b/plugins/OpenSSL/src/stdafx.h index bc90991127..b107c70ef8 100644 --- a/plugins/OpenSSL/src/stdafx.h +++ b/plugins/OpenSSL/src/stdafx.h @@ -35,7 +35,6 @@ typedef struct SslHandle *HSSL; #define DELAYIMP_INSECURE_WRITABLE_HOOKS #include -#define __NO_CMPLUGIN_NEEDED #include #include #include @@ -46,5 +45,3 @@ typedef struct SslHandle *HSSL; #include #include "version.h" - -extern HINSTANCE hInst; -- cgit v1.2.3