从 Outlook COM 加载项手动触发 Windows 错误报告

发布于 2024-08-25 17:17:49 字数 324 浏览 9 评论 0原文

我正在使用 Visual Studio 2008 和 VSTO 编写 Outlook COM 加载项。如果加载项中未处理异常,我希望它触发 Windows 错误报告 (WER)。我们公司可以访问 WinQual,以便我们可以从用户那里获取我们程序中发生的 WER 报告。有什么方法可以做到这一点吗?

据我所知,这是不可能的,但想检查一下是否有办法。仅当应用程序生成未处理的异常时才会触发 WER。在 Outlook 中运行的 Outlook 加载项和 Outlook 在对 COM 加载项的调用周围有异常处理程序,以防止 COM 加载项导致 Outlook 崩溃。由于 Outlook 不会崩溃,因此不会触发 WER。

I am writing a Outlook COM Add In using Visual Studio 2008 and VSTO. If an exception goes unhandled in the add in, I would like it to trigger Windows Error Reporting (WER). Our company has access to WinQual so that we can get reports of WER reports from users that occur in our program. Is there some way to do this?

From what I can tell, this isn't possible, but wanted to check to see if there was a way. WER is only triggered when an application generates an unhandled exception. An Outlook Add In run in Outlook and Outlook has exception handlers around the calls to COM Add In to protect against a COM Add In causing Outlook to crash. Since Outlook doesn't crash, WER doesn't get triggered.

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

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

发布评论

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

评论(1

早茶月光 2024-09-01 17:17:49

MSDN 论坛

正如您所说,WER 是由崩溃或挂起激活的,异常不会触发它,除非它们导致这些情况。好吧,试想一下,未处理的异常(甚至可能在用户代码中抛出)触发了 WER,微软将收到数百万份报告。如果您发现 VSTO 存在问题,请随时通过 Microsoft Connect 报告或在论坛上与我们分享。

虽然还没有完全实现,但潜台词似乎是它永远不会发生。

Answer to the same question (possibly by you!) found on MSDN forums:

As you said, WER is activated by a crash or hang and exceptions do not trigger that unless they lead to those conditions. Well, just imagine that unhandled exceptions (which even could be thrown in user code) triggered WER, Microsoft would get millions of reports. If you find a problem with VSTO, feel free to report it through Microsoft Connect ro share it with us on forum.

It doesn't quite get there, but the subtext would appear to be that it'll never happen.

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