From ca55ac7905e8ffd1ee979b5b5fe7121fa7a03a5d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 28 May 2018 22:38:35 +0300 Subject: all plugins => CMPlugin virtual functions --- plugins/SendScreenshotPlus/src/Main.cpp | 4 ++-- plugins/SendScreenshotPlus/src/stdafx.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/SendScreenshotPlus') diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 395ff7907d..c30c512a80 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -262,7 +262,7 @@ int hook_SystemPreShutdown(WPARAM, LPARAM) ATOM g_clsTargetHighlighter = 0; -extern "C" __declspec(dllexport) int Load(void) +int CMPlugin::Load() { /// hook events HookEvent(ME_SYSTEM_MODULESLOADED, hook_ModulesLoaded); @@ -325,7 +325,7 @@ extern "C" __declspec(dllexport) int Load(void) ///////////////////////////////////////////////////////////////////////////////////////// // Prepare the plugin to stop -extern "C" __declspec(dllexport) int Unload(void) +int CMPlugin::Unload() { if (g_clsTargetHighlighter) UnregisterClass((wchar_t*)g_clsTargetHighlighter, g_plugin.getInst()), g_clsTargetHighlighter = 0; diff --git a/plugins/SendScreenshotPlus/src/stdafx.h b/plugins/SendScreenshotPlus/src/stdafx.h index e6517b49c0..4460d41220 100644 --- a/plugins/SendScreenshotPlus/src/stdafx.h +++ b/plugins/SendScreenshotPlus/src/stdafx.h @@ -121,6 +121,9 @@ typedef struct _MGLOBAL { struct CMPlugin : public PLUGIN { CMPlugin(); + + int Load() override; + int Unload() override; }; extern ATOM g_clsTargetHighlighter; -- cgit v1.2.3