我已经按照链接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日志中,我会看到下面附加的错误。我已经采纳了许多建议,但没有得到多少帮助。请提出问题/解决办法。
应用程序示例代码。
[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 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
发布于 2016-02-18 12:33:23
我已经解决了这个问题来使用COM服务器"CSExeCOMServer“,也就是在https://code.msdn.microsoft.com/windowsapps/CSExeCOMServer-3b1c1054。
https://stackoverflow.com/questions/34398574
复制相似问题