diff options
29 files changed, 8 insertions, 63 deletions
diff --git a/include/newpluginapi.h b/include/newpluginapi.h index fc1344030c..278b9192e4 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -331,13 +331,6 @@ template<class T> class PLUGIN : public CMPluginBase {
typedef CMPluginBase CSuper;
-public:
- static BOOL WINAPI RawDllMain(HINSTANCE hInstance, DWORD, LPVOID)
- {
- g_plugin.setInst(hInstance);
- return TRUE;
- }
-
protected:
PLUGIN(const char *moduleName)
: CSuper(moduleName)
@@ -420,4 +413,12 @@ public: template<class P>
OBJLIST<P> ACCPROTOPLUGIN<P>::g_arInstances(1, PtrKeySortT);
+#ifndef __NO_CMPLUGIN_NEEDED
+#ifdef _DEBUG
+#pragma comment(lib, "cmstubd.lib")
+#else
+#pragma comment(lib, "cmstub.lib")
+#endif
+#endif
+
#endif // M_NEWPLUGINAPI_H__
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp index 7b2c7b0fd7..46b95320dc 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -62,8 +62,6 @@ extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index c3add00af0..c38139c9b8 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -45,8 +45,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
INT_PTR GetCaps(WPARAM wParam, LPARAM)
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index ef35101dbc..b893f7ce50 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -90,8 +90,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp index 548621b96f..c4eb978981 100644 --- a/plugins/NewsAggregator/Src/NewsAggregator.cpp +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -51,8 +51,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 1a10038b7c..d719ae38f8 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -86,8 +86,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 0c26e4f717..181f36d14e 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -279,8 +279,6 @@ inline int Quotes_UnhookEvent(HANDLE h) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
EXTERN_C __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/StartPosition/src/main.cpp b/plugins/StartPosition/src/main.cpp index c4bab80218..36705787a5 100644 --- a/plugins/StartPosition/src/main.cpp +++ b/plugins/StartPosition/src/main.cpp @@ -48,8 +48,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp index 55c5b92c25..3920685b73 100644 --- a/plugins/Weather/src/weather.cpp +++ b/plugins/Weather/src/weather.cpp @@ -61,8 +61,6 @@ HANDLE hTBButton = nullptr; CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
// plugin info
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index 4a99ab3cd4..303a58a03b 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -88,8 +88,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load()
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 53ff5dbf6a..41acfb6955 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -71,8 +71,6 @@ static void GetProfileDirectory(wchar_t *szPath, int cbPath) CMPlugin g_plugin; -extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; - ///////////////////////////////////////////////////////////////////////////////////////// extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; diff --git a/protocols/Discord/src/main.cpp b/protocols/Discord/src/main.cpp index c0c06bb5cc..1d9c337cfc 100644 --- a/protocols/Discord/src/main.cpp +++ b/protocols/Discord/src/main.cpp @@ -43,8 +43,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin; -extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; - ///////////////////////////////////////////////////////////////////////////////////////// // Interface information diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp index f412e49ce5..c6d09c558d 100644 --- a/protocols/Dummy/src/main.cpp +++ b/protocols/Dummy/src/main.cpp @@ -76,8 +76,6 @@ extern "C" int __declspec(dllexport) Unload(void) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
// stubs for obsoleted protocols
diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp index 4e5db0990e..0cf4329081 100644 --- a/protocols/EmLanProto/src/amdproto.cpp +++ b/protocols/EmLanProto/src/amdproto.cpp @@ -5,8 +5,6 @@ CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
//////////////////////////////////////////////////////////////////////////
CMLan* g_lan = nullptr;
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp index c8b764ba09..fb4d363bca 100644 --- a/protocols/FacebookRM/src/main.cpp +++ b/protocols/FacebookRM/src/main.cpp @@ -50,8 +50,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
// Interface information
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 37491551bc..f718313224 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -48,8 +48,6 @@ static unsigned long crc_table[256]; CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
//////////////////////////////////////////////////////////
// Extra winsock function for error description
//
diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index af7f13d4b5..95e23fafa6 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -60,8 +60,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp index 3f6a516c70..8413b762cc 100644 --- a/protocols/IcqOscarJ/src/init.cpp +++ b/protocols/IcqOscarJ/src/init.cpp @@ -59,8 +59,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
int ModuleLoad(WPARAM, LPARAM)
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index aef6f638ac..670e03d1b8 100755 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -61,8 +61,6 @@ bool bSecureIM, bMirOTR, bNewGPG, bPlatform; CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
PLUGININFOEX pluginInfo = {
diff --git a/protocols/MRA/src/Mra.cpp b/protocols/MRA/src/Mra.cpp index 46e06b3be9..8c9c139e3b 100644 --- a/protocols/MRA/src/Mra.cpp +++ b/protocols/MRA/src/Mra.cpp @@ -35,8 +35,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp index 703df9323c..5f3a7f58be 100644 --- a/protocols/MSN/src/msn.cpp +++ b/protocols/MSN/src/msn.cpp @@ -67,8 +67,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
// OnModulesLoaded - finalizes plugin's configuration on load
diff --git a/protocols/MinecraftDynmap/src/main.cpp b/protocols/MinecraftDynmap/src/main.cpp index d0edbe2b34..8261f02e37 100644 --- a/protocols/MinecraftDynmap/src/main.cpp +++ b/protocols/MinecraftDynmap/src/main.cpp @@ -45,8 +45,6 @@ PLUGININFOEX pluginInfo = { CMPlugin g_plugin; -extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; - ///////////////////////////////////////////////////////////////////////////// extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp index ce2dbcfa74..d2d0559529 100644 --- a/protocols/Omegle/src/main.cpp +++ b/protocols/Omegle/src/main.cpp @@ -53,8 +53,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
// Interface information
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index 3c67736302..27e0d2e08e 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -29,8 +29,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp index 1b358e0651..d606d7d593 100644 --- a/protocols/SkypeWeb/src/main.cpp +++ b/protocols/SkypeWeb/src/main.cpp @@ -46,8 +46,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/Steam/src/main.cpp b/protocols/Steam/src/main.cpp index 2bf3ee3bdc..94a6915805 100644 --- a/protocols/Steam/src/main.cpp +++ b/protocols/Steam/src/main.cpp @@ -27,8 +27,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/Tox/src/main.cpp b/protocols/Tox/src/main.cpp index 1b4c10f526..e38e972025 100644 --- a/protocols/Tox/src/main.cpp +++ b/protocols/Tox/src/main.cpp @@ -28,8 +28,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin; -extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; - ///////////////////////////////////////////////////////////////////////////////////////// extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp index 94dd556b24..655cb2e4c7 100644 --- a/protocols/Twitter/src/main.cpp +++ b/protocols/Twitter/src/main.cpp @@ -48,8 +48,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/VKontakte/src/main.cpp b/protocols/VKontakte/src/main.cpp index d87612bf7b..bb64d07bc5 100644 --- a/protocols/VKontakte/src/main.cpp +++ b/protocols/VKontakte/src/main.cpp @@ -44,8 +44,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) CMPlugin g_plugin;
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
|