From 9db2e1eb71e2428191fe0cda4d372391d6046ee0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 5 May 2018 12:14:44 +0200 Subject: fixes #1320 (Ordinal 116 not found in mir_app.mir) --- src/mir_app/src/dll_sniffer.cpp | 4 ++-- src/mir_app/src/newplugins.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mir_app/src/dll_sniffer.cpp b/src/mir_app/src/dll_sniffer.cpp index 0b9ea031b9..c341c9e87c 100644 --- a/src/mir_app/src/dll_sniffer.cpp +++ b/src/mir_app/src/dll_sniffer.cpp @@ -123,7 +123,7 @@ MUUID* GetPluginInterfaces(const wchar_t* ptszFileName, bool& bIsPlugin) bHasUnload = true; else if (!mir_strcmp(szName, "MirandaInterfaces")) { bHasMuuids = true; - pIds = (MUUID*)&pSecStart[ ptrFuncList[*ptrOrdRVA]]; + pIds = (MUUID*)&pSecStart[ptrFuncList[*ptrOrdRVA]]; } // old plugin, skip it else if (!mir_strcmp(szName, "MirandaPluginInterfaces")) @@ -141,7 +141,7 @@ MUUID* GetPluginInterfaces(const wchar_t* ptszFileName, bool& bIsPlugin) for (MUUID* p = pIds; *p != miid_last; p++) nLength++; - pResult = (MUUID*)mir_alloc( sizeof(MUUID)*nLength); + pResult = (MUUID*)mir_alloc(sizeof(MUUID)*nLength); if (pResult) memcpy(pResult, pIds, sizeof(MUUID)*nLength); } diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp index 9e93ea32eb..fa83a8ec39 100644 --- a/src/mir_app/src/newplugins.cpp +++ b/src/mir_app/src/newplugins.cpp @@ -121,7 +121,7 @@ static const MUUID pluginBannedList[] = { 0xa0138fc6, 0x4c52, 0x4501, { 0xaf, 0x93, 0x7d, 0x3e, 0x20, 0xbc, 0xae, 0x5b } }, // dbchecker }; -static bool isPluginBanned(const MUUID& u1) +static bool isPluginBanned(const MUUID &u1) { for (auto &it : pluginBannedList) if (it == u1) @@ -271,7 +271,9 @@ static int checkPI(BASIC_PLUGIN_INFO *bpi, PLUGININFOEX *pi) int checkAPI(wchar_t* plugin, BASIC_PLUGIN_INFO* bpi, DWORD dwMirVer, int checkTypeAPI) { + SetErrorMode(SEM_FAILCRITICALERRORS); // disable error messages HINSTANCE h = LoadLibrary(plugin); + SetErrorMode(0); // reset the system default if (h == nullptr) return 0; -- cgit v1.2.3