From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- plugins/AuthState/src/main.cpp | 16 ++++++++++++---- plugins/AuthState/src/stdafx.h | 4 +--- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'plugins/AuthState/src') diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index 9686fc4a4f..c100ac48d2 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -41,7 +41,9 @@ enum ICON_BOTH }; -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -51,14 +53,20 @@ PLUGININFOEX pluginInfo = { __AUTHORWEB, UNICODE_AWARE, // {DACE7D41-DFA9-4772-89AE-A59A6153E6B2} - { 0xdace7d41, 0xdfa9, 0x4772, { 0x89, 0xae, 0xa5, 0x9a, 0x61, 0x53, 0xe6, 0xb2 } } + {0xdace7d41, 0xdfa9, 0x4772, {0x89, 0xae, 0xa5, 0x9a, 0x61, 0x53, 0xe6, 0xb2}} }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + INT_PTR getIconToUse(MCONTACT hContact, LPARAM) { const char *proto = GetContactProto(hContact); @@ -162,7 +170,7 @@ int onModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded); HookEvent(ME_DB_CONTACT_SETTINGCHANGED, onContactSettingChanged); diff --git a/plugins/AuthState/src/stdafx.h b/plugins/AuthState/src/stdafx.h index 57701cd8c1..a101d76aac 100644 --- a/plugins/AuthState/src/stdafx.h +++ b/plugins/AuthState/src/stdafx.h @@ -40,9 +40,7 @@ struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(MODULENAME) - {} + CMPlugin(); }; int onOptInitialise(WPARAM wParam, LPARAM lParam); -- cgit v1.2.3