Reentrancy was detected

左心房为你撑大大i 提交于 2019-12-22 14:41:03

问题


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.

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.

I've seen this article in MSDN - http://msdn.microsoft.com/en-us/library/ms172237.aspx but it doesn't help really.


回答1:


I figured that out:

  • It should be in the same thread (this was expected)
  • It should not run during the initialization of the unmanaged control. So I run it after setting all properties and events then it worked.


来源:https://stackoverflow.com/questions/808030/reentrancy-was-detected

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