取得contact.LastName时发生System.Runtime.InteropServices.COMException(0x800706BE) [英] System.Runtime.InteropServices.COMException (0x800706BE) when getting contact.LastName

查看:465
本文介绍了取得contact.LastName时发生System.Runtime.InteropServices.COMException(0x800706BE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的某些用户有时会收到此异常(并非针对每个联系人):

Some of our users are getting this exception sometimes (not for every contact):

System.Runtime.InteropServices.COMException (0x800706BE): 
   The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
   at Microsoft.Office.Interop.Outlook._ContactItem.get_LastName()

当我们尝试获取联系人的姓氏(ContactItem类型)时会发生这种情况.

This happens when we're trying to get the last name of a contact (of the ContactItem type).

有人知道是什么问题吗?

Does anybody know what the problem is?

任何帮助将不胜感激.谢谢!

Any help would be appreciated. Thanks!

推荐答案

这是Windows错误,功能代码7.最后一个字是Windows错误,0x6be == 1726:

It is a Windows error, facility code 7. The last word gives the Windows error, 0x6be == 1726:

// MessageId: RPC_S_CALL_FAILED
//
// MessageText:
//
// The remote procedure call failed.
//
#define RPC_S_CALL_FAILED                1726L

与Office程序(如Outlook)的互操作通过进程外COM进行. RPC是低级的远程过程调用机制.这种远程呼叫失败有多种原因.错误代码和错误名称都很好.

Interop with Office programs like Outlook happens through out-of-process COM. RPC is the low-level Remote Procedure Call mechanism. There are several reasons for such a remote call to fail. Both the error code and the error name google well.

最简单的解释就是Outlook崩溃了.那个会发生.进程内互操作的优点是,当主机程序崩溃时,它也会同时删除您的代码.并非在过程外的情况下,您只是很难诊断出错误.要求客户的IT员工使用其典型的Office故障排除策略.

The simplest explanation is just that Outlook fell over. That happens. The advantage of in-process interop is that when the host program crashes then it will take out your code as well. Not in an out-of-process scenario, you just get a hard to diagnose error. Ask your customer's IT staff to use their typical Office troubleshooting strategies.

这篇关于取得contact.LastName时发生System.Runtime.InteropServices.COMException(0x800706BE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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