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/ChangeKeyboardLayout/src/main.cpp | 4 ++-- plugins/ChangeKeyboardLayout/src/stdafx.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/ChangeKeyboardLayout/src') diff --git a/plugins/ChangeKeyboardLayout/src/main.cpp b/plugins/ChangeKeyboardLayout/src/main.cpp index 77180fd1c3..ca660047ae 100644 --- a/plugins/ChangeKeyboardLayout/src/main.cpp +++ b/plugins/ChangeKeyboardLayout/src/main.cpp @@ -44,7 +44,7 @@ CMPlugin::CMPlugin() : ///////////////////////////////////////////////////////////////////////////////////////// -extern "C" __declspec(dllexport) int Load(void) +int CMPlugin::Load() { memset(hklLayouts, 0, sizeof(hklLayouts)); bLayNum = GetKeyboardLayoutList(20, hklLayouts); @@ -64,7 +64,7 @@ extern "C" __declspec(dllexport) int Load(void) return 0; } -extern "C" __declspec(dllexport) int Unload(void) +int CMPlugin::Unload() { for (int i = 0; i < bLayNum; i++) mir_free(ptszLayStrings[i]); diff --git a/plugins/ChangeKeyboardLayout/src/stdafx.h b/plugins/ChangeKeyboardLayout/src/stdafx.h index 3b54648181..d4504679ca 100644 --- a/plugins/ChangeKeyboardLayout/src/stdafx.h +++ b/plugins/ChangeKeyboardLayout/src/stdafx.h @@ -32,6 +32,9 @@ struct CMPlugin : public PLUGIN { CMPlugin(); + + int Load() override; + int Unload() override; }; // History++ API -- cgit v1.2.3