diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-16 13:42:19 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-16 13:42:25 +0300 |
commit | 51f216f7e0feb67ad21387219c1b90e42b14658d (patch) | |
tree | 2ce37e615bf4f82320fe01babc37401fa4a56ca3 /src/core/stdcrypt | |
parent | 2e8582832fe56c89bb422b82e884ddaf67a8dbb3 (diff) |
Core plugins => CMPlugin
Diffstat (limited to 'src/core/stdcrypt')
-rw-r--r-- | src/core/stdcrypt/src/main.cpp | 8 | ||||
-rw-r--r-- | src/core/stdcrypt/src/stdafx.h | 9 |
2 files changed, 7 insertions, 10 deletions
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 <direct.h>
#include <malloc.h>
-#define __NO_CMPLUGIN_NEEDED
#include <win2k.h>
-
#include <m_system.h>
#include <newpluginapi.h>
#include <m_utils.h>
@@ -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>
+{
+ CMPlugin() :
+ PLUGIN<CMPlugin>(nullptr)
+ {}
+};
bool getRandomBytes(BYTE *buf, size_t bufLen);
void slow_hash(const void *buf, size_t bufLen, BYTE *tmpHash);
|