From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- src/core/stdautoaway/src/autoaway.cpp | 6 +++--- src/core/stdautoaway/src/main.cpp | 18 +++++++++++++++--- src/core/stdautoaway/src/stdafx.h | 6 ++---- src/core/stdaway/src/main.cpp | 18 +++++++++++++++--- src/core/stdaway/src/stdafx.h | 4 +--- src/core/stdclist/src/init.cpp | 10 +++++++--- src/core/stdclist/src/stdafx.h | 4 +--- src/core/stdcrypt/src/main.cpp | 18 +++++++++++++++--- src/core/stdcrypt/src/stdafx.h | 4 +--- src/core/stdemail/src/main.cpp | 18 +++++++++++++++--- src/core/stdemail/src/stdafx.h | 4 +--- src/core/stdfile/src/main.cpp | 18 +++++++++++++++--- src/core/stdfile/src/stdafx.h | 4 +--- src/core/stdidle/src/main.cpp | 18 +++++++++++++++--- src/core/stdidle/src/options.cpp | 2 +- src/core/stdidle/src/stdafx.h | 30 ++++++++++++++---------------- src/core/stdmsg/src/srmm.cpp | 18 +++++++++++++++--- src/core/stdmsg/src/stdafx.h | 4 +--- src/core/stdssl/src/main.cpp | 10 +++++++--- src/core/stdssl/src/stdafx.h | 4 +--- src/core/stduihist/src/main.cpp | 18 +++++++++++++++--- src/core/stduihist/src/stdafx.h | 4 +--- src/core/stduserinfo/src/main.cpp | 18 +++++++++++++++--- src/core/stduserinfo/src/stdafx.h | 4 +--- src/core/stduseronline/src/main.cpp | 18 +++++++++++++++--- src/core/stduseronline/src/stdafx.h | 4 +--- 26 files changed, 194 insertions(+), 90 deletions(-) (limited to 'src/core') diff --git a/src/core/stdautoaway/src/autoaway.cpp b/src/core/stdautoaway/src/autoaway.cpp index c5cf316d36..b926c740f2 100644 --- a/src/core/stdautoaway/src/autoaway.cpp +++ b/src/core/stdautoaway/src/autoaway.cpp @@ -71,16 +71,16 @@ static int AutoAwayEvent(WPARAM, LPARAM lParam) continue; // save old status of account and set to given status - db_set_w(NULL, AA_MODULE, pa->szModuleName, pa->iRealStatus); + db_set_w(NULL, MODULENAME, pa->szModuleName, pa->iRealStatus); Proto_SetStatus(pa->szModuleName, status); } else { - int oldstatus = db_get_w(NULL, AA_MODULE, pa->szModuleName, 0); + int oldstatus = db_get_w(NULL, MODULENAME, pa->szModuleName, 0); if (oldstatus != ID_STATUS_ONLINE && oldstatus != ID_STATUS_FREECHAT) continue; // returning from idle and this accout was set away, set it back - db_unset(NULL, AA_MODULE, pa->szModuleName); + db_unset(NULL, MODULENAME, pa->szModuleName); if (!mii.aaLock) Proto_SetStatus(pa->szModuleName, oldstatus); } diff --git a/src/core/stdautoaway/src/main.cpp b/src/core/stdautoaway/src/main.cpp index e3270fd02d..bc5d1d89ea 100644 --- a/src/core/stdautoaway/src/main.cpp +++ b/src/core/stdautoaway/src/main.cpp @@ -26,7 +26,9 @@ int LoadAutoAwayModule(void); CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = { { 0x9f5ca736, 0x1108, 0x4872, {0xbe, 0xc3, 0x19, 0xc8, 0x4b, 0xc2, 0x14, 0x3b}} }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_AUTOAWAY, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); 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 d785f0f238..0587b8148c 100644 --- a/src/core/stdautoaway/src/stdafx.h +++ b/src/core/stdautoaway/src/stdafx.h @@ -65,11 +65,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../../mir_app/src/resource.h" -#define AA_MODULE "AutoAway" +#define MODULENAME "AutoAway" struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(AA_MODULE) - {} + CMPlugin(); }; diff --git a/src/core/stdaway/src/main.cpp b/src/core/stdaway/src/main.cpp index 8d05a682fd..09deaf6fb9 100644 --- a/src/core/stdaway/src/main.cpp +++ b/src/core/stdaway/src/main.cpp @@ -26,7 +26,9 @@ int LoadAwayMsgModule(void); CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = { { 0xe58558e3, 0x83e7, 0x44ef, {0x8e, 0x39, 0xd9, 0xe0, 0x54, 0x19, 0x56, 0xdf}} }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); 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 6ae1a5bd6a..3f7ba051e1 100644 --- a/src/core/stdaway/src/stdafx.h +++ b/src/core/stdaway/src/stdafx.h @@ -70,7 +70,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(MODULENAME) - {} + CMPlugin(); }; diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp index 7ac6277971..f499cc0134 100644 --- a/src/core/stdclist/src/init.cpp +++ b/src/core/stdclist/src/init.cpp @@ -43,7 +43,7 @@ int CListOptInit(WPARAM wParam, LPARAM lParam); ///////////////////////////////////////////////////////////////////////////////////////// // returns the plugin information -PLUGININFOEX pluginInfo = { +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -56,9 +56,13 @@ PLUGININFOEX pluginInfo = { { 0x240a91dc, 0x9464, 0x457a, { 0x97, 0x87, 0xff, 0x1e, 0xa8, 0x8e, 0x77, 0xe2 } } }; +CMPlugin::CMPlugin() : + PLUGIN("CList", pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } ///////////////////////////////////////////////////////////////////////////////////////// @@ -109,7 +113,7 @@ static INT_PTR GetStatusMode(WPARAM, LPARAM) extern "C" __declspec(dllexport) int CListInitialise() { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); g_bSortByStatus = db_get_b(NULL, "CList", "SortByStatus", SETTING_SORTBYSTATUS_DEFAULT); diff --git a/src/core/stdclist/src/stdafx.h b/src/core/stdclist/src/stdafx.h index 3803aa1214..f42349b00f 100644 --- a/src/core/stdclist/src/stdafx.h +++ b/src/core/stdclist/src/stdafx.h @@ -58,9 +58,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN("CList") - {} + CMPlugin(); }; // shared vars diff --git a/src/core/stdcrypt/src/main.cpp b/src/core/stdcrypt/src/main.cpp index 4a295603fa..011511d37b 100644 --- a/src/core/stdcrypt/src/main.cpp +++ b/src/core/stdcrypt/src/main.cpp @@ -25,7 +25,9 @@ int LoadEncryptionModule(void); CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -38,20 +40,30 @@ PLUGININFOEX pluginInfo = { { 0xd3637189, 0xa5a5, 0x41f5, {0xbc, 0x72, 0x67, 0xa2, 0xf8, 0xaf, 0x1b, 0x6f}} }; +CMPlugin::CMPlugin() : + PLUGIN(nullptr, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_CRYPTO, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); 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 c10671bcca..8cc54ff399 100644 --- a/src/core/stdcrypt/src/stdafx.h +++ b/src/core/stdcrypt/src/stdafx.h @@ -69,9 +69,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(nullptr) - {} + CMPlugin(); }; bool getRandomBytes(BYTE *buf, size_t bufLen); diff --git a/src/core/stdemail/src/main.cpp b/src/core/stdemail/src/main.cpp index 6da780ed8b..5197155945 100644 --- a/src/core/stdemail/src/main.cpp +++ b/src/core/stdemail/src/main.cpp @@ -26,7 +26,9 @@ int LoadSendRecvEMailModule(void); CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = { {0xb774d10a, 0xc761, 0x11e1, {0x84, 0x05, 0x27, 0xe7, 0x61, 0x88, 0x70, 0x9b }} }; +CMPlugin::CMPlugin() : + PLUGIN(nullptr, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SREMAIL, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); 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 e9a3f62ed1..aa4037b703 100644 --- a/src/core/stdemail/src/stdafx.h +++ b/src/core/stdemail/src/stdafx.h @@ -66,7 +66,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(nullptr) - {} + CMPlugin(); }; diff --git a/src/core/stdfile/src/main.cpp b/src/core/stdfile/src/main.cpp index 3e50600c14..d1ca18c66d 100644 --- a/src/core/stdfile/src/main.cpp +++ b/src/core/stdfile/src/main.cpp @@ -30,7 +30,9 @@ int &hLangpack(g_plugin.m_hLang); ITaskbarList3 * pTaskbarInterface; -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -43,16 +45,24 @@ PLUGININFOEX pluginInfo = { { 0x39698dce, 0x7ed4, 0x4334, {0xac, 0x4c, 0xba, 0x8b, 0x37, 0xa8, 0x6f, 0x13}} }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRFILE, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); if ( IsWinVer7Plus()) @@ -62,6 +72,8 @@ extern "C" int __declspec(dllexport) Load(void) return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Unload(void) { if (pTaskbarInterface) diff --git a/src/core/stdfile/src/stdafx.h b/src/core/stdfile/src/stdafx.h index 2edc930862..d763d8ae9a 100644 --- a/src/core/stdfile/src/stdafx.h +++ b/src/core/stdfile/src/stdafx.h @@ -76,9 +76,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(MODULENAME) - {} + CMPlugin(); }; extern ITaskbarList3 * pTaskbarInterface; diff --git a/src/core/stdidle/src/main.cpp b/src/core/stdidle/src/main.cpp index 0131b4a427..5f7a5bb00e 100644 --- a/src/core/stdidle/src/main.cpp +++ b/src/core/stdidle/src/main.cpp @@ -28,7 +28,9 @@ CMPlugin g_plugin; CLIST_INTERFACE* pcli; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -41,22 +43,32 @@ PLUGININFOEX pluginInfo = { { 0x53ac190b, 0xe223, 0x4341, {0x82, 0x5f, 0x70, 0x9d, 0x85, 0x20, 0x21, 0x5b}} }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_IDLE, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); LoadIdleModule(); return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Unload(void) { UnloadIdleModule(); diff --git a/src/core/stdidle/src/options.cpp b/src/core/stdidle/src/options.cpp index 5da1144b09..8d34a2909a 100644 --- a/src/core/stdidle/src/options.cpp +++ b/src/core/stdidle/src/options.cpp @@ -57,7 +57,7 @@ class COptionsDlg : public CPluginDlgBase public: COptionsDlg() : - CPluginDlgBase(g_plugin, IDD_OPT_IDLE, IDLEMOD), + CPluginDlgBase(g_plugin, IDD_OPT_IDLE, MODULENAME), edt1sttime(this, IDC_IDLE1STTIME), spinIdle(this, IDC_IDLESPIN), cmbAAStatus(this, IDC_AASTATUS), diff --git a/src/core/stdidle/src/stdafx.h b/src/core/stdidle/src/stdafx.h index 5eff95b29b..e313a5d426 100644 --- a/src/core/stdidle/src/stdafx.h +++ b/src/core/stdidle/src/stdafx.h @@ -65,30 +65,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../../mir_app/src/resource.h" -#define IDLEMOD "Idle" +#define MODULENAME "Idle" struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(IDLEMOD) - {} + CMPlugin(); }; struct Settings { Settings() : - bIdleCheck(IDLEMOD, "UserIdleCheck", 0), - bIdleMethod(IDLEMOD, "IdleMethod", 0), - bIdleOnSaver(IDLEMOD, "IdleOnSaver", 0), - bIdleOnFullScr(IDLEMOD, "IdleOnFullScr", 0), - bIdleOnLock(IDLEMOD, "IdleOnLock", 0), - bIdlePrivate(IDLEMOD, "IdlePrivate", 0), - bIdleSoundsOff(IDLEMOD, "IdleSoundsOff", 1), - bIdleOnTerminal(IDLEMOD, "IdleOnTerminalDisconnect", 0), - bIdleStatusLock(IDLEMOD, "IdleStatusLock", 0), - bAAEnable(IDLEMOD, "AAEnable", 0), - bAAStatus(IDLEMOD, "AAStatus", 0), - iIdleTime1st(IDLEMOD, "IdleTime1st", 10) + bIdleCheck(MODULENAME, "UserIdleCheck", 0), + bIdleMethod(MODULENAME, "IdleMethod", 0), + bIdleOnSaver(MODULENAME, "IdleOnSaver", 0), + bIdleOnFullScr(MODULENAME, "IdleOnFullScr", 0), + bIdleOnLock(MODULENAME, "IdleOnLock", 0), + bIdlePrivate(MODULENAME, "IdlePrivate", 0), + bIdleSoundsOff(MODULENAME, "IdleSoundsOff", 1), + bIdleOnTerminal(MODULENAME, "IdleOnTerminalDisconnect", 0), + bIdleStatusLock(MODULENAME, "IdleStatusLock", 0), + bAAEnable(MODULENAME, "AAEnable", 0), + bAAStatus(MODULENAME, "AAStatus", 0), + iIdleTime1st(MODULENAME, "IdleTime1st", 10) {} CMOption bIdleCheck, bIdleMethod, bIdleOnSaver, bIdleOnFullScr, bIdleOnLock; diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp index 183e2bcf08..612e3b59c3 100644 --- a/src/core/stdmsg/src/srmm.cpp +++ b/src/core/stdmsg/src/srmm.cpp @@ -29,7 +29,9 @@ CMPlugin g_plugin; CLIST_INTERFACE *pcli; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -41,22 +43,32 @@ PLUGININFOEX pluginInfo = { { 0x657fe89b, 0xd121, 0x40c2, { 0x8a, 0xc9, 0xb9, 0xfa, 0x57, 0x55, 0xb3, 0x0D } } //{657FE89B-D121-40c2-8AC9-B9FA5755B30D} }; +CMPlugin::CMPlugin() : + PLUGIN(SRMMMOD, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); Load_ChatModule(); return LoadSendRecvMessageModule(); } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Unload(void) { SplitmsgShutdown(); diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 8654d9153d..6f1875347d 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -108,9 +108,7 @@ struct GlobalLogSettings : public GlobalLogSettingsBase struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(SRMMMOD) - {} + CMPlugin(); }; ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/stdssl/src/main.cpp b/src/core/stdssl/src/main.cpp index 5fab770f9f..18fde05196 100644 --- a/src/core/stdssl/src/main.cpp +++ b/src/core/stdssl/src/main.cpp @@ -27,7 +27,7 @@ void UnloadSslModule(void); CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -40,16 +40,20 @@ PLUGININFOEX pluginInfo = { { 0x312C4F84, 0x75BE, 0x4404, {0xBC, 0xB1, 0xC1, 0x03, 0xDB, 0xE5, 0xA3, 0xB8 }} }; +CMPlugin::CMPlugin() : + PLUGIN(nullptr, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SSL, MIID_LAST }; extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); return LoadSslModule(); } diff --git a/src/core/stdssl/src/stdafx.h b/src/core/stdssl/src/stdafx.h index 6221d6c3b4..8f875605f0 100644 --- a/src/core/stdssl/src/stdafx.h +++ b/src/core/stdssl/src/stdafx.h @@ -42,7 +42,5 @@ typedef struct SslHandle *HSSL; struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(nullptr) - {} + CMPlugin(); }; diff --git a/src/core/stduihist/src/main.cpp b/src/core/stduihist/src/main.cpp index bcf31573ce..b9e2bd1fd5 100644 --- a/src/core/stduihist/src/main.cpp +++ b/src/core/stduihist/src/main.cpp @@ -26,7 +26,9 @@ int LoadHistoryModule(void); CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = { { 0x5eedf3c5, 0x3071, 0x4234, {0xa6, 0x27, 0xef, 0xd0, 0x62, 0xa4, 0xd6, 0x94}} }; +CMPlugin::CMPlugin() : + PLUGIN(nullptr, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHISTORY, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); 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 c07a081180..5dfae67b52 100644 --- a/src/core/stduihist/src/stdafx.h +++ b/src/core/stduihist/src/stdafx.h @@ -66,9 +66,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(nullptr) - {} + CMPlugin(); }; #pragma comment(lib, "version.lib") diff --git a/src/core/stduserinfo/src/main.cpp b/src/core/stduserinfo/src/main.cpp index 6e8b25f981..5a331de50c 100644 --- a/src/core/stduserinfo/src/main.cpp +++ b/src/core/stduserinfo/src/main.cpp @@ -26,7 +26,9 @@ int LoadUserInfoModule(void); CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = { { 0x8198dc94, 0xbc4, 0x448a, { 0x84, 0x95, 0x8f, 0xe8, 0x32, 0xc1, 0xd3, 0x33 } } }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIUSERINFO, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); 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 814e260abb..e73f080e88 100644 --- a/src/core/stduserinfo/src/stdafx.h +++ b/src/core/stduserinfo/src/stdafx.h @@ -70,7 +70,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(MODULENAME) - {} + CMPlugin(); }; diff --git a/src/core/stduseronline/src/main.cpp b/src/core/stduseronline/src/main.cpp index 027eba4d7b..ebbdf4f496 100644 --- a/src/core/stduseronline/src/main.cpp +++ b/src/core/stduseronline/src/main.cpp @@ -27,7 +27,9 @@ CMPlugin g_plugin; CLIST_INTERFACE* pcli; int &hLangpack(g_plugin.m_hLang); -PLUGININFOEX pluginInfo = { +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, MIRANDA_VERSION_DWORD, @@ -40,22 +42,32 @@ PLUGININFOEX pluginInfo = { { 0x251c78d7, 0xf6e0, 0x4083, {0x92, 0xdc, 0x25, 0x2d, 0xcb, 0x3b, 0xe7, 0x24}} }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_USERONLINE, MIID_LAST }; +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); 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 9fae72e8ed..aa1da528da 100644 --- a/src/core/stduseronline/src/stdafx.h +++ b/src/core/stduseronline/src/stdafx.h @@ -68,7 +68,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(MODULENAME) - {} + CMPlugin(); }; -- cgit v1.2.3