首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将IM应用程序与outlook 2010/2013集成

将IM应用程序与outlook 2010/2013集成
EN

Stack Overflow用户
提问于 2015-12-21 14:58:22
回答 1查看 363关注 0票数 0

我已经按照链接ContactCardDesktop.exe的建议实现了IM应用程序(名称为“https://msdn.microsoft.com/en-us/library/office/jj900715(v=office.15).aspx”),我已经完成了文章中所有的注册表设置。但是,对于函数GetAuthenticationInfo()和GetInterface(),对IM应用程序没有调用outlook。即使没有在注册表位置获得ProcessID,HKCU\Software\IM Providers\ContactCardDesktop。

在outlook日志中,我会看到下面附加的错误。我已经采纳了许多建议,但没有得到多少帮助。请提出问题/解决办法。

应用程序示例代码。

代码语言:javascript
复制
[ClassInterface(ClassInterfaceType.None)]
    [ComSourceInterfaces(typeof(_IUCOfficeIntegrationEvents))]
    [ProgId("LitwareClientAppObject.Class")]
    [Guid("449B04AD-32A8-4D21-B0AE-8FC316E051CE"), ComVisible(true)]

    public partial class LitwareClientAppObject : IUCOfficeIntegration
    {
        IMClient imClient;
        Automation imAutomation;

        public LitwareClientAppObject()
        {
            InitializeComponent();
            imClient = new IMClient();
            imAutomation = new IMClientAutomation();
        }
        // Implementation details omitted.
        public string GetAuthenticationInfo(string _version)
        {
            string supportedOfficeVersion = "15.0.0.0";
            // Do a simple check for equivalency.
            if (supportedOfficeVersion == _version)
            {
                return "<authenticationinfo>";
            }
            else
            {
                return null;
            }
        }

        public object GetInterface(string _version, OIInterface _interface)
        {
            IMClient imClient = new IMClient();
            IMClientAutomation imAutomation = new IMClientAutomation();
            switch (_interface)
            {
                case OIInterface.oiInterfaceILyncClient:
                    {
                        return imClient;
                    }
                case OIInterface.oiInterfaceIAutomation:
                    {
                        return imAutomation;
                    }
                default:
                    {
                        throw new NotImplementedException();
                    }
            }
        }

        public OIFeature GetSupportedFeatures(string _version)
        {
            OIFeature supportedFeature1 = OIFeature.oiFeatureQuickContacts;
            OIFeature supportedFeature2 = OIFeature.oiFeatureFastSearch;

            return (supportedFeature1 | supportedFeature2);
        }

错误,如:

  • CMsoIMProviderFactory::HrEnsureDefaultIMAppRegKeys成功开启reg键(HKCU:SOFTWARE\IM Providers)
  • CMsoIMProviderFactory::HrEnsureDefaultIMAppRegKeys成功查询reg密钥(HKCU:SOFTWARE\IM Providers:DefaultIMApp:ContactCardDesktop)
  • CMsoIMProviderFactory::HrEnsureDefaultIMProcessRegKey成功打开reg键(HKCU:SOFTWARE\IM Providers\ContactCardDesktop)
  • CMsoIMProviderFactory::HrEnsureDefaultIMProcessRegKey成功打开reg键(HKLM:SOFTWARE\IM Providers\ContactCardDesktop)
  • CMsoIMProviderFactory::WhichMessengerInProcessList使用(ContactCardDesktop.exe)进程名进行搜索
代码语言:javascript
复制
- CMsoIMProviderFactory::WhichMessengerInProcessList Using (ContactCardDesktop.exe) process name for search  hr = 80040154, We couldn't identify the provider type we now try to manually CoCreate using the LCClient CLSID  

  • CMsoIMProviderFactory::HrGetAvailableProvider!失败!行: 409 hr = 0x80040154 hr = 80040154,我们无法识别提供者类型,我们现在尝试使用CoCreate LCClient
  • CMsoIMProviderFactory::HrGetAvailableProvider!失败!行: 289 hr = 0x80004005!提供者初始化失败!
EN

回答 1

Stack Overflow用户

发布于 2016-02-18 12:33:23

我已经解决了这个问题来使用COM服务器"CSExeCOMServer“,也就是在https://code.msdn.microsoft.com/windowsapps/CSExeCOMServer-3b1c1054

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34398574

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档