2013-10-15 6 views
6

이렇게 사용 가능한 오디오 장치 목록을 얻으려고하면 어떻게됩니까?Lync 2013 sdk에서 오디오 장치를 가져올 수 없습니다.

LyncClient client = LyncClient.GetClient(); 
foreach (Device dev in client.DeviceManager.AudioDevices) 
{ 
     //Do something 
} 

나는 Exception has been thrown by the target of an invocation.

다음
"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))." 

이 스택 트레이스

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) 
at Microsoft.Lync.Model.Internal.UCWCache.CreateUCW(Object source, CCOMInfo ccomInfo) 
at Microsoft.Lync.Model.Internal.UCWCache.GetITTargetNS(Object source) 
at Microsoft.Lync.Model.Internal.UCEnumerator`2.get_Current() 
at Microsoft.Lync.Model.Internal.UCEnumerator`2.System.Collections.Generic.IEnumerator<S>.get_Current() 

그리고

at Microsoft.Lync.Model.Device.AudioDevice.INTERNAL_Init(IAudioDevice initInterface) 
at Microsoft.Lync.Model.Device.AudioDevice.INTERNAL_Init_Object(Object initInterface) 
+0

동일한 문제가 있습니다.이 문제를 해결 한 버전 (sdk 및 Lync Client 2013 모두)을 게시 할 수 있습니까? – Anas

+0

늦게 답장을 드려서 죄송합니다. 이 버전의 Lync http://support.microsoft.com/kb/2825630을 사용합니다. 및 SDK의이 버전 http://www.microsoft.com/en-ca/download/confirmation.aspx?id=36824 – user1098580

답변

1

Lync와 SDK의 버전이 같은지 확인 했습니까?

많은 Lync 2013 릴리스가 있고 버전이 같지 않을 수 있습니다.

0

문제가있는 것으로 나타납니다 내부 예외 스택 추적을 인 오류를 얻을 "// Do s omething "코드의 일부입니다.

나는 그저 잘 뛰었다.

var Client = LyncClient.GetClient(); 

     foreach (var dev in Client.DeviceManager.AudioDevices) 
     {    
      Console.WriteLine(dev.Name); 
     } 

작동하지 않는 경우 스택 추적이 실행됩니까?

+0

dev 변수에 영향을 주려고 할 때 foreach 자체에서 오류가 발생합니다. 나는 스택 추적을 추가했다. – user1098580

관련 문제