【发布时间】:2016-02-18 20:33:23
【问题描述】:
我已经按照链接https://msdn.microsoft.com/en-us/library/office/jj900715(v=office.15).aspx 的建议实现了 IM 应用程序(名称是“ContactCardDesktop.exe”) 我已经按照文章完成了所有的注册表设置。但是对于函数 GetAuthenticationInfo() 和 GetInterface(),没有调用 Outlook 到 IM 应用程序。 甚至没有在注册表位置 HKCU\Software\IM Providers\ContactCardDesktop 获取 ProcessID。
在 Outlook 日志中,我收到以下错误。我已经接受了很多建议,但没有得到太多帮助。 请提出问题/解决方案。
应用程序示例代码。
[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 成功打开注册密钥(HKCU:SOFTWARE\IM Providers)
- CMsoIMProviderFactory::HrEnsureDefaultIMAppRegKeys 成功查询 reg key (HKCU:SOFTWARE\IM Providers:DefaultIMApp:ContactCardDesktop)
- CMsoIMProviderFactory::HrEnsureDefaultIMProcessRegKey 成功打开注册密钥 (HKCU:SOFTWARE\IM Providers\ContactCardDesktop)
- CMsoIMProviderFactory::HrEnsureDefaultIMProcessRegKey 成功打开注册密钥 (HKLM:SOFTWARE\IM Providers\ContactCardDesktop)
-
CMsoIMProviderFactory::WhichMessengerInProcessList 使用 (ContactCardDesktop.exe) 进程名称进行搜索
- CMsoIMProviderFactory::WhichMessengerInProcessList 使用 (ContactCardDesktop.exe) 进程名称进行搜索 hr = 80040154,我们无法识别我们现在尝试使用 LCClient CLSID 手动 CoCreate 的提供程序类型
- CMsoIMProviderFactory::HrGetAvailableProvider !失败!行:409 hr = 0x80040154 hr = 80040154,我们无法识别我们现在尝试使用 LCClient CLSID 手动 CoCreate 的提供程序类型
- CMsoIMProviderFactory::HrGetAvailableProvider !失败!行:289 hr = 0x80004005 !!!Provider 初始化失败!!!
【问题讨论】:
标签: c# com outlook-2010 outlook-2013