Outlook Interop-检测崩溃 [英] Outlook Interop - Detect Crash

查看:50
本文介绍了Outlook Interop-检测崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以在连接Outlook时检测Outlook何时崩溃?我有一个程序可以通过使用Outlook连接器在Outlook中读取我的电子邮件来检查我的Hotmail帐户,然后以编程方式每15秒点击一次发送/接收并每秒检查一次我的电子邮件计数.

我没有知道这是因为我打发送/接收的频率是多少,还是检查电子邮件计数的频率是因为我使用的是笨拙的计算机,但是Outlook崩溃了很多.问题在于它没有关闭,它弹出外观崩溃".重新启动吗?"窗口,因此该过程仍然有效.这意味着我不能只是检查该过程并重新启动(如果不存在).那么,有什么方法可以让我检测到Outlook已停止工作吗?

解决方案

您好,

这可能有不同的原因.由于您是通过互操作进行调用的,因此COM可能会引发导致崩溃的异常.为了缩小问题的范围,我们需要更多信息:
1.如您所说,您是否在其他计算机上尝试过您的应用程序?机器本身,甚至机器状态也会影响您的应用.
2.您是否尝试过增加查询间隔以查看击中速度是否太快?
3.您是否曾经尝试调试崩溃,以查看崩溃的原因?您可以创建一个崩溃的dumo并与我们分享.

请提供有关您的计算机,操作系统,Office,VS和应用程序的更多信息.

Hamed

Is there any way to detect when outlook crashes while I'm connected to it? I have a program which checks my hotmail account by using outlook connector to read my emails in outlook, then I programmatically hit send/receive every 15 seconds and check my email count every second.

I don't know if it's because of how often I hit send/receive or how often I check my email count, or if it's just the crappy computer I'm using, but outlook crashes a lot. The problem is that it doesn't close, it pops up a "outlook has crashed. restart it?" window so the process is still alive. This means I can't just check for the process and restart if it's not there. So is there any way for me to detect that outlook has stopped working?

解决方案

Hi there,

This could have different reasons. Since you are calling through interop, COM could throw exceptions which causes the crash. In order to narrow down the problem, we need more information:
1. As you said, have you tried your app on a different machine? The machine itself and even the state of the machine can affect your app.
2. Have you tried increasing your query intervals to see if you are hitting too quickly?
3. Have you ever tried to debug the crash to see why it is crashing? You may create a crash dumo and share it with us.

Please give more info about your machine, OS, Office, VS, and your app.

Hamed


这篇关于Outlook Interop-检测崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆