Mercurial > hg > vamp-plugin-load-checker
changeset 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 | d4548b18eaf2 |
children | cf18645ff411 |
files | src/helper.cpp |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
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 != "") {