Lync SDK上的桌面共享,应用程序模式返回null

Lync SDK上的桌面共享,应用程序模式返回null,sdk,desktop,lync,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 (_conver

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

      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;
            }

        }  
在会话中添加,即使我们正在获取会话模态

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

}

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

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