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 /protocols/MSN/src/msn.cpp | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'protocols/MSN/src/msn.cpp')
-rw-r--r-- | protocols/MSN/src/msn.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp index ac39b01399..769c3a7e07 100644 --- a/protocols/MSN/src/msn.cpp +++ b/protocols/MSN/src/msn.cpp @@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "msn_proto.h"
#include "version.h"
+CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
int &hLangpack(g_plugin.m_hLang);
@@ -39,7 +40,9 @@ void MsnLinks_Destroy(void); bool g_bTerminated = false;
int avsPresent = -1;
-static const PLUGININFOEX pluginInfo =
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static const PLUGININFOEX pluginInfoEx =
{
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -53,9 +56,16 @@ static const PLUGININFOEX pluginInfo = {0x97724af9, 0xf3fb, 0x47d3, {0xa3, 0xbf, 0xea, 0xa9, 0x35, 0xc7, 0x4e, 0x6d}}
};
+CMPlugin::CMPlugin() :
+ ACCPROTOPLUGIN<CMsnProto>("MSN", pluginInfoEx)
+{
+ ::DisableThreadLibraryCalls(m_hInst);
+ SetUniqueId("wlid");
+}
+
extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -64,10 +74,6 @@ extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD) extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
/////////////////////////////////////////////////////////////////////////////////////////
-
-CMPlugin g_plugin;
-
-/////////////////////////////////////////////////////////////////////////////////////////
// OnModulesLoaded - finalizes plugin's configuration on load
static int OnModulesLoaded(WPARAM, LPARAM)
@@ -83,7 +89,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
|