From 11e70d8c4e224d80015fffe0378c53abee5fd824 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 17 May 2018 19:41:35 +0300 Subject: Popup, PManagerEx, QuickContacts, RemovePersonalSettings, Restart, SeenPlugin, SendSS, ShlExt, SimpleAR, SimpleStatusMsg, SkypeStatusChange, SmileyAdd, SMS => CMPlugin --- plugins/ProfileManager/src/pmanagerEx.cpp | 26 +++++++++++++++----------- plugins/ProfileManager/src/stdafx.h | 1 - 2 files changed, 15 insertions(+), 12 deletions(-) (limited to 'plugins/ProfileManager') diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp index fad24aae35..4cfbce533e 100644 --- a/plugins/ProfileManager/src/pmanagerEx.cpp +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -13,10 +13,20 @@ There is no warranty. #define SRV_CHANGE_PM "Database/ChangePM" #define SRV_RESTART_ME "System/RestartMe" -HINSTANCE hInst; +struct CMPlugin : public PLUGIN +{ + CMPlugin() : + PLUGIN(nullptr) + {} +} +g_plugin; + int hLangpack; -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfo = +{ sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -36,14 +46,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) ///////////////////////////////////////////////////////////////////////////////////////// -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) -{ - hInst = hinstDLL; - return TRUE; -} - -///////////////////////////////////////////////////////////////////////////////////////// - static INT_PTR ChangePM(WPARAM, LPARAM) { wchar_t fn[MAX_PATH]; @@ -85,7 +87,7 @@ extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfo); - Icon_Register(hInst, LPGEN("Profile manager"), iconList, _countof(iconList)); + Icon_Register(g_plugin.getInst(), LPGEN("Profile manager"), iconList, _countof(iconList)); CreateServiceFunction(SRV_LOAD_PM, LoadPM); CreateServiceFunction(SRV_CHANGE_PM, ChangePM); @@ -107,6 +109,8 @@ extern "C" __declspec(dllexport) int Load(void) return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) int Unload(void) { return 0; diff --git a/plugins/ProfileManager/src/stdafx.h b/plugins/ProfileManager/src/stdafx.h index 013c87b75b..26b605671a 100644 --- a/plugins/ProfileManager/src/stdafx.h +++ b/plugins/ProfileManager/src/stdafx.h @@ -2,7 +2,6 @@ #include -#define __NO_CMPLUGIN_NEEDED #include #include #include -- cgit v1.2.3