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/HwHotKeys/src/HwHotKeys_DllMain.cpp | 7 ++----- plugins/HwHotKeys/src/stdafx.h | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/HwHotKeys/src') diff --git a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp index 17ceb61f9a..c3717b8e75 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp @@ -85,7 +85,7 @@ CMPlugin::CMPlugin() : // ============================================================================ -extern "C" __declspec(dllexport) int Load(void) +int CMPlugin::Load() { // загружаем (из БД) настройки плагина code_Close = db_get_dw(0, MODULENAME, "Close", 0); @@ -123,11 +123,8 @@ int initializeOptions(WPARAM wParam, LPARAM) // ============================================================================ -extern "C" __declspec(dllexport) int Unload(void) +int CMPlugin::Unload() { UnhookWindowsHookEx(hHook); return 0; } - -// ============================================================================ - diff --git a/plugins/HwHotKeys/src/stdafx.h b/plugins/HwHotKeys/src/stdafx.h index da95e622c5..cc32f8e7e8 100644 --- a/plugins/HwHotKeys/src/stdafx.h +++ b/plugins/HwHotKeys/src/stdafx.h @@ -42,6 +42,9 @@ LRESULT CALLBACK key_hook(INT, WPARAM, LPARAM); struct CMPlugin : public PLUGIN { CMPlugin(); + + int Load() override; + int Unload() override; }; extern HWND hDialogWnd; // глобально используется для вывода туда в реалтайме сканкодов клавы, из хука -- cgit v1.2.3