Dll是否尝试在OS Loader locck中进行托管执行? [英] Dll is attempting managed execution inside OS Loader locck ?
本文介绍了Dll是否尝试在OS Loader locck中进行托管执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
DLL' C:\ Windows \assembly \ GAC \ Microsoft.DirectX \1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll '正在尝试在OS Loader锁内执行托管执行。不要尝试在 DllMain
或图像初始化函数中运行托管代码,因为这样做会导致应用程序挂起。
如何使用它?
解决方案
Google是你的朋友 [ ^ ]
在发布之前,始终为Google提供答案。它节省了每个人的时间。
调试 - >例外 - >托管调试协助 - > Loader Lock(取消选中抛出)
在参考Rob Graham:嗯,我搜索了这个尝试在OS Loader锁中执行托管执行问题并在CodeProject中找到了这个答案!!!!!
无论如何,我在另一个第三个产品DLL上有错误消息。我的程序已编译并正常工作。然后我做了一个完整的构建并在下一次运行时得到了这个错误。我从备份中恢复了所有源代码并仍然收到错误!
真正的问题:在我测试模块时,我转过身来on异常处理以在首次抛出异常时唤醒调试器。下次我进行完整编译时,所有内容都设置了此选项。第三方DLL抛出此错误,捕获并处理它但是当我打开此异常选项时,调试器就醒了。
解决方案:设置异常正常。
如果没有调试器运行已编译的程序,我认为它会有效。
-rwg
DLL 'C:\Windows\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain
or image initialization function since doing so can cause the application to hang.
How can I use it?
解决方案
Google is your friend[^]
Always Google for the answer before posting. It saves everyone time.
Debug-->Exceptions-->managed debugging assistances-->Loader Lock(uncheck thrown)
In reference to Rob Graham: Hmmm, I googled this "attempting managed execution inside OS Loader lock" problem and found this answer in CodeProject!!!!!
Anyway, I had the error message on another third product DLL. My program had been compiling and working fine. Then I did a full build and got this error the next run. I restored all source code from backups and still received the error!
The real problem: During my testing of a module, I turned on Exception handling to wake up the debugger when the exception is first thrown. The next time I did a full compile, everything had this option set. The third party DLL was throwing this error, catching and handling it but when I turned on this exception option, then the debugger woke up.
The solution: set Exceptions back to normal.
Had I run the compiled program without the debugger I think it would have worked.
-rwg
这篇关于Dll是否尝试在OS Loader locck中进行托管执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文