Suppressing errors in LoadLibrary

喜欢而已 提交于 2019-12-11 19:28:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!