Lync NotInitializedException uncatchable on windows 8

Viewed 230

I use lync Sdk to dock Lync conversation within my own wfp application. The problem is that when I try to dock the conversation like this:

public void Dock(Conversation conversation, IntPtr host)
{
  try
  {
    ConversationWindow window = _automation.GetConversationWindow(conversation);
    if (window.State == ConversationWindowState.Initialized)
    {
      window.Dock(host);
    }
  }
  catch (Exception ex)
  {
  }
}

sometime the window.State change between the verification and the docking and on windows 8 the generated exception seems to be not catchable and cause my application to crash where on windows 7 the exception is just catch.

the exception is of type Microsoft.Lync.Model.NotInitializedException

2 Answers
Related