如何避免“RPC 服务器不可用”当用户关闭 Outlook 并且我的应用程序正在使用 OLE 自动化时?

发布于 2024-08-31 13:11:02 字数 294 浏览 2 评论 0原文

我的应用程序使用 Outlook 对象模型。 Outlook 是一个进程外 COM 服务器。在 Outlook 2007 之前,如果用户在我的应用程序引用 Outlook 时关闭 Outlook,则 Outlook 将以隐藏状态运行。在 Outlook 2007 中,如果用户关闭 Outlook,进程就会关闭,并且我的应用程序会收到“RPC 服务器不可用”消息。 Outlook 忽略我的应用程序参考。

如何让 Outlook 2007 尊重我的应用程序对其的引用,并执行它在 Outlook 2000 中执行的操作(保持运行,直到我的应用程序发布引用)?

My application uses the Outlook object model. Outlook is an out-of-process COM server. Before Outlook 2007, if the user would close Outlook while my app had a reference to it, Outlook would stay running in a hidden state. In Outlook 2007, if the user closes Outlook, the process closes and my application receives a "RPC server is unavailable". Outlook is ignoring my apps reference.

How do I get Outlook 2007 to respect my application's reference to it, and do what it used to do in Outlook 2000 (stay running until my app released the reference)?

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

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

发布评论

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

评论(1

尾戒 2024-09-07 13:11:02

订阅应用程序对象的 Quit 事件并释放对 Outlook 等的引用。

我认为还有一个 reg hack 可以使其像以前一样运行..

arrha .. 刚刚找到带有注册表路径 http://msdn.microsoft.com/en-us/library/dd239276.aspx

Subscribe to the Quit event off the application object and release your references to outlook etc.

I think there is also a reg hack to make it behave as before ..

arrha .. just found the msdn article with the registry path http://msdn.microsoft.com/en-us/library/dd239276.aspx

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