gpt4 book ai didi

c# - 获取 contact.LastName 时出现 System.Runtime.InteropServices.COMException (0x800706BE)

转载 作者:行者123 更新时间:2023-11-30 13:51:28 25 4
gpt4 key购买 nike

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

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

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

有人知道问题出在哪里吗?

如有任何帮助,我们将不胜感激。谢谢!

最佳答案

这是一个 Windows 错误,设施代码 7。最后一个字给出了 Windows 错误,0x6be == 1726:

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

与 Outlook 等 Office 程序的互操作是通过进程外 COM 实现的。 RPC 是低级远程过程调用机制。这种远程调用失败的原因有多种。错误代码和错误名称都可以谷歌。

最简单的解释就是Outlook摔倒了。那个会发生。进程内互操作的优点是,当宿主程序崩溃时,它也会删除你的代码。不是在进程外的情况下,您只是很难诊断错误。请客户的 IT 员工使用他们典型的 Office 故障排除策略。

关于c# - 获取 contact.LastName 时出现 System.Runtime.InteropServices.COMException (0x800706BE),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4471787/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com