comparison src/helper.cpp @ 32:146d42909e71

Avoid Windows error dialog for DLL load failures in checker
author Chris Cannam
date Thu, 23 Feb 2017 10:34:56 +0000
parents 7a20698b4c29
children a43d7a2867d2
comparison
equal deleted inserted replaced
31:d4548b18eaf2 32:146d42909e71
226 return 2; 226 return 2;
227 } 227 }
228 228
229 string descriptor = argv[1]; 229 string descriptor = argv[1];
230 230
231 #ifdef _WIN32
232 // Avoid showing the error-handler dialog for missing DLLs,
233 // failing quietly instead. It's permissible for this program
234 // to simply fail when a DLL can't be loaded -- showing the
235 // error dialog wouldn't change this anyway, it would just
236 // block the program until the user clicked it away and then
237 // fail anyway.
238 SetErrorMode(SEM_FAILCRITICALERRORS);
239 #endif
240
231 while (getline(cin, soname)) { 241 while (getline(cin, soname)) {
232 string report = check(soname, descriptor); 242 string report = check(soname, descriptor);
233 if (report != "") { 243 if (report != "") {
234 cout << "FAILURE|" << soname << "|" << report << endl; 244 cout << "FAILURE|" << soname << "|" << report << endl;
235 allGood = false; 245 allGood = false;