diff options
182 files changed, 127 insertions, 1057 deletions
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index ceded8b16a..e3d0fcf825 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -60,11 +60,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(AVS_MODULE, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int ComparePicture(const protoPicCacheEntry *p1, const protoPicCacheEntry *p2)
diff --git a/plugins/Actman/actman.dpr b/plugins/Actman/actman.dpr index 0bf4f38921..2106331144 100644 --- a/plugins/Actman/actman.dpr +++ b/plugins/Actman/actman.dpr @@ -66,22 +66,6 @@ const var
hevaction,hHookChanged,hevinout:THANDLE;
-
-function MirandaPluginInfoEx(mirandaVersion:dword):PPLUGININFOEX; cdecl;
-begin
- result:=@PluginInfo;
- PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
- PluginInfo.shortName :='Action manager';
- PluginInfo.version :=$00030001;
- PluginInfo.description:='Plugin for manage hotkeys to open contact window, insert text, '+
- 'run program and call services';
- PluginInfo.author :='Awkward';
- PluginInfo.copyright :='(c) 2007-13 Awkward';
- PluginInfo.homepage :='https://miranda-ng.org/p/Actman/';
- PluginInfo.flags :=UNICODE_AWARE;
- PluginInfo.uuid :=MIID_ACTMAN;
-end;
-
{$include i_const.inc}
{$include i_options.inc}
@@ -259,9 +243,19 @@ begin end;
exports
- Load, Unload,
- MirandaPluginInfoEx;
+ Load, Unload;
begin
DisableThreadLibraryCalls(hInstance);
+
+ PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
+ PluginInfo.shortName :='Action manager';
+ PluginInfo.version :=$00030001;
+ PluginInfo.description:='Plugin for manage hotkeys to open contact window, insert text, '+
+ 'run program and call services';
+ PluginInfo.author :='Awkward';
+ PluginInfo.copyright :='(c) 2007-13 Awkward';
+ PluginInfo.homepage :='https://miranda-ng.org/p/Actman/';
+ PluginInfo.flags :=UNICODE_AWARE;
+ PluginInfo.uuid :=MIID_ACTMAN;
end.
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp index 8d25acd7f9..476adcf49d 100644 --- a/plugins/AddContactPlus/src/main.cpp +++ b/plugins/AddContactPlus/src/main.cpp @@ -53,11 +53,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static INT_PTR AddContactPlusDialog(WPARAM, LPARAM)
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index 3e8ad68d0a..729b1ec001 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -41,11 +41,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/AsSingleWindow/src/AsSingleWindow.cpp b/plugins/AsSingleWindow/src/AsSingleWindow.cpp index c91d544486..2c3fab8b98 100644 --- a/plugins/AsSingleWindow/src/AsSingleWindow.cpp +++ b/plugins/AsSingleWindow/src/AsSingleWindow.cpp @@ -27,11 +27,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// static int MsgWindowEvent(WPARAM, LPARAM lParam) diff --git a/plugins/AssocMgr/src/main.cpp b/plugins/AssocMgr/src/main.cpp index cc8e1d8690..1f633cc72f 100644 --- a/plugins/AssocMgr/src/main.cpp +++ b/plugins/AssocMgr/src/main.cpp @@ -44,11 +44,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index e9615c53bb..c40764c10f 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -59,11 +59,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
INT_PTR getIconToUse(MCONTACT hContact, LPARAM)
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp index d517278dcc..6dc32d5244 100644 --- a/plugins/AutoRun/src/main.cpp +++ b/plugins/AutoRun/src/main.cpp @@ -22,11 +22,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void GetProfilePath(wchar_t *res, size_t resLen)
diff --git a/plugins/AutoShutdown/src/main.cpp b/plugins/AutoShutdown/src/main.cpp index d4b3c17b9f..a6b359a6b0 100644 --- a/plugins/AutoShutdown/src/main.cpp +++ b/plugins/AutoShutdown/src/main.cpp @@ -49,11 +49,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int ShutdownModulesLoaded(WPARAM, LPARAM)
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index a72edbe819..dc943db21f 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -59,11 +59,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// services
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 1063418e29..d1a3f3411d 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -52,11 +52,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
#define MAXCHAN 5
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 3c05365717..095d51ac18 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -55,11 +55,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHISTORY, MIID_LAST };
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index cdb55daf13..af9aced63a 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -58,11 +58,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(BOLTUN_KEY, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void UpdateEngine()
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index e7dcc192db..3f4b0a82eb 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -61,11 +61,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MOD_NAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static BOOL IsAeroMode()
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 2ed7065ee9..4b76e9e252 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -65,11 +65,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
time_t getLastSeen(MCONTACT hContact)
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 67ae0e2c85..9dadc4cc8d 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -22,11 +22,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// MainInit
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 7aa007d4ec..a65a9ffbf7 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -52,11 +52,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODNAME, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - //====[ LOADER ]============================================================= static int OnDbChanged(WPARAM hContact, LPARAM lparam) diff --git a/plugins/ChangeKeyboardLayout/src/main.cpp b/plugins/ChangeKeyboardLayout/src/main.cpp index 5b2721ca0b..77180fd1c3 100644 --- a/plugins/ChangeKeyboardLayout/src/main.cpp +++ b/plugins/ChangeKeyboardLayout/src/main.cpp @@ -42,11 +42,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 817e5e98fc..6196807f2e 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -46,11 +46,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int CALLBACK MenuWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp index caa109f895..7d48f3402f 100644 --- a/plugins/Clist_blind/src/init.cpp +++ b/plugins/Clist_blind/src/init.cpp @@ -69,11 +69,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>("CList", pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// returns plugin's interfaces information
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index 012afcced7..6d77c35ea6 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -61,11 +61,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>("CList", pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_CLIST, MIID_LAST };
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index 25756269b4..5c8d4348d3 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -79,11 +79,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>("CList", pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_CLIST, MIID_LAST };
diff --git a/plugins/Cln_skinedit/src/main.cpp b/plugins/Cln_skinedit/src/main.cpp index 0d48677c07..f6b8c85497 100644 --- a/plugins/Cln_skinedit/src/main.cpp +++ b/plugins/Cln_skinedit/src/main.cpp @@ -55,11 +55,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>("Skin editor", pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// // prototypes diff --git a/plugins/CloudFile/src/main.cpp b/plugins/CloudFile/src/main.cpp index 728bfaf785..b09386e37b 100644 --- a/plugins/CloudFile/src/main.cpp +++ b/plugins/CloudFile/src/main.cpp @@ -20,11 +20,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// // Interface information diff --git a/plugins/CmdLine/src/CmdLine.cpp b/plugins/CmdLine/src/CmdLine.cpp index e5b72b48fe..47a34c6052 100644 --- a/plugins/CmdLine/src/CmdLine.cpp +++ b/plugins/CmdLine/src/CmdLine.cpp @@ -42,11 +42,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load(void)
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp index 99e73ab4a1..a829e38cce 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -60,11 +60,6 @@ CMPlugin::CMPlugin() : RegisterProtocol(PROTOTYPE_PROTOCOL);
}
-extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/Console/src/init.cpp b/plugins/Console/src/init.cpp index de6eb7745c..4e30e0a698 100644 --- a/plugins/Console/src/init.cpp +++ b/plugins/Console/src/init.cpp @@ -60,11 +60,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>("Console", pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 1afae1deae..26f21e9449 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -54,11 +54,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int HookDBEventAdded(WPARAM hContact, LPARAM hDbEvent)
diff --git a/plugins/CountryFlags/src/main.cpp b/plugins/CountryFlags/src/main.cpp index 901b04e1be..fe988b8c4b 100644 --- a/plugins/CountryFlags/src/main.cpp +++ b/plugins/CountryFlags/src/main.cpp @@ -43,11 +43,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index d17f6d5c19..effb082fc8 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. CMPlugin g_plugin;
-DWORD mirandaVersion;
LCID packlcid;
//HANDLE hCrashLogFolder, hVerInfoFolder;
HANDLE hVerInfoFolder;
@@ -55,12 +54,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirVersion)
-{
- ::mirandaVersion = mirVersion;
- return (PLUGININFOEX*)&pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// MirandaInterfaces - returns the protocol interface to the core
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 41af5b4721..498a5026e1 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -125,27 +125,6 @@ void GetLinkedModulesInfo(wchar_t *moduleName, CMStringW &buffer) importData++; //go to next record
}
}
-
- bool found = false;
- PIMAGE_EXPORT_DIRECTORY exportData = (PIMAGE_EXPORT_DIRECTORY)ImageDirectoryEntryToData(dllAddr, FALSE,
- IMAGE_DIRECTORY_ENTRY_EXPORT, &tableSize);
- if (exportData) {
- ULONG *funcAddr = (ULONG*)ImageRvaToVa(nthdrs, dllAddr, exportData->AddressOfNames, nullptr);
- for (unsigned i = 0; i < exportData->NumberOfNames; ++i) {
- char *funcName = (char*)ImageRvaToVa(nthdrs, dllAddr, funcAddr[i], nullptr);
- if (mir_strcmp(funcName, "DatabasePluginInfo") == 0) {
- buffer.Append(L" This dll is a Miranda database plugin, another database is active right now\r\n");
- found = true;
- break;
- }
- else if (mir_strcmp(funcName, "MirandaPluginInfoEx") == 0) {
- found = true;
- break;
- }
- }
- }
- if (!found)
- buffer.Append(L" This dll is not a Miranda plugin and should be removed from plugins directory\r\n");
}
__except (EXCEPTION_EXECUTE_HANDLER) {}
@@ -208,7 +187,7 @@ static void GetPluginsString(CMStringW &buffer, unsigned &flags) continue;
}
- PLUGININFOEX *pi = GetMirInfo(hModule);
+ const PLUGININFOEX *pi = GetMirInfo(hModule);
if (pi != nullptr) {
wchar_t timebuf[30] = L"";
GetLastWriteTime(&FindFileData.ftLastWriteTime, timebuf, 30);
@@ -603,7 +582,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wcha if (crashpos != 0) {
HMODULE hModule = (HMODULE)Module.BaseOfImage;
- PLUGININFOEX *pi = GetMirInfo(hModule);
+ const PLUGININFOEX *pi = GetMirInfo(hModule);
if (pi != nullptr) {
if (pi->shortName) {
CMStringW crashcause;
diff --git a/plugins/CrashDumper/src/stdafx.h b/plugins/CrashDumper/src/stdafx.h index 5abffe7fb9..7b1bd36867 100644 --- a/plugins/CrashDumper/src/stdafx.h +++ b/plugins/CrashDumper/src/stdafx.h @@ -94,7 +94,6 @@ struct VerTrnsfr bool autot;
};
-extern DWORD mirandaVersion;
extern LCID packlcid;
extern bool servicemode, clsdates, dtsubfldr, catchcrashes, needrestart;
@@ -128,7 +127,7 @@ void StoreStringToClip(CMStringW& buffer); void ShowMessage(int type, const wchar_t* format, ...);
bool IsPluginEnabled(wchar_t* filename);
-PLUGININFOEX* GetMirInfo(HMODULE hModule);
+const PLUGININFOEX* GetMirInfo(HMODULE hModule);
void CreateMiniDump(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr);
void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const wchar_t* msg);
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp index b86fa072f6..9d0bb2cbd4 100644 --- a/plugins/CrashDumper/src/utils.cpp +++ b/plugins/CrashDumper/src/utils.cpp @@ -89,15 +89,10 @@ void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, DWORD dwSize) GetLastWriteTime(&FindFileData.ftLastWriteTime, lpszString, dwSize);
}
-typedef PLUGININFOEX * (__cdecl * Miranda_Plugin_Info) (DWORD mirandaVersion);
-
-PLUGININFOEX* GetMirInfo(HMODULE hModule)
+const PLUGININFOEX* GetMirInfo(HMODULE hModule)
{
- Miranda_Plugin_Info bpi = (Miranda_Plugin_Info)GetProcAddress(hModule, "MirandaPluginInfoEx");
- if (bpi == nullptr)
- return nullptr;
-
- return bpi(mirandaVersion);
+ CMPluginBase &pPlugin = GetPluginByInstance(hModule);
+ return (pPlugin.getInst() == hModule) ? &pPlugin.getInfo() : nullptr;
}
void GetInternetExplorerVersion(CMStringW &buffer)
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp index e452e95812..c0b9e72ed8 100644 --- a/plugins/CryptoPP/src/main.cpp +++ b/plugins/CryptoPP/src/main.cpp @@ -30,11 +30,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int onModulesLoaded(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/CyrTranslit/src/main.cpp b/plugins/CyrTranslit/src/main.cpp index 64bbf49b9e..0494302287 100644 --- a/plugins/CyrTranslit/src/main.cpp +++ b/plugins/CyrTranslit/src/main.cpp @@ -39,11 +39,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>("CyrTranslit", pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index d9e99121e8..47205ca2a5 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -50,11 +50,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// returns 0 if the profile is created, EMKPRF*
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index e402d435a2..6f619ede17 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -36,11 +36,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// we implement service mode interface
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp index 5d33f45cb6..4c38a8793d 100644 --- a/plugins/Db_autobackups/src/main.cpp +++ b/plugins/Db_autobackups/src/main.cpp @@ -24,11 +24,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULE, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static INT_PTR ABService(WPARAM, LPARAM)
diff --git a/plugins/Dbx_mdbx/src/init.cpp b/plugins/Dbx_mdbx/src/init.cpp index 26d06a3276..74f3f3fd14 100644 --- a/plugins/Dbx_mdbx/src/init.cpp +++ b/plugins/Dbx_mdbx/src/init.cpp @@ -53,11 +53,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_DATABASE, MIID_LAST };
diff --git a/plugins/Exchange/src/exchange.cpp b/plugins/Exchange/src/exchange.cpp index 2d88988355..c933a9f9d2 100644 --- a/plugins/Exchange/src/exchange.cpp +++ b/plugins/Exchange/src/exchange.cpp @@ -46,11 +46,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load()
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index 0337afe09b..c687584cc7 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -54,11 +54,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static IconItem iconList[] =
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index d56a9123a9..c387729535 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -53,11 +53,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>("FavContacts", pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index 602bbcd4e9..c709181372 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -41,11 +41,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// wParam - Section name
// lParam - Icon ID
diff --git a/plugins/FingerprintNG/src/main.cpp b/plugins/FingerprintNG/src/main.cpp index c63c17a91e..043fc72ccc 100644 --- a/plugins/FingerprintNG/src/main.cpp +++ b/plugins/FingerprintNG/src/main.cpp @@ -47,11 +47,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load(void)
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index 3e443391b9..18cb1d9a7d 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -86,11 +86,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULE, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////
// Options
diff --git a/plugins/Folders/src/folders.cpp b/plugins/Folders/src/folders.cpp index 5848e4a0fa..353e2b112a 100644 --- a/plugins/Folders/src/folders.cpp +++ b/plugins/Folders/src/folders.cpp @@ -43,11 +43,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(ModuleName, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index 3dd34047a0..dd116e5f08 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -45,11 +45,6 @@ CMPlugin::CMPlugin() : RegisterProtocol(PROTOTYPE_VIRTUAL);
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
INT_PTR GetCaps(WPARAM wParam, LPARAM)
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index 169ba58c2c..41b87e78f9 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -105,11 +105,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD /*mirandaVersion*/)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////
// Member Function : bOpenLogFile
// Type : Global
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp index 81e723d2d0..e039752b2d 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist.cpp @@ -40,11 +40,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(LINKLIST_MODULE, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int InitOptionsDlg(WPARAM wParam, LPARAM)
diff --git a/plugins/HistoryPlusPlus/historypp.dpr b/plugins/HistoryPlusPlus/historypp.dpr index 746459a1a6..6f5a19d9da 100644 --- a/plugins/HistoryPlusPlus/historypp.dpr +++ b/plugins/HistoryPlusPlus/historypp.dpr @@ -128,21 +128,6 @@ function OnEventDeleted(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; forward function OnMetaDefaultChanged(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; forward;
function OnPreshutdown(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; forward;
-// tell Miranda about this plugin ExVersion
-function MirandaPluginInfoEx(mirandaVersion:DWORD): PPLUGININFOEX; cdecl;
-begin
- PluginInfo.cbSize:= SizeOf(TPLUGININFOEX);
- PluginInfo.shortName:= hppShortNameV;
- PluginInfo.version:= hppVersion;
- PluginInfo.description:= hppDescription;
- PluginInfo.author:= hppAuthor;
- PluginInfo.copyright:= hppCopyright;
- PluginInfo.homepage:= hppHomePageURL;
- PluginInfo.flags:= UNICODE_AWARE;
- PluginInfo.uuid:= MIID_HISTORYPP;
- Result := @PluginInfo;
-end;
-
var
PluginInterfaces: array[0..1] of TGUID;
@@ -518,7 +503,6 @@ begin end;
exports
- MirandaPluginInfoEx,
MirandaPluginInterfaces,
Load,
Unload;
@@ -526,6 +510,16 @@ exports begin
DisableThreadLibraryCalls(hInstance);
+ PluginInfo.cbSize:= SizeOf(TPLUGININFOEX);
+ PluginInfo.shortName:= hppShortNameV;
+ PluginInfo.version:= hppVersion;
+ PluginInfo.description:= hppDescription;
+ PluginInfo.author:= hppAuthor;
+ PluginInfo.copyright:= hppCopyright;
+ PluginInfo.homepage:= hppHomePageURL;
+ PluginInfo.flags:= UNICODE_AWARE;
+ PluginInfo.uuid:= MIID_HISTORYPP;
+
// decreasing ref count to oleaut32.dll as said
// in plugins doc
FreeLibrary(GetModuleHandle('oleaut32.dll'));
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp index b6c1674bf0..1871f69371 100644 --- a/plugins/HistoryStats/src/main.cpp +++ b/plugins/HistoryStats/src/main.cpp @@ -381,14 +381,6 @@ static int EventModulesLoaded(WPARAM, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
// external interface
-extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- OutputDebugString(L"HistoryStats: MirandaPluginInfoEx() was called.\n");
-
- // MEMO: (don't) fail, if version is below minimum
- return &pluginInfoEx;
-}
-
extern "C" __declspec(dllexport) int Load()
{
// init COM, needed for GUID generation
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp index 69a71c692f..d0d556dbdc 100644 --- a/plugins/HistorySweeperLight/src/main.cpp +++ b/plugins/HistorySweeperLight/src/main.cpp @@ -45,11 +45,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(ModuleName, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int OnIconPressed(WPARAM hContact, LPARAM lParam)
diff --git a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp index 42463ec40b..4cbe88a23f 100644 --- a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp +++ b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp @@ -84,11 +84,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
// ============================================================================
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp index 5aa3035ac7..2e46085c64 100644 --- a/plugins/IEHistory/src/IEHistory.cpp +++ b/plugins/IEHistory/src/IEHistory.cpp @@ -30,6 +30,8 @@ MWindowList hOpenWindowsList = nullptr; HMODULE hUxTheme = nullptr; BOOL(WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD) = nullptr; +///////////////////////////////////////////////////////////////////////////////////////// + PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_DISPLAY_NAME, @@ -47,17 +49,11 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} +///////////////////////////////////////////////////////////////////////////////////////// -static const MUUID interfaces[] = { MIID_UIHISTORY, MIID_LAST }; +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHISTORY, MIID_LAST }; -extern "C" __declspec(dllexport) const MUUID *MirandaPluginInterfaces() -{ - return interfaces; -} +///////////////////////////////////////////////////////////////////////////////////////// extern "C" int __declspec(dllexport) Load(void) { @@ -94,6 +90,8 @@ extern "C" int __declspec(dllexport) Load(void) return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Unload() { WindowList_Broadcast(hOpenWindowsList, WM_CLOSE, 0, 0); diff --git a/plugins/IEView/src/ieview_main.cpp b/plugins/IEView/src/ieview_main.cpp index 8646896009..c3b71b298a 100644 --- a/plugins/IEView/src/ieview_main.cpp +++ b/plugins/IEView/src/ieview_main.cpp @@ -52,11 +52,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(ieviewModuleName, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int ModulesLoaded(WPARAM, LPARAM)
diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp index 2f872b962a..a5a7e8f903 100644 --- a/plugins/IgnoreState/src/main.cpp +++ b/plugins/IgnoreState/src/main.cpp @@ -62,11 +62,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
BOOL checkState(int type)
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index b2277a0942..f24d4a1cb2 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -31,7 +31,6 @@ HWND hwndWizard, hwndAccMerge; CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
-// MirandaPluginInfoEx - returns an information about a plugin
static PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
@@ -50,11 +49,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(IMPORT_MODULE, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// MirandaInterfaces - returns the protocol interface to the core
diff --git a/plugins/ImportTXT/importtxt.dpr b/plugins/ImportTXT/importtxt.dpr index 8a7959a197..5953497e9d 100644 --- a/plugins/ImportTXT/importtxt.dpr +++ b/plugins/ImportTXT/importtxt.dpr @@ -49,21 +49,6 @@ var hwndWizard:HWND;
hwndDialog:HWND;
-function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
-begin
- PluginInfo.cbSize :=sizeof(TPLUGININFOEX);
- PluginInfo.shortName :='Import TXT';
- PluginInfo.version :=$0000010A;
- PluginInfo.description:='Imports history saved in TXT files from other clients.';
- PluginInfo.author :='Abyss';
- PluginInfo.copyright :='© 2008 Abyss';
- PluginInfo.homepage :='https://miranda-ng.org/p/ImportTXT/';
- PluginInfo.flags :=UNICODE_AWARE;
- PluginInfo.uuid :=MIID_IMPORTTEXT;
-
- result := @PluginInfo;
-end;
-
function ContactMenuCommand(wParam: wParam; lParam: lParam): int_ptr; cdecl;
begin
result := 0;
@@ -153,9 +138,18 @@ begin end;
exports
- Load, Unload, MirandaPluginInfoEx;
+ Load, Unload;
-initialization
- DisableThreadLibraryCalls(hInstance);
+begin
+ PluginInfo.cbSize :=sizeof(TPLUGININFOEX);
+ PluginInfo.shortName :='Import TXT';
+ PluginInfo.version :=$0000010A;
+ PluginInfo.description:='Imports history saved in TXT files from other clients.';
+ PluginInfo.author :='Abyss';
+ PluginInfo.copyright :='© 2008 Abyss';
+ PluginInfo.homepage :='https://miranda-ng.org/p/ImportTXT/';
+ PluginInfo.flags :=UNICODE_AWARE;
+ PluginInfo.uuid :=MIID_IMPORTTEXT;
+ DisableThreadLibraryCalls(hInstance);
end.
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index d580710d18..14db0f8852 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -105,11 +105,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int InitializeOptions(WPARAM, LPARAM);
diff --git a/plugins/ListeningTo/src/main.cpp b/plugins/ListeningTo/src/main.cpp index f176f5e7ed..6a589d0cc5 100644 --- a/plugins/ListeningTo/src/main.cpp +++ b/plugins/ListeningTo/src/main.cpp @@ -41,11 +41,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load(void)
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 64a49f810f..5129c6d723 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -84,14 +84,6 @@ CMPlugin::CMPlugin() : RegisterProtocol(PROTOTYPE_PROTOCOL);
}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
-#ifdef _WIN64
-#error LotusNotify.dll cannot work with 64bit Miranda. (Lotus client is 32bit only)
-#endif
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/MagneticWindows/src/MagneticWindows.cpp b/plugins/MagneticWindows/src/MagneticWindows.cpp index c7154443b2..ddb16b00b9 100644 --- a/plugins/MagneticWindows/src/MagneticWindows.cpp +++ b/plugins/MagneticWindows/src/MagneticWindows.cpp @@ -36,11 +36,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - /////////////////////////////////////////////////////////////////////////////////////////////////// // Plugin Functions /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index a0cb9171f6..644b5fe3bc 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -94,11 +94,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
struct ModSetLinkLinkItem { // code from dbe++ plugin by Bio
diff --git a/plugins/MessageState/src/main.cpp b/plugins/MessageState/src/main.cpp index 70da5ae189..a70cc74864 100644 --- a/plugins/MessageState/src/main.cpp +++ b/plugins/MessageState/src/main.cpp @@ -23,11 +23,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load(void)
diff --git a/plugins/MirFox/src/MirandaInterface.cpp b/plugins/MirFox/src/MirandaInterface.cpp index cb7c84384f..5bd35281b1 100644 --- a/plugins/MirFox/src/MirandaInterface.cpp +++ b/plugins/MirFox/src/MirandaInterface.cpp @@ -36,11 +36,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec (dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int __cdecl onAccListChanged(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp index 244f4c9bc4..98bdf213d4 100644 --- a/plugins/MirLua/src/main.cpp +++ b/plugins/MirLua/src/main.cpp @@ -24,11 +24,6 @@ PLUGININFOEX pluginInfoEx = };
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int OnOptionsInit(WPARAM wParam, LPARAM)
diff --git a/plugins/MirOTR/src/dllmain.cpp b/plugins/MirOTR/src/dllmain.cpp index 44942d8d0d..3dbd68fe7f 100644 --- a/plugins/MirOTR/src/dllmain.cpp +++ b/plugins/MirOTR/src/dllmain.cpp @@ -22,11 +22,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int ModulesLoaded(WPARAM, LPARAM)
diff --git a/plugins/MirandaG15/src/Miranda.cpp b/plugins/MirandaG15/src/Miranda.cpp index e8b01288b7..6333d41c53 100644 --- a/plugins/MirandaG15/src/Miranda.cpp +++ b/plugins/MirandaG15/src/Miranda.cpp @@ -85,11 +85,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-EXTERN_C __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// Called by Miranda to load the plugin.
// We defer initialization until Miranda's module loading process completed and return 0 to
diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp index b15d928d8d..7da0cc00a6 100644 --- a/plugins/MobileState/src/main.cpp +++ b/plugins/MobileState/src/main.cpp @@ -47,11 +47,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
bool hasMobileClient(MCONTACT hContact, LPARAM)
diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp index 5e81f88334..062fa12da2 100644 --- a/plugins/MsgPopup/src/main.cpp +++ b/plugins/MsgPopup/src/main.cpp @@ -53,11 +53,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
typedef int (WINAPI *MSGBOXPROC)(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType);
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index 0ba1b823c0..9a06998258 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -43,11 +43,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////
// Member Function : ShowExportHistory
// Type : Global
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp index 02c2ded7cb..88a07681a4 100644 --- a/plugins/MyDetails/src/mydetails.cpp +++ b/plugins/MyDetails/src/mydetails.cpp @@ -50,11 +50,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
// Services ///////////////////////////////////////////////////////////////////////////////////////
static INT_PTR Menu_SetMyAvatarUI(WPARAM, LPARAM)
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 20d890d039..8079e5a14b 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -93,11 +93,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY, MIID_LAST };
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp index 8b61db81f9..ec4acf3996 100644 --- a/plugins/NewEventNotify/src/main.cpp +++ b/plugins/NewEventNotify/src/main.cpp @@ -54,11 +54,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// Hooks
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 1fc4cc76a4..ee5564be32 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -73,11 +73,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULE, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_USERONLINE, MIID_LAST };
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index d9041abdbc..130a2a44f6 100755 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -38,11 +38,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// INT_PTR LoadKey(WPARAM w, LPARAM l); diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp index df17a71708..087e022a80 100644 --- a/plugins/NewsAggregator/Src/NewsAggregator.cpp +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -26,6 +26,8 @@ HANDLE hUpdateMutex; LIST<CFeedEditor> g_arFeeds(1, PtrKeySortT);
+CMPlugin g_plugin;
+
/////////////////////////////////////////////////////////////////////////////////////////
PLUGININFOEX pluginInfoEx = {
@@ -48,15 +50,6 @@ CMPlugin::CMPlugin() : SetUniqueId("URL");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-CMPlugin g_plugin;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index cc5081b270..220239f9e4 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -44,11 +44,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec (dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void RemoveReadEvents(MCONTACT hContact = 0)
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 75f4859ab3..84381ae945 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -7,6 +7,7 @@ #include "Version.h"
CLIST_INTERFACE *pcli;
+CMPlugin g_plugin;
INT_PTR doubleClick(WPARAM wParam, LPARAM)
{
@@ -82,15 +83,6 @@ CMPlugin::CMPlugin() : RegisterProtocol(PROTOTYPE_VIRTUAL);
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-CMPlugin g_plugin;
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index 55be584e93..d705e5776e 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -33,11 +33,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void RegisterFontServiceFonts();
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 1e2cc16ac0..a2fa27f3a9 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -46,11 +46,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
enum replace_mode_t {
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index dd0790fcef..aacea0f23c 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -37,11 +37,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static INT_PTR NudgeShowMenu(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp index e46dfe33bf..f1d8c23b9c 100644 --- a/plugins/OpenFolder/src/openFolder.cpp +++ b/plugins/OpenFolder/src/openFolder.cpp @@ -28,11 +28,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static IconItem iconList[] =
diff --git a/plugins/OpenSSL/src/main.cpp b/plugins/OpenSSL/src/main.cpp index 9904c5eaf5..9189eff641 100644 --- a/plugins/OpenSSL/src/main.cpp +++ b/plugins/OpenSSL/src/main.cpp @@ -49,11 +49,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SSL, MIID_LAST };
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp index b03ca7051d..a9e1cf9347 100644 --- a/plugins/PackUpdater/Src/PackUpdater.cpp +++ b/plugins/PackUpdater/Src/PackUpdater.cpp @@ -44,11 +44,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 32412f2607..a419de75b1 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -62,11 +62,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
std::wstring GetFile()
diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp index 9e8e962300..88b3c2b0a4 100644 --- a/plugins/Ping/src/ping.cpp +++ b/plugins/Ping/src/ping.cpp @@ -28,11 +28,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static void CreatePluginServices()
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index c72790d501..558271131c 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -42,11 +42,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 588681a7ca..f0f0fe2ee0 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -301,11 +301,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-MIRAPI PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
//===== Load ============================================================================
// Initializes the services provided and the link to those needed
// Called when the plugin is loaded into Miranda
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp index d0913e6b3d..31e08541c0 100644 --- a/plugins/ProfileManager/src/pmanagerEx.cpp +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -40,11 +40,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static INT_PTR ChangePM(WPARAM, LPARAM)
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index ff7124fe33..8c15a2d162 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -53,11 +53,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int ModulesLoaded(WPARAM, LPARAM)
diff --git a/plugins/QuickMessages/src/main.cpp b/plugins/QuickMessages/src/main.cpp index a1f7f7db8b..65860a0a94 100644 --- a/plugins/QuickMessages/src/main.cpp +++ b/plugins/QuickMessages/src/main.cpp @@ -49,11 +49,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int PreShutdown(WPARAM, LPARAM)
diff --git a/plugins/QuickReplies/src/quickreplies.cpp b/plugins/QuickReplies/src/quickreplies.cpp index 8a6ab4d471..51822ddcfc 100644 --- a/plugins/QuickReplies/src/quickreplies.cpp +++ b/plugins/QuickReplies/src/quickreplies.cpp @@ -41,11 +41,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/QuickSearch/quicksearch.dpr b/plugins/QuickSearch/quicksearch.dpr index a53cc35d8a..b691c0308e 100644 --- a/plugins/QuickSearch/quicksearch.dpr +++ b/plugins/QuickSearch/quicksearch.dpr @@ -20,24 +20,6 @@ uses mirutils,
common;
-function MirandaPluginInfoEx(mirandaVersion:dword):PPLUGININFOEX; cdecl;
-begin
- result:=@PluginInfo;
- PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
- PluginInfo.shortName :='Quick Search';
- PluginInfo.version :=$01040200;
- PluginInfo.description:=
- 'This plugin allows you to quick search for nickname, '+
- 'firstname, lastname, email, uin in your contact list. '+
- 'And now you may add any setting to display - for example '+
- 'user''s version of Miranda, group or city.';
- PluginInfo.author :='Awkward, based on Bethoven sources';
- PluginInfo.copyright :='(c) 2004-05 Bethoven; 2006-13 Awkward';
- PluginInfo.homepage :='https://miranda-ng.org/p/QuickSearch/';
- PluginInfo.flags :=UNICODE_AWARE;
- PluginInfo.uuid :=MIID_QUICKSEARCH;
-end;
-
function OnTTBLoaded(wParam:WPARAM;lParam:LPARAM):int;cdecl;
begin
addtotoolbar;
@@ -188,9 +170,22 @@ begin end;
exports
- Load, Unload,
- MirandaPluginInfoEx;
+ Load, Unload;
begin
DisableThreadLibraryCalls(hInstance);
+
+ PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
+ PluginInfo.shortName :='Quick Search';
+ PluginInfo.version :=$01040200;
+ PluginInfo.description:=
+ 'This plugin allows you to quick search for nickname, '+
+ 'firstname, lastname, email, uin in your contact list. '+
+ 'And now you may add any setting to display - for example '+
+ 'user''s version of Miranda, group or city.';
+ PluginInfo.author :='Awkward, based on Bethoven sources';
+ PluginInfo.copyright :='(c) 2004-05 Bethoven; 2006-13 Awkward';
+ PluginInfo.homepage :='https://miranda-ng.org/p/QuickSearch/';
+ PluginInfo.flags :=UNICODE_AWARE;
+ PluginInfo.uuid :=MIID_QUICKSEARCH;
end.
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index af5efea065..4fedf300fe 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -303,11 +303,6 @@ CMPlugin::CMPlugin() : SetUniqueId(DB_STR_QUOTE_SYMBOL);
}
-EXTERN_C __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
EXTERN_C int __declspec(dllexport) Load(void)
diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp index e8a1b0a6f9..4e9cead3f3 100644 --- a/plugins/Rate/src/main.cpp +++ b/plugins/Rate/src/main.cpp @@ -64,11 +64,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
///////////////////////////////////////////////////////////////////////////////
static void setExtraIcon(MCONTACT hContact, int bRate = -1, BOOL clear = TRUE)
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index b95975282f..38db5bb092 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -44,11 +44,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void LoadDBSettings()
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index 172130ffe1..5e1913caf6 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -34,7 +34,6 @@ struct CMPlugin : public PLUGIN<CMPlugin> }
g_plugin;
-
char gIniFile[MAX_PATH];
char gMirandaDir[MAX_PATH];
@@ -57,11 +56,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_REMOVEPERSONALSETTINGS, MIID_LAST };
diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp index c234d9b3ba..fad5964a56 100644 --- a/plugins/Restart/src/restart.cpp +++ b/plugins/Restart/src/restart.cpp @@ -27,11 +27,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static INT_PTR RestartMe(WPARAM, LPARAM)
diff --git a/plugins/SMS/src/main.cpp b/plugins/SMS/src/main.cpp index 3485b24cdf..cbff1d1ed4 100644 --- a/plugins/SMS/src/main.cpp +++ b/plugins/SMS/src/main.cpp @@ -52,11 +52,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static void VersionConversions()
diff --git a/plugins/Scriver/src/srmm.cpp b/plugins/Scriver/src/srmm.cpp index 60d66c6891..3fe63d5923 100644 --- a/plugins/Scriver/src/srmm.cpp +++ b/plugins/Scriver/src/srmm.cpp @@ -50,11 +50,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(SRMM_MODULE, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM, MIID_LAST };
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 853f4bfeb7..fa55643c37 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -21,11 +21,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// basic events: onModuleLoad, onModulesLoad, onShutdown
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index d7a0f50f44..41709dd073 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -46,11 +46,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(S_MOD, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
#define TRANSNUMBER 2
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index cec25e7247..b50e5f7ac8 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -226,11 +226,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// // hooks diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 37c41041c1..b4ff1df312 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -78,11 +78,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
INT_PTR CALLBACK ExitDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp index 4a83f542c5..3d83de1b99 100644 --- a/plugins/ShellExt/src/main.cpp +++ b/plugins/ShellExt/src/main.cpp @@ -34,11 +34,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(SHLExt_Name, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// exported functions
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index 3a4b73927a..709e650bfd 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -52,11 +52,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
INT_PTR ToggleEnable(WPARAM, LPARAM)
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 99af369ed3..b5403a7efa 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -50,11 +50,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY, MIID_LAST };
diff --git a/plugins/SkypeStatusChange/src/main.cpp b/plugins/SkypeStatusChange/src/main.cpp index 85b4f94f3d..bba4628908 100644 --- a/plugins/SkypeStatusChange/src/main.cpp +++ b/plugins/SkypeStatusChange/src/main.cpp @@ -36,11 +36,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
enum
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index e8d89df74d..276b6f6d3a 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -45,11 +45,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD /* mirandaVersion */)
-{
- return (PLUGININFOEX*)&pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static IconItem iconList[] =
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index 9a0f1d5f42..858d2e7326 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -24,11 +24,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern int OnOptInitialize(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index ea95b18c00..8940fba892 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -60,11 +60,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - // Functions //////////////////////////////////////////////////////////////////////////// static int IconsChanged(WPARAM, LPARAM) diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp index e1744d32ef..ea4bd33493 100644 --- a/plugins/SplashScreen/src/main.cpp +++ b/plugins/SplashScreen/src/main.cpp @@ -54,11 +54,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void SplashMain()
diff --git a/plugins/StartPosition/src/main.cpp b/plugins/StartPosition/src/main.cpp index cb170b5ba5..cd28b270c6 100644 --- a/plugins/StartPosition/src/main.cpp +++ b/plugins/StartPosition/src/main.cpp @@ -40,11 +40,6 @@ PLUGININFOEX pluginInfoEx = { {0x211f6277, 0x6f9b, 0x4b77, {0xa9, 0x39, 0x84, 0xd0, 0x4b, 0x26, 0xb3, 0x8c}}
};
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 2186670051..da8b59b374 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -80,11 +80,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static void __cdecl AdvSt(void*)
diff --git a/plugins/StatusChange/src/main.cpp b/plugins/StatusChange/src/main.cpp index fdd3d1c8e1..737687808e 100644 --- a/plugins/StatusChange/src/main.cpp +++ b/plugins/StatusChange/src/main.cpp @@ -27,11 +27,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void LoadOptions()
diff --git a/plugins/StatusManager/src/main.cpp b/plugins/StatusManager/src/main.cpp index ad49f23786..f4aa5e4fdb 100644 --- a/plugins/StatusManager/src/main.cpp +++ b/plugins/StatusManager/src/main.cpp @@ -42,11 +42,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// // interfaces diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp index 72f5008f6e..5eae71c585 100755 --- a/plugins/StopSpamMod/src/init.cpp +++ b/plugins/StopSpamMod/src/init.cpp @@ -77,11 +77,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern wstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, wstring errorValue);
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp index 48dc1669c4..c46d86c32a 100644 --- a/plugins/StopSpamPlus/src/stopspam.cpp +++ b/plugins/StopSpamPlus/src/stopspam.cpp @@ -23,11 +23,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load(void)
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp index 481ad9bfc9..2c4e0acfe3 100644 --- a/plugins/TabSRMM/src/srmm.cpp +++ b/plugins/TabSRMM/src/srmm.cpp @@ -56,11 +56,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(SRMSGMOD, pluginInfoEx) {} -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM, MIID_LAST }; diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 9f2932d1b8..5cee51d439 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -55,11 +55,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int ReloadFont(WPARAM, LPARAM)
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp index 9884bddd58..872d733ee3 100644 --- a/plugins/Toaster/src/main.cpp +++ b/plugins/Toaster/src/main.cpp @@ -22,15 +22,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- if (!IsWinVer8Plus()) {
- MessageBox(nullptr, TranslateT("This plugin requires Windows 8 or higher"), _T(MODULENAME), MB_OK | MB_ICONERROR);
- return nullptr;
- }
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int OnPreShutdown(WPARAM, LPARAM)
@@ -54,6 +45,11 @@ static int OnPreShutdown(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void)
{
+ if (!IsWinVer8Plus()) {
+ MessageBox(nullptr, TranslateT("This plugin requires Windows 8 or higher"), _T(MODULENAME), MB_OK | MB_ICONERROR);
+ return 1;
+ }
+
HookEvent(ME_OPT_INITIALISE, OnOptionsInitialized);
HookEvent(ME_SYSTEM_PRESHUTDOWN, &OnPreShutdown);
diff --git a/plugins/TooltipNotify/src/main.cpp b/plugins/TooltipNotify/src/main.cpp index c470162481..618e1adf9e 100644 --- a/plugins/TooltipNotify/src/main.cpp +++ b/plugins/TooltipNotify/src/main.cpp @@ -35,11 +35,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int ProtoContactIsTyping(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/TopToolBar/src/main.cpp b/plugins/TopToolBar/src/main.cpp index 67b234c089..2715332a7a 100644 --- a/plugins/TopToolBar/src/main.cpp +++ b/plugins/TopToolBar/src/main.cpp @@ -38,11 +38,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(TTB_OPTDIR, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load(void)
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 9ebaf127ac..f0d3703806 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -116,11 +116,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int TrafficCounterShutdown(WPARAM, LPARAM)
diff --git a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp index f9a48c7417..c68d61de93 100644 --- a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp +++ b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp @@ -45,11 +45,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static IconItem iconList[] =
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp index f5be3ae646..4da5867c59 100644 --- a/plugins/UserGuide/src/main.cpp +++ b/plugins/UserGuide/src/main.cpp @@ -22,11 +22,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static INT_PTR ShowGuideFile(WPARAM, LPARAM)
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp index 458346c5d7..25334f92f6 100644 --- a/plugins/UserInfoEx/src/init.cpp +++ b/plugins/UserInfoEx/src/init.cpp @@ -45,11 +45,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/*
============================================================================================
event hooks
diff --git a/plugins/Variables/src/main.cpp b/plugins/Variables/src/main.cpp index 98455ac7bd..bd65f18915 100644 --- a/plugins/Variables/src/main.cpp +++ b/plugins/Variables/src/main.cpp @@ -22,7 +22,7 @@ CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
-// MirandaPluginInfoEx - returns the extended information about a plugin
+// plugin info
PLUGININFOEX pluginInfoEx =
{
@@ -42,11 +42,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// Load - plugin's entry point
diff --git a/plugins/Watrack/docs/sampledll.dpr b/plugins/Watrack/docs/sampledll.dpr index 5a6c3b0c80..acdf0088f2 100644 --- a/plugins/Watrack/docs/sampledll.dpr +++ b/plugins/Watrack/docs/sampledll.dpr @@ -106,18 +106,6 @@ begin result:=0;
end;
-function MirandaPluginInfo(mirandaVersion:dword):PPLUGININFO; cdecl;
-begin
- result:=@PluginInfo;
- PluginInfo.cbSize:=SizeOf(TPLUGININFO);
-end;
-
-function MirandaPluginInfoEx(mirandaVersion:dword):PPLUGININFOEX; cdecl;
-begin
- result:=@PluginInfo;
- PluginInfo.cbSize:=SizeOf(TPLUGININFOEX);
-end;
-
function Load(link: PPLUGINLINK): int; cdecl;
begin
PLUGINLINK := pointer(link);
@@ -132,8 +120,7 @@ begin end;
exports
- Load, Unload,
- MirandaPluginInfoEx;
+ Load, Unload;
begin
end.
diff --git a/plugins/Watrack/watrack.dpr b/plugins/Watrack/watrack.dpr index b01ccf51ee..78130ec692 100644 --- a/plugins/Watrack/watrack.dpr +++ b/plugins/Watrack/watrack.dpr @@ -38,20 +38,6 @@ uses const
MenuDisablePos = 500050000;
-function MirandaPluginInfoEx(mirandaVersion:dword):PPLUGININFOEX; cdecl;
-begin
- result:=@PluginInfo;
- PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
- PluginInfo.shortName :=PluginName;
- PluginInfo.version :=$0000060C;
- PluginInfo.description:='Paste played music info into message window or status text';
- PluginInfo.author :='Awkward';
- PluginInfo.copyright :='(c) 2005-12 Awkward';
- PluginInfo.homepage :='https://miranda-ng.org/p/Watrack/';
- PluginInfo.flags :=UNICODE_AWARE;
- PluginInfo.uuid :=MIID_WATRACK;
-end;
-
{$include i_options.inc}
{$include i_timer.inc}
{$include i_gui.inc}
@@ -675,9 +661,18 @@ begin end;
exports
- Load, Unload,
- MirandaPluginInfoEx;
+ Load, Unload;
begin
DisableThreadLibraryCalls(hInstance);
+
+ PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
+ PluginInfo.shortName :=PluginName;
+ PluginInfo.version :=$0000060C;
+ PluginInfo.description:='Paste played music info into message window or status text';
+ PluginInfo.author :='Awkward';
+ PluginInfo.copyright :='(c) 2005-12 Awkward';
+ PluginInfo.homepage :='https://miranda-ng.org/p/Watrack/';
+ PluginInfo.flags :=UNICODE_AWARE;
+ PluginInfo.uuid :=MIID_WATRACK;
end.
diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp index 1eed92c54c..9d7cf11e40 100755 --- a/plugins/Watrack_MPD/src/init.cpp +++ b/plugins/Watrack_MPD/src/init.cpp @@ -43,11 +43,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int OnModulesLoaded(WPARAM, LPARAM)
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp index 469aaa8251..17894a55e8 100644 --- a/plugins/Weather/src/weather.cpp +++ b/plugins/Weather/src/weather.cpp @@ -83,11 +83,6 @@ CMPlugin::CMPlugin() : SetUniqueId("ID");
}
-extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index a27cef9231..91778dffe2 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -53,11 +53,6 @@ CMPlugin::CMPlugin() : SetUniqueId("PreserveName");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void InitServices()
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp index fb5e124084..970fb3f3ff 100644 --- a/plugins/WhenWasIt/src/WhenWasIt.cpp +++ b/plugins/WhenWasIt/src/WhenWasIt.cpp @@ -47,11 +47,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load(void)
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index de08971df6..094320ad92 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -26,11 +26,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int OptionsInit(WPARAM, LPARAM);
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp index 156518c5a5..ec497b4be7 100644 --- a/plugins/WinterSpeak/src/main.cpp +++ b/plugins/WinterSpeak/src/main.cpp @@ -26,11 +26,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>("speak_config", pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
//-----------------------------------------------------------------------------
// Description : External hook
//-----------------------------------------------------------------------------
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index 55eccc0ee9..4802e65965 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -37,11 +37,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
struct
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 57d3cd29df..763bbe0492 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -93,11 +93,6 @@ CMPlugin::CMPlugin() : SetUniqueId("Id"); } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// // The callback function diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp index 0ce3638d47..803f3c446a 100644 --- a/plugins/YAPP/src/yapp.cpp +++ b/plugins/YAPP/src/yapp.cpp @@ -47,11 +47,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
static int ReloadFont(WPARAM, LPARAM)
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index 220a60f11a..fc0d6978e6 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -48,11 +48,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// Protocols acknowledgement
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp index e1cdb7ccf8..aebcc52b5a 100644 --- a/plugins/ZeroNotification/src/main.cpp +++ b/plugins/ZeroNotification/src/main.cpp @@ -32,11 +32,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// Update the name on the menu
diff --git a/plugins/ZeroSwitch/src/ZeroSwitch.cpp b/plugins/ZeroSwitch/src/ZeroSwitch.cpp index 34664f84be..6d89d004d4 100644 --- a/plugins/ZeroSwitch/src/ZeroSwitch.cpp +++ b/plugins/ZeroSwitch/src/ZeroSwitch.cpp @@ -32,11 +32,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK HelperProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/mRadio/mradio.dpr b/plugins/mRadio/mradio.dpr index d7cb1dade7..4d27ccc201 100644 --- a/plugins/mRadio/mradio.dpr +++ b/plugins/mRadio/mradio.dpr @@ -27,21 +27,6 @@ uses {$include i_visual.inc}
{$include i_optdlg.inc}
-function MirandaPluginInfoEx(mirandaVersion:dword):PPLUGININFOEX; cdecl;
-begin
- result:=@PluginInfo;
- PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
- PluginInfo.shortName :='mRadio Mod';
- PluginInfo.version :=$00000204;
- PluginInfo.description:='This plugin plays and records Internet radio streams.'+
- ' Also local media files can be played.';
- PluginInfo.author :='Awkward';
- PluginInfo.copyright :='(c) 2007-14 Awkward';
- PluginInfo.homepage :='https://miranda-ng.org/p/MRadio/';
- PluginInfo.flags :=UNICODE_AWARE;
- PluginInfo.uuid :=MIID_MRADIO;
-end;
-
function OnModulesLoaded(wParam:WPARAM;lParam:LPARAM):int;cdecl;
var
nlu:TNETLIBUSER;
@@ -178,7 +163,6 @@ begin CreateServiceFunction(MS_RADIO_EXPORT ,@ExportAll);
CreateServiceFunction(MS_RADIO_IMPORT ,@ImportAll);
-
CreateProtoServices;
HookEvent(ME_SYSTEM_MODULESLOADED ,@OnModulesLoaded);
@@ -198,8 +182,7 @@ begin end;
exports
- Load, Unload,
- MirandaPluginInfoEx;
+ Load, Unload;
begin
// register protocol
@@ -207,4 +190,15 @@ begin Proto_SetUniqueId(PluginName,optStationURL);
DisableThreadLibraryCalls(hInstance);
+
+ PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
+ PluginInfo.shortName :='mRadio Mod';
+ PluginInfo.version :=$00000204;
+ PluginInfo.description:='This plugin plays and records Internet radio streams.'+
+ ' Also local media files can be played.';
+ PluginInfo.author :='Awkward';
+ PluginInfo.copyright :='(c) 2007-14 Awkward';
+ PluginInfo.homepage :='https://miranda-ng.org/p/MRadio/';
+ PluginInfo.flags :=UNICODE_AWARE;
+ PluginInfo.uuid :=MIID_MRADIO;
end.
diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp index 6be7c412f0..62640c1a58 100644 --- a/plugins/mTextControl/src/main.cpp +++ b/plugins/mTextControl/src/main.cpp @@ -48,11 +48,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/wbOSD/src/main.cpp b/plugins/wbOSD/src/main.cpp index 192f2654cb..5126bd6dfe 100644 --- a/plugins/wbOSD/src/main.cpp +++ b/plugins/wbOSD/src/main.cpp @@ -36,11 +36,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load()
diff --git a/protocols/Discord/src/main.cpp b/protocols/Discord/src/main.cpp index 0b8404bf3d..e72f02b6a8 100644 --- a/protocols/Discord/src/main.cpp +++ b/protocols/Discord/src/main.cpp @@ -18,8 +18,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h" CHAT_MANAGER *pci; +CMPlugin g_plugin; + HWND g_hwndHeartbeat; +///////////////////////////////////////////////////////////////////////////////////////// + PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -39,15 +43,6 @@ CMPlugin::CMPlugin() : SetUniqueId(DB_KEY_ID); } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; - ///////////////////////////////////////////////////////////////////////////////////////// // Interface information diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp index 2c0203959b..79a8bedbdd 100644 --- a/protocols/Dummy/src/main.cpp +++ b/protocols/Dummy/src/main.cpp @@ -45,11 +45,6 @@ CMPlugin::CMPlugin() : SetUniqueId(templates[id].setting);
}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp index 09893f2b12..6c02c60c61 100644 --- a/protocols/EmLanProto/src/amdproto.cpp +++ b/protocols/EmLanProto/src/amdproto.cpp @@ -37,11 +37,6 @@ CMPlugin::CMPlugin() : SetUniqueId("Nick");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* __cdecl MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// Interface information
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp index 615b398450..97d57a5c4c 100644 --- a/protocols/FacebookRM/src/main.cpp +++ b/protocols/FacebookRM/src/main.cpp @@ -48,12 +48,6 @@ CMPlugin::CMPlugin() : SetUniqueId(FACEBOOK_KEY_ID);
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- g_mirandaVersion = mirandaVersion;
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// Interface information
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 8c41562922..c6230db354 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -53,11 +53,6 @@ CMPlugin::CMPlugin() : SetUniqueId(GG_KEY_UIN);
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
//////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/ICQCorp/src/corp.cpp b/protocols/ICQCorp/src/corp.cpp index be1339f51b..497037cf06 100644 --- a/protocols/ICQCorp/src/corp.cpp +++ b/protocols/ICQCorp/src/corp.cpp @@ -52,11 +52,6 @@ CMPlugin::CMPlugin() : Proto_SetUniqueId(protoName, "UIN");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
//////////////////////////////////////////////////////////////////////////
// Interface information
diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index d8c7760439..e8b9724a67 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -60,11 +60,6 @@ CMPlugin::CMPlugin() : SetUniqueId("Nick");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
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 03458a6e91..40edf08637 100644 --- a/protocols/IcqOscarJ/src/init.cpp +++ b/protocols/IcqOscarJ/src/init.cpp @@ -52,11 +52,6 @@ CMPlugin::CMPlugin() : SetUniqueId(UNIQUEIDSETTING);
}
-extern "C" PLUGININFOEX __declspec(dllexport) *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index be35a6b994..21900ab114 100755 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -77,11 +77,6 @@ CMPlugin::CMPlugin() : SetUniqueId("jid");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/protocols/MRA/src/Mra.cpp b/protocols/MRA/src/Mra.cpp index aafa5594be..cc50b71add 100644 --- a/protocols/MRA/src/Mra.cpp +++ b/protocols/MRA/src/Mra.cpp @@ -34,11 +34,6 @@ CMPlugin::CMPlugin() : SetUniqueId("e-mail");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
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 2d0ebe2729..5b39364a1d 100644 --- a/protocols/MSN/src/msn.cpp +++ b/protocols/MSN/src/msn.cpp @@ -62,11 +62,6 @@ CMPlugin::CMPlugin() : SetUniqueId("wlid");
}
-extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// MirandaInterfaces - returns the protocol interface to the core
diff --git a/protocols/MinecraftDynmap/src/main.cpp b/protocols/MinecraftDynmap/src/main.cpp index 46b8ec8e9d..d65a46fed8 100644 --- a/protocols/MinecraftDynmap/src/main.cpp +++ b/protocols/MinecraftDynmap/src/main.cpp @@ -46,11 +46,6 @@ CMPlugin::CMPlugin() : SetUniqueId("Nick"); } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// // Interface information diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp index 4e3a855042..8f1e9a35d5 100644 --- a/protocols/Omegle/src/main.cpp +++ b/protocols/Omegle/src/main.cpp @@ -51,12 +51,6 @@ CMPlugin::CMPlugin() : SetUniqueId("Nick");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- g_mirandaVersion = mirandaVersion;
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// Interface information
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index 9f13661814..43ab40c2f8 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -25,11 +25,6 @@ CMPlugin::CMPlugin() : SetUniqueId("stid");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
CMPlugin g_plugin;
diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp index 3ad43bdb3b..394126f175 100644 --- a/protocols/SkypeWeb/src/main.cpp +++ b/protocols/SkypeWeb/src/main.cpp @@ -46,11 +46,6 @@ CMPlugin::CMPlugin() : SetUniqueId(SKYPE_SETTINGS_ID);
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
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 d3800ab357..e42ef84bd4 100644 --- a/protocols/Steam/src/main.cpp +++ b/protocols/Steam/src/main.cpp @@ -26,11 +26,6 @@ CMPlugin::CMPlugin() : SetUniqueId("SteamID");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
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 b96745c315..0d128b5d65 100644 --- a/protocols/Tox/src/main.cpp +++ b/protocols/Tox/src/main.cpp @@ -28,11 +28,6 @@ CMPlugin::CMPlugin() : SetUniqueId(TOX_SETTINGS_ID); } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - ///////////////////////////////////////////////////////////////////////////////////////// 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 dd2a9743d3..16a00f0ac9 100644 --- a/protocols/Twitter/src/main.cpp +++ b/protocols/Twitter/src/main.cpp @@ -46,11 +46,6 @@ CMPlugin::CMPlugin() : SetUniqueId(TWITTER_KEY_UN);
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
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 89e02ff532..493c01411a 100644 --- a/protocols/VKontakte/src/main.cpp +++ b/protocols/VKontakte/src/main.cpp @@ -43,11 +43,6 @@ CMPlugin::CMPlugin() : SetUniqueId("ID");
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/src/core/stdautoaway/src/main.cpp b/src/core/stdautoaway/src/main.cpp index b520ce7890..51ce693ead 100644 --- a/src/core/stdautoaway/src/main.cpp +++ b/src/core/stdautoaway/src/main.cpp @@ -44,11 +44,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_AUTOAWAY, MIID_LAST };
diff --git a/src/core/stdaway/src/main.cpp b/src/core/stdaway/src/main.cpp index 90c43ec8a8..f67eefefe2 100644 --- a/src/core/stdaway/src/main.cpp +++ b/src/core/stdaway/src/main.cpp @@ -44,11 +44,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY, MIID_LAST };
diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp index 548677eb42..94d4517491 100644 --- a/src/core/stdclist/src/init.cpp +++ b/src/core/stdclist/src/init.cpp @@ -59,11 +59,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>("CList", pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// returns plugin's interfaces information
diff --git a/src/core/stdcrypt/src/main.cpp b/src/core/stdcrypt/src/main.cpp index 4e69e3da7f..59c390c3f3 100644 --- a/src/core/stdcrypt/src/main.cpp +++ b/src/core/stdcrypt/src/main.cpp @@ -43,11 +43,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_CRYPTO, MIID_LAST };
diff --git a/src/core/stdemail/src/main.cpp b/src/core/stdemail/src/main.cpp index 12e62d1b3d..dd9c3ae081 100644 --- a/src/core/stdemail/src/main.cpp +++ b/src/core/stdemail/src/main.cpp @@ -44,11 +44,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SREMAIL, MIID_LAST };
diff --git a/src/core/stdfile/src/main.cpp b/src/core/stdfile/src/main.cpp index 864f95e58a..27a00db40a 100644 --- a/src/core/stdfile/src/main.cpp +++ b/src/core/stdfile/src/main.cpp @@ -48,11 +48,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRFILE, MIID_LAST };
diff --git a/src/core/stdidle/src/main.cpp b/src/core/stdidle/src/main.cpp index 85084c8d18..89268caadf 100644 --- a/src/core/stdidle/src/main.cpp +++ b/src/core/stdidle/src/main.cpp @@ -46,11 +46,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_IDLE, MIID_LAST };
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp index d32aebd342..2cdff71f91 100644 --- a/src/core/stdmsg/src/srmm.cpp +++ b/src/core/stdmsg/src/srmm.cpp @@ -46,11 +46,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(SRMMMOD, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM, MIID_LAST };
diff --git a/src/core/stdssl/src/main.cpp b/src/core/stdssl/src/main.cpp index c50ad8fb21..d80db3e488 100644 --- a/src/core/stdssl/src/main.cpp +++ b/src/core/stdssl/src/main.cpp @@ -43,11 +43,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SSL, MIID_LAST };
extern "C" int __declspec(dllexport) Load(void)
diff --git a/src/core/stduihist/src/main.cpp b/src/core/stduihist/src/main.cpp index d9f99ca941..1f5eeae95f 100644 --- a/src/core/stduihist/src/main.cpp +++ b/src/core/stduihist/src/main.cpp @@ -44,11 +44,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHISTORY, MIID_LAST };
diff --git a/src/core/stduserinfo/src/main.cpp b/src/core/stduserinfo/src/main.cpp index 1a3c0c3d51..cefc32e91d 100644 --- a/src/core/stduserinfo/src/main.cpp +++ b/src/core/stduserinfo/src/main.cpp @@ -44,11 +44,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIUSERINFO, MIID_LAST };
diff --git a/src/core/stduseronline/src/main.cpp b/src/core/stduseronline/src/main.cpp index 2f0869a6dc..248bf8077e 100644 --- a/src/core/stduseronline/src/main.cpp +++ b/src/core/stduseronline/src/main.cpp @@ -45,11 +45,6 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
{}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_USERONLINE, MIID_LAST };
diff --git a/src/mir_app/src/database.cpp b/src/mir_app/src/database.cpp index 12de009718..e7f5483e59 100644 --- a/src/mir_app/src/database.cpp +++ b/src/mir_app/src/database.cpp @@ -373,7 +373,7 @@ int touchDatabase(const wchar_t *tszProfile, DATABASELINK **dblink) return EGROKPRF_CANTREAD;
}
-// enumerate all plugins that had valid DatabasePluginInfo()
+// enumerate all database plugins
int tryOpenDatabase(const wchar_t *tszProfile)
{
for (auto &it : arDbPlugins) {
@@ -408,7 +408,7 @@ int tryOpenDatabase(const wchar_t *tszProfile) return -1; // no suitable driver found
}
-// enumerate all plugins that had valid DatabasePluginInfo()
+// enumerate all database plugins
static int tryCreateDatabase(const wchar_t *ptszProfile)
{
wchar_t *tszProfile = NEWWSTR_ALLOCA(ptszProfile);
diff --git a/src/mir_app/src/dll_sniffer.cpp b/src/mir_app/src/dll_sniffer.cpp index c341c9e87c..c4e64b31ed 100644 --- a/src/mir_app/src/dll_sniffer.cpp +++ b/src/mir_app/src/dll_sniffer.cpp @@ -112,26 +112,21 @@ MUUID* GetPluginInterfaces(const wchar_t* ptszFileName, bool& bIsPlugin) DWORD *ptrFuncList = (DWORD*)&pSecStart[pED->AddressOfFunctions];
MUUID* pIds = nullptr;
- bool bHasLoad = false, bHasUnload = false, bHasInfo = false, bHasMuuids = false;
+ bool bHasLoad = false, bHasUnload = false, bHasMuuids = false;
for (size_t i=0; i < pED->NumberOfNames; i++, ptrRVA++, ptrOrdRVA++) {
char *szName = (char*)&pSecStart[*ptrRVA];
if (!mir_strcmp(szName, "Load"))
bHasLoad = true;
- if (!mir_strcmp(szName, "MirandaPluginInfoEx"))
- bHasInfo = true;
else if (!mir_strcmp(szName, "Unload"))
bHasUnload = true;
else if (!mir_strcmp(szName, "MirandaInterfaces")) {
bHasMuuids = true;
pIds = (MUUID*)&pSecStart[ptrFuncList[*ptrOrdRVA]];
}
- // old plugin, skip it
- else if (!mir_strcmp(szName, "MirandaPluginInterfaces"))
- __leave;
}
// a plugin might have no interfaces
- if (bHasLoad && bHasUnload && bHasInfo)
+ if (bHasLoad && bHasUnload)
bIsPlugin = true;
if (!bHasLoad || !bHasMuuids || !bHasUnload)
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp index 6ed202455e..9bf1835e75 100644 --- a/src/mir_app/src/newplugins.cpp +++ b/src/mir_app/src/newplugins.cpp @@ -55,7 +55,6 @@ MUUID miid_last = MIID_LAST; static BOOL bModuleInitialized = FALSE;
wchar_t mirandabootini[MAX_PATH];
-static DWORD mirandaVersion;
static int askAboutIgnoredPlugins;
pluginEntry *plugin_crshdmp, *plugin_service, *plugin_ssl, *plugin_clist;
@@ -185,12 +184,12 @@ static bool validInterfaceList(MUUID *piface) return true;
}
-static int checkPI(BASIC_PLUGIN_INFO *bpi, PLUGININFOEX *pi)
+static int checkPI(BASIC_PLUGIN_INFO *bpi, const PLUGININFOEX *pi)
{
if (pi == nullptr)
return FALSE;
- if (bpi->InfoEx == nullptr || pi->cbSize != sizeof(PLUGININFOEX))
+ if (pi->cbSize != sizeof(PLUGININFOEX))
return FALSE;
if (!validInterfaceList(bpi->Interfaces) || isPluginBanned(pi->uuid))
@@ -203,7 +202,7 @@ static int checkPI(BASIC_PLUGIN_INFO *bpi, PLUGININFOEX *pi) return TRUE;
}
-int checkAPI(wchar_t* plugin, BASIC_PLUGIN_INFO* bpi, DWORD dwMirVer, int checkTypeAPI)
+int checkAPI(wchar_t* plugin, BASIC_PLUGIN_INFO* bpi, int checkTypeAPI)
{
SetErrorMode(SEM_FAILCRITICALERRORS); // disable error messages
HINSTANCE h = LoadLibrary(plugin);
@@ -212,12 +211,12 @@ int checkAPI(wchar_t* plugin, BASIC_PLUGIN_INFO* bpi, DWORD dwMirVer, int checkT return 0;
// loaded, check for exports
+ CMPluginBase &pPlugin = GetPluginByInstance(h);
bpi->Load = (Miranda_Plugin_Load)GetProcAddress(h, "Load");
bpi->Unload = (Miranda_Plugin_Unload)GetProcAddress(h, "Unload");
- bpi->InfoEx = (Miranda_Plugin_InfoEx)GetProcAddress(h, "MirandaPluginInfoEx");
- // if they were present
- if (!bpi->Load || !bpi->Unload || !bpi->InfoEx) {
+ // Load & Unload shall be defined anyway, and a dll must register itself during LoadLibrary
+ if (!bpi->Load || !bpi->Unload || pPlugin.getInst() != h) {
LBL_Error:
FreeLibrary(h);
return 0;
@@ -225,17 +224,19 @@ LBL_Error: bpi->Interfaces = (MUUID*)GetProcAddress(h, "MirandaInterfaces");
if (bpi->Interfaces == nullptr) {
- typedef MUUID * (__cdecl * Miranda_Plugin_Interfaces) (void);
+ // MirandaPluginInterfaces function is actual only for the only plugin, HistoryPlusPlus
+ // plugins written in C++ shall export data directly
+ typedef MUUID* (__cdecl * Miranda_Plugin_Interfaces)(void);
Miranda_Plugin_Interfaces pFunc = (Miranda_Plugin_Interfaces)GetProcAddress(h, "MirandaPluginInterfaces");
if (pFunc)
bpi->Interfaces = pFunc();
}
- PLUGININFOEX* pi = bpi->InfoEx(dwMirVer);
- if (!checkPI(bpi, pi))
+ const PLUGININFOEX &pi = pPlugin.getInfo();
+ if (!checkPI(bpi, &pi))
goto LBL_Error;
- bpi->pluginInfo = pi;
+ bpi->pluginInfo = π
// basic API is present
if (checkTypeAPI == CHECKAPI_NONE) {
LBL_Ok:
@@ -245,7 +246,7 @@ LBL_Ok: // check clist ?
if (checkTypeAPI == CHECKAPI_CLIST) {
bpi->clistlink = (CList_Initialise)GetProcAddress(h, "CListInitialise");
- if ((pi->flags & UNICODE_AWARE) && bpi->clistlink)
+ if ((pi.flags & UNICODE_AWARE) && bpi->clistlink)
goto LBL_Ok;
}
goto LBL_Error;
@@ -379,7 +380,7 @@ pluginEntry* OpenPlugin(wchar_t *tszFileName, wchar_t *dir, wchar_t *path) bool bIsDb = hasMuuid(pIds, MIID_DATABASE);
if (bIsDb || hasMuuid(pIds, MIID_CRYPTO)) {
BASIC_PLUGIN_INFO bpi;
- if (checkAPI(tszFullPath, &bpi, mirandaVersion, CHECKAPI_NONE)) {
+ if (checkAPI(tszFullPath, &bpi, CHECKAPI_NONE)) {
// plugin is valid
p->bHasBasicApi = p->bIsLast = true;
if (bIsDb)
@@ -412,7 +413,7 @@ pluginEntry* OpenPlugin(wchar_t *tszFileName, wchar_t *dir, wchar_t *path) // load it for a profile manager's window
else if (hasMuuid(pIds, MIID_SERVICEMODE)) {
BASIC_PLUGIN_INFO bpi;
- if (checkAPI(tszFullPath, &bpi, mirandaVersion, CHECKAPI_NONE)) {
+ if (checkAPI(tszFullPath, &bpi, CHECKAPI_NONE)) {
p->bOk = p->bHasBasicApi = true;
p->bpi = bpi;
if (hasMuuid(bpi, MIID_SERVICEMODE)) {
@@ -465,7 +466,7 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic) BASIC_PLUGIN_INFO bpi;
mir_snwprintf(tszFullPath, L"%s\\%s\\%s", exe, (p->bIsCore) ? L"Core" : L"Plugins", p->pluginname);
- if (!checkAPI(tszFullPath, &bpi, mirandaVersion, CHECKAPI_NONE)) {
+ if (!checkAPI(tszFullPath, &bpi, CHECKAPI_NONE)) {
p->bFailed = true;
return false;
}
@@ -557,7 +558,7 @@ static bool loadClistModule(wchar_t* exe, pluginEntry *p) g_bReadyToInitClist = true;
BASIC_PLUGIN_INFO bpi;
- if (checkAPI(exe, &bpi, mirandaVersion, CHECKAPI_CLIST)) {
+ if (checkAPI(exe, &bpi, CHECKAPI_CLIST)) {
p->bpi = bpi;
p->bIsLast = p->bOk = p->bHasBasicApi = true;
@@ -711,7 +712,7 @@ int LoadProtocolPlugins(void) mir_snwprintf(tszFullPath, L"%s\\%s\\%s", exe, L"Plugins", p->pluginname);
BASIC_PLUGIN_INFO bpi;
- if (checkAPI(tszFullPath, &bpi, 0, CHECKAPI_NONE)) {
+ if (checkAPI(tszFullPath, &bpi, CHECKAPI_NONE)) {
p->bOk = p->bHasBasicApi = true;
p->bpi = bpi;
}
@@ -798,8 +799,6 @@ int LoadNewPluginsModuleInfos(void) LoadPluginOptions();
- mirandaVersion = Miranda_GetVersion();
-
// remember where the mirandaboot.ini goes
PathToAbsoluteW(L"mirandaboot.ini", mirandabootini);
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index ee7bc7d146..db0390e517 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -65,7 +65,7 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM HINSTANCE hInst = GetModuleHandle(buf);
BASIC_PLUGIN_INFO pi;
- if (checkAPI(buf, &pi, MIRANDA_VERSION_CORE, CHECKAPI_NONE) == 0)
+ if (checkAPI(buf, &pi, CHECKAPI_NONE) == 0)
return TRUE;
PluginListItemData *dat = (PluginListItemData*)mir_alloc(sizeof(PluginListItemData));
diff --git a/src/mir_app/src/plugins.h b/src/mir_app/src/plugins.h index 08b5c63eda..68f8b3024e 100644 --- a/src/mir_app/src/plugins.h +++ b/src/mir_app/src/plugins.h @@ -11,8 +11,7 @@ // basic export prototypes
typedef int (__cdecl * Miranda_Plugin_Load) (void);
typedef int (__cdecl * Miranda_Plugin_Unload) (void);
-// version control
-typedef PLUGININFOEX * (__cdecl * Miranda_Plugin_InfoEx) (DWORD mirandaVersion);
+
// prototype for clists
typedef int (__cdecl * CList_Initialise) (void);
@@ -22,10 +21,9 @@ struct BASIC_PLUGIN_INFO HINSTANCE hInst;
Miranda_Plugin_Load Load;
Miranda_Plugin_Unload Unload;
- Miranda_Plugin_InfoEx InfoEx;
CList_Initialise clistlink;
- PLUGININFOEX *pluginInfo; // must be freed if hInst = = nullptr then its a copy
- MUUID *Interfaces; // array of supported interfaces
+ const PLUGININFOEX *pluginInfo; // must be freed if hInst == nullptr then its a copy
+ MUUID *Interfaces; // array of supported interfaces
};
struct pluginEntry
@@ -43,7 +41,7 @@ struct pluginEntry bool bHasBasicApi : 1; // has Load, Unload, MirandaPluginInfo() -> PLUGININFO seems valid, this dll is in memory.
bool bIsProtocol : 1; // protocol module
- bool bIsDatabase : 1; // has DatabasePluginInfo() and is valid as can be, and PCLASS_BASICAPI has to be set too
+ bool bIsDatabase : 1; // has MUUID_DATABASE in its interfaces, and PCLASS_BASICAPI has to be set too
bool bIsClist : 1; // a CList implementation
bool bIsCrypto : 1; // crypto provider
};
@@ -64,7 +62,7 @@ void SetPluginOnWhiteList(const wchar_t* pluginname, int allow); int getDefaultPluginIdx(const MUUID& muuid);
bool hasMuuid(const BASIC_PLUGIN_INFO&, const MUUID&);
bool hasMuuid(const MUUID* pFirst, const MUUID&);
-int checkAPI(wchar_t* plugin, BASIC_PLUGIN_INFO* bpi, DWORD mirandaVersion, int checkTypeAPI);
+int checkAPI(wchar_t* plugin, BASIC_PLUGIN_INFO* bpi, int checkTypeAPI);
pluginEntry* OpenPlugin(wchar_t *tszFileName, wchar_t *dir, wchar_t *path);
|