summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tools/idc/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp
index cceae07..19bd874 100644
--- a/src/tools/idc/main.cpp
+++ b/src/tools/idc/main.cpp
@@ -178,11 +178,13 @@ static HMODULE loadLibraryQt(const QString &input)
{
const wchar_t *inputC = reinterpret_cast<const wchar_t *>(input.utf16());
// Load DLL with the folder containing the DLL temporarily added to the search path when loading dependencies
+ const UINT oldErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
HMODULE result =
LoadLibraryEx(inputC, NULL, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
// If that fails, call with flags=0 to get LoadLibrary() behavior (search %PATH%).
if (!result)
result = LoadLibraryEx(inputC, NULL, 0);
+ SetErrorMode(oldErrorMode);
return result;
}