[Home] [Overview] [Developer] [Manual]


COM Interfaces

Since Version 3.1, Open Contacts provides COM interfaces for you as software developers to integrate Open Contacts with other software applications such as calendar programs and Email programs. You don't need to study the database structures of Open Contacts. The interfaces give you COM functions to lookup, search, read, and write contact info.

COM Registration

When installing Open Contacts, the installer will register the COM interfaces.

If for some reason you need to register the Open Contacts COM API again, execute OpenContacts.exe with "regserver" as a command line argument. For example, assuming OpenContacts.exe is located in c:\Program Files\Open Contacts\, use the following command line to register:

"c:\Program Files\Open Contacts\OpenContacts.exe" /regserver

To unregister the COM API, use the following command:

"c:\Program Files\Open Contacts\OpenContacts.exe" /unregserver

Please note, Open Contacts can run as a portable program, with setting "disableCOM=1" in file "main.ini".  A running instance of Open Contacts with such setting will not respond to COM client calls.

Please check the IDL file of the original COM interface.

Overview

The COM object of Open Contacts hold a Contacts Buffer that stores all contacts, selected contacts, listed contacts, or new contact requested by the client. Many COM functions will reset this Contacts Buffer with a new set of contact IDs.

The purpose of the interfaces is for integrating Open Contacts with other software applications. For example, if you want to develop extensions or Add-on of Mozilla, Netscape or mobile phone managers, these interfaces could be handy.

Please check the COM Interface Reference.

You are welcome to suggest interfaces that suit your need.

Tips of Developing Client Programs

When transferring  data from OC to your program, you can get either individual contacts or organizational contacts, however, when transferring from your program to OC, by default you will write only to individual contacts. If you want to write to organizational contacts, please start a section by calling "BeginCompanies()" and end with "EndCompanies()".

Generally a COM client is a standalone program. However, if you desired, you may develop plugin programs for Open Contacts, which run in the same process with Open Contacts.