The Pocket Outlook Object Model

Before you can begin developing applications that integrate with Pocket Outlook, let's first examine the object model that POOM uses to expose the contact, appointment, and task data that has been stored on the device. Figure 10.2 illustrates the relationships among the objects in Pocket Outlook.

Figure 10.2. Pocket Outlook's Data Object Model


The Pocket Outlook Object Model consists of the following interfaces:

  • The main interface of POOM is IPOutlookApp. This is the interface with which you log on to Outlook, and the one from which you derive all other interfaces.

  • Information about various time zones can be accessed through the ITimeZone interface.

  • Each Outlook application is contained within its own IFolder interface. There is one for Contacts, Appointments, and Tasks, each of which essentially "wraps" its respective database. In addition, there is a special folder for handling the sending and receiving of infrared data.

  • Enumeration of the items in a folder is handled through the IPOutlookItemCollection and IPOlItems interfaces.

  • IContact is the interface for working with an individual contact entry.

  • IAppointment is the interface for working with an individual appointment.

  • The IRecipients, IRecipient, and IPOlRecipient interfaces are used to specify recipients of an appointment (which is considered a meeting request).

  • ITask is the interface for working with an individual task.

  • The IRecurrencePattern, IExceptions, and IException interfaces are used for setting up recurring appointments and tasks.


In previous versions of Windows CE, POOM also supported additional information about various cities using the ICity interface. As of Pocket PC 2002, this city data has been removed, and calling IPOutlookApp::GetDefaultFolder() to return a City folder will return an E_NOTIMPL error code.

The data that was previously used for the interface is now provided by a comma-separated value file that is located in the .\wce300\Pocket PC 2002\citylist\citylist.csv directory. This file contains information such as city names, longitude and latitude, airport codes, and area codes.

A Word about Object Identifiers (OIDs)

Every item stored within any of the Pocket Outlook applications contains a unique DWORD value that can be used to identify it. This is also known as an item's object identifier (OID). As you will see, each of the interfaces in the Pocket Outlook Object Model provides a property value that you can use to retrieve an object's OID. While you can use an object's identifier to quickly get access to an item and its interface (by using the IPOutlookApp::GetItemfromOid() method), it is typically not a good idea to store this value in a permanent form. Because of the design of the Windows CE object store, object identifiers are changed whenever a user does a backup and restore of the device, thus making the previous OID invalid.