Can I use the Microsoft Lync API to communicate with Communicator 2007/2007 R2?

I encode information about the presence of IM in one of silverlight's applications. So far, the only solution I have found is one from CodePlex (Silverlight.OCS). It is "good", but it is very dated.

The Lync SDK makes it easy to get presence information inside silverlight. Unfortunately, 99% of the users on our network are still on OFfice Communicator (R2), so using the ready-made Lync method (controls: PresenceIndicator ... in xaml) cannot work.

So, I'm curious if the Lync SDK supports the way to communicate with Office Communicator?

If so, how would I: a) check which client is running, and then b) connect to this client - be it Lync or Communicator. Any help is much appreciated! Last but not least, I'm looking for C # code, if at all possible. Thank!

+5
source share
1 answer

You cannot use the Lync 2010 SDK for Office Communicator, only Lync 2010.

A previous incarnation of the SDK is the Communicator Office Automation API (OCAA). This is a COM API and will work against Communication 2007 and 2007 R2. It is still supported ... bye!

You can download the API here . The MSDN landing page is here .

... , , ( , , OCS API;)

:

    private IMessengerContact FindContact(string userID)
{
    IMessengerContact contact = null;
    // Try the local contact list first
    try
    {
        contact = (IMessengerContact)communicator.GetContact(userID, "");
    }
    catch
    {
        contact = null;
    }

    // For a nonlocal contact, try the SIP Provider of Communicator
    if (contact == null || contact.Status == MISTATUS.MISTATUS_UNKNOWN)
    {
        try
        {
            contact =
                (IMessengerContact)communicator.GetContact(userID,
                communicator.MyServiceId);
            return contact;
        }
        catch
        {
            contact = null;
            return contact;
        }
    }
    else
    {
        return contact;
    }
}

:

IMessengerContact Status, MISTATUS.

+2

All Articles