2016年Skype商业版没有客户端SDK
本文关键字:客户端 SDK Skype 2016年 | 更新日期: 2023-09-27 18:18:22
我已经更新到Skype for Business 2016 (Office 2016),我正在开发的与Lync客户端集成的桌面应用程序已经开始抛出异常。
我猜SDK版本15.0.4481.100与Skype for Business版本16.0.42.66.1003不兼容,但我找不到比Lync 2013 SDK(2014-03-17)更新的SDK。
桌面客户端开发的Skype为商业2016不支持,因为它是与2013?
例外:Unable to cast COM object of type 'System.__ComObject' to interface type
'Microsoft.Office.Uc.IAudioDevice2'. This operation failed because the QueryInterface call
on the COM component for the interface with IID '{86B3E5FE-4635-4C1E-A725-C80B71D04984}'
failed due to the following error: No such interface supported
(Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
更新LyncClient.GetClient( sideBySide ).DeviceManager.AudioDevices
当我迭代音频设备时发生异常。使用嵌入式(UI抑制)S4B客户端启动和接受调用可以工作,但是sideByside不能。我最初的问题的答案似乎是肯定的,但不完全是!
Lync Client SDK 2013应该支持Skype for Business 2016。目前还没有发布新的客户端SDK。
您可以使用ILyncClient "内部对象"(来自Microsoft.Office.Uc)来解决此问题
,
static bool SetClientAudioDevice(LyncClient client, string name)
{
var innerClient = (ILyncClient)client.InnerObject;
var deviceManager = innerClient.DeviceManager;
Console.WriteLine("Current audio device: [{0}]", client.DeviceManager.ActiveAudioDevice.Name);
Console.WriteLine("Lync Client Audio Devices List:");
var ok = false;
foreach (var device in deviceManager.AudioDevices.OfType<Microsoft.Office.Uc.AudioDevice>())
{
Console.WriteLine(" AudioDevice: [{0}], Active[{1}], ID[{2}], IsCertified[{3}], Priority[{4}], Type[{5}]", device.Name, device.IsActive, device.Id, device.IsCertified, device.Priority, device.Type);
if (device.Name.IndexOf(name, StringComparison.InvariantCultureIgnoreCase) >= 0)
{
Console.WriteLine(" Setting active device!");
deviceManager.ActiveAudioDevice = device;
ok = true;
}
}
return ok;
}
就像Ankit提到的,2013 SDK也适用于Skype for Business 2016。
要绕过安装限制("Microsoft Lync 2013未找到"),请使用Jon Gallant的建议:http://blog.jongallant.com/2016/08/solution lync - 2013 -不- found/
即解压lyncsdk.exe并手动安装相应的MSI (x86或x64)。