为什么在调试时 Word 会冻结?

发布于 2024-07-07 05:17:16 字数 128 浏览 7 评论 0原文

每当我在 Visual Studio 2008 中的某个 C#.NET 应用程序中遇到断点并启动 Microsoft Word 2007 时,Word 将无法打开,直到我重新启动 C# 应用程序。 我有一些关于原因的理论,但有人确切知道吗?

Whenever I'm at a break point in a certain C#.NET application in Visual Studio 2008 and I fire up Microsoft Word 2007, word will fail to open until I restart the C# application. I have a few theories about why, but does anyone know for sure?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无可置疑 2024-07-14 05:17:16

这可能是因为 Word 正在向顶级窗口发送 DDE 消息,而您的应用程序无法处理它,因为它挂在调试器中。 Raymond Chen 有一篇关于此的博客文章(尽管与调试器没有直接关系,但效果相同)。

This can be because Word is sending out DDE messages to top level windows, and your app is not able to process it since it is hung in the debugger. Raymond Chen has a blog post on this (though not directly related to debugger, but same effect).

日久见人心 2024-07-14 05:17:16

此类挂起的常见原因是(或曾经是)应用程序在启动时发送广播 Windows 消息并期望每个窗口都有响应。 如果您在调试器中打开了 GUI 应用程序,那么它不会回复 Windows 消息,因此发送应用程序将挂起等待响应。 我记得使用这种技术的最常见的程序类型是安装程序。

我不知道 Word 2007 是否发送任何广播消息,但这只是可能发生的一种方式。 COM/OLE 内容可能会通过多种方式挂起,对于 Word 来说,这种情况似乎更可能发生。

A common cause of such hangs is (or used to be) an application that sent a broadcast Windows message on startup and expected a response from every window. If you've got a GUI application open in a debugger, then it won't be replying to Windows messages and so the sending application will hang waiting for a response. I recall the most common types of programs that used this technique were installer programs.

I don't know whether Word 2007 sends any broadcast messages, but that's only one way this might happen. There are a myriad ways that COM/OLE stuff can get hung up, and this probably seems more likely for Word.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文