diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
commit | 8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch) | |
tree | 03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/YAMN/src | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/YAMN/src')
-rw-r--r-- | plugins/YAMN/src/main.cpp | 18 | ||||
-rw-r--r-- | plugins/YAMN/src/stdafx.h | 7 |
2 files changed, 12 insertions, 13 deletions
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index db71aa8e05..4638b59d42 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -29,6 +29,7 @@ static int iDllPlugins = 0; YAMN_VARIABLES YAMNVar; +CMPlugin g_plugin; CLIST_INTERFACE *pcli; int &hLangpack(g_plugin.m_hLang); @@ -69,15 +70,11 @@ static void GetProfileDirectory(wchar_t *szPath, int cbPath) ///////////////////////////////////////////////////////////////////////////////////////// -CMPlugin g_plugin; - -///////////////////////////////////////////////////////////////////////////////////////// - extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; ///////////////////////////////////////////////////////////////////////////////////////// -PLUGININFOEX pluginInfo = { +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -90,9 +87,16 @@ PLUGININFOEX pluginInfo = { {0xb047a7e5, 0x27a, 0x4cfc, {0x8b, 0x18, 0xed, 0xa8, 0x34, 0x5d, 0x27, 0x90}} }; +CMPlugin::CMPlugin() : + PLUGIN<CMPlugin>(YAMN_DBMODULE, pluginInfoEx) +{ + RegisterProtocol(PROTOTYPE_VIRTUAL); + SetUniqueId("Id"); +} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } ///////////////////////////////////////////////////////////////////////////////////////// @@ -237,7 +241,7 @@ static void LoadPlugins() extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); YAMN_STATUS = ID_STATUS_OFFLINE; diff --git a/plugins/YAMN/src/stdafx.h b/plugins/YAMN/src/stdafx.h index b5612aa639..485e8bdf76 100644 --- a/plugins/YAMN/src/stdafx.h +++ b/plugins/YAMN/src/stdafx.h @@ -44,12 +44,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(YAMN_DBMODULE)
- {
- RegisterProtocol(PROTOTYPE_VIRTUAL);
- SetUniqueId("Id");
- }
+ CMPlugin();
};
// From services.cpp
|