summaryrefslogtreecommitdiff
path: root/src/core/stdcrypt
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
commit8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch)
tree03e5b4870f09a3163306740c2eebee47bc15b042 /src/core/stdcrypt
parentc5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff)
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'src/core/stdcrypt')
-rw-r--r--src/core/stdcrypt/src/main.cpp18
-rw-r--r--src/core/stdcrypt/src/stdafx.h4
2 files changed, 16 insertions, 6 deletions
diff --git a/src/core/stdcrypt/src/main.cpp b/src/core/stdcrypt/src/main.cpp
index 4a295603fa..011511d37b 100644
--- a/src/core/stdcrypt/src/main.cpp
+++ b/src/core/stdcrypt/src/main.cpp
@@ -25,7 +25,9 @@ int LoadEncryptionModule(void);
CMPlugin g_plugin;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -38,20 +40,30 @@ PLUGININFOEX pluginInfo = {
{ 0xd3637189, 0xa5a5, 0x41f5, {0xbc, 0x72, 0x67, 0xa2, 0xf8, 0xaf, 0x1b, 0x6f}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_CRYPTO, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
return LoadEncryptionModule();
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/src/core/stdcrypt/src/stdafx.h b/src/core/stdcrypt/src/stdafx.h
index c10671bcca..8cc54ff399 100644
--- a/src/core/stdcrypt/src/stdafx.h
+++ b/src/core/stdcrypt/src/stdafx.h
@@ -69,9 +69,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(nullptr)
- {}
+ CMPlugin();
};
bool getRandomBytes(BYTE *buf, size_t bufLen);