Mercurial > hg > vamp-plugin-load-checker
diff 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 |
line wrap: on
line diff
--- 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 != "") {