我已经按链接https://msdn.microsoft.com/en-us/library/office/jj900715(v=office.15).aspx 建议的方式实现了IM应用程序(名称为“ContactCardDesktop.exe”)。我已完成每篇文章的所有注册表设置。但是对于函数GetAuthenticationInfo()和GetInterface(),IM应用程序没有Outlook调用。 即使没有获取注册表位置HKCU \ Software \ IM Providers \ ContactCardDesktop中的ProcessID。将IM应用程序与Outlook 2010/2013集成
在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成功打开REG键(HKCU:SOFTWARE \ IM提供商)
- CMsoIMProviderFactory :: HrEnsureDefaultIMAppRegKeys成功查询REG键(HKCU:SOFTWARE \ IM提供商:DefaultIMApp:ContactCardDesktop)
- CMsoIMProviderFactory :: HrEnsureDefaultIMProcessRegKey成功打开注册表项(HKCU:SOFTWARE \ IM Providers \ ContactCardDesktop)
- CMsoIMProviderFactory :: HrEnsureDefaultIMProcessRegKey成功打开REG键(HKLM:SOFTWARE \ IM提供商\ ContactCardDesktop)
CMsoIMProviderFactory ::搜索
- CMsoIMProviderFactory ::使用(ContactCardDesktop.exe)的进程名WhichMessengerInProcessList使用WhichMessengerInProcessList( ContactCardDesktop.exe)搜索HR = 80040154进程的名称,我们无法确定供应商类型,我们现在尝试手动CoCreate的使用LCClient CLSID
- CMsoIMProviderFactory :: HrGetAvailableProvider!失败!线路:409小时= 0x80040154的HR = 80040154,我们无法确定供应商类型,我们现在尝试手动CoCreate的使用LCClient CLSID
- CMsoIMProviderFactory :: HrGetAvailableProvider失败!行:289小时= 0x80004005 !!!提供程序初始化失败!
嗨,我是在太整合我的办公室IM应用有趣。我看不到如何将CSExeCOMServer放入我的代码中。你会有一些提示吗?谢谢 ! – SRD