summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp4
-rw-r--r--plugins/ClientChangeNotify/src/stdafx.h3
-rw-r--r--plugins/KeyboardNotify/src/main.cpp4
-rw-r--r--plugins/KeyboardNotify/src/stdafx.h3
-rw-r--r--plugins/NewEventNotify/src/main.cpp8
-rw-r--r--plugins/NewEventNotify/src/stdafx.h2
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp4
-rw-r--r--plugins/NewXstatusNotify/src/stdafx.h3
-rw-r--r--plugins/NotifyAnything/src/main.cpp4
-rw-r--r--plugins/NotifyAnything/src/stdafx.h3
-rw-r--r--plugins/TooltipNotify/src/main.cpp4
-rw-r--r--plugins/TooltipNotify/src/stdafx.h3
-rw-r--r--plugins/XSoundNotify/src/stdafx.h3
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp4
-rw-r--r--plugins/ZeroNotification/src/main.cpp9
-rw-r--r--plugins/ZeroNotification/src/stdafx.h2
16 files changed, 36 insertions, 27 deletions
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 6196807f2e..eb4c8d6abe 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -342,7 +342,7 @@ static int MirandaLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &g_hMainThread, THREAD_SET_CONTEXT, false, 0);
@@ -361,7 +361,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
CloseHandle(g_hMainThread);
return 0;
diff --git a/plugins/ClientChangeNotify/src/stdafx.h b/plugins/ClientChangeNotify/src/stdafx.h
index 6032939f7f..9fc0695866 100644
--- a/plugins/ClientChangeNotify/src/stdafx.h
+++ b/plugins/ClientChangeNotify/src/stdafx.h
@@ -55,6 +55,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "TMyArray.h"
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index e78befc9f4..6fd274071b 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -924,7 +924,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
GetWindowsVersion();
OpenKeyboardDevice();
@@ -937,7 +937,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
// Unload
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
UnhookWindowsHooks();
diff --git a/plugins/KeyboardNotify/src/stdafx.h b/plugins/KeyboardNotify/src/stdafx.h
index 6af0fffa14..3b01954284 100644
--- a/plugins/KeyboardNotify/src/stdafx.h
+++ b/plugins/KeyboardNotify/src/stdafx.h
@@ -58,4 +58,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp
index 08e6141ce4..72bfaddbaa 100644
--- a/plugins/NewEventNotify/src/main.cpp
+++ b/plugins/NewEventNotify/src/main.cpp
@@ -130,7 +130,7 @@ int HookedOptions(WPARAM wParam, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, HookedInit);
HookEvent(ME_OPT_INITIALISE, HookedOptions);
@@ -139,12 +139,6 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
//-------------------------------------
//---Check Window Message function
diff --git a/plugins/NewEventNotify/src/stdafx.h b/plugins/NewEventNotify/src/stdafx.h
index 434e95f3de..daaff09e99 100644
--- a/plugins/NewEventNotify/src/stdafx.h
+++ b/plugins/NewEventNotify/src/stdafx.h
@@ -151,6 +151,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
struct PLUGIN_OPTIONS
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 387b28c549..c15933478b 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -1144,7 +1144,7 @@ static int OnShutdown(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
g_plugin.registerIcon(LPGEN("New Status Notify"), iconList, MODULE);
@@ -1188,7 +1188,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
DestroyHookableEvent(hHookContactStatusChanged);
return 0;
diff --git a/plugins/NewXstatusNotify/src/stdafx.h b/plugins/NewXstatusNotify/src/stdafx.h
index 6f8578163d..5c87669c6f 100644
--- a/plugins/NewXstatusNotify/src/stdafx.h
+++ b/plugins/NewXstatusNotify/src/stdafx.h
@@ -71,6 +71,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define MAX_STATUSTEXT 36
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp
index a2fa27f3a9..725772cfa3 100644
--- a/plugins/NotifyAnything/src/main.cpp
+++ b/plugins/NotifyAnything/src/main.cpp
@@ -965,7 +965,7 @@ void stop_threads()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
g_firstrun = true;
@@ -987,7 +987,7 @@ extern "C" int __declspec(dllexport) Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
stop_threads();
WSACleanup();
diff --git a/plugins/NotifyAnything/src/stdafx.h b/plugins/NotifyAnything/src/stdafx.h
index 940b5d379f..70ad7e8304 100644
--- a/plugins/NotifyAnything/src/stdafx.h
+++ b/plugins/NotifyAnything/src/stdafx.h
@@ -26,6 +26,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
//---------------------------
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>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "version.h"
diff --git a/plugins/XSoundNotify/src/stdafx.h b/plugins/XSoundNotify/src/stdafx.h
index 70c1a6b9d6..7a5c1527ac 100644
--- a/plugins/XSoundNotify/src/stdafx.h
+++ b/plugins/XSoundNotify/src/stdafx.h
@@ -25,6 +25,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
struct XSN_Data
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index 5e766f0bb7..d8713148ce 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -231,7 +231,7 @@ static int OnPreShutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
CreateServiceFunction("XSoundNotify/ContactMenuCommand", ShowDialog);
@@ -250,7 +250,7 @@ extern "C" int __declspec(dllexport) Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
WindowList_Destroy(hChangeSoundDlgList);
return 0;
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp
index aebcc52b5a..f0d4808dd2 100644
--- a/plugins/ZeroNotification/src/main.cpp
+++ b/plugins/ZeroNotification/src/main.cpp
@@ -83,7 +83,7 @@ static INT_PTR NoSoundMenuCommand(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
if (!db_get_b(NULL, MODULENAME, "HideMenu", 1)) {
CreateServiceFunction(MODULENAME "/MenuCommand", NoSoundMenuCommand);
@@ -104,10 +104,3 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/ZeroNotification/src/stdafx.h b/plugins/ZeroNotification/src/stdafx.h
index f646c02676..9f10d44afb 100644
--- a/plugins/ZeroNotification/src/stdafx.h
+++ b/plugins/ZeroNotification/src/stdafx.h
@@ -18,6 +18,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
#define DEFAULT_NOSOUND 0x00000000