0
현재 응용 프로그램에서 Lync 사용자의 연락처 사진을 표시하려고합니다. Lync 클라이언트에서 이전에 사용자를 조회 한 경우에만 제대로 작동합니다. 일종의 캐싱이 필요한 것 같습니다. 이전에 사용자를 검색하지 않고 연락처 목록에서 사용자를 직접 연락처로 지정하지 않으면 아무 것도 반환하지 않습니다. 모든 아이디어 코드로 조회를 수행하는 방법? 지금 당장하고있는 일들 :Lync 2013 SDK GetContactInformation 사진
Public Function GetLyncPicture(lyncMail As String) As Image
Dim myimage As Image = Nothing
Try
If lyncMail.Trim.Length > 0 Then
client = LyncClient.GetClient()
If client IsNot Nothing Then
Dim cManager As ContactManager = client.ContactManager
If cManager IsNot Nothing Then
Dim contact As Contact = cManager.GetContactByUri(lyncMail)
If contact IsNot Nothing Then
Dim ciList As New List(Of ContactInformationType)()
ciList.Add(ContactInformationType.Photo)
Dim dic As IDictionary(Of ContactInformationType, Object) = Nothing
dic = contact.GetContactInformation(ciList)
If dic IsNot Nothing Then
Dim photoStream As Stream = TryCast(dic(ContactInformationType.Photo), Stream)
If photoStream IsNot Nothing Then
myimage = Image.FromStream(photoStream)
End If
End If
End If
End If
End If
End If
Catch ex As Exception
End Try
GetLyncPicture = myimage
End Function