Welcome to MSDN Blogs Sign in | Join | Help

Chris Mayo's Blog - Unified Communications Development

Writing software with the Unified Communications Platform - Office Communications Server 2007, Office Communicator 2007, Exchange 2007 and the UC SDKs
The Office Communicator Automation API in 2 min.

What is it?

The Office Communicator Automation API provides programmatic access to Office Communicator 2007 R2 so you can automate Office Communicator 2007 R2 running on the client computer.

The Office Communicator Automation API is a quick and easy way to integrate Office Communicator functionality into your applications.

 

What does it do?

With the Office Communicator Automation API, you can add presence and communication features to any client application, including:

  1. Embed Presence with Application Specific Contact Lists – use the API to build contact lists specific to an application and show Office Communicator presence for those contacts.
  2. Launch Communications – add IM, voice and video communications directly in an application to allow users to communicate and collaborate directly from the application.
  3. Application Context Specific Communication – use the API to integrate data from the application into conversations the application launches to provide application specific context for the conversation.

 

What do I need to know?

The API automates Office Communicator running on the client machine allowing you to create sophisticated presence and communication features with minimal code. 

 

The API works with either Office Communicator 2007 or Office Communicator 2007 R2. 

 

Office Communicator must be deployed on each client in order for your Office Communicator Automation API code to run.

 

The API provides two COM libraries:

  • Communicator.dll – provides classes and interfaces for automating Office Communicator.  Classes and interfaces in this library often cause Office Communicator to show dialogs.  For example, when calling the method to add a contact to the Office Communicator contact list from this library, the “Add Contact” dialog is shown.
  • CommunicatorPriv.dll – provides classes and interfaces for automating Office Communicator.  Classes and intefaces in this library will never show Office Communicator dialogs.  For example, calling the method to add a contact to the contact list using this library won’t show the “Add Contact” dialog.

 

Since the API is based on the COM platform, you’ll need to treat instances of classes and interfaces as unmanaged resources and release them when you’re done to avoid resource issues such as memory leaks.

 

What do I need?

  1. Office Communications Server 2007 (or later).
  2. Office Communicator 2007 (or later).
  3. Office Communicator 2007 SDK.
  4. Visual Studio 2005 (or later).

Where can I get it?

The Office Communicator Automation API ships in the Microsoft Office Communicator 2007 SDK along with samples and documentation.

Published Thursday, January 08, 2009 3:56 PM by cmayo

Comments

# The Office Communicator Automation API in 2 min. | Coded Style @ Thursday, January 08, 2009 5:08 PM

PingBack from http://www.codedstyle.com/the-office-communicator-automation-api-in-2-min/

The Office Communicator Automation API in 2 min. | Coded Style

# re: The Office Communicator Automation API in 2 min. @ Friday, January 30, 2009 1:05 PM

Can you use the Communicator Automation API with ASP.NET?

I created 2 VS2008 projects with the same code (just creates a _communicator object = new Messenger()). One project is a WPF app and the other ASP.NET. The WPF works fine but the ASP.NET keeps returning COM errors. Both are being run on a DC with OCS 2007, CWA, and a Communicator client.

Allyson Kreft

# re: The Office Communicator Automation API in 2 min. @ Friday, February 13, 2009 12:58 PM

No, the OC Automation API is for client side development.

Look at the UCMA 2.0 API for creating client gateways for server side scenarios such as ASP.NET.

Thanks,

Chris.

Chris

# re: The Office Communicator Automation API in 2 min. @ Wednesday, March 25, 2009 11:10 AM

Have you ever reached to get the phonenumber of an incomming call? I've spent a lot of time on this task, but I struggle with that. I want to show an adressform in our businessapplication of the incomming caller, related to the phonenumber.

Thomas Beneke

# When you say... @ Tuesday, April 14, 2009 8:48 AM

"use the API to build contact lists specific to an application", do you mean that you can programmatically create a list of contacts that do not appear in the Communicator users's contact list within Communicator?  I haven't found a way to do this.  You can create a new group, but it still appears in the user's contact list in Communicator.

I've also found that I often get stale presence from the Communicator Automation API for contacts who are not in the user's contact list.

Mark Irwin

# re: The Office Communicator Automation API in 2 min. @ Tuesday, April 21, 2009 3:38 PM

Thomas,

You can do this with the UCCA API.  See the following sample:

http://www.microsoft.com/downloads/details.aspx?FamilyId=84AC7DD7-99D3-48F7-99D7-A281BD616407&displaylang=en

Let me know if you have questions.

Chris.

cmayo

# re: The Office Communicator Automation API in 2 min. @ Tuesday, April 21, 2009 3:40 PM

Mark,

Yes, you can create a contact list that included contacts that are not in the local users contact list.  

You will get stale presence when using the OC Automation API.

To get around this, add the contact to the contact list under an application specific group.

Thanks,

Chris

cmayo

Anonymous comments are disabled
Page view tracker