summaryrefslogtreecommitdiff
path: root/plugins/BossKeyPlus
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
commit8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch)
tree03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/BossKeyPlus
parentc5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff)
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/BossKeyPlus')
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp18
-rw-r--r--plugins/BossKeyPlus/src/stdafx.h6
2 files changed, 16 insertions, 8 deletions
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index ac96a8c0a8..359a5a0f5f 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -43,7 +43,9 @@ PFNDwmIsCompositionEnabled dwmIsCompositionEnabled;
static void LanguageChanged(HWND hDlg);
-static PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
@@ -56,11 +58,17 @@ static PLUGININFOEX pluginInfo = {
{ 0x4fac353d, 0x0a36, 0x44a4, { 0x90, 0x64, 0x67, 0x59, 0xc5, 0x3a, 0xe7, 0x82 } }
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MOD_NAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static BOOL IsAeroMode()
{
BOOL result;
@@ -614,7 +622,7 @@ static int EnumProtos(WPARAM, LPARAM)
return 0;
}
-int MirandaLoaded(WPARAM, LPARAM)
+static int MirandaLoaded(WPARAM, LPARAM)
{
g_wMask = db_get_w(NULL, MOD_NAME, "optsmask", DEFAULTSETTING);
@@ -681,7 +689,7 @@ int MirandaLoaded(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
g_wMaskAdv = db_get_w(NULL, MOD_NAME, "optsmaskadv", 0);
@@ -706,6 +714,8 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
UninitIdleTimer();
diff --git a/plugins/BossKeyPlus/src/stdafx.h b/plugins/BossKeyPlus/src/stdafx.h
index 5694e71e65..86d29173a2 100644
--- a/plugins/BossKeyPlus/src/stdafx.h
+++ b/plugins/BossKeyPlus/src/stdafx.h
@@ -51,14 +51,12 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MOD_NAME)
- {}
+ CMPlugin();
};
#define KEY_DOWN(key) ((GetAsyncKeyState(key) & 0x8000) ? (true) : (false))
#define MAXPASSLEN 16
-#define DEFAULTSETTING (OPT_SETONLINEBACK | OPT_DISABLESNDS | OPT_ONLINEONLY | OPT_USEDEFMSG)
+#define DEFAULTSETTING (OPT_SETONLINEBACK | OPT_DISABLESNDS | OPT_ONLINEONLY | OPT_USEDEFMSG)
#define OLD_SOUND 1
#define OLD_POPUP 2