summaryrefslogtreecommitdiff
path: root/plugins/OpenSSL/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-17 21:05:17 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-17 21:05:23 +0300
commit5ebe9c34375bce857ad3160abba67d6ed2beadaf (patch)
tree6ec4260f751125db66852d70aed8e106a2527012 /plugins/OpenSSL/src
parent754665d1ae053678088144bb833bda76a0d95794 (diff)
MirLua, MirOTR, New_GPG, OpenSSL, SecureIM -> CMplugin
Diffstat (limited to 'plugins/OpenSSL/src')
-rw-r--r--plugins/OpenSSL/src/main.cpp23
-rw-r--r--plugins/OpenSSL/src/stdafx.h3
2 files changed, 16 insertions, 10 deletions
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>
+{
+ CMPlugin() :
+ PLUGIN<CMPlugin>(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 <delayimp.h>
-#define __NO_CMPLUGIN_NEEDED
#include <newpluginapi.h>
#include <m_netlib.h>
#include <m_langpack.h>
@@ -46,5 +45,3 @@ typedef struct SslHandle *HSSL;
#include <openssl/rand.h>
#include "version.h"
-
-extern HINSTANCE hInst;