summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-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
37 files changed, 76 insertions, 93 deletions
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;
};