在Lync SDK上进行桌面共享,Application Modality返回null

时间:2014-09-24 11:58:06

标签: sdk desktop lync

单击按钮,应为活动对话窗口触发桌面共享事件。在按钮单击中,我们有以下代码:

      private void StartSharingResource_Button_Click(object sender, EventArgs e)
        {

            //If there is no active conversation to share this resource in, return from handler
            if (_conversation == null)
            {
                return;
            }

            //If there is no sharing modality stored locally on the active conversation, get it from the active conversation and store it.
            if (_sharingModality == null)
            {
                _sharingModality = _conversation.Modalities[ModalityTypes.ApplicationSharing] as ApplicationSharingModality;
            }

        }  

On Conversation添加甚至我们正在获取对话模式

void ConversationManager_ConversationAdded(object sender, Microsoft.Lync.Model.Conversation.ConversationManagerEventArgs e)
        {
          _sharingModality = (ApplicationSharingModality)_conversation.Modalities[ModalityTypes.ApplicationSharing];

}

在_conversation.Modalities [ModalityTypes.ApplicationSharing]部分中都是null,我们得到一个对象引用错误。我们正在使用LYNC SDK - 15.0.4603.1000版本。

1 个答案:

答案 0 :(得分:0)

您的Lync SDK版本高于Lync客户端版本,因此无法保证某些api调用。请从Microsoft应用最新的Lync补丁。