我已根据链接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。
在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 :: WhichMessengerInProcessList使用(ContactCardDesktop.exe)进程名称进行搜索
答案 0 :(得分:0)
我已经解决了这个问题,使用位于https://code.msdn.microsoft.com/windowsapps/CSExeCOMServer-3b1c1054的COM服务器“CSExeCOMServer”