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/MenuItemEx/src/main.cpp | 20 +++++++++++++++----- plugins/MenuItemEx/src/stdafx.h | 6 +----- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'plugins/MenuItemEx') diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 06bd112ebc..9aff4ebe0e 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -76,6 +76,8 @@ static const ii[] = { { LPGENW("Typing Notify"), IGNOREEVENT_TYPINGNOTIFY, SKINICON_OTHER_TYPING } }; +///////////////////////////////////////////////////////////////////////////////////////// + PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -89,6 +91,17 @@ PLUGININFOEX pluginInfoEx = { { 0xb1902a52, 0x9114, 0x4d7e, { 0xac, 0x2e, 0xb3, 0xa5, 0x2e, 0x01, 0xd5, 0x74 } } }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} + +///////////////////////////////////////////////////////////////////////////////////////// + struct ModSetLinkLinkItem { // code from dbe++ plugin by Bio char *name; BYTE *next; //struct ModSetLinkLinkItem @@ -1043,11 +1056,6 @@ static int PluginInit(WPARAM, LPARAM) return 0; } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfoEx); @@ -1079,6 +1087,8 @@ extern "C" __declspec(dllexport) int Load(void) return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) int Unload(void) { DestroyIcon(hIcons[3]); diff --git a/plugins/MenuItemEx/src/stdafx.h b/plugins/MenuItemEx/src/stdafx.h index 4f83841c4e..03c9183055 100644 --- a/plugins/MenuItemEx/src/stdafx.h +++ b/plugins/MenuItemEx/src/stdafx.h @@ -32,15 +32,11 @@ struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(MODULENAME) - {} + CMPlugin(); }; #define MIIM_STRING 0x00000040 -extern PLUGININFOEX pluginInfoEx; - int OptionsInit(WPARAM, LPARAM); #define MAX_PROTOS 32 -- cgit v1.2.3