From 9250a0caadc93ec7a92b99deea151ab7a1c403da Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 28 May 2018 20:49:19 +0200 Subject: Notification plugins - convert to Load/Unload methods of CMPlugin --- plugins/TooltipNotify/src/main.cpp | 4 ++-- plugins/TooltipNotify/src/stdafx.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/TooltipNotify/src') diff --git a/plugins/TooltipNotify/src/main.cpp b/plugins/TooltipNotify/src/main.cpp index 05fbbbe7ee..608fcb4e18 100644 --- a/plugins/TooltipNotify/src/main.cpp +++ b/plugins/TooltipNotify/src/main.cpp @@ -67,7 +67,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) return CTooltipNotify::GetObjInstance()->ModulesLoaded(wParam, lParam); } -extern "C" int __declspec(dllexport) Load(void) +int CMPlugin::Load() { g_pTooltipNotify = new CTooltipNotify(); assert(g_pTooltipNotify!=nullptr); @@ -78,7 +78,7 @@ extern "C" int __declspec(dllexport) Load(void) ///////////////////////////////////////////////////////////////////////////////////////// -extern "C" int __declspec(dllexport) Unload(void) +int CMPlugin::Unload() { if (g_hContactSettingChanged) UnhookEvent(g_hContactSettingChanged); if (g_hProtoContactIsTyping) UnhookEvent(g_hProtoContactIsTyping); diff --git a/plugins/TooltipNotify/src/stdafx.h b/plugins/TooltipNotify/src/stdafx.h index fd114c37d9..cd67137e26 100644 --- a/plugins/TooltipNotify/src/stdafx.h +++ b/plugins/TooltipNotify/src/stdafx.h @@ -30,6 +30,9 @@ struct CMPlugin : public PLUGIN { CMPlugin(); + + int Load() override; + int Unload() override; }; #include "version.h" -- cgit v1.2.3