From 51f216f7e0feb67ad21387219c1b90e42b14658d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 16 May 2018 13:42:19 +0300 Subject: Core plugins => CMPlugin --- src/core/stdcrypt/src/main.cpp | 8 +------- src/core/stdcrypt/src/stdafx.h | 9 ++++++--- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'src/core/stdcrypt') diff --git a/src/core/stdcrypt/src/main.cpp b/src/core/stdcrypt/src/main.cpp index f14cab066a..9633341f8c 100644 --- a/src/core/stdcrypt/src/main.cpp +++ b/src/core/stdcrypt/src/main.cpp @@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadEncryptionModule(void); -HINSTANCE hInst; +CMPlugin g_plugin; int hLangpack; PLUGININFOEX pluginInfo = { @@ -38,12 +38,6 @@ PLUGININFOEX pluginInfo = { { 0xd3637189, 0xa5a5, 0x41f5, {0xbc, 0x72, 0x67, 0xa2, 0xf8, 0xaf, 0x1b, 0x6f}} }; -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) -{ - hInst = hinstDLL; - return TRUE; -} - extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfo; diff --git a/src/core/stdcrypt/src/stdafx.h b/src/core/stdcrypt/src/stdafx.h index 2bc0d66d3e..c10671bcca 100644 --- a/src/core/stdcrypt/src/stdafx.h +++ b/src/core/stdcrypt/src/stdafx.h @@ -40,9 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#define __NO_CMPLUGIN_NEEDED #include - #include #include #include @@ -69,7 +67,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdcrypt.h" -extern HINSTANCE hInst; +struct CMPlugin : public PLUGIN +{ + CMPlugin() : + PLUGIN(nullptr) + {} +}; bool getRandomBytes(BYTE *buf, size_t bufLen); void slow_hash(const void *buf, size_t bufLen, BYTE *tmpHash); -- cgit v1.2.3