重入检测 [英] Reentrancy was detected
问题描述
我收到重入检测MDA错误同时设定了WebBrowser控件的属性。 这只是如果我称之为SetWindowsHookEx函数勾在同一个线程中的某些拨号。
I'm getting "Reentrancy was detected" MDA error while setting a webbrowser control's properties. This only happens if I call "SetWindowsHookEx" to hook some dials within the same thread.
通常这个钩子code正常工作,但它并没有发挥好与WebBrowser控件。当我忽略异常code正常工作,至少看起来不错,但很明显,我有点担心。
Normally this hooking code works fine but it doesn't play nice with Webbrowser Control. When I ignore the exception code works fine, at least look like fine but obviously I'm a bit worried.
有没有什么想法,为什么完全这个错误发生,以及如何解决问题。
Is there any idea why exactly this error is happening and how to resolve the problem.
我已经看到了这篇文章在MSDN - http://msdn.microsoft .COM / EN-US /库/ ms172237.aspx ,但它并不能帮助真的。
I've seen this article in MSDN - http://msdn.microsoft.com/en-us/library/ms172237.aspx but it doesn't help really.
推荐答案
我想通了这一点:
- 它应该是在同一线程中(这是预期)
- 在它不应该在非托管控制的初始化过程中运行。所以我设置的所有属性和事件,然后它的工作后,运行它。
这篇关于重入检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!