# HG changeset patch # User Chris Cannam # Date 1487846096 0 # Node ID 146d42909e712134774f0b2a12498b1d841b6e8e # Parent d4548b18eaf20cb10045cf246af891d491c8cc32 Avoid Windows error dialog for DLL load failures in checker diff -r d4548b18eaf2 -r 146d42909e71 src/helper.cpp --- a/src/helper.cpp Tue Jan 10 17:18:48 2017 +0000 +++ b/src/helper.cpp Thu Feb 23 10:34:56 2017 +0000 @@ -228,6 +228,16 @@ string descriptor = argv[1]; +#ifdef _WIN32 + // Avoid showing the error-handler dialog for missing DLLs, + // failing quietly instead. It's permissible for this program + // to simply fail when a DLL can't be loaded -- showing the + // error dialog wouldn't change this anyway, it would just + // block the program until the user clicked it away and then + // fail anyway. + SetErrorMode(SEM_FAILCRITICALERRORS); +#endif + while (getline(cin, soname)) { string report = check(soname, descriptor); if (report != "") {