summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-28 22:38:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-28 22:39:22 +0300
commitca55ac7905e8ffd1ee979b5b5fe7121fa7a03a5d (patch)
tree2fc218f22e6fb28baa5b5efc02ab652daae97d73
parent9250a0caadc93ec7a92b99deea151ab7a1c403da (diff)
all plugins => CMPlugin virtual functions
-rw-r--r--plugins/AddContactPlus/src/main.cpp7
-rw-r--r--plugins/AddContactPlus/src/stdafx.h2
-rw-r--r--plugins/Alarms/src/alarms.cpp9
-rwxr-xr-xplugins/Alarms/src/stdafx.h2
-rw-r--r--plugins/AsSingleWindow/src/AsSingleWindow.cpp4
-rw-r--r--plugins/AsSingleWindow/src/stdafx.h3
-rw-r--r--plugins/AssocMgr/src/main.cpp4
-rw-r--r--plugins/AssocMgr/src/stdafx.h3
-rw-r--r--plugins/AuthState/src/main.cpp7
-rw-r--r--plugins/AuthState/src/stdafx.h2
-rw-r--r--plugins/AutoRun/src/main.cpp9
-rw-r--r--plugins/AutoRun/src/stdafx.h2
-rw-r--r--plugins/AutoShutdown/src/main.cpp4
-rw-r--r--plugins/AutoShutdown/src/stdafx.h3
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp4
-rw-r--r--plugins/AvatarHistory/src/stdafx.h3
-rw-r--r--plugins/BASS_interface/src/Main.cpp9
-rw-r--r--plugins/BASS_interface/src/stdafx.h2
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp4
-rw-r--r--plugins/BasicHistory/src/stdafx.h3
-rw-r--r--plugins/Boltun/src/boltun.cpp4
-rw-r--r--plugins/Boltun/src/stdafx.h3
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp4
-rw-r--r--plugins/BossKeyPlus/src/stdafx.h3
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp4
-rw-r--r--plugins/BuddyExpectator/src/stdafx.h3
-rw-r--r--plugins/BuddyPounce/src/main.cpp4
-rw-r--r--plugins/BuddyPounce/src/stdafx.h3
-rw-r--r--plugins/CSList/src/cslist.cpp9
-rw-r--r--plugins/CSList/src/stdafx.h2
-rw-r--r--plugins/ChangeKeyboardLayout/src/main.cpp4
-rw-r--r--plugins/ChangeKeyboardLayout/src/stdafx.h3
-rw-r--r--plugins/Clist_blind/src/init.cpp10
-rw-r--r--plugins/Clist_blind/src/stdafx.h2
-rw-r--r--plugins/Clist_modern/src/init.cpp4
-rw-r--r--plugins/Clist_modern/src/stdafx.h3
-rw-r--r--plugins/Clist_nicer/src/init.cpp4
-rw-r--r--plugins/Clist_nicer/src/stdafx.h3
-rw-r--r--plugins/Cln_skinedit/src/main.cpp9
-rw-r--r--plugins/Cln_skinedit/src/stdafx.h2
-rw-r--r--plugins/CloudFile/src/main.cpp9
-rw-r--r--plugins/CloudFile/src/stdafx.h2
-rw-r--r--plugins/CmdLine/src/CmdLine.cpp4
-rw-r--r--plugins/CmdLine/src/stdafx.h3
-rw-r--r--plugins/ConnectionNotify/src/ConnectionNotify.cpp4
-rw-r--r--plugins/ConnectionNotify/src/stdafx.h3
-rw-r--r--plugins/Console/src/init.cpp4
-rw-r--r--plugins/Console/src/stdafx.h3
-rw-r--r--plugins/ContactsPlus/src/main.cpp4
-rw-r--r--plugins/ContactsPlus/src/stdafx.h3
-rw-r--r--plugins/CountryFlags/src/main.cpp4
-rw-r--r--plugins/CountryFlags/src/stdafx.h3
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp4
-rw-r--r--plugins/CrashDumper/src/stdafx.h3
-rw-r--r--plugins/CryptoPP/src/commonheaders.h2
-rw-r--r--plugins/CryptoPP/src/main.cpp9
-rw-r--r--plugins/CyrTranslit/src/main.cpp9
-rw-r--r--plugins/CyrTranslit/src/stdafx.h2
-rw-r--r--plugins/Db3x_mmap/src/init.cpp9
-rw-r--r--plugins/Db3x_mmap/src/stdafx.h2
-rw-r--r--plugins/DbEditorPP/src/main.cpp4
-rw-r--r--plugins/DbEditorPP/src/stdafx.h3
-rw-r--r--plugins/Db_autobackups/src/main.cpp12
-rw-r--r--plugins/Db_autobackups/src/stdafx.h2
-rw-r--r--plugins/Dbx_mdbx/src/init.cpp9
-rw-r--r--plugins/Dbx_mdbx/src/stdafx.h2
-rw-r--r--plugins/Exchange/src/exchange.cpp4
-rw-r--r--plugins/Exchange/src/stdafx.h3
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp9
-rw-r--r--plugins/FTPFileYM/src/stdafx.h2
-rw-r--r--plugins/FavContacts/src/main.cpp4
-rw-r--r--plugins/FavContacts/src/stdafx.h3
-rw-r--r--plugins/FileAsMessage/src/main.cpp4
-rw-r--r--plugins/FileAsMessage/src/stdafx.h3
-rw-r--r--plugins/FingerprintNG/src/main.cpp4
-rw-r--r--plugins/FingerprintNG/src/stdafx.h3
-rw-r--r--plugins/FloatingContacts/src/main.cpp4
-rw-r--r--plugins/FloatingContacts/src/stdafx.h3
-rw-r--r--plugins/Folders/src/folders.cpp4
-rw-r--r--plugins/Folders/src/stdafx.h3
-rw-r--r--plugins/GmailNotifier/src/main.cpp4
-rw-r--r--plugins/GmailNotifier/src/stdafx.h3
-rw-r--r--plugins/HTTPServer/src/Glob.h3
-rw-r--r--plugins/HTTPServer/src/main.cpp4
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp4
-rw-r--r--plugins/HistoryLinkListPlus/src/stdafx.h3
-rw-r--r--plugins/HistoryStats/src/main.cpp4
-rw-r--r--plugins/HistoryStats/src/stdafx.h3
-rw-r--r--plugins/HistorySweeperLight/src/main.cpp4
-rw-r--r--plugins/HistorySweeperLight/src/stdafx.h3
-rw-r--r--plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp7
-rw-r--r--plugins/HwHotKeys/src/stdafx.h3
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp4
-rw-r--r--plugins/IEHistory/src/stdafx.h3
-rw-r--r--plugins/IEView/src/ieview_main.cpp4
-rw-r--r--plugins/IEView/src/stdafx.h3
-rw-r--r--plugins/IgnoreState/src/main.cpp7
-rw-r--r--plugins/IgnoreState/src/stdafx.h2
-rw-r--r--plugins/Import/src/main.cpp10
-rw-r--r--plugins/Import/src/stdafx.h2
-rw-r--r--plugins/ListeningTo/src/main.cpp4
-rw-r--r--plugins/ListeningTo/src/stdafx.h3
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp4
-rw-r--r--plugins/LotusNotify/src/LotusNotify.h3
-rw-r--r--plugins/MagneticWindows/src/MagneticWindows.cpp7
-rw-r--r--plugins/MagneticWindows/src/stdafx.h2
-rw-r--r--plugins/MenuItemEx/src/main.cpp4
-rw-r--r--plugins/MenuItemEx/src/stdafx.h3
-rw-r--r--plugins/MessageState/src/main.cpp9
-rw-r--r--plugins/MessageState/src/stdafx.h2
-rw-r--r--plugins/MirFox/src/MirandaInterface.cpp4
-rw-r--r--plugins/MirFox/src/common.h3
-rw-r--r--plugins/MirOTR/src/dllmain.cpp4
-rw-r--r--plugins/MirOTR/src/stdafx.h3
-rw-r--r--plugins/MirandaG15/src/Miranda.cpp4
-rw-r--r--plugins/MirandaG15/src/StdAfx.h3
-rw-r--r--plugins/MobileState/src/main.cpp9
-rw-r--r--plugins/MobileState/src/stdafx.h2
-rw-r--r--plugins/MsgPopup/src/main.cpp9
-rw-r--r--plugins/MsgPopup/src/stdafx.h2
-rwxr-xr-xplugins/Msg_Export/src/main.cpp4
-rwxr-xr-xplugins/Msg_Export/src/stdafx.h3
-rw-r--r--plugins/MyDetails/src/mydetails.cpp4
-rw-r--r--plugins/MyDetails/src/stdafx.h3
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp4
-rw-r--r--plugins/NewAwaySysMod/src/stdafx.h3
-rw-r--r--plugins/NewEventNotify/src/main.cpp5
-rwxr-xr-xplugins/New_GPG/src/init.cpp4
-rwxr-xr-xplugins/New_GPG/src/stdafx.h3
-rw-r--r--plugins/NewsAggregator/Src/NewsAggregator.cpp4
-rw-r--r--plugins/NewsAggregator/Src/stdafx.h3
-rw-r--r--plugins/NoHistory/src/dllmain.cpp4
-rw-r--r--plugins/NoHistory/src/stdafx.h3
-rw-r--r--plugins/Non-IM Contact/src/main.cpp4
-rw-r--r--plugins/Non-IM Contact/src/stdafx.h3
-rw-r--r--plugins/NotesAndReminders/src/globals.h3
-rw-r--r--plugins/NotesAndReminders/src/main.cpp4
-rw-r--r--plugins/Nudge/src/main.cpp4
-rw-r--r--plugins/Nudge/src/stdafx.h3
-rw-r--r--plugins/OpenFolder/src/openFolder.cpp11
-rw-r--r--plugins/OpenSSL/src/main.cpp7
-rw-r--r--plugins/PackUpdater/Src/PackUpdater.cpp4
-rw-r--r--plugins/PackUpdater/Src/stdafx.h3
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp4
-rw-r--r--plugins/PasteIt/src/stdafx.h3
-rw-r--r--plugins/Ping/src/ping.cpp4
-rw-r--r--plugins/Ping/src/stdafx.h3
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp4
-rw-r--r--plugins/PluginUpdater/src/stdafx.h3
-rw-r--r--plugins/Popup/src/defs.h43
-rw-r--r--plugins/Popup/src/main.cpp4
-rw-r--r--plugins/Popup/src/stdafx.h4
-rw-r--r--plugins/ProfileManager/src/pmanagerEx.cpp11
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp4
-rw-r--r--plugins/QuickContacts/src/stdafx.h3
-rw-r--r--plugins/QuickMessages/src/main.cpp9
-rw-r--r--plugins/QuickMessages/src/stdafx.h2
-rw-r--r--plugins/QuickReplies/src/quickreplies.cpp9
-rw-r--r--plugins/QuickReplies/src/stdafx.h2
-rw-r--r--plugins/Quotes/src/Forex.cpp4
-rw-r--r--plugins/Quotes/src/stdafx.h3
-rw-r--r--plugins/Rate/src/main.cpp11
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp4
-rw-r--r--plugins/RecentContacts/src/stdafx.h3
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp11
-rw-r--r--plugins/Restart/src/restart.cpp11
-rw-r--r--plugins/SMS/src/main.cpp9
-rw-r--r--plugins/SMS/src/stdafx.h2
-rw-r--r--plugins/Scriver/src/srmm.cpp4
-rw-r--r--plugins/Scriver/src/stdafx.h3
-rw-r--r--plugins/SecureIM/src/commonheaders.h3
-rw-r--r--plugins/SecureIM/src/main.cpp4
-rw-r--r--plugins/SeenPlugin/src/main.cpp4
-rw-r--r--plugins/SeenPlugin/src/stdafx.h3
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp4
-rw-r--r--plugins/SendScreenshotPlus/src/stdafx.h3
-rw-r--r--plugins/Sessions/Src/Main.cpp9
-rw-r--r--plugins/Sessions/Src/stdafx.h2
-rw-r--r--plugins/ShellExt/src/main.cpp7
-rw-r--r--plugins/ShellExt/src/stdafx.h2
-rw-r--r--plugins/SimpleAR/src/Main.cpp9
-rw-r--r--plugins/SimpleAR/src/stdafx.h2
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp4
-rw-r--r--plugins/SimpleStatusMsg/src/stdafx.h3
-rw-r--r--plugins/SkypeStatusChange/src/main.cpp9
-rw-r--r--plugins/SkypeStatusChange/src/stdafx.h2
-rw-r--r--plugins/SmileyAdd/src/main.cpp4
-rw-r--r--plugins/SmileyAdd/src/stdafx.h3
-rw-r--r--plugins/Spamotron/src/spamotron.cpp4
-rw-r--r--plugins/Spamotron/src/stdafx.h3
-rw-r--r--plugins/SpellChecker/src/spellchecker.cpp4
-rw-r--r--plugins/SpellChecker/src/stdafx.h3
-rw-r--r--plugins/SplashScreen/src/main.cpp4
-rw-r--r--plugins/SplashScreen/src/stdafx.h3
-rw-r--r--plugins/StartPosition/src/main.cpp9
-rw-r--r--plugins/StartPosition/src/startposition.h2
-rw-r--r--plugins/StartupSilence/src/main.cpp4
-rw-r--r--plugins/StartupSilence/src/stdafx.h3
-rw-r--r--plugins/StatusChange/src/main.cpp9
-rw-r--r--plugins/StatusChange/src/stdafx.h2
-rw-r--r--plugins/StatusManager/src/main.cpp4
-rw-r--r--plugins/StatusManager/src/stdafx.h3
-rwxr-xr-xplugins/StopSpamMod/src/init.cpp9
-rwxr-xr-xplugins/StopSpamMod/src/stdafx.h2
-rw-r--r--plugins/StopSpamPlus/src/stdafx.h2
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp9
-rw-r--r--plugins/TabSRMM/src/msgs.h3
-rw-r--r--plugins/TabSRMM/src/srmm.cpp4
-rw-r--r--plugins/TipperYM/src/stdafx.h3
-rw-r--r--plugins/TipperYM/src/tipper.cpp4
-rw-r--r--plugins/Toaster/src/main.cpp9
-rw-r--r--plugins/Toaster/src/stdafx.h2
-rw-r--r--plugins/TopToolBar/src/main.cpp4
-rw-r--r--plugins/TopToolBar/src/stdafx.h3
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp4
-rw-r--r--plugins/TrafficCounter/src/stdafx.h3
-rw-r--r--plugins/TranslitSwitcher/src/TranslitSwitcher.cpp11
-rw-r--r--plugins/UserGuide/src/main.cpp9
-rw-r--r--plugins/UserGuide/src/stdafx.h2
-rw-r--r--plugins/UserInfoEx/src/init.cpp4
-rw-r--r--plugins/UserInfoEx/src/stdafx.h3
-rw-r--r--plugins/Variables/src/main.cpp4
-rw-r--r--plugins/Variables/src/stdafx.h3
-rwxr-xr-xplugins/Watrack_MPD/src/init.cpp4
-rwxr-xr-xplugins/Watrack_MPD/src/stdafx.h3
-rw-r--r--plugins/Weather/src/stdafx.h3
-rw-r--r--plugins/Weather/src/weather.cpp4
-rw-r--r--plugins/WebView/src/main.cpp4
-rw-r--r--plugins/WebView/src/webview.h3
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp4
-rw-r--r--plugins/WhenWasIt/src/stdafx.h3
-rw-r--r--plugins/WhoUsesMyFiles/src/stdafx.h3
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp4
-rw-r--r--plugins/WinterSpeak/src/main.cpp4
-rw-r--r--plugins/WinterSpeak/src/stdafx.h3
-rw-r--r--plugins/YAMN/src/main.cpp4
-rw-r--r--plugins/YAMN/src/stdafx.h3
-rw-r--r--plugins/YAPP/src/stdafx.h3
-rw-r--r--plugins/YAPP/src/yapp.cpp4
-rw-r--r--plugins/YARelay/src/main.cpp9
-rw-r--r--plugins/YARelay/src/stdafx.h2
-rw-r--r--plugins/ZeroSwitch/src/ZeroSwitch.cpp7
-rw-r--r--plugins/mTextControl/src/main.cpp4
-rw-r--r--plugins/mTextControl/src/stdafx.h3
-rw-r--r--plugins/wbOSD/src/main.cpp4
-rw-r--r--plugins/wbOSD/src/stdafx.h3
-rw-r--r--protocols/Discord/src/main.cpp4
-rw-r--r--protocols/Discord/src/proto.h3
-rw-r--r--protocols/Dummy/src/dummy.h2
-rw-r--r--protocols/Dummy/src/main.cpp10
-rw-r--r--protocols/EmLanProto/src/amdproto.cpp4
-rw-r--r--protocols/EmLanProto/src/stdafx.h3
-rw-r--r--protocols/FacebookRM/src/main.cpp10
-rw-r--r--protocols/FacebookRM/src/proto.h2
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.h3
-rw-r--r--protocols/ICQCorp/src/corp.cpp4
-rw-r--r--protocols/ICQCorp/src/stdafx.h3
-rw-r--r--protocols/IRCG/src/ircproto.h3
-rw-r--r--protocols/IRCG/src/main.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.h3
-rw-r--r--protocols/IcqOscarJ/src/init.cpp4
-rwxr-xr-xprotocols/JabberG/src/jabber.cpp4
-rwxr-xr-xprotocols/JabberG/src/stdafx.h3
-rw-r--r--protocols/MRA/src/Mra.cpp4
-rw-r--r--protocols/MRA/src/MraProto.h3
-rw-r--r--protocols/MSN/src/msn.cpp4
-rw-r--r--protocols/MSN/src/msn_proto.h3
-rw-r--r--protocols/MinecraftDynmap/src/main.cpp4
-rw-r--r--protocols/MinecraftDynmap/src/proto.h3
-rw-r--r--protocols/Omegle/src/main.cpp10
-rw-r--r--protocols/Omegle/src/proto.h2
-rw-r--r--protocols/Sametime/src/sametime.cpp10
-rw-r--r--protocols/SkypeWeb/src/main.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h3
-rw-r--r--protocols/Steam/src/main.cpp9
-rw-r--r--protocols/Steam/src/steam_proto.h2
-rw-r--r--protocols/Tox/src/main.cpp9
-rw-r--r--protocols/Tox/src/tox_proto.h2
-rw-r--r--protocols/Twitter/src/main.cpp10
-rw-r--r--protocols/Twitter/src/proto.h2
-rw-r--r--protocols/VKontakte/src/main.cpp10
-rw-r--r--protocols/VKontakte/src/vk_proto.h2
-rw-r--r--src/core/stdautoaway/src/main.cpp9
-rw-r--r--src/core/stdautoaway/src/stdafx.h2
-rw-r--r--src/core/stdaway/src/main.cpp9
-rw-r--r--src/core/stdaway/src/stdafx.h2
-rw-r--r--src/core/stdclist/src/init.cpp10
-rw-r--r--src/core/stdclist/src/stdafx.h2
-rw-r--r--src/core/stdcrypt/src/main.cpp9
-rw-r--r--src/core/stdcrypt/src/stdafx.h2
-rw-r--r--src/core/stdemail/src/main.cpp9
-rw-r--r--src/core/stdemail/src/stdafx.h2
-rw-r--r--src/core/stdfile/src/main.cpp4
-rw-r--r--src/core/stdfile/src/stdafx.h3
-rw-r--r--src/core/stdidle/src/main.cpp4
-rw-r--r--src/core/stdidle/src/stdafx.h3
-rw-r--r--src/core/stdmsg/src/srmm.cpp4
-rw-r--r--src/core/stdmsg/src/stdafx.h3
-rw-r--r--src/core/stdssl/src/main.cpp4
-rw-r--r--src/core/stdssl/src/stdafx.h3
-rw-r--r--src/core/stduihist/src/main.cpp9
-rw-r--r--src/core/stduihist/src/stdafx.h2
-rw-r--r--src/core/stduserinfo/src/main.cpp9
-rw-r--r--src/core/stduserinfo/src/stdafx.h2
-rw-r--r--src/core/stduseronline/src/main.cpp9
-rw-r--r--src/core/stduseronline/src/stdafx.h2
307 files changed, 670 insertions, 709 deletions
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp
index b1418ee47c..00ab8d1e4d 100644
--- a/plugins/AddContactPlus/src/main.cpp
+++ b/plugins/AddContactPlus/src/main.cpp
@@ -129,7 +129,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
INITCOMMONCONTROLSEX icex = { sizeof(icex), ICC_USEREX_CLASSES };
InitCommonControlsEx(&icex);
@@ -142,8 +142,3 @@ extern "C" int __declspec(dllexport) Load(void)
CreateServiceFunction(MS_ADDCONTACTPLUS_SHOW, AddContactPlusDialog);
return 0;
}
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/AddContactPlus/src/stdafx.h b/plugins/AddContactPlus/src/stdafx.h
index c8f890020e..3b6ecad482 100644
--- a/plugins/AddContactPlus/src/stdafx.h
+++ b/plugins/AddContactPlus/src/stdafx.h
@@ -49,6 +49,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
#define ICON_ADD "AddContactPlus_Icon"
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index 55cc434915..50505dff78 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -143,7 +143,7 @@ static int MainDeInit(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
// ensure datetime picker is loaded
INITCOMMONCONTROLSEX ccx;
@@ -164,10 +164,3 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/Alarms/src/stdafx.h b/plugins/Alarms/src/stdafx.h
index 149933f902..edb0265094 100755
--- a/plugins/Alarms/src/stdafx.h
+++ b/plugins/Alarms/src/stdafx.h
@@ -54,6 +54,8 @@ typedef struct ALARM_tag {
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern HANDLE hTopToolbarButton;
diff --git a/plugins/AsSingleWindow/src/AsSingleWindow.cpp b/plugins/AsSingleWindow/src/AsSingleWindow.cpp
index 8135edefcf..21d5f4fc8b 100644
--- a/plugins/AsSingleWindow/src/AsSingleWindow.cpp
+++ b/plugins/AsSingleWindow/src/AsSingleWindow.cpp
@@ -63,7 +63,7 @@ static int OnShutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
::InitializeCriticalSection(&pluginVars.m_CS);
pluginVars.IsUpdateInProgress = false;
@@ -75,7 +75,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
::DeleteCriticalSection(&pluginVars.m_CS);
return 0;
diff --git a/plugins/AsSingleWindow/src/stdafx.h b/plugins/AsSingleWindow/src/stdafx.h
index 206955b5f7..e1967facfc 100644
--- a/plugins/AsSingleWindow/src/stdafx.h
+++ b/plugins/AsSingleWindow/src/stdafx.h
@@ -26,4 +26,7 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/plugins/AssocMgr/src/main.cpp b/plugins/AssocMgr/src/main.cpp
index 1f633cc72f..d7a493ec66 100644
--- a/plugins/AssocMgr/src/main.cpp
+++ b/plugins/AssocMgr/src/main.cpp
@@ -46,7 +46,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
InitAssocList();
InitDde();
@@ -55,7 +55,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
UninitDde();
UninitAssocList();
diff --git a/plugins/AssocMgr/src/stdafx.h b/plugins/AssocMgr/src/stdafx.h
index 59108c7499..67f485c63b 100644
--- a/plugins/AssocMgr/src/stdafx.h
+++ b/plugins/AssocMgr/src/stdafx.h
@@ -50,4 +50,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/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index c40764c10f..dfec97add4 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -162,7 +162,7 @@ int onModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, onContactSettingChanged);
@@ -183,8 +183,3 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/AuthState/src/stdafx.h b/plugins/AuthState/src/stdafx.h
index a101d76aac..6264b7f4ce 100644
--- a/plugins/AuthState/src/stdafx.h
+++ b/plugins/AuthState/src/stdafx.h
@@ -41,6 +41,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
int onOptInitialise(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp
index 6dc32d5244..98accc4b3f 100644
--- a/plugins/AutoRun/src/main.cpp
+++ b/plugins/AutoRun/src/main.cpp
@@ -114,15 +114,8 @@ static int AutorunOptInitialise(WPARAM wParam, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_OPT_INITIALISE, AutorunOptInitialise);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/AutoRun/src/stdafx.h b/plugins/AutoRun/src/stdafx.h
index 1536fb686b..8de5e959f3 100644
--- a/plugins/AutoRun/src/stdafx.h
+++ b/plugins/AutoRun/src/stdafx.h
@@ -18,4 +18,6 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/plugins/AutoShutdown/src/main.cpp b/plugins/AutoShutdown/src/main.cpp
index 0f0dcfc0da..f9f7d81ce6 100644
--- a/plugins/AutoShutdown/src/main.cpp
+++ b/plugins/AutoShutdown/src/main.cpp
@@ -59,7 +59,7 @@ static int ShutdownModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
INITCOMMONCONTROLSEX icc;
icc.dwSize = sizeof(icc);
@@ -80,7 +80,7 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
UninitOptions();
UninitWatcher(); /* before UninitFrame() */
diff --git a/plugins/AutoShutdown/src/stdafx.h b/plugins/AutoShutdown/src/stdafx.h
index 01374d8416..0e58bbf11a 100644
--- a/plugins/AutoShutdown/src/stdafx.h
+++ b/plugins/AutoShutdown/src/stdafx.h
@@ -79,6 +79,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern IconItem iconList[]; \ No newline at end of file
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index dc943db21f..27e525a38c 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -278,7 +278,7 @@ static INT_PTR CALLBACK FirstRunDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPA
return FALSE;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
CoInitialize(nullptr);
@@ -339,7 +339,7 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
WindowList_Destroy(hAvatarWindowsList);
return 0;
diff --git a/plugins/AvatarHistory/src/stdafx.h b/plugins/AvatarHistory/src/stdafx.h
index cdf31741b7..1bf87a8b61 100644
--- a/plugins/AvatarHistory/src/stdafx.h
+++ b/plugins/AvatarHistory/src/stdafx.h
@@ -45,6 +45,9 @@ extern wchar_t basedir[];
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define AVH_DEF_POPUPFG 0
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index e65f1fda14..bde69bdc88 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -591,7 +591,7 @@ static IconItem iconList[] =
{ LPGEN("Sounds disabled"), "BASSSoundOff", IDI_BASSSoundOff }
};
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
@@ -600,10 +600,3 @@ extern "C" int __declspec(dllexport) Load(void)
g_plugin.registerIcon(MODULENAME, iconList);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/BASS_interface/src/stdafx.h b/plugins/BASS_interface/src/stdafx.h
index 1da9396919..48bfe04616 100644
--- a/plugins/BASS_interface/src/stdafx.h
+++ b/plugins/BASS_interface/src/stdafx.h
@@ -30,6 +30,8 @@ Copyright (C) 2010, 2011 tico-tico
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
#define OPT_VOLUME "Volume"
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index 095d51ac18..5bac74c444 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -234,7 +234,7 @@ int ModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
hTaskMainMenu = nullptr;
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &g_hMainThread, 0, FALSE, DUPLICATE_SAME_ACCESS);
@@ -259,7 +259,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
if (g_hMainThread)
CloseHandle(g_hMainThread);
diff --git a/plugins/BasicHistory/src/stdafx.h b/plugins/BasicHistory/src/stdafx.h
index f2e353cb67..9672419c66 100644
--- a/plugins/BasicHistory/src/stdafx.h
+++ b/plugins/BasicHistory/src/stdafx.h
@@ -61,6 +61,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "../../libs/zlib/src/zconf.h"
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index af9aced63a..e42a29f07f 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -512,7 +512,7 @@ static int MessagePrebuild(WPARAM hContact, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
GetModuleFileName(g_plugin.getInst(), tszPath, _countof(tszPath));
*(wcsrchr(tszPath, '\\') + 1) = '\0';
@@ -562,7 +562,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
if (pTimer)
KillTimer(nullptr, pTimer);
diff --git a/plugins/Boltun/src/stdafx.h b/plugins/Boltun/src/stdafx.h
index 274b20a185..0fb747b3cf 100644
--- a/plugins/Boltun/src/stdafx.h
+++ b/plugins/Boltun/src/stdafx.h
@@ -54,6 +54,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
//Service names
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index baec5d057b..486132ee28 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -680,7 +680,7 @@ static int MirandaLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
g_wMaskAdv = db_get_w(NULL, MOD_NAME, "optsmaskadv", 0);
g_bOldSetting = db_get_b(NULL, MOD_NAME, "OldSetting", 0);
@@ -706,7 +706,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UninitIdleTimer();
diff --git a/plugins/BossKeyPlus/src/stdafx.h b/plugins/BossKeyPlus/src/stdafx.h
index 86d29173a2..83e8920b89 100644
--- a/plugins/BossKeyPlus/src/stdafx.h
+++ b/plugins/BossKeyPlus/src/stdafx.h
@@ -52,6 +52,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define KEY_DOWN(key) ((GetAsyncKeyState(key) & 0x8000) ? (true) : (false))
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index e10b249dbf..5401ff0e96 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -645,7 +645,7 @@ int onShutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
InitOptions();
@@ -682,7 +682,7 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
KillTimer(nullptr, timer_id);
diff --git a/plugins/BuddyExpectator/src/stdafx.h b/plugins/BuddyExpectator/src/stdafx.h
index 73eef9d564..3e3ed107e1 100644
--- a/plugins/BuddyExpectator/src/stdafx.h
+++ b/plugins/BuddyExpectator/src/stdafx.h
@@ -50,6 +50,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern HANDLE hExtraIcon;
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 9dadc4cc8d..6137208c63 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -212,7 +212,7 @@ INT_PTR AddToPounce(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// Load (hook ModulesLoaded)
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, UserOnlineSettingChanged);
@@ -231,7 +231,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
WindowList_Destroy(hWindowList);
return 0;
diff --git a/plugins/BuddyPounce/src/stdafx.h b/plugins/BuddyPounce/src/stdafx.h
index c72a0f832b..0e663db042 100644
--- a/plugins/BuddyPounce/src/stdafx.h
+++ b/plugins/BuddyPounce/src/stdafx.h
@@ -30,6 +30,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define SECONDSINADAY 86400
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index 25f0f84cff..d469929aea 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -96,7 +96,7 @@ static int OnPreshutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
// support for ComboBoxEx
INITCOMMONCONTROLSEX icc;
@@ -133,13 +133,6 @@ extern "C" __declspec(dllexport) int Load()
return 0;
}
-//====[ UNLOADER ]===========================================================
-
-extern "C" __declspec(dllexport) int Unload()
-{
- return 0;
-}
-
//====[ FUN ]================================================================
void RegisterHotkeys(char buf[200], wchar_t* accName, int Number)
diff --git a/plugins/CSList/src/stdafx.h b/plugins/CSList/src/stdafx.h
index c78a18e600..e651bc45b0 100644
--- a/plugins/CSList/src/stdafx.h
+++ b/plugins/CSList/src/stdafx.h
@@ -60,6 +60,8 @@ Offers List of your Custom Statuses.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
//====[ LIMITS ]=============================================================
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>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
// History++ API
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index a4f2527ad5..cb83fe7179 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -148,20 +148,12 @@ extern "C" int __declspec(dllexport) CListInitialise()
/////////////////////////////////////////////////////////////////////////////////////////
// a plugin loader aware of CList exports will never call this.
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////
-// a plugin unloader
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
wchar_t* MyDBGetContactSettingTString(MCONTACT hContact, char* module, char* setting, wchar_t* out, size_t len, wchar_t *def)
{
diff --git a/plugins/Clist_blind/src/stdafx.h b/plugins/Clist_blind/src/stdafx.h
index 86e83604c4..62ce6c4d07 100644
--- a/plugins/Clist_blind/src/stdafx.h
+++ b/plugins/Clist_blind/src/stdafx.h
@@ -42,6 +42,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
struct ClcContact : public ClcContactBase {};
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp
index 03fd4a044e..34282b8c25 100644
--- a/plugins/Clist_modern/src/init.cpp
+++ b/plugins/Clist_modern/src/init.cpp
@@ -90,14 +90,14 @@ extern "C" __declspec(dllexport) int CListInitialise()
/////////////////////////////////////////////////////////////////////////////////////////
// never called by a newer plugin loader.
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load(void)
{
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload(void)
{
TRACE("Unloading Clist Modern\r\n");
diff --git a/plugins/Clist_modern/src/stdafx.h b/plugins/Clist_modern/src/stdafx.h
index 39a21ac3a5..559f864d92 100644
--- a/plugins/Clist_modern/src/stdafx.h
+++ b/plugins/Clist_modern/src/stdafx.h
@@ -105,6 +105,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "modern_global_structure.h"
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp
index d745f1e13d..d4132cf8a7 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -221,14 +221,14 @@ extern "C" int __declspec(dllexport) CListInitialise()
/////////////////////////////////////////////////////////////////////////////////////////
// a plugin loader aware of CList exports will never call this.
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
if (IsWindow(g_clistApi.hwndContactList))
DestroyWindow(g_clistApi.hwndContactList);
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h
index 095baf763d..bab2bf55c3 100644
--- a/plugins/Clist_nicer/src/stdafx.h
+++ b/plugins/Clist_nicer/src/stdafx.h
@@ -75,6 +75,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
// shared vars
diff --git a/plugins/Cln_skinedit/src/main.cpp b/plugins/Cln_skinedit/src/main.cpp
index f6b8c85497..8c95c929ff 100644
--- a/plugins/Cln_skinedit/src/main.cpp
+++ b/plugins/Cln_skinedit/src/main.cpp
@@ -893,16 +893,9 @@ static INT_PTR SkinEdit_Invoke(WPARAM, LPARAM lParam)
return (INT_PTR)psd->hwndSkinEdit;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
CreateServiceFunction(MS_CLNSE_INVOKE, SkinEdit_Invoke);
CreateServiceFunction(MS_CLNSE_FILLBYCURRENTSEL, SkinEdit_FillByCurrentSel);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/Cln_skinedit/src/stdafx.h b/plugins/Cln_skinedit/src/stdafx.h
index 5f96c2f53a..d64d5cae3a 100644
--- a/plugins/Cln_skinedit/src/stdafx.h
+++ b/plugins/Cln_skinedit/src/stdafx.h
@@ -40,4 +40,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/plugins/CloudFile/src/main.cpp b/plugins/CloudFile/src/main.cpp
index b09386e37b..3e57d50035 100644
--- a/plugins/CloudFile/src/main.cpp
+++ b/plugins/CloudFile/src/main.cpp
@@ -27,7 +27,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
@@ -36,10 +36,3 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/CloudFile/src/stdafx.h b/plugins/CloudFile/src/stdafx.h
index cc8ce7c9f6..08628d1488 100644
--- a/plugins/CloudFile/src/stdafx.h
+++ b/plugins/CloudFile/src/stdafx.h
@@ -120,6 +120,8 @@ CCloudService* FindService(const char *szProto);
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
#endif //_COMMON_H_ \ No newline at end of file
diff --git a/plugins/CmdLine/src/CmdLine.cpp b/plugins/CmdLine/src/CmdLine.cpp
index d42ba87727..898cea4e2f 100644
--- a/plugins/CmdLine/src/CmdLine.cpp
+++ b/plugins/CmdLine/src/CmdLine.cpp
@@ -43,7 +43,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
if (InitServer())
MessageBox(nullptr, TranslateT("Could not initialize CmdLine plugin property"), TranslateT("Error"), MB_ICONEXCLAMATION | MB_OK);
@@ -54,7 +54,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
bWaitForUnload = 0;
diff --git a/plugins/CmdLine/src/stdafx.h b/plugins/CmdLine/src/stdafx.h
index 1d0401030d..f099a2d38d 100644
--- a/plugins/CmdLine/src/stdafx.h
+++ b/plugins/CmdLine/src/stdafx.h
@@ -59,6 +59,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern int bUseANSIStrings;
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
index a56c3179a2..602ac4d22e 100644
--- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp
+++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
@@ -839,7 +839,7 @@ static int preshutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
#ifdef _DEBUG
_OutputDebugString(L"Entering Load dll");
@@ -874,7 +874,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
WaitForSingleObjectEx(hConnectionCheckThread, INFINITE, FALSE);
if (hConnectionCheckThread)CloseHandle(hConnectionCheckThread);
diff --git a/plugins/ConnectionNotify/src/stdafx.h b/plugins/ConnectionNotify/src/stdafx.h
index bd06f4bf8c..dbadd2d5c9 100644
--- a/plugins/ConnectionNotify/src/stdafx.h
+++ b/plugins/ConnectionNotify/src/stdafx.h
@@ -41,6 +41,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
void showMsg(wchar_t *pName,DWORD pid,wchar_t *intIp,wchar_t *extIp,int intPort,int extPort,int state);
diff --git a/plugins/Console/src/init.cpp b/plugins/Console/src/init.cpp
index 4e30e0a698..088932dc74 100644
--- a/plugins/Console/src/init.cpp
+++ b/plugins/Console/src/init.cpp
@@ -62,7 +62,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
g_plugin.registerIcon("Console", iconList);
@@ -71,7 +71,7 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
ShutdownConsole();
return 0;
diff --git a/plugins/Console/src/stdafx.h b/plugins/Console/src/stdafx.h
index 064c40b5ff..97755d566f 100644
--- a/plugins/Console/src/stdafx.h
+++ b/plugins/Console/src/stdafx.h
@@ -47,6 +47,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
void InitConsole();
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index ad1a35320b..a3ff85c702 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -190,7 +190,7 @@ static INT_PTR ServiceReceiveCommand(WPARAM, LPARAM lParam)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
InitCommonControls();
@@ -213,7 +213,7 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
WindowList_Destroy(g_hSendWindowList);
WindowList_Destroy(g_hRecvWindowList);
diff --git a/plugins/ContactsPlus/src/stdafx.h b/plugins/ContactsPlus/src/stdafx.h
index 839827bc9b..c83bee9491 100644
--- a/plugins/ContactsPlus/src/stdafx.h
+++ b/plugins/ContactsPlus/src/stdafx.h
@@ -55,6 +55,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define MS_CONTACTS_SEND "ContactsTransfer/SendContacts"
diff --git a/plugins/CountryFlags/src/main.cpp b/plugins/CountryFlags/src/main.cpp
index fe988b8c4b..3af8d023be 100644
--- a/plugins/CountryFlags/src/main.cpp
+++ b/plugins/CountryFlags/src/main.cpp
@@ -45,7 +45,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
PrepareBufferedFunctions();
if (CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&nCountriesCount, (LPARAM)&countries))
@@ -64,7 +64,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
KillBufferedFunctions();
UninitIpToCountry();
diff --git a/plugins/CountryFlags/src/stdafx.h b/plugins/CountryFlags/src/stdafx.h
index 892fdf6589..25142a7e1c 100644
--- a/plugins/CountryFlags/src/stdafx.h
+++ b/plugins/CountryFlags/src/stdafx.h
@@ -46,6 +46,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern int nCountriesCount;
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp
index effb082fc8..e4972c70b9 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -350,7 +350,7 @@ static int PreShutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
hMsftedit = LoadLibrary(L"Msftedit.dll");
if (hMsftedit == nullptr)
@@ -390,7 +390,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
DestroyAllWindows();
diff --git a/plugins/CrashDumper/src/stdafx.h b/plugins/CrashDumper/src/stdafx.h
index 7b1bd36867..9f47d34e63 100644
--- a/plugins/CrashDumper/src/stdafx.h
+++ b/plugins/CrashDumper/src/stdafx.h
@@ -81,6 +81,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define VI_FLAG_FORMAT 1
diff --git a/plugins/CryptoPP/src/commonheaders.h b/plugins/CryptoPP/src/commonheaders.h
index 11b6468772..575fa7a96a 100644
--- a/plugins/CryptoPP/src/commonheaders.h
+++ b/plugins/CryptoPP/src/commonheaders.h
@@ -57,6 +57,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern LPCSTR szModuleName;
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp
index c0b9e72ed8..0b305a9949 100644
--- a/plugins/CryptoPP/src/main.cpp
+++ b/plugins/CryptoPP/src/main.cpp
@@ -41,7 +41,7 @@ int onModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
DisableThreadLibraryCalls(g_plugin.getInst());
@@ -55,13 +55,6 @@ extern "C" __declspec(dllexport) int Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload()
-{
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
BOOL ExtractFileFromResource(HANDLE FH, int ResType, int ResId, DWORD* Size)
{
HRSRC RH = FindResource(g_plugin.getInst(), MAKEINTRESOURCE(ResId), MAKEINTRESOURCE(ResType));
diff --git a/plugins/CyrTranslit/src/main.cpp b/plugins/CyrTranslit/src/main.cpp
index 0494302287..cd27788f1c 100644
--- a/plugins/CyrTranslit/src/main.cpp
+++ b/plugins/CyrTranslit/src/main.cpp
@@ -41,15 +41,8 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
CyrTranslit::MirandaContact::initialize();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/CyrTranslit/src/stdafx.h b/plugins/CyrTranslit/src/stdafx.h
index a2c3cd6387..39c8171553 100644
--- a/plugins/CyrTranslit/src/stdafx.h
+++ b/plugins/CyrTranslit/src/stdafx.h
@@ -36,4 +36,6 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp
index 47205ca2a5..10e133a2c0 100644
--- a/plugins/Db3x_mmap/src/init.cpp
+++ b/plugins/Db3x_mmap/src/init.cpp
@@ -133,15 +133,8 @@ static DATABASELINK dblink =
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
RegisterDatabasePlugin(&dblink);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/Db3x_mmap/src/stdafx.h b/plugins/Db3x_mmap/src/stdafx.h
index 266918c3cf..e18d5c8318 100644
--- a/plugins/Db3x_mmap/src/stdafx.h
+++ b/plugins/Db3x_mmap/src/stdafx.h
@@ -56,6 +56,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern LIST<CDb3Mmap> g_Dbs;
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index 6f619ede17..97f9f267af 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -169,7 +169,7 @@ static INT_PTR ImportFromFile(WPARAM wParam, LPARAM lParam)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
hwnd2mainWindow = nullptr;
@@ -197,7 +197,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
freeAllWatches();
return 0;
diff --git a/plugins/DbEditorPP/src/stdafx.h b/plugins/DbEditorPP/src/stdafx.h
index ce5058594e..1b0b9c586f 100644
--- a/plugins/DbEditorPP/src/stdafx.h
+++ b/plugins/DbEditorPP/src/stdafx.h
@@ -50,6 +50,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define msg(a) MessageBox(hwnd2mainWindow,a,_A2T(modFullname),MB_OK)
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp
index 4c38a8793d..4c52633c9e 100644
--- a/plugins/Db_autobackups/src/main.cpp
+++ b/plugins/Db_autobackups/src/main.cpp
@@ -110,7 +110,7 @@ static int PreShutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
Miranda_GetVersionText(g_szMirVer, sizeof(g_szMirVer));
@@ -125,15 +125,5 @@ extern "C" __declspec(dllexport) int Load(void)
HookEvent(ME_OPT_INITIALISE, OptionsInit);
SetBackupTimer();
-
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
-
-
diff --git a/plugins/Db_autobackups/src/stdafx.h b/plugins/Db_autobackups/src/stdafx.h
index e6acf25c7b..b0229f1e35 100644
--- a/plugins/Db_autobackups/src/stdafx.h
+++ b/plugins/Db_autobackups/src/stdafx.h
@@ -30,6 +30,8 @@ namespace fs = std::experimental::filesystem;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
#include "options.h"
diff --git a/plugins/Dbx_mdbx/src/init.cpp b/plugins/Dbx_mdbx/src/init.cpp
index 74f3f3fd14..aa84d1fdd4 100644
--- a/plugins/Dbx_mdbx/src/init.cpp
+++ b/plugins/Dbx_mdbx/src/init.cpp
@@ -96,15 +96,8 @@ static DATABASELINK dblink =
loadDatabase
};
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
RegisterDatabasePlugin(&dblink);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/Dbx_mdbx/src/stdafx.h b/plugins/Dbx_mdbx/src/stdafx.h
index 67ee331d64..cbb50765ab 100644
--- a/plugins/Dbx_mdbx/src/stdafx.h
+++ b/plugins/Dbx_mdbx/src/stdafx.h
@@ -165,6 +165,8 @@ public:
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
#include "ui.h"
diff --git a/plugins/Exchange/src/exchange.cpp b/plugins/Exchange/src/exchange.cpp
index c933a9f9d2..e8dbc094ce 100644
--- a/plugins/Exchange/src/exchange.cpp
+++ b/plugins/Exchange/src/exchange.cpp
@@ -48,7 +48,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
hiMailIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_MAIL));
InitServices();
@@ -58,7 +58,7 @@ extern "C" int __declspec(dllexport) Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
DestroyServices();
UnhookEvents();
diff --git a/plugins/Exchange/src/stdafx.h b/plugins/Exchange/src/stdafx.h
index 1bca507c9d..67394ca4ce 100644
--- a/plugins/Exchange/src/stdafx.h
+++ b/plugins/Exchange/src/stdafx.h
@@ -56,6 +56,9 @@ extern HWND hEmailsDlg;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif //M_EXCHANGE_COMMONHEADERS_H \ No newline at end of file
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index c687584cc7..16a76bc66e 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -372,7 +372,7 @@ static int Shutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
#ifdef _DEBUG
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
@@ -397,10 +397,3 @@ extern "C" int __declspec(dllexport) Load(void)
ftpList.init();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/FTPFileYM/src/stdafx.h b/plugins/FTPFileYM/src/stdafx.h
index 8bcb15e909..9f1a9c41a7 100644
--- a/plugins/FTPFileYM/src/stdafx.h
+++ b/plugins/FTPFileYM/src/stdafx.h
@@ -84,4 +84,6 @@ using namespace std;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index c387729535..ca6cbdb0c5 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -55,7 +55,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
g_contactCache = new CContactCache;
@@ -71,7 +71,7 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
UninitServices();
UninitMenu();
diff --git a/plugins/FavContacts/src/stdafx.h b/plugins/FavContacts/src/stdafx.h
index 858d735c8f..8c08062ec9 100644
--- a/plugins/FavContacts/src/stdafx.h
+++ b/plugins/FavContacts/src/stdafx.h
@@ -52,6 +52,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "resource.h"
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index f6ffd068d2..3815e347e5 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -183,7 +183,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
InitCRC32();
@@ -209,7 +209,7 @@ extern "C" __declspec(dllexport) int Load(void)
// Unload()
// Called by Miranda when Plugin is unloaded.
//
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
WindowList_Destroy(hFileList);
if (hHookSkinIconsChanged != nullptr)
diff --git a/plugins/FileAsMessage/src/stdafx.h b/plugins/FileAsMessage/src/stdafx.h
index 3cc13e9f15..7020a88dab 100644
--- a/plugins/FileAsMessage/src/stdafx.h
+++ b/plugins/FileAsMessage/src/stdafx.h
@@ -36,6 +36,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern char *szServiceTitle;
diff --git a/plugins/FingerprintNG/src/main.cpp b/plugins/FingerprintNG/src/main.cpp
index 043fc72ccc..e502260e1f 100644
--- a/plugins/FingerprintNG/src/main.cpp
+++ b/plugins/FingerprintNG/src/main.cpp
@@ -49,7 +49,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load(void)
{
InitFingerModule();
return 0;
@@ -57,7 +57,7 @@ extern "C" int __declspec(dllexport) Load(void)
///////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
HeapDestroy(hHeap);
ClearFI();
diff --git a/plugins/FingerprintNG/src/stdafx.h b/plugins/FingerprintNG/src/stdafx.h
index a416667e88..2a7d2521bb 100644
--- a/plugins/FingerprintNG/src/stdafx.h
+++ b/plugins/FingerprintNG/src/stdafx.h
@@ -115,6 +115,9 @@ typedef struct _foundInfo
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
void ClearFI();
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index 99ab507a73..9226ad8fb9 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -901,7 +901,7 @@ static int OnPreshutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
g_plugin.registerIconW(_A2W(MODULE), g_iconList);
LoadMenus();
@@ -927,7 +927,7 @@ extern "C" int __declspec(dllexport) Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
if (hLTEdgesPen)
DeleteObject(hLTEdgesPen);
diff --git a/plugins/FloatingContacts/src/stdafx.h b/plugins/FloatingContacts/src/stdafx.h
index 532c1d94df..253215ba86 100644
--- a/plugins/FloatingContacts/src/stdafx.h
+++ b/plugins/FloatingContacts/src/stdafx.h
@@ -37,6 +37,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif // #ifndef __STDHDR_H__
diff --git a/plugins/Folders/src/folders.cpp b/plugins/Folders/src/folders.cpp
index 353e2b112a..ad83692bd4 100644
--- a/plugins/Folders/src/folders.cpp
+++ b/plugins/Folders/src/folders.cpp
@@ -45,7 +45,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
InitServices();
InitEvents();
@@ -55,7 +55,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload()
+int CMPlugin::Unload()
{
DestroyEvents();
return 0;
diff --git a/plugins/Folders/src/stdafx.h b/plugins/Folders/src/stdafx.h
index a3352f491b..aa0ecd1ec0 100644
--- a/plugins/Folders/src/stdafx.h
+++ b/plugins/Folders/src/stdafx.h
@@ -59,6 +59,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern OBJLIST<CFolderItem> lstRegisteredFolders;
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp
index af7dfa44ec..330fcd2a09 100644
--- a/plugins/GmailNotifier/src/main.cpp
+++ b/plugins/GmailNotifier/src/main.cpp
@@ -84,7 +84,7 @@ static int OnMirandaStart(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
g_plugin.addSound("Gmail", LPGENW("Other"), LPGENW("Gmail: New thread(s)"));
HookEvent(ME_CLIST_DOUBLECLICKED, OpenBrowser);
@@ -149,7 +149,7 @@ extern "C" int __declspec(dllexport) Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
if (hTimer)
KillTimer(nullptr, hTimer);
diff --git a/plugins/GmailNotifier/src/stdafx.h b/plugins/GmailNotifier/src/stdafx.h
index cd60bd5335..330a85e62b 100644
--- a/plugins/GmailNotifier/src/stdafx.h
+++ b/plugins/GmailNotifier/src/stdafx.h
@@ -94,4 +94,7 @@ Account* GetAccountByContact(MCONTACT hContact);
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/plugins/HTTPServer/src/Glob.h b/plugins/HTTPServer/src/Glob.h
index c66347cfec..ba1cb0e1e9 100644
--- a/plugins/HTTPServer/src/Glob.h
+++ b/plugins/HTTPServer/src/Glob.h
@@ -61,6 +61,9 @@ using namespace std;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern HNETLIBUSER hNetlibUser;
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index 6adf9893b3..38c8fa787e 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -811,7 +811,7 @@ int nSystemShutdown(WPARAM /*wparam*/, LPARAM /*lparam*/)
// Developer : KN
/////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
hHttpAcceptConnectionsService = CreateServiceFunction(MS_HTTP_ACCEPT_CONNECTIONS, nToggelAcceptConnections);
if (!hHttpAcceptConnectionsService) {
@@ -909,7 +909,7 @@ extern "C" __declspec(dllexport) int Load()
// Developer : KN
/////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload()
+int CMPlugin::Unload()
{
nSystemShutdown(0, 0);
if (hwndStatsticView)
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index e039752b2d..634a292574 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -145,7 +145,7 @@ static INT_PTR LinkList_Main(WPARAM hContact, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
CreateServiceFunction("Linklist/MenuCommand", LinkList_Main);
@@ -179,7 +179,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
WindowList_Destroy(hWindowList);
DestroyCursor(splitCursor);
diff --git a/plugins/HistoryLinkListPlus/src/stdafx.h b/plugins/HistoryLinkListPlus/src/stdafx.h
index dd92964454..728a5b3160 100644
--- a/plugins/HistoryLinkListPlus/src/stdafx.h
+++ b/plugins/HistoryLinkListPlus/src/stdafx.h
@@ -130,6 +130,9 @@ typedef struct {
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define _mstrlen(x) (_countof(x) - 1)
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index 1871f69371..320f309065 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -381,7 +381,7 @@ static int EventModulesLoaded(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
// external interface
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
// init COM, needed for GUID generation
CoInitialize(nullptr);
@@ -433,7 +433,7 @@ extern "C" __declspec(dllexport) int Load()
return 0;
}
-extern "C" __declspec(dllexport) int Unload()
+int CMPlugin::Unload()
{
// free global settings object
delete g_pSettings;
diff --git a/plugins/HistoryStats/src/stdafx.h b/plugins/HistoryStats/src/stdafx.h
index f61e53f3ea..94ebbc4452 100644
--- a/plugins/HistoryStats/src/stdafx.h
+++ b/plugins/HistoryStats/src/stdafx.h
@@ -127,6 +127,9 @@ namespace ext
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif // HISTORYSTATS_GUARD__GLOABLS_H
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp
index d0d556dbdc..d0218610be 100644
--- a/plugins/HistorySweeperLight/src/main.cpp
+++ b/plugins/HistorySweeperLight/src/main.cpp
@@ -113,7 +113,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_OPT_INITIALISE, HSOptInitialise);
@@ -124,7 +124,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
ShutdownAction();
return 0;
diff --git a/plugins/HistorySweeperLight/src/stdafx.h b/plugins/HistorySweeperLight/src/stdafx.h
index c6ee6ae3c4..9b680898dd 100644
--- a/plugins/HistorySweeperLight/src/stdafx.h
+++ b/plugins/HistorySweeperLight/src/stdafx.h
@@ -47,6 +47,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
// main.c
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>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern HWND hDialogWnd; // глобально используется для вывода туда в реалтайме сканкодов клавы, из хука
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index 2e46085c64..9b73741e82 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -55,7 +55,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHIST
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
INITCOMMONCONTROLSEX icex;
icex.dwSize = sizeof(icex);
@@ -92,7 +92,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
WindowList_Broadcast(hOpenWindowsList, WM_CLOSE, 0, 0);
WindowList_Destroy(hOpenWindowsList);
diff --git a/plugins/IEHistory/src/stdafx.h b/plugins/IEHistory/src/stdafx.h
index 2ab6a12c79..f073c987a4 100644
--- a/plugins/IEHistory/src/stdafx.h
+++ b/plugins/IEHistory/src/stdafx.h
@@ -75,6 +75,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern HICON hIcon; //history icon
diff --git a/plugins/IEView/src/ieview_main.cpp b/plugins/IEView/src/ieview_main.cpp
index 885ab13e6b..885c89815a 100644
--- a/plugins/IEView/src/ieview_main.cpp
+++ b/plugins/IEView/src/ieview_main.cpp
@@ -58,7 +58,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
int wdsize = GetCurrentDirectory(0, nullptr);
wchar_t *workingDir = new wchar_t[wdsize];
@@ -81,7 +81,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
Options::uninit();
DestroyHookableEvent(hHookOptionsChanged);
diff --git a/plugins/IEView/src/stdafx.h b/plugins/IEView/src/stdafx.h
index 68fa4d7c95..fa6f601184 100644
--- a/plugins/IEView/src/stdafx.h
+++ b/plugins/IEView/src/stdafx.h
@@ -77,6 +77,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern IEView *debugView;
diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp
index a5a7e8f903..fe614d542d 100644
--- a/plugins/IgnoreState/src/main.cpp
+++ b/plugins/IgnoreState/src/main.cpp
@@ -149,7 +149,7 @@ int onContactSettingChanged(WPARAM hContact, LPARAM lParam)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, onContactSettingChanged);
@@ -161,8 +161,3 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/IgnoreState/src/stdafx.h b/plugins/IgnoreState/src/stdafx.h
index f7d5a7516c..9020364783 100644
--- a/plugins/IgnoreState/src/stdafx.h
+++ b/plugins/IgnoreState/src/stdafx.h
@@ -42,6 +42,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
struct IGNOREITEMS
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp
index f24d4a1cb2..10f22c7568 100644
--- a/plugins/Import/src/main.cpp
+++ b/plugins/Import/src/main.cpp
@@ -132,7 +132,7 @@ static INT_PTR ImportCommand(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
CreateServiceFunction(IMPORT_SERVICE, ImportCommand);
CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
@@ -151,11 +151,3 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Unload a plugin
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/Import/src/stdafx.h b/plugins/Import/src/stdafx.h
index c3fafad1e4..667f81b861 100644
--- a/plugins/Import/src/stdafx.h
+++ b/plugins/Import/src/stdafx.h
@@ -57,6 +57,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
// Keys
diff --git a/plugins/ListeningTo/src/main.cpp b/plugins/ListeningTo/src/main.cpp
index 6a589d0cc5..9d6ae82082 100644
--- a/plugins/ListeningTo/src/main.cpp
+++ b/plugins/ListeningTo/src/main.cpp
@@ -43,7 +43,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
CoInitialize(nullptr);
@@ -55,7 +55,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
CoUninitialize();
return 0;
diff --git a/plugins/ListeningTo/src/stdafx.h b/plugins/ListeningTo/src/stdafx.h
index 52ab19b677..1c756963d6 100644
--- a/plugins/ListeningTo/src/stdafx.h
+++ b/plugins/ListeningTo/src/stdafx.h
@@ -50,6 +50,9 @@ Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "../../utils/mir_options.h"
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 025323949c..702cd11aae 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -1671,7 +1671,7 @@ static int preshutdown(WPARAM, LPARAM)
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
Plugin_Terminated = false;
@@ -1738,7 +1738,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
log(L"Unload: start");
Plugin_Terminated = true;
diff --git a/plugins/LotusNotify/src/LotusNotify.h b/plugins/LotusNotify/src/LotusNotify.h
index e776381aba..3cf0c32407 100644
--- a/plugins/LotusNotify/src/LotusNotify.h
+++ b/plugins/LotusNotify/src/LotusNotify.h
@@ -31,4 +31,7 @@ void checkthread(void*);
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/plugins/MagneticWindows/src/MagneticWindows.cpp b/plugins/MagneticWindows/src/MagneticWindows.cpp
index 03ea94abbd..ec9f3928e7 100644
--- a/plugins/MagneticWindows/src/MagneticWindows.cpp
+++ b/plugins/MagneticWindows/src/MagneticWindows.cpp
@@ -106,7 +106,7 @@ int SnapPluginShutDown(WPARAM, LPARAM)
// Exportet Functions
///////////////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, SnapPluginStart);
HookEvent(ME_SYSTEM_PRESHUTDOWN, SnapPluginShutDown);
@@ -119,8 +119,3 @@ extern "C" int __declspec(dllexport) Load()
WindowStart();
return 0;
}
-
-extern "C" int __declspec(dllexport) Unload()
-{
- return 0;
-}
diff --git a/plugins/MagneticWindows/src/stdafx.h b/plugins/MagneticWindows/src/stdafx.h
index 962673a6ea..1bc81267c0 100644
--- a/plugins/MagneticWindows/src/stdafx.h
+++ b/plugins/MagneticWindows/src/stdafx.h
@@ -28,6 +28,8 @@ struct TWorkingVariables
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
void WindowStart();
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 51f6746c27..0ed62c9026 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -1049,7 +1049,7 @@ static int PluginInit(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
g_plugin.registerIcon(LPGEN("MenuItemEx"), iconList);
g_plugin.registerIcon(LPGEN("MenuItemEx"), overlayIconList);
@@ -1079,7 +1079,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
DestroyIcon(hIcons[3]);
DestroyIcon(hIcons[4]);
diff --git a/plugins/MenuItemEx/src/stdafx.h b/plugins/MenuItemEx/src/stdafx.h
index 03c9183055..29b5add4d8 100644
--- a/plugins/MenuItemEx/src/stdafx.h
+++ b/plugins/MenuItemEx/src/stdafx.h
@@ -33,6 +33,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define MIIM_STRING 0x00000040
diff --git a/plugins/MessageState/src/main.cpp b/plugins/MessageState/src/main.cpp
index a70cc74864..d799a1408e 100644
--- a/plugins/MessageState/src/main.cpp
+++ b/plugins/MessageState/src/main.cpp
@@ -25,16 +25,9 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
InitServices();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-} \ No newline at end of file
diff --git a/plugins/MessageState/src/stdafx.h b/plugins/MessageState/src/stdafx.h
index 29b8b8d3f1..c5e033d418 100644
--- a/plugins/MessageState/src/stdafx.h
+++ b/plugins/MessageState/src/stdafx.h
@@ -23,6 +23,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern IconItem Icons[]; \ No newline at end of file
diff --git a/plugins/MirFox/src/MirandaInterface.cpp b/plugins/MirFox/src/MirandaInterface.cpp
index 5bd35281b1..09cb05058a 100644
--- a/plugins/MirFox/src/MirandaInterface.cpp
+++ b/plugins/MirFox/src/MirandaInterface.cpp
@@ -134,7 +134,7 @@ static int OnShutdown(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
@@ -160,7 +160,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec (dllexport) int Unload(void)
+int CMPlugin::Unload()
{
MFLogger::getInstance()->log(L"Unload: start");
diff --git a/plugins/MirFox/src/common.h b/plugins/MirFox/src/common.h
index 21eefe49e8..2334d4f1bf 100644
--- a/plugins/MirFox/src/common.h
+++ b/plugins/MirFox/src/common.h
@@ -26,6 +26,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
//for MirandaUtils.h and MirfoxData.h and MirfoxMiranda.h
diff --git a/plugins/MirOTR/src/dllmain.cpp b/plugins/MirOTR/src/dllmain.cpp
index 3dbd68fe7f..d291e7269d 100644
--- a/plugins/MirOTR/src/dllmain.cpp
+++ b/plugins/MirOTR/src/dllmain.cpp
@@ -48,7 +48,7 @@ int ModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
DEBUGOUTA("LOAD MIROTR");
@@ -85,7 +85,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
DEBUGOUTA("UNLOAD MIROTR");
DeinitSRMM();
diff --git a/plugins/MirOTR/src/stdafx.h b/plugins/MirOTR/src/stdafx.h
index 64a3871e43..981a5b04fd 100644
--- a/plugins/MirOTR/src/stdafx.h
+++ b/plugins/MirOTR/src/stdafx.h
@@ -77,6 +77,9 @@ using namespace std;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define PREF_BYPASS_OTR 0x8000
diff --git a/plugins/MirandaG15/src/Miranda.cpp b/plugins/MirandaG15/src/Miranda.cpp
index 90cd6fcede..cf3a273e92 100644
--- a/plugins/MirandaG15/src/Miranda.cpp
+++ b/plugins/MirandaG15/src/Miranda.cpp
@@ -89,7 +89,7 @@ CMPlugin::CMPlugin() :
// We defer initialization until Miranda's module loading process completed and return 0 to
// mark success, everything else will cause the plugin to be freed right away.
-EXTERN_C int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
g_bInitialized = false;
@@ -103,7 +103,7 @@ EXTERN_C int __declspec(dllexport) Load()
/////////////////////////////////////////////////////////////////////////////////////////
// Called by Miranda when the plugin should unload itself.
-EXTERN_C int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload(void)
{
if(!g_bInitialized) {
TRACE(L"ERROR: Unload requested, but plugin is not initialized?!\n");
diff --git a/plugins/MirandaG15/src/StdAfx.h b/plugins/MirandaG15/src/StdAfx.h
index 632b5288fe..29978e1e66 100644
--- a/plugins/MirandaG15/src/StdAfx.h
+++ b/plugins/MirandaG15/src/StdAfx.h
@@ -38,6 +38,9 @@ using namespace std;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "LCDFramework/LCDFramework.h"
diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp
index 7da0cc00a6..ff9ef152d8 100644
--- a/plugins/MobileState/src/main.cpp
+++ b/plugins/MobileState/src/main.cpp
@@ -104,7 +104,7 @@ static int onModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, onContactSettingChanged);
@@ -117,10 +117,3 @@ extern "C" int __declspec(dllexport) Load(void)
hExtraIcon = ExtraIcon_RegisterIcolib("mobilestate", LPGEN("Mobile State"), "mobile_icon");
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/MobileState/src/stdafx.h b/plugins/MobileState/src/stdafx.h
index cf9ac60eb9..38e126b481 100644
--- a/plugins/MobileState/src/stdafx.h
+++ b/plugins/MobileState/src/stdafx.h
@@ -40,4 +40,6 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp
index 062fa12da2..11bb810d63 100644
--- a/plugins/MsgPopup/src/main.cpp
+++ b/plugins/MsgPopup/src/main.cpp
@@ -219,7 +219,7 @@ void LoadConfig()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, HookedInit);
HookEvent(ME_OPT_INITIALISE, HookedOptions);
@@ -227,10 +227,3 @@ extern "C" __declspec(dllexport) int Load(void)
LoadConfig();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/MsgPopup/src/stdafx.h b/plugins/MsgPopup/src/stdafx.h
index eeac5fc31d..759bc6436a 100644
--- a/plugins/MsgPopup/src/stdafx.h
+++ b/plugins/MsgPopup/src/stdafx.h
@@ -42,6 +42,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
struct MSGBOXOPTIONS
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp
index 9a06998258..4464680323 100755
--- a/plugins/Msg_Export/src/main.cpp
+++ b/plugins/Msg_Export/src/main.cpp
@@ -137,7 +137,7 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/)
// Developer : KN
/////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
@@ -185,7 +185,7 @@ extern "C" __declspec(dllexport) int Load()
// Developer : KN
/////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
WindowList_Destroy(hInternalWindowList);
bUseInternalViewer(false);
diff --git a/plugins/Msg_Export/src/stdafx.h b/plugins/Msg_Export/src/stdafx.h
index 9b49eebf9f..cfe152d061 100755
--- a/plugins/Msg_Export/src/stdafx.h
+++ b/plugins/Msg_Export/src/stdafx.h
@@ -57,6 +57,9 @@ using namespace std;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern MWindowList hInternalWindowList;
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp
index ef5f5c2482..36de82c6e5 100644
--- a/plugins/MyDetails/src/mydetails.cpp
+++ b/plugins/MyDetails/src/mydetails.cpp
@@ -129,7 +129,7 @@ static int MainUninit(WPARAM, LPARAM)
// Load ///////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
// Hook event to load messages and show first one
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
@@ -157,7 +157,7 @@ extern "C" __declspec(dllexport) int Load()
// Unload /////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
DeInitProtocolData();
return 0;
diff --git a/plugins/MyDetails/src/stdafx.h b/plugins/MyDetails/src/stdafx.h
index 091cd05e56..af7275116a 100644
--- a/plugins/MyDetails/src/stdafx.h
+++ b/plugins/MyDetails/src/stdafx.h
@@ -66,6 +66,9 @@ Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern bool g_bFramesExist, g_bAvsExist;
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index 8079e5a14b..15777de903 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -701,7 +701,7 @@ int MirandaLoaded(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
@@ -728,7 +728,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
WindowList_Destroy(g_hReadWndList);
return 0;
diff --git a/plugins/NewAwaySysMod/src/stdafx.h b/plugins/NewAwaySysMod/src/stdafx.h
index 004dca9cb2..47a5bba3c2 100644
--- a/plugins/NewAwaySysMod/src/stdafx.h
+++ b/plugins/NewAwaySysMod/src/stdafx.h
@@ -224,6 +224,9 @@ int ICQStatusToGeneralStatus(int bICQStat); // TODO: get rid of these protocol-s
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
struct SetAwayMsgData
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp
index 72bfaddbaa..a506d8206a 100644
--- a/plugins/NewEventNotify/src/main.cpp
+++ b/plugins/NewEventNotify/src/main.cpp
@@ -139,9 +139,8 @@ int CMPlugin::Load()
return 0;
}
-
-//-------------------------------------
-//---Check Window Message function
+/////////////////////////////////////////////////////////////////////////////////////////
+// Check Window Message function
// Took this snippet of code from "EventNotify" by micron-x, thx *g*
// checks if the message-dialog window is already opened
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 130a2a44f6..907c4cffb1 100755
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -140,7 +140,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
@@ -198,7 +198,7 @@ extern "C" int __declspec(dllexport) Load()
/////////////////////////////////////////////////////////////////////////////////////////
extern list<wstring> transfers;
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
if(!transfers.empty())
{
diff --git a/plugins/New_GPG/src/stdafx.h b/plugins/New_GPG/src/stdafx.h
index 699f69bbc1..c23c23e7c1 100755
--- a/plugins/New_GPG/src/stdafx.h
+++ b/plugins/New_GPG/src/stdafx.h
@@ -76,6 +76,9 @@ using std::fstream;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
//internal
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp
index 087e022a80..4294a73d4d 100644
--- a/plugins/NewsAggregator/Src/NewsAggregator.cpp
+++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp
@@ -56,7 +56,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
// Add options hook
HookEvent(ME_OPT_INITIALISE, OptInit);
@@ -98,7 +98,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
DestroyUpdateList();
CloseHandle(hUpdateMutex);
diff --git a/plugins/NewsAggregator/Src/stdafx.h b/plugins/NewsAggregator/Src/stdafx.h
index d2215249cd..b40650e2f9 100644
--- a/plugins/NewsAggregator/Src/stdafx.h
+++ b/plugins/NewsAggregator/Src/stdafx.h
@@ -71,6 +71,9 @@ extern wchar_t tszRoot[MAX_PATH];
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
//============ STRUCT USED TO MAKE AN UPDATE LIST ============
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 220239f9e4..117144be63 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -261,7 +261,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec (dllexport) int Load()
+int CMPlugin::Load()
{
// Ensure that the common control DLL is loaded (for listview)
INITCOMMONCONTROLSEX icex = { sizeof(icex), ICC_LISTVIEW_CLASSES };
@@ -281,7 +281,7 @@ extern "C" __declspec (dllexport) int Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec (dllexport) int Unload(void)
+int CMPlugin::Unload(void)
{
RemoveReadEvents();
return 0;
diff --git a/plugins/NoHistory/src/stdafx.h b/plugins/NoHistory/src/stdafx.h
index 76962ba8f6..5da0cb63ac 100644
--- a/plugins/NoHistory/src/stdafx.h
+++ b/plugins/NoHistory/src/stdafx.h
@@ -28,6 +28,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
void SrmmMenu_Load();
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index 0718d35605..c04f0dcd25 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -111,7 +111,7 @@ IconItem iconList[] =
{ LPGEN("Main Icon"), MODNAME, IDI_MAIN },
};
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
g_plugin.registerIcon(LPGEN("Non-IM Contact"), iconList);
@@ -188,7 +188,7 @@ extern "C" __declspec(dllexport) int Load()
// Description : Unloads plugin
//=====================================================
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
killTimer();
return 0;
diff --git a/plugins/Non-IM Contact/src/stdafx.h b/plugins/Non-IM Contact/src/stdafx.h
index ff8899df3c..43d301a805 100644
--- a/plugins/Non-IM Contact/src/stdafx.h
+++ b/plugins/Non-IM Contact/src/stdafx.h
@@ -120,6 +120,9 @@ extern HNETLIBUSER hNetlibUser;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif
diff --git a/plugins/NotesAndReminders/src/globals.h b/plugins/NotesAndReminders/src/globals.h
index b6c8363b97..c774dcffb7 100644
--- a/plugins/NotesAndReminders/src/globals.h
+++ b/plugins/NotesAndReminders/src/globals.h
@@ -31,6 +31,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
// normal timer interval for reminder update processing
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index 92e83ed312..b1207d055d 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -266,7 +266,7 @@ int OnModulesLoaded(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
hmiranda = GetModuleHandle(nullptr);
@@ -293,7 +293,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
CloseNotesList();
CloseReminderList();
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index b74ec95f5b..e9c5640131 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -473,7 +473,7 @@ static int AccListChanged(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
LoadIcons();
@@ -512,7 +512,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
arNudges.destroy();
return 0;
diff --git a/plugins/Nudge/src/stdafx.h b/plugins/Nudge/src/stdafx.h
index 17f4503308..7216df9ab0 100644
--- a/plugins/Nudge/src/stdafx.h
+++ b/plugins/Nudge/src/stdafx.h
@@ -77,6 +77,9 @@ void AutoResendNudge(void *wParam) ;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern int nProtocol;
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp
index f1d8c23b9c..cd4b741ea8 100644
--- a/plugins/OpenFolder/src/openFolder.cpp
+++ b/plugins/OpenFolder/src/openFolder.cpp
@@ -3,6 +3,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
}
g_plugin;
@@ -78,7 +80,7 @@ HICON LoadIconExEx(const char* IcoLibName, int)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
CreateServiceFunction(MS_OPENFOLDER_OPEN, MenuCommand_OpenFolder);
@@ -108,10 +110,3 @@ extern "C" int __declspec(dllexport) Load()
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload()
-{
- return 0;
-}
diff --git a/plugins/OpenSSL/src/main.cpp b/plugins/OpenSSL/src/main.cpp
index 9189eff641..1bc4bda216 100644
--- a/plugins/OpenSSL/src/main.cpp
+++ b/plugins/OpenSSL/src/main.cpp
@@ -26,6 +26,9 @@ void UnloadSslModule(void);
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
}
g_plugin;
@@ -55,14 +58,14 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SSL, M
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
return LoadSslModule();
}
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UnloadSslModule();
return 0;
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp
index a9e1cf9347..cdae7910ce 100644
--- a/plugins/PackUpdater/Src/PackUpdater.cpp
+++ b/plugins/PackUpdater/Src/PackUpdater.cpp
@@ -46,7 +46,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
wchar_t *tszFolder = Utils_ReplaceVarsW(L"%miranda_userdata%\\" DEFAULT_UPDATES_FOLDER);
mir_wstrncpy(tszRoot, tszFolder, _countof(tszRoot));
@@ -94,7 +94,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
if (hCheckThread)
hCheckThread = nullptr;
diff --git a/plugins/PackUpdater/Src/stdafx.h b/plugins/PackUpdater/Src/stdafx.h
index be444fdfc8..9f87204d38 100644
--- a/plugins/PackUpdater/Src/stdafx.h
+++ b/plugins/PackUpdater/Src/stdafx.h
@@ -54,6 +54,9 @@ typedef std::wstring tString;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
struct FILEURL
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index a56a46d15e..4e48b1aabf 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -346,7 +346,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
g_plugin.registerIcon(LPGEN("Paste It"), iconList);
@@ -374,7 +374,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UnhookEvent(hModulesLoaded);
UnhookEvent(hPrebuildContactMenu);
diff --git a/plugins/PasteIt/src/stdafx.h b/plugins/PasteIt/src/stdafx.h
index 347e4e0dff..e747eb8f97 100644
--- a/plugins/PasteIt/src/stdafx.h
+++ b/plugins/PasteIt/src/stdafx.h
@@ -43,4 +43,7 @@ extern PasteToWeb* pasteToWebs[PasteToWeb::pages];
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp
index 99cc6b67e3..ad55a54a90 100644
--- a/plugins/Ping/src/ping.cpp
+++ b/plugins/Ping/src/ping.cpp
@@ -116,7 +116,7 @@ static IconItem iconList[] =
{ LPGEN("Disabled"), "ping_disabled", IDI_ICON_DISABLED },
};
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
use_raw_ping = false;
db_set_b(0, MODULENAME, "UsingRawSockets", (BYTE)use_raw_ping);
@@ -143,7 +143,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
SavePingList(0, 0);
diff --git a/plugins/Ping/src/stdafx.h b/plugins/Ping/src/stdafx.h
index d2abecce00..257c56d6f8 100644
--- a/plugins/Ping/src/stdafx.h
+++ b/plugins/Ping/src/stdafx.h
@@ -57,6 +57,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
typedef struct {
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index 558271131c..7bac5a686f 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -44,7 +44,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
InitServices();
@@ -123,7 +123,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
UnloadCheck();
UnloadListNew();
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index 00be8fc56f..8e59245d55 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -160,6 +160,9 @@ extern IconItem iconList[];
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
void UninitCheck(void);
diff --git a/plugins/Popup/src/defs.h b/plugins/Popup/src/defs.h
deleted file mode 100644
index 43959f9b86..0000000000
--- a/plugins/Popup/src/defs.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Popup Plus plugin for Miranda IM
-
-Copyright © 2002 Luca Santarelli,
-© 2004-2007 Victor Pavlychko
-© 2010 MPK
-© 2010 Merlin_de
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef __defs_h__
-#define __defs_h__
-
-#ifdef __cplusplus
-// in C++ files we should define everything inside extren "C"
-#define EXTERNC extern "C"
-#define BEGIN_EXTERNC extern "C" {
-#define END_EXTERNC };
-
-// in C++ all exported function must be extern "C"
-#define MIRAPI extern "C" __declspec(dllexport)
-#else
-#define EXTERNC
-#define BEGIN_EXTERNC
-#define END_EXTERNC
-
-#define MIRAPI __declspec(dllexport)
-#endif
-
-#endif \ No newline at end of file
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 51f7891dce..7517084fce 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -319,7 +319,7 @@ static int OnShutdown(WPARAM, LPARAM)
return 0;
}
-MIRAPI int Load(void)
+int CMPlugin::Load()
{
CreateServiceFunction(MS_POPUP_GETSTATUS, GetStatus);
@@ -404,7 +404,7 @@ MIRAPI int Load(void)
// Prepare the plugin to stop
// Called by Miranda when it will exit or when the plugin gets deselected
-MIRAPI int Unload(void)
+int CMPlugin::Unload()
{
DeleteObject(fonts.title);
DeleteObject(fonts.clock);
diff --git a/plugins/Popup/src/stdafx.h b/plugins/Popup/src/stdafx.h
index 3ac1fe44e3..a63a558885 100644
--- a/plugins/Popup/src/stdafx.h
+++ b/plugins/Popup/src/stdafx.h
@@ -105,10 +105,12 @@ https://miranda-ng.org/distr/
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "resource.h"
-#include "defs.h"
#include "version.h"
#include "config.h"
#include "common.h"
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp
index 31e08541c0..1944dcb8ee 100644
--- a/plugins/ProfileManager/src/pmanagerEx.cpp
+++ b/plugins/ProfileManager/src/pmanagerEx.cpp
@@ -16,6 +16,8 @@ There is no warranty.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
}
g_plugin;
@@ -79,7 +81,7 @@ static MUUID uids[_countof(iconList)] =
{ 0x5A2EDCCD, 0xB43B, 0x48FA, 0x8A, 0xE8, 0xB5, 0x8B, 0xD7, 0xA5, 0x5A, 0x13 }
};
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
g_plugin.registerIcon(LPGEN("Profile manager"), iconList);
@@ -102,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/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 8c15a2d162..e387eae8be 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -147,7 +147,7 @@ static int EventAdded(WPARAM wparam, LPARAM hDbEvent)
return 0;
}
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
CreateServiceFunction(MS_QC_SHOW_DIALOG, ShowDialog);
@@ -160,7 +160,7 @@ extern "C" __declspec(dllexport) int Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
FreeContacts();
diff --git a/plugins/QuickContacts/src/stdafx.h b/plugins/QuickContacts/src/stdafx.h
index f5abdae0e6..a2d7392f14 100644
--- a/plugins/QuickContacts/src/stdafx.h
+++ b/plugins/QuickContacts/src/stdafx.h
@@ -56,6 +56,9 @@ Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
//add a new hotkey so it has a default and can be changed in the options dialog
diff --git a/plugins/QuickMessages/src/main.cpp b/plugins/QuickMessages/src/main.cpp
index 65860a0a94..a9a530efdd 100644
--- a/plugins/QuickMessages/src/main.cpp
+++ b/plugins/QuickMessages/src/main.cpp
@@ -275,16 +275,9 @@ static int PluginInit(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, PluginInit);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/QuickMessages/src/stdafx.h b/plugins/QuickMessages/src/stdafx.h
index 278bea3676..cd8963057d 100644
--- a/plugins/QuickMessages/src/stdafx.h
+++ b/plugins/QuickMessages/src/stdafx.h
@@ -46,6 +46,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern HANDLE hIcolib;
diff --git a/plugins/QuickReplies/src/quickreplies.cpp b/plugins/QuickReplies/src/quickreplies.cpp
index 51822ddcfc..7ca1696a00 100644
--- a/plugins/QuickReplies/src/quickreplies.cpp
+++ b/plugins/QuickReplies/src/quickreplies.cpp
@@ -43,15 +43,8 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/QuickReplies/src/stdafx.h b/plugins/QuickReplies/src/stdafx.h
index 821c91bab3..091d8e57cf 100644
--- a/plugins/QuickReplies/src/stdafx.h
+++ b/plugins/QuickReplies/src/stdafx.h
@@ -40,6 +40,8 @@ Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
#define MS_QUICKREPLIES_SERVICE MODULENAME"/Service"
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index 4fedf300fe..8e501c3e80 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -305,7 +305,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-EXTERN_C int __declspec(dllexport) Load(void)
+int CMPlugin::Load(void)
{
if (!CModuleInfo::Verify())
return 1;
@@ -329,7 +329,7 @@ EXTERN_C int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-EXTERN_C __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload(void)
{
WaitForWorkingThreads();
diff --git a/plugins/Quotes/src/stdafx.h b/plugins/Quotes/src/stdafx.h
index b8fb295aaa..ad3d73a0cd 100644
--- a/plugins/Quotes/src/stdafx.h
+++ b/plugins/Quotes/src/stdafx.h
@@ -119,4 +119,7 @@ inline tstring quotes_a2t(const char* s)
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp
index 4e9cead3f3..1c15d5f978 100644
--- a/plugins/Rate/src/main.cpp
+++ b/plugins/Rate/src/main.cpp
@@ -40,6 +40,8 @@ static HANDLE hExtraIcon = nullptr;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
}
g_plugin;
@@ -113,7 +115,7 @@ int onContactSettingChanged(WPARAM hContact, LPARAM lParam)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, onContactSettingChanged);
@@ -125,10 +127,3 @@ extern "C" int __declspec(dllexport) Load(void)
hExtraIcon = ExtraIcon_RegisterIcolib("contact_rate", LPGEN("Contact rate"), "rate_high");
return 0;
}
-
-///////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 4d4177a4b2..8b2fb34115 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -542,7 +542,7 @@ static INT_PTR ToggleIgnore(WPARAM hContact, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
CoInitialize(nullptr);
@@ -564,7 +564,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
CoUninitialize();
return 0;
diff --git a/plugins/RecentContacts/src/stdafx.h b/plugins/RecentContacts/src/stdafx.h
index 785fe4bb0f..6408a5c727 100644
--- a/plugins/RecentContacts/src/stdafx.h
+++ b/plugins/RecentContacts/src/stdafx.h
@@ -51,6 +51,9 @@ void wfree(char **Data);
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index 5e1913caf6..0900f3ee71 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -31,6 +31,8 @@ Based on work by nullbie
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
}
g_plugin;
@@ -585,7 +587,7 @@ static INT_PTR RemoveAllService(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
CMenuItem mi(g_plugin);
SET_UID(mi, 0x2f9f21df, 0xf33c, 0x4640, 0xb9, 0x63, 0xd3, 0x26, 0x8a, 0xb8, 0xb1, 0xf0);
@@ -627,10 +629,3 @@ extern "C" int __declspec(dllexport) Load()
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp
index fad5964a56..037cc634be 100644
--- a/plugins/Restart/src/restart.cpp
+++ b/plugins/Restart/src/restart.cpp
@@ -3,6 +3,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
}
g_plugin;
@@ -40,7 +42,7 @@ static IconItem iconList[] =
{ LPGEN("Restart"), "rst_restart_icon", IDI_RESTARTICON }
};
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
// IcoLib support
g_plugin.registerIcon(LPGEN("Restart Plugin"), iconList);
@@ -57,10 +59,3 @@ extern "C" __declspec(dllexport) int Load(void)
Menu_AddTrayMenuItem(&mi);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/SMS/src/main.cpp b/plugins/SMS/src/main.cpp
index f2f23f7e68..426c714da3 100644
--- a/plugins/SMS/src/main.cpp
+++ b/plugins/SMS/src/main.cpp
@@ -112,7 +112,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED,OnModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN,OnPreShutdown);
@@ -123,10 +123,3 @@ extern "C" int __declspec(dllexport) Load(void)
LoadServices();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/SMS/src/stdafx.h b/plugins/SMS/src/stdafx.h
index e5c66ce515..87197e6a7b 100644
--- a/plugins/SMS/src/stdafx.h
+++ b/plugins/SMS/src/stdafx.h
@@ -34,6 +34,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
// структура содержащая информацию по построению меню или расширенных иконок
diff --git a/plugins/Scriver/src/srmm.cpp b/plugins/Scriver/src/srmm.cpp
index 5987790e72..95571ba0ed 100644
--- a/plugins/Scriver/src/srmm.cpp
+++ b/plugins/Scriver/src/srmm.cpp
@@ -55,7 +55,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM,
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
if (IsWinVer7Plus())
CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_ALL, IID_ITaskbarList3, (void**)&pTaskbarInterface);
@@ -65,7 +65,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
if (pTaskbarInterface)
pTaskbarInterface->Release();
diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h
index e023334fe9..f5190599b1 100644
--- a/plugins/Scriver/src/stdafx.h
+++ b/plugins/Scriver/src/stdafx.h
@@ -71,6 +71,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "resource.h"
diff --git a/plugins/SecureIM/src/commonheaders.h b/plugins/SecureIM/src/commonheaders.h
index 75f2149272..abe1b2f5ad 100644
--- a/plugins/SecureIM/src/commonheaders.h
+++ b/plugins/SecureIM/src/commonheaders.h
@@ -65,6 +65,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern char TEMP[MAX_PATH];
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index fa55643c37..6dd6706a23 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -273,7 +273,7 @@ static int onShutdown(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
// Load
-extern "C" __declspec(dllexport) int __cdecl Load(void)
+int CMPlugin::Load(void)
{
INITCOMMONCONTROLSEX icce = { sizeof(icce), ICC_LISTVIEW_CLASSES | ICC_TAB_CLASSES };
InitCommonControlsEx(&icce);
@@ -350,7 +350,7 @@ extern "C" __declspec(dllexport) int __cdecl Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
// Unload
-extern "C" __declspec(dllexport) int __cdecl Unload()
+int CMPlugin::Unload()
{
freelib();
return 0;
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp
index 41709dd073..12f4ab156b 100644
--- a/plugins/SeenPlugin/src/main.cpp
+++ b/plugins/SeenPlugin/src/main.cpp
@@ -91,7 +91,7 @@ static int OnShutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
g_pUserInfo = WindowList_Create();
g_hShutdownEvent = CreateEvent(nullptr, TRUE, FALSE, nullptr);
@@ -118,7 +118,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
UninitFileOutput();
UnloadWatchedProtos();
diff --git a/plugins/SeenPlugin/src/stdafx.h b/plugins/SeenPlugin/src/stdafx.h
index 97b2b04bf3..a11efb3db3 100644
--- a/plugins/SeenPlugin/src/stdafx.h
+++ b/plugins/SeenPlugin/src/stdafx.h
@@ -64,6 +64,9 @@ wchar_t *any_to_Idle(MCONTACT hContact, const char *module_name, const char *set
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
//#define UM_CHECKHOOKS (WM_USER+1)
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>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern ATOM g_clsTargetHighlighter;
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index b4ff1df312..6d44ad45c2 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -806,7 +806,7 @@ static int PluginInit(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
CreateServiceFunction(MS_SESSIONS_SHOWFAVORITESMENU, BuildFavMenu);
CreateServiceFunction(MS_SESSIONS_OPENMANAGER, OpenSessionsManagerWindow);
@@ -851,10 +851,3 @@ extern "C" __declspec(dllexport) int Load(void)
g_plugin.registerIcon(MODULENAME, iconList);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/Sessions/Src/stdafx.h b/plugins/Sessions/Src/stdafx.h
index 2a2424edbb..2d319c94f9 100644
--- a/plugins/Sessions/Src/stdafx.h
+++ b/plugins/Sessions/Src/stdafx.h
@@ -50,6 +50,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern IconItem iconList[];
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp
index 3d83de1b99..74841af390 100644
--- a/plugins/ShellExt/src/main.cpp
+++ b/plugins/ShellExt/src/main.cpp
@@ -151,7 +151,7 @@ STDAPI DllUnregisterServer()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
InvokeThreadServer();
HookEvent(ME_OPT_INITIALISE, OnOptionsInit);
@@ -159,8 +159,3 @@ extern "C" __declspec(dllexport) int Load(void)
CheckRegisterServer();
return 0;
}
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/ShellExt/src/stdafx.h b/plugins/ShellExt/src/stdafx.h
index edd2b9599d..aa2f1e1f59 100644
--- a/plugins/ShellExt/src/stdafx.h
+++ b/plugins/ShellExt/src/stdafx.h
@@ -46,6 +46,8 @@ HRESULT RemoveCOMRegistryEntries();
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern bool bIsVistaPlus;
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index 5e3d38d1be..734cee99ef 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -241,7 +241,7 @@ IconItem iconList[] =
{ LPGEN("Enable Auto&reply"), "Enable Auto&reply", IDI_ON }
};
-extern "C" int __declspec(dllexport)Load(void)
+int CMPlugin::Load()
{
CreateServiceFunction(MODULENAME"/ToggleEnable", ToggleEnable);
CreateServiceFunction(MODULENAME"/ToggleAutoanswer", Toggle);
@@ -268,10 +268,3 @@ extern "C" int __declspec(dllexport)Load(void)
g_plugin.registerIcon("Simple Auto Replier", iconList);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport)int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/SimpleAR/src/stdafx.h b/plugins/SimpleAR/src/stdafx.h
index 5cb8c46b34..0c13a139e3 100644
--- a/plugins/SimpleAR/src/stdafx.h
+++ b/plugins/SimpleAR/src/stdafx.h
@@ -27,6 +27,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern INT interval;
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 5a7411bfe0..497ecdf157 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -1673,7 +1673,7 @@ static INT_PTR sttGetAwayMessageT(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
hwndSAMsgDialog = nullptr;
accounts = (PROTOACCOUNTS *)mir_alloc(sizeof(PROTOACCOUNTS));
@@ -1698,7 +1698,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UnhookEvent(h_statusmodechange);
UnhookProtoEvents();
diff --git a/plugins/SimpleStatusMsg/src/stdafx.h b/plugins/SimpleStatusMsg/src/stdafx.h
index 2de8f45579..e8040ec8a2 100644
--- a/plugins/SimpleStatusMsg/src/stdafx.h
+++ b/plugins/SimpleStatusMsg/src/stdafx.h
@@ -49,6 +49,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "simplestatusmsg.h"
diff --git a/plugins/SkypeStatusChange/src/main.cpp b/plugins/SkypeStatusChange/src/main.cpp
index bba4628908..9ddbc28fcd 100644
--- a/plugins/SkypeStatusChange/src/main.cpp
+++ b/plugins/SkypeStatusChange/src/main.cpp
@@ -265,7 +265,7 @@ int SSC_OnPreShutdown(WPARAM/* wParam*/, LPARAM/* lParam*/)
/******************************* INSTALLATION PROCEDURES *****************************/
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
g_MsgIDSkypeControlAPIAttach = ::RegisterWindowMessage(L"SkypeControlAPIAttach");
g_MsgIDSkypeControlAPIDiscover = ::RegisterWindowMessage(L"SkypeControlAPIDiscover");
@@ -296,10 +296,3 @@ extern "C" int __declspec(dllexport) Load()
HookEvent(ME_OPT_INITIALISE, SSC_OptInitialise);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void) // Executed on DLL unload
-{
- return 0;
-}
diff --git a/plugins/SkypeStatusChange/src/stdafx.h b/plugins/SkypeStatusChange/src/stdafx.h
index 90dfeb1b32..d33c1cef9f 100644
--- a/plugins/SkypeStatusChange/src/stdafx.h
+++ b/plugins/SkypeStatusChange/src/stdafx.h
@@ -20,6 +20,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
class COptions
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp
index 276b6f6d3a..409e5bb81a 100644
--- a/plugins/SmileyAdd/src/main.cpp
+++ b/plugins/SmileyAdd/src/main.cpp
@@ -85,7 +85,7 @@ static int MirandaShutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) {
ReportError(TranslateT("Only one instance of SmileyAdd could be executed.\nRemove duplicate instances from 'Plugins' directory"));
@@ -130,7 +130,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
RemoveDialogBoxHook();
diff --git a/plugins/SmileyAdd/src/stdafx.h b/plugins/SmileyAdd/src/stdafx.h
index fa7c936f8b..4e8e07dd10 100644
--- a/plugins/SmileyAdd/src/stdafx.h
+++ b/plugins/SmileyAdd/src/stdafx.h
@@ -99,6 +99,9 @@ extern LIST<void> menuHandleArray;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define DM_REMAKELOG (WM_USER + 11)
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index 858d2e7326..5c48d8a3f5 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -501,7 +501,7 @@ void RemoveNotOnListSettings()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
srand((unsigned)time(0));
bayesdb = nullptr;
@@ -522,7 +522,7 @@ extern "C" __declspec(dllexport) int Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" _declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
RemoveNotOnListSettings();
UnhookEvent(hOptInitialize);
diff --git a/plugins/Spamotron/src/stdafx.h b/plugins/Spamotron/src/stdafx.h
index 66578f6329..e6e87b4136 100644
--- a/plugins/Spamotron/src/stdafx.h
+++ b/plugins/Spamotron/src/stdafx.h
@@ -152,6 +152,9 @@ void dequeue_messages();
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#ifdef _DEBUG
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp
index 8940fba892..2226ae058a 100644
--- a/plugins/SpellChecker/src/spellchecker.cpp
+++ b/plugins/SpellChecker/src/spellchecker.cpp
@@ -223,7 +223,7 @@ static IconItem iconList[] =
{ LPGEN("Unknown"), "spellchecker_unknown", IDI_UNKNOWN_FLAG }
};
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
// icons
g_plugin.registerIcon(LPGEN("Spell Checker"), iconList);
@@ -245,7 +245,7 @@ extern "C" int __declspec(dllexport) Load(void)
////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
DeleteObject(hCheckedBmp);
FreeDictionaries(languages);
diff --git a/plugins/SpellChecker/src/stdafx.h b/plugins/SpellChecker/src/stdafx.h
index 130ad02c76..a6dd064cb4 100644
--- a/plugins/SpellChecker/src/stdafx.h
+++ b/plugins/SpellChecker/src/stdafx.h
@@ -77,6 +77,9 @@ using namespace std;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern BOOL uinfoex_enabled;
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp
index ea4bd33493..47f949afc2 100644
--- a/plugins/SplashScreen/src/main.cpp
+++ b/plugins/SplashScreen/src/main.cpp
@@ -227,7 +227,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
@@ -239,7 +239,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UnregisterClass(SPLASH_CLASS, g_plugin.getInst());
return 0;
diff --git a/plugins/SplashScreen/src/stdafx.h b/plugins/SplashScreen/src/stdafx.h
index a0841de240..5907f3e701 100644
--- a/plugins/SplashScreen/src/stdafx.h
+++ b/plugins/SplashScreen/src/stdafx.h
@@ -55,6 +55,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
struct SPLASHOPTS
diff --git a/plugins/StartPosition/src/main.cpp b/plugins/StartPosition/src/main.cpp
index cd28b270c6..08a0d124d8 100644
--- a/plugins/StartPosition/src/main.cpp
+++ b/plugins/StartPosition/src/main.cpp
@@ -42,16 +42,9 @@ PLUGININFOEX pluginInfoEx = {
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
g_plugin.Init();
g_plugin.positionClist();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/StartPosition/src/startposition.h b/plugins/StartPosition/src/startposition.h
index 455fb8981b..932a91c2a1 100644
--- a/plugins/StartPosition/src/startposition.h
+++ b/plugins/StartPosition/src/startposition.h
@@ -23,6 +23,8 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+ int Load() override;
+
void Init();
int __cdecl OnOptionsInit(WPARAM, LPARAM);
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index da8b59b374..0048e15541 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -437,7 +437,7 @@ int ModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
InitSettings();
@@ -458,7 +458,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
if (hTTBarloaded != nullptr)
UnhookEvent(hTTBarloaded);
diff --git a/plugins/StartupSilence/src/stdafx.h b/plugins/StartupSilence/src/stdafx.h
index 3b8206ae8f..0eff5b5fce 100644
--- a/plugins/StartupSilence/src/stdafx.h
+++ b/plugins/StartupSilence/src/stdafx.h
@@ -34,6 +34,9 @@ void UpdateTTB();
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define SS_SERVICE_NAME "StartupSilence/ToggleEnabled"
diff --git a/plugins/StatusChange/src/main.cpp b/plugins/StatusChange/src/main.cpp
index 737687808e..21be66c31f 100644
--- a/plugins/StatusChange/src/main.cpp
+++ b/plugins/StatusChange/src/main.cpp
@@ -331,7 +331,7 @@ int StatusChangeOptInit(WPARAM wParam, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_OPT_INITIALISE, StatusChangeOptInit);
HookEvent(ME_DB_EVENT_ADDED, StatusChangeGetMessage);
@@ -339,10 +339,3 @@ extern "C" __declspec(dllexport) int Load(void)
LoadOptions();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/StatusChange/src/stdafx.h b/plugins/StatusChange/src/stdafx.h
index c3303d1c35..7bc56869e1 100644
--- a/plugins/StatusChange/src/stdafx.h
+++ b/plugins/StatusChange/src/stdafx.h
@@ -21,6 +21,8 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
struct TOPTIONS
diff --git a/plugins/StatusManager/src/main.cpp b/plugins/StatusManager/src/main.cpp
index 1cbbefba36..1e6b949f1c 100644
--- a/plugins/StatusManager/src/main.cpp
+++ b/plugins/StatusManager/src/main.cpp
@@ -90,7 +90,7 @@ int OnAccChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged);
@@ -110,7 +110,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
// plugin's exit point
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
if (g_KSEnabled)
KeepStatusUnload();
diff --git a/plugins/StatusManager/src/stdafx.h b/plugins/StatusManager/src/stdafx.h
index 63c6cf83ea..dbf035fe4a 100644
--- a/plugins/StatusManager/src/stdafx.h
+++ b/plugins/StatusManager/src/stdafx.h
@@ -31,6 +31,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "commonstatus.h"
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index 5eae71c585..27a58fb800 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -128,7 +128,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
CreateServiceFunction("/RemoveTmp", (MIRANDASERVICE)RemoveTmp);
HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
@@ -147,10 +147,3 @@ extern "C" int __declspec(dllexport) Load()
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/StopSpamMod/src/stdafx.h b/plugins/StopSpamMod/src/stdafx.h
index d6ccebe6dd..6ae48751de 100755
--- a/plugins/StopSpamMod/src/stdafx.h
+++ b/plugins/StopSpamMod/src/stdafx.h
@@ -38,6 +38,8 @@ using namespace std;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern HANDLE hStopSpamLogDirH;
diff --git a/plugins/StopSpamPlus/src/stdafx.h b/plugins/StopSpamPlus/src/stdafx.h
index 7222611019..6545486713 100644
--- a/plugins/StopSpamPlus/src/stdafx.h
+++ b/plugins/StopSpamPlus/src/stdafx.h
@@ -34,6 +34,8 @@ typedef std::wstring tstring;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern char const *answeredSetting;
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index ad0d30d992..411b734f2d 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -24,7 +24,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
CreateServiceFunction(MS_STOPSPAM_CONTACTPASSED, IsContactPassed);
@@ -46,10 +46,3 @@ extern "C" int __declspec(dllexport) Load(void)
CreateServiceFunction(mi.pszService, RemoveTempContacts);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-} \ No newline at end of file
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index de48faf728..166247d4c1 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -1126,6 +1126,9 @@ struct SKINDESC
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif /* _MSGS_H */
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index 22d4ace74c..9b81d58abe 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -61,7 +61,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM,
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
if (WinVerMajor() < 5) {
MessageBox(nullptr, TranslateT("This version of TabSRMM requires Windows 2000 or later."), L"tabSRMM", MB_OK | MB_ICONERROR);
@@ -77,7 +77,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
FreeLogFonts();
Chat_Unload();
diff --git a/plugins/TipperYM/src/stdafx.h b/plugins/TipperYM/src/stdafx.h
index 68817c16cf..201f651745 100644
--- a/plugins/TipperYM/src/stdafx.h
+++ b/plugins/TipperYM/src/stdafx.h
@@ -76,6 +76,9 @@ Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern HFONT hFontTitle, hFontLabels, hFontValues, hFontTrayTitle;
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp
index 2e64843f24..5c8cd820d2 100644
--- a/plugins/TipperYM/src/tipper.cpp
+++ b/plugins/TipperYM/src/tipper.cpp
@@ -313,7 +313,7 @@ IconItem iconList[] =
{ LPGEN("Apply"), "apply", IDI_APPLY }
};
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
iCodePage = Langpack_GetDefaultCodePage();
@@ -340,7 +340,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
UnhookEvent(hSettingChangedEvent);
UnhookEvent(hEventDeleted);
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp
index 872d733ee3..cd51eb9819 100644
--- a/plugins/Toaster/src/main.cpp
+++ b/plugins/Toaster/src/main.cpp
@@ -43,7 +43,7 @@ static int OnPreShutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
if (!IsWinVer8Plus()) {
MessageBox(nullptr, TranslateT("This plugin requires Windows 8 or higher"), _T(MODULENAME), MB_OK | MB_ICONERROR);
@@ -66,10 +66,3 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/Toaster/src/stdafx.h b/plugins/Toaster/src/stdafx.h
index a5914af140..460861ee91 100644
--- a/plugins/Toaster/src/stdafx.h
+++ b/plugins/Toaster/src/stdafx.h
@@ -35,6 +35,8 @@ const wchar_t AppUserModelID[] = L"MirandaNG";
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
class ToastNotification;
diff --git a/plugins/TopToolBar/src/main.cpp b/plugins/TopToolBar/src/main.cpp
index e83a59dd08..8f5024a3f7 100644
--- a/plugins/TopToolBar/src/main.cpp
+++ b/plugins/TopToolBar/src/main.cpp
@@ -39,7 +39,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
g_plugin.registerIcon(TTB_OPTDIR, iconList, TTB_OPTDIR);
@@ -49,7 +49,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UnloadToolbarModule();
return 0;
diff --git a/plugins/TopToolBar/src/stdafx.h b/plugins/TopToolBar/src/stdafx.h
index 2cee9fefc4..44d4193d40 100644
--- a/plugins/TopToolBar/src/stdafx.h
+++ b/plugins/TopToolBar/src/stdafx.h
@@ -40,6 +40,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index 5359c976ec..b454b80c6c 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -1146,7 +1146,7 @@ static int TrafficCounterModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_OPT_INITIALISE, TrafficCounterOptInitialise);
HookEvent(ME_SYSTEM_MODULESLOADED, TrafficCounterModulesLoaded);
@@ -1161,7 +1161,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
// Удаляем шрифт.
if (Traffic_h_font) {
diff --git a/plugins/TrafficCounter/src/stdafx.h b/plugins/TrafficCounter/src/stdafx.h
index 9878720fbc..15037b21cd 100644
--- a/plugins/TrafficCounter/src/stdafx.h
+++ b/plugins/TrafficCounter/src/stdafx.h
@@ -47,6 +47,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#include "resource.h"
diff --git a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
index c68d61de93..67dc807af9 100644
--- a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
+++ b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
@@ -22,6 +22,8 @@ Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
}
g_plugin;
@@ -109,7 +111,7 @@ int OnModulesLoaded(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
CreateServiceFunction(MS_TS_SWITCHLAYOUT, ServiceSwitch);
CreateServiceFunction(MS_TS_TRANSLITLAYOUT, ServiceTranslit);
@@ -159,10 +161,3 @@ extern "C" __declspec(dllexport) int Load(void)
g_plugin.addHotkey(&hkd);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-} \ No newline at end of file
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp
index 4da5867c59..156ee338eb 100644
--- a/plugins/UserGuide/src/main.cpp
+++ b/plugins/UserGuide/src/main.cpp
@@ -65,7 +65,7 @@ static INT_PTR ShowGuideFile(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
CMenuItem mi(g_plugin);
SET_UID(mi, 0x6787c12d, 0xdc85, 0x409d, 0xaa, 0x6c, 0x1f, 0xfe, 0x5f, 0xe8, 0xc1, 0x18);
@@ -79,10 +79,3 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(mi.pszService, ShowGuideFile);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/plugins/UserGuide/src/stdafx.h b/plugins/UserGuide/src/stdafx.h
index 55f9f3cd00..f49d8e7c33 100644
--- a/plugins/UserGuide/src/stdafx.h
+++ b/plugins/UserGuide/src/stdafx.h
@@ -14,4 +14,6 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp
index ce0260655c..3203cc87a6 100644
--- a/plugins/UserInfoEx/src/init.cpp
+++ b/plugins/UserInfoEx/src/init.cpp
@@ -138,7 +138,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {
*
* @return 0
**/
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
FreeLibrary(hDwmApi);
return 0;
@@ -149,7 +149,7 @@ extern "C" int __declspec(dllexport) Unload(void)
*
* @return 0
**/
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
// init common controls
INITCOMMONCONTROLSEX ccEx;
diff --git a/plugins/UserInfoEx/src/stdafx.h b/plugins/UserInfoEx/src/stdafx.h
index 1b2fbe41cc..76d67779b0 100644
--- a/plugins/UserInfoEx/src/stdafx.h
+++ b/plugins/UserInfoEx/src/stdafx.h
@@ -161,6 +161,9 @@ unsigned int hashSettingW_M2(const char * key); //new Murma2 hash
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
typedef struct _MGLOBAL
diff --git a/plugins/Variables/src/main.cpp b/plugins/Variables/src/main.cpp
index bd65f18915..4bfff0a42d 100644
--- a/plugins/Variables/src/main.cpp
+++ b/plugins/Variables/src/main.cpp
@@ -45,7 +45,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
// Load - plugin's entry point
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
LoadVarModule();
return 0;
@@ -54,7 +54,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
// Unload - destroys plugin from memory
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UnloadVarModule();
return 0;
diff --git a/plugins/Variables/src/stdafx.h b/plugins/Variables/src/stdafx.h
index d4514659a7..ee25d7bdbd 100644
--- a/plugins/Variables/src/stdafx.h
+++ b/plugins/Variables/src/stdafx.h
@@ -73,6 +73,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#define SETTING_STARTUPTEXT "StartupText"
diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp
index 9d7cf11e40..49d25d64b8 100755
--- a/plugins/Watrack_MPD/src/init.cpp
+++ b/plugins/Watrack_MPD/src/init.cpp
@@ -64,7 +64,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_OPT_INITIALISE, WaMpdOptInit);
@@ -73,7 +73,7 @@ extern "C" __declspec(dllexport) int Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
mir_free(gbHost);
mir_free(gbPassword);
diff --git a/plugins/Watrack_MPD/src/stdafx.h b/plugins/Watrack_MPD/src/stdafx.h
index 7342704828..ac03eee33a 100755
--- a/plugins/Watrack_MPD/src/stdafx.h
+++ b/plugins/Watrack_MPD/src/stdafx.h
@@ -37,6 +37,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern HNETLIBUSER ghNetlibUser;
diff --git a/plugins/Weather/src/stdafx.h b/plugins/Weather/src/stdafx.h
index c197c848cf..a33b89e6d3 100644
--- a/plugins/Weather/src/stdafx.h
+++ b/plugins/Weather/src/stdafx.h
@@ -522,5 +522,8 @@ void ReleaseIconEx(HICON hIcon);
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp
index ae7244b902..30907b648f 100644
--- a/plugins/Weather/src/weather.cpp
+++ b/plugins/Weather/src/weather.cpp
@@ -154,7 +154,7 @@ void InitVar()
ModuleLoaded = FALSE;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
// initialize global variables
InitVar();
@@ -211,7 +211,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
// unload function
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
DestroyMwin();
DestroyWindow(hPopupWindow);
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index 91778dffe2..2c7d70ec58 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -91,7 +91,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
HookEvent(ME_CLIST_DOUBLECLICKED, Doubleclick);
@@ -251,7 +251,7 @@ extern "C" int __declspec(dllexport) Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
ChangeContactStatus(0);
diff --git a/plugins/WebView/src/webview.h b/plugins/WebView/src/webview.h
index fce570cdb1..ad69459257 100644
--- a/plugins/WebView/src/webview.h
+++ b/plugins/WebView/src/webview.h
@@ -247,4 +247,7 @@ extern HANDLE hHookAlertOSD;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index 970fb3f3ff..e97f7fcab9 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -49,7 +49,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
Log("%s", "Entering function " __FUNCTION__);
@@ -136,7 +136,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
Log("%s", "Entering function " __FUNCTION__);
diff --git a/plugins/WhenWasIt/src/stdafx.h b/plugins/WhenWasIt/src/stdafx.h
index 25dbf33929..579b5d51a5 100644
--- a/plugins/WhenWasIt/src/stdafx.h
+++ b/plugins/WhenWasIt/src/stdafx.h
@@ -66,6 +66,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern HWND hBirthdaysDlg;
diff --git a/plugins/WhoUsesMyFiles/src/stdafx.h b/plugins/WhoUsesMyFiles/src/stdafx.h
index ac78ddc54c..31370ae51b 100644
--- a/plugins/WhoUsesMyFiles/src/stdafx.h
+++ b/plugins/WhoUsesMyFiles/src/stdafx.h
@@ -116,6 +116,9 @@ BOOL del_marked(PWumf* l);
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern WUMF_OPTIONS WumfOptions;
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index 094320ad92..fce2633623 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -216,7 +216,7 @@ int InitTopToolbar(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
LoadOptions();
@@ -256,7 +256,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
KillTimer(nullptr, 777);
if (hLogger)
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp
index ec497b4be7..c9643147f5 100644
--- a/plugins/WinterSpeak/src/main.cpp
+++ b/plugins/WinterSpeak/src/main.cpp
@@ -99,7 +99,7 @@ int dialogOptionsInitialise(WPARAM wParam, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
if (!g_speak_config)
{
@@ -133,7 +133,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
UnhookEvent(g_dialog_options_initialise);
diff --git a/plugins/WinterSpeak/src/stdafx.h b/plugins/WinterSpeak/src/stdafx.h
index 8899be7c6e..ee049286e3 100644
--- a/plugins/WinterSpeak/src/stdafx.h
+++ b/plugins/WinterSpeak/src/stdafx.h
@@ -49,4 +49,7 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index 4cd7b8dd43..739ba30a83 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -232,7 +232,7 @@ static void LoadPlugins()
}
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
YAMN_STATUS = ID_STATUS_OFFLINE;
@@ -330,7 +330,7 @@ static void UnloadPlugins()
hDllPlugins = nullptr;
}
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
#ifdef _DEBUG
UnInitDebug();
diff --git a/plugins/YAMN/src/stdafx.h b/plugins/YAMN/src/stdafx.h
index 485e8bdf76..f28c1aaa21 100644
--- a/plugins/YAMN/src/stdafx.h
+++ b/plugins/YAMN/src/stdafx.h
@@ -45,6 +45,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
// From services.cpp
diff --git a/plugins/YAPP/src/stdafx.h b/plugins/YAPP/src/stdafx.h
index b36b284271..666b9ed3a3 100644
--- a/plugins/YAPP/src/stdafx.h
+++ b/plugins/YAPP/src/stdafx.h
@@ -45,6 +45,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern bool bShutdown;
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp
index 6696c73895..28b10abc35 100644
--- a/plugins/YAPP/src/yapp.cpp
+++ b/plugins/YAPP/src/yapp.cpp
@@ -207,7 +207,7 @@ static int PreShutdown(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
InitMessagePump();
InitOptions();
@@ -223,7 +223,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
DeleteObject(hFontFirstLine);
DeleteObject(hFontSecondLine);
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index fc0d6978e6..f2099a12b5 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -213,7 +213,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
// Load plugin options from DB
hForwardFrom = (MCONTACT)db_get_dw(NULL, MODULENAME, "ForwardFrom", 0);
@@ -240,10 +240,3 @@ extern "C" int __declspec(dllexport) Load()
HookEvent(ME_PROTO_ACK, ProtoAck);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/plugins/YARelay/src/stdafx.h b/plugins/YARelay/src/stdafx.h
index 1b9d3ae627..85acbb020a 100644
--- a/plugins/YARelay/src/stdafx.h
+++ b/plugins/YARelay/src/stdafx.h
@@ -51,6 +51,8 @@ Features:
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
extern MCONTACT hForwardFrom, hForwardTo;
diff --git a/plugins/ZeroSwitch/src/ZeroSwitch.cpp b/plugins/ZeroSwitch/src/ZeroSwitch.cpp
index f51bb04b17..95e2e84e1b 100644
--- a/plugins/ZeroSwitch/src/ZeroSwitch.cpp
+++ b/plugins/ZeroSwitch/src/ZeroSwitch.cpp
@@ -6,6 +6,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
}
g_plugin;
@@ -131,7 +134,7 @@ LRESULT CALLBACK CallWndRetProc(int nCode, WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
if (IsWinVerVistaPlus()) {
MessageBox(nullptr, TranslateT("Plugin works under Windows XP only"), TranslateT("ZeroSwitch plugin failed"), MB_ICONSTOP);
@@ -147,7 +150,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
if (hHook)
UnhookWindowsHookEx(hHook);
diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp
index 62640c1a58..44c04969cb 100644
--- a/plugins/mTextControl/src/main.cpp
+++ b/plugins/mTextControl/src/main.cpp
@@ -50,7 +50,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
MyCreateTextServices = nullptr;
hMsfteditDll = LoadLibrary(L"msftedit.dll");
@@ -67,7 +67,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
UnloadTextUsers();
UnloadRichEdit();
diff --git a/plugins/mTextControl/src/stdafx.h b/plugins/mTextControl/src/stdafx.h
index b9ddc388dc..2edf57f236 100644
--- a/plugins/mTextControl/src/stdafx.h
+++ b/plugins/mTextControl/src/stdafx.h
@@ -57,6 +57,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif // __headers_h__
diff --git a/plugins/wbOSD/src/main.cpp b/plugins/wbOSD/src/main.cpp
index 5126bd6dfe..3539f32de0 100644
--- a/plugins/wbOSD/src/main.cpp
+++ b/plugins/wbOSD/src/main.cpp
@@ -38,7 +38,7 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
logmsg("Load");
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
@@ -47,7 +47,7 @@ extern "C" __declspec(dllexport) int Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload()
+int CMPlugin::Unload()
{
logmsg("Unload");
diff --git a/plugins/wbOSD/src/stdafx.h b/plugins/wbOSD/src/stdafx.h
index 1355f3787d..4a22046169 100644
--- a/plugins/wbOSD/src/stdafx.h
+++ b/plugins/wbOSD/src/stdafx.h
@@ -31,6 +31,9 @@ Distributed under GNU's GPL 2 or later
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
// Settings defaults
diff --git a/protocols/Discord/src/main.cpp b/protocols/Discord/src/main.cpp
index 1dc83a4ce3..5d4841e977 100644
--- a/protocols/Discord/src/main.cpp
+++ b/protocols/Discord/src/main.cpp
@@ -56,7 +56,7 @@ IconItem g_iconList[] =
{ LPGEN("Group chats"), "groupchat", IDI_GROUPCHAT }
};
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
g_hwndHeartbeat = CreateWindowEx(0, L"STATIC", nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
@@ -67,7 +67,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
// Unload
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
DestroyWindow(g_hwndHeartbeat);
return 0;
diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h
index c47875950f..502f52fb2f 100644
--- a/protocols/Discord/src/proto.h
+++ b/protocols/Discord/src/proto.h
@@ -365,4 +365,7 @@ public:
struct CMPlugin : public ACCPROTOPLUGIN<CDiscordProto>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/protocols/Dummy/src/dummy.h b/protocols/Dummy/src/dummy.h
index 2dd22bc769..cca1f81fbb 100644
--- a/protocols/Dummy/src/dummy.h
+++ b/protocols/Dummy/src/dummy.h
@@ -71,4 +71,6 @@ static const ttemplate templates[] =
struct CMPlugin : public ACCPROTOPLUGIN<CDummyProto>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp
index 999d3f8b41..57af4a2723 100644
--- a/protocols/Dummy/src/main.cpp
+++ b/protocols/Dummy/src/main.cpp
@@ -59,21 +59,13 @@ static int OnModulesLoaded(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
// OnLoad - initialize the plugin instance
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
-// Unload - destroy the plugin instance
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
// stubs for obsoleted protocols
struct CMPluginAim : public ACCPROTOPLUGIN<CDummyProto>
diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp
index 6c02c60c61..61e215590c 100644
--- a/protocols/EmLanProto/src/amdproto.cpp
+++ b/protocols/EmLanProto/src/amdproto.cpp
@@ -327,7 +327,7 @@ INT_PTR CALLBACK EMPDlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
return FALSE;
}
-extern "C" int __declspec(dllexport) __cdecl Load()
+int CMPlugin::Load()
{
g_lan = new CMLan();
@@ -356,7 +356,7 @@ extern "C" int __declspec(dllexport) __cdecl Load()
return 0;
}
-extern "C" int __declspec(dllexport) __cdecl Unload()
+int CMPlugin::Unload()
{
delete g_lan;
return 0;
diff --git a/protocols/EmLanProto/src/stdafx.h b/protocols/EmLanProto/src/stdafx.h
index 30aca9c8a4..d39315933e 100644
--- a/protocols/EmLanProto/src/stdafx.h
+++ b/protocols/EmLanProto/src/stdafx.h
@@ -28,6 +28,9 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
//#define VERBOSE
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp
index 97d57a5c4c..03ac7db7d1 100644
--- a/protocols/FacebookRM/src/main.cpp
+++ b/protocols/FacebookRM/src/main.cpp
@@ -56,7 +56,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
/////////////////////////////////////////////////////////////////////////////////////////
// Load
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
InitIcons();
InitContactMenus();
@@ -79,11 +79,3 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Unload
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h
index 7583c2e43e..48a8c22ee7 100644
--- a/protocols/FacebookRM/src/proto.h
+++ b/protocols/FacebookRM/src/proto.h
@@ -290,4 +290,6 @@ public:
struct CMPlugin : public ACCPROTOPLUGIN<FacebookProto>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index aaf4e792b8..848f5ba2f0 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -295,7 +295,7 @@ void GaduProto::OnBuildProtoMenu()
//////////////////////////////////////////////////////////
// When plugin is loaded
//
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, gg_modulesloaded);
@@ -306,7 +306,7 @@ extern "C" int __declspec(dllexport) Load(void)
//////////////////////////////////////////////////////////
// When plugin is unloaded
//
-extern "C" int __declspec(dllexport) Unload()
+int CMPlugin::Unload()
{
WSACleanup();
return 0;
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h
index b77a27aee0..ada0efe1d8 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.h
+++ b/protocols/Gadu-Gadu/src/gg_proto.h
@@ -316,6 +316,9 @@ void crc_gentable(void);
struct CMPlugin : public ACCPROTOPLUGIN<GaduProto>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif
diff --git a/protocols/ICQCorp/src/corp.cpp b/protocols/ICQCorp/src/corp.cpp
index 497037cf06..aa7a241ec0 100644
--- a/protocols/ICQCorp/src/corp.cpp
+++ b/protocols/ICQCorp/src/corp.cpp
@@ -59,7 +59,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
///////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load()
+int CMPlugin::Load()
{
CMStringA szDescr(FORMAT, "%s connection", protoName);
NETLIBUSER nlu = {};
@@ -74,7 +74,7 @@ extern "C" __declspec(dllexport) int Load()
///////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload()
+int CMPlugin::Unload()
{
UnloadServices();
return 0;
diff --git a/protocols/ICQCorp/src/stdafx.h b/protocols/ICQCorp/src/stdafx.h
index 215bb0a9dc..f32175904f 100644
--- a/protocols/ICQCorp/src/stdafx.h
+++ b/protocols/ICQCorp/src/stdafx.h
@@ -60,4 +60,7 @@ extern int UnloadServices();
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/protocols/IRCG/src/ircproto.h b/protocols/IRCG/src/ircproto.h
index bc7c19d6b7..473ec06359 100644
--- a/protocols/IRCG/src/ircproto.h
+++ b/protocols/IRCG/src/ircproto.h
@@ -421,6 +421,9 @@ private:
struct CMPlugin : public ACCPROTOPLUGIN<CIrcProto>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif // _IRCPROTO_H_
diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp
index 086cb11dd3..e6061eb2bf 100644
--- a/protocols/IRCG/src/main.cpp
+++ b/protocols/IRCG/src/main.cpp
@@ -64,7 +64,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
InitIcons();
InitServers();
@@ -74,7 +74,7 @@ extern "C" int __declspec(dllexport) Load()
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UninitContactMenus();
UninitTimers();
diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h
index aae9dead64..b3d7939aab 100644
--- a/protocols/IcqOscarJ/src/icq_proto.h
+++ b/protocols/IcqOscarJ/src/icq_proto.h
@@ -898,6 +898,9 @@ struct CIcqProto : public PROTO<CIcqProto>
struct CMPlugin : public ACCPROTOPLUGIN<CIcqProto>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp
index 40edf08637..ccb1819c35 100644
--- a/protocols/IcqOscarJ/src/init.cpp
+++ b/protocols/IcqOscarJ/src/init.cpp
@@ -73,7 +73,7 @@ IconItem iconList[] =
{ LPGEN("Expand string edit"), "ICO_EXPANDSTRINGEDIT", IDI_EXPANDSTRINGEDIT }
};
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
srand(time(0));
_tzset();
@@ -99,7 +99,7 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
// destroying contact menu
g_MenuUninit();
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index 556a479c96..5f57a3bedd 100755
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -148,7 +148,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
///////////////////////////////////////////////////////////////////////////////
// OnLoad - initialize the plugin instance
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
char mirVer[100];
Miranda_GetVersionText(mirVer, _countof(mirVer));
@@ -176,7 +176,7 @@ extern "C" int __declspec(dllexport) Load()
///////////////////////////////////////////////////////////////////////////////
// Unload - destroy the plugin instance
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
g_XstatusIconsUninit();
JabberUserInfoUninit();
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h
index d58e95d5b0..614dd0dcb7 100755
--- a/protocols/JabberG/src/stdafx.h
+++ b/protocols/JabberG/src/stdafx.h
@@ -113,6 +113,9 @@ struct CJabberProto;
struct CMPlugin : public ACCPROTOPLUGIN<CJabberProto>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
class CJabberDlgBase : public CProtoDlgBase<CJabberProto>
diff --git a/protocols/MRA/src/Mra.cpp b/protocols/MRA/src/Mra.cpp
index afc0564e7b..f2ab1ca447 100644
--- a/protocols/MRA/src/Mra.cpp
+++ b/protocols/MRA/src/Mra.cpp
@@ -39,7 +39,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
///////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
IconsLoad();
InitXStatusIcons();
@@ -48,7 +48,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" __declspec(dllexport) int Unload(void)
+int CMPlugin::Unload()
{
DestroyXStatusIcons();
if (g_hDLLXStatusIcons) {
diff --git a/protocols/MRA/src/MraProto.h b/protocols/MRA/src/MraProto.h
index 0221580d3f..c1559de6ec 100644
--- a/protocols/MRA/src/MraProto.h
+++ b/protocols/MRA/src/MraProto.h
@@ -343,4 +343,7 @@ struct CMraProto : public PROTO<CMraProto>
struct CMPlugin : public ACCPROTOPLUGIN<CMraProto>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp
index 2dc0977d74..89c38531ae 100644
--- a/protocols/MSN/src/msn.cpp
+++ b/protocols/MSN/src/msn.cpp
@@ -80,7 +80,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
// Performs a primary set of actions upon plugin loading
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
@@ -92,7 +92,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
// Unload a plugin
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
MSN_RemoveContactMenus();
MsnLinks_Destroy();
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h
index b88e4020bc..33851a20b0 100644
--- a/protocols/MSN/src/msn_proto.h
+++ b/protocols/MSN/src/msn_proto.h
@@ -470,6 +470,9 @@ struct CMsnProto : public PROTO<CMsnProto>
struct CMPlugin : public ACCPROTOPLUGIN<CMsnProto>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif
diff --git a/protocols/MinecraftDynmap/src/main.cpp b/protocols/MinecraftDynmap/src/main.cpp
index 268c8c1734..3468294e18 100644
--- a/protocols/MinecraftDynmap/src/main.cpp
+++ b/protocols/MinecraftDynmap/src/main.cpp
@@ -55,7 +55,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCO
static HANDLE g_hEvents[1];
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
InitIcons();
@@ -80,7 +80,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
// Unload
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
for (size_t i=0; i < _countof(g_hEvents); i++)
UnhookEvent(g_hEvents[i]);
diff --git a/protocols/MinecraftDynmap/src/proto.h b/protocols/MinecraftDynmap/src/proto.h
index b6d7bc9273..811a22ec74 100644
--- a/protocols/MinecraftDynmap/src/proto.h
+++ b/protocols/MinecraftDynmap/src/proto.h
@@ -130,4 +130,7 @@ public:
struct CMPlugin : public ACCPROTOPLUGIN<MinecraftDynmapProto>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp
index 51e4a2800a..3a41e407a4 100644
--- a/protocols/Omegle/src/main.cpp
+++ b/protocols/Omegle/src/main.cpp
@@ -58,7 +58,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
/////////////////////////////////////////////////////////////////////////////////////////
// Load
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
InitIcons();
@@ -84,11 +84,3 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Unload
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/protocols/Omegle/src/proto.h b/protocols/Omegle/src/proto.h
index d36c1862bf..f9b2f814a7 100644
--- a/protocols/Omegle/src/proto.h
+++ b/protocols/Omegle/src/proto.h
@@ -105,4 +105,6 @@ public:
struct CMPlugin : public ACCPROTOPLUGIN<OmegleProto>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp
index 43ab40c2f8..15bbcd4357 100644
--- a/protocols/Sametime/src/sametime.cpp
+++ b/protocols/Sametime/src/sametime.cpp
@@ -229,13 +229,3 @@ void CSametimeProto::BroadcastNewStatus(int iNewStatus)
m_iStatus = iNewStatus;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)previous_status, m_iStatus);
}
-
-extern "C" int __declspec(dllexport) Load(void)
-{
- return 0;
-}
-
-extern "C" int __declspec(dllexport) Unload()
-{
- return 0;
-}
diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp
index cb8fe9e898..98d99e4d67 100644
--- a/protocols/SkypeWeb/src/main.cpp
+++ b/protocols/SkypeWeb/src/main.cpp
@@ -59,7 +59,7 @@ int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
Miranda_GetVersionText(g_szMirVer, sizeof(g_szMirVer));
@@ -79,7 +79,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
DestroyHookableEvent(g_hCallEvent);
return 0;
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index 43db460dfe..8c8aa6c442 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -422,6 +422,9 @@ private:
struct CMPlugin : public ACCPROTOPLUGIN<CSkypeProto>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
#endif //_SKYPE_PROTO_H_ \ No newline at end of file
diff --git a/protocols/Steam/src/main.cpp b/protocols/Steam/src/main.cpp
index e42ef84bd4..223b422ca0 100644
--- a/protocols/Steam/src/main.cpp
+++ b/protocols/Steam/src/main.cpp
@@ -32,7 +32,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
char iconName[100];
mir_snprintf(iconName, "%s_%s", MODULE, "gaming");
@@ -44,10 +44,3 @@ extern "C" int __declspec(dllexport) Load(void)
CSteamProto::InitMenus();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h
index 39c1b7a2be..9fe393f51b 100644
--- a/protocols/Steam/src/steam_proto.h
+++ b/protocols/Steam/src/steam_proto.h
@@ -277,6 +277,8 @@ protected:
struct CMPlugin : public ACCPROTOPLUGIN<CSteamProto>
{
CMPlugin();
+
+ int Load() override;
};
int OnReloadIcons(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/Tox/src/main.cpp b/protocols/Tox/src/main.cpp
index 329f6ffb51..219c7a07c6 100644
--- a/protocols/Tox/src/main.cpp
+++ b/protocols/Tox/src/main.cpp
@@ -46,15 +46,8 @@ int OnModulesLoaded(WPARAM, LPARAM)
return 0;
}
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h
index 5af4c0bddf..37028045e9 100644
--- a/protocols/Tox/src/tox_proto.h
+++ b/protocols/Tox/src/tox_proto.h
@@ -249,6 +249,8 @@ private:
struct CMPlugin : public ACCPROTOPLUGIN<CToxProto>
{
CMPlugin();
+
+ int Load() override;
};
#endif //_TOX_PROTO_H_ \ No newline at end of file
diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp
index 7069d21bd3..459afe6478 100644
--- a/protocols/Twitter/src/main.cpp
+++ b/protocols/Twitter/src/main.cpp
@@ -52,18 +52,10 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
/////////////////////////////////////////////////////////////////////////////////////////
// Load
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
InitIcons();
InitContactMenus();
TwitterInitSounds();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Unload
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h
index fe84da9742..5aead06280 100644
--- a/protocols/Twitter/src/proto.h
+++ b/protocols/Twitter/src/proto.h
@@ -130,6 +130,8 @@ private:
struct CMPlugin : public ACCPROTOPLUGIN<TwitterProto>
{
CMPlugin();
+
+ int Load() override;
};
// TODO: remove this
diff --git a/protocols/VKontakte/src/main.cpp b/protocols/VKontakte/src/main.cpp
index d267ede49a..bf375bbd98 100644
--- a/protocols/VKontakte/src/main.cpp
+++ b/protocols/VKontakte/src/main.cpp
@@ -49,16 +49,8 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
/////////////////////////////////////////////////////////////////////////////////////////
// OnLoad - initialize the plugin instance
-extern "C" int __declspec(dllexport) Load()
+int CMPlugin::Load()
{
InitIcons();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Unload - destroy the plugin instance
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index e1e032e5b9..b0f82112f0 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -404,4 +404,6 @@ private:
struct CMPlugin : public ACCPROTOPLUGIN<CVkProto>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/src/core/stdautoaway/src/main.cpp b/src/core/stdautoaway/src/main.cpp
index 51ce693ead..08cb2a891c 100644
--- a/src/core/stdautoaway/src/main.cpp
+++ b/src/core/stdautoaway/src/main.cpp
@@ -50,15 +50,8 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_AUTOAW
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
LoadAutoAwayModule();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/src/core/stdautoaway/src/stdafx.h b/src/core/stdautoaway/src/stdafx.h
index 0587b8148c..6c55b9c1b5 100644
--- a/src/core/stdautoaway/src/stdafx.h
+++ b/src/core/stdautoaway/src/stdafx.h
@@ -70,4 +70,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/src/core/stdaway/src/main.cpp b/src/core/stdaway/src/main.cpp
index f67eefefe2..0efb65c767 100644
--- a/src/core/stdaway/src/main.cpp
+++ b/src/core/stdaway/src/main.cpp
@@ -50,15 +50,8 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
LoadAwayMsgModule();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/src/core/stdaway/src/stdafx.h b/src/core/stdaway/src/stdafx.h
index 3f7ba051e1..89f9b34e02 100644
--- a/src/core/stdaway/src/stdafx.h
+++ b/src/core/stdaway/src/stdafx.h
@@ -71,4 +71,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp
index 6d86619ed9..046273e99d 100644
--- a/src/core/stdclist/src/init.cpp
+++ b/src/core/stdclist/src/init.cpp
@@ -130,15 +130,7 @@ extern "C" __declspec(dllexport) int CListInitialise()
/////////////////////////////////////////////////////////////////////////////////////////
// a plugin loader aware of CList exports will never call this.
-extern "C" __declspec(dllexport) int Load(void)
+int CMPlugin::Load()
{
return 1;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// a plugin unloader
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/src/core/stdclist/src/stdafx.h b/src/core/stdclist/src/stdafx.h
index f42349b00f..d79f6931ed 100644
--- a/src/core/stdclist/src/stdafx.h
+++ b/src/core/stdclist/src/stdafx.h
@@ -59,6 +59,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
// shared vars
diff --git a/src/core/stdcrypt/src/main.cpp b/src/core/stdcrypt/src/main.cpp
index 59c390c3f3..f0677e5f6f 100644
--- a/src/core/stdcrypt/src/main.cpp
+++ b/src/core/stdcrypt/src/main.cpp
@@ -49,14 +49,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_CRYPTO
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
return LoadEncryptionModule();
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/src/core/stdcrypt/src/stdafx.h b/src/core/stdcrypt/src/stdafx.h
index 8cc54ff399..d7138bd206 100644
--- a/src/core/stdcrypt/src/stdafx.h
+++ b/src/core/stdcrypt/src/stdafx.h
@@ -70,6 +70,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
bool getRandomBytes(BYTE *buf, size_t bufLen);
diff --git a/src/core/stdemail/src/main.cpp b/src/core/stdemail/src/main.cpp
index dd9c3ae081..abab7cbeff 100644
--- a/src/core/stdemail/src/main.cpp
+++ b/src/core/stdemail/src/main.cpp
@@ -50,15 +50,8 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SREMAI
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
LoadSendRecvEMailModule();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/src/core/stdemail/src/stdafx.h b/src/core/stdemail/src/stdafx.h
index aa4037b703..3ffcb003b8 100644
--- a/src/core/stdemail/src/stdafx.h
+++ b/src/core/stdemail/src/stdafx.h
@@ -67,4 +67,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/src/core/stdfile/src/main.cpp b/src/core/stdfile/src/main.cpp
index b4b4146518..d979ecc4a5 100644
--- a/src/core/stdfile/src/main.cpp
+++ b/src/core/stdfile/src/main.cpp
@@ -52,7 +52,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRFILE
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
if ( IsWinVer7Plus())
CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_ALL, IID_ITaskbarList3, (void**)&pTaskbarInterface);
@@ -63,7 +63,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
if (pTaskbarInterface)
pTaskbarInterface->Release();
diff --git a/src/core/stdfile/src/stdafx.h b/src/core/stdfile/src/stdafx.h
index d763d8ae9a..a55763d694 100644
--- a/src/core/stdfile/src/stdafx.h
+++ b/src/core/stdfile/src/stdafx.h
@@ -77,6 +77,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
extern ITaskbarList3 * pTaskbarInterface;
diff --git a/src/core/stdidle/src/main.cpp b/src/core/stdidle/src/main.cpp
index 747808bb8e..a77bcba4d3 100644
--- a/src/core/stdidle/src/main.cpp
+++ b/src/core/stdidle/src/main.cpp
@@ -51,7 +51,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_IDLE,
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
LoadIdleModule();
return 0;
@@ -59,7 +59,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UnloadIdleModule();
return 0;
diff --git a/src/core/stdidle/src/stdafx.h b/src/core/stdidle/src/stdafx.h
index e313a5d426..1efc351565 100644
--- a/src/core/stdidle/src/stdafx.h
+++ b/src/core/stdidle/src/stdafx.h
@@ -70,6 +70,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
struct Settings
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp
index d5004f291b..97df9cbdbf 100644
--- a/src/core/stdmsg/src/srmm.cpp
+++ b/src/core/stdmsg/src/srmm.cpp
@@ -50,7 +50,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM,
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
Load_ChatModule();
return LoadSendRecvMessageModule();
@@ -58,7 +58,7 @@ extern "C" int __declspec(dllexport) Load(void)
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
SplitmsgShutdown();
Unload_ChatModule();
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index d0f0f8ae3f..c73b0314b0 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -109,6 +109,9 @@ struct GlobalLogSettings : public GlobalLogSettingsBase
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/stdssl/src/main.cpp b/src/core/stdssl/src/main.cpp
index d80db3e488..ebf2b31905 100644
--- a/src/core/stdssl/src/main.cpp
+++ b/src/core/stdssl/src/main.cpp
@@ -45,12 +45,12 @@ CMPlugin::CMPlugin() :
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SSL, MIID_LAST };
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
return LoadSslModule();
}
-extern "C" int __declspec(dllexport) Unload(void)
+int CMPlugin::Unload()
{
UnloadSslModule();
return 0;
diff --git a/src/core/stdssl/src/stdafx.h b/src/core/stdssl/src/stdafx.h
index 8f875605f0..44b21097ba 100644
--- a/src/core/stdssl/src/stdafx.h
+++ b/src/core/stdssl/src/stdafx.h
@@ -43,4 +43,7 @@ typedef struct SslHandle *HSSL;
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
+ int Unload() override;
};
diff --git a/src/core/stduihist/src/main.cpp b/src/core/stduihist/src/main.cpp
index 1f5eeae95f..45d183f263 100644
--- a/src/core/stduihist/src/main.cpp
+++ b/src/core/stduihist/src/main.cpp
@@ -50,15 +50,8 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHIST
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
LoadHistoryModule();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/src/core/stduihist/src/stdafx.h b/src/core/stduihist/src/stdafx.h
index 5dfae67b52..71003a491e 100644
--- a/src/core/stduihist/src/stdafx.h
+++ b/src/core/stduihist/src/stdafx.h
@@ -67,6 +67,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
#pragma comment(lib, "version.lib")
diff --git a/src/core/stduserinfo/src/main.cpp b/src/core/stduserinfo/src/main.cpp
index cefc32e91d..bfc375e5a8 100644
--- a/src/core/stduserinfo/src/main.cpp
+++ b/src/core/stduserinfo/src/main.cpp
@@ -50,15 +50,8 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIUSER
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
LoadUserInfoModule();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/src/core/stduserinfo/src/stdafx.h b/src/core/stduserinfo/src/stdafx.h
index e73f080e88..6c6a24b279 100644
--- a/src/core/stduserinfo/src/stdafx.h
+++ b/src/core/stduserinfo/src/stdafx.h
@@ -71,4 +71,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};
diff --git a/src/core/stduseronline/src/main.cpp b/src/core/stduseronline/src/main.cpp
index 4794c2dc21..9bf49e3ffd 100644
--- a/src/core/stduseronline/src/main.cpp
+++ b/src/core/stduseronline/src/main.cpp
@@ -50,15 +50,8 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_USERON
/////////////////////////////////////////////////////////////////////////////////////////
-extern "C" int __declspec(dllexport) Load(void)
+int CMPlugin::Load()
{
LoadUserOnlineModule();
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- return 0;
-}
diff --git a/src/core/stduseronline/src/stdafx.h b/src/core/stduseronline/src/stdafx.h
index aa1da528da..67c57474ef 100644
--- a/src/core/stduseronline/src/stdafx.h
+++ b/src/core/stduseronline/src/stdafx.h
@@ -69,4 +69,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+
+ int Load() override;
};