问题
I'm trying to get rid of the error messages Windows sometimes pops when loading a DLL.
I tried to do the following:
UINT oldErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
SetErrorMode(oldErrorMode | SEM_FAILCRITICALERRORS);
LoadLibrary(myDll);
SetErrorMode(oldErrorMode);
But I'm still getting the error windows, I tried to load several DLLs to make sure they don't remove the SerErrorMode() so that's not the case.
Does anybody has an idea what else can I try?
Thanks
来源:https://stackoverflow.com/questions/8254122/suppressing-errors-in-loadlibrary