Chapter 10. Pocket Outlook Object Model

Your contact, while interesting in the context of science fiction, was, at least in my memory, recounting a poorly veiled synopsis of an episode of Rocky and Bullwinkle.

?Dana Scully, The X-Files

Managing the nitty-gritty details of your day-to-day life is one of the most common uses of a PDA. On the Pocket PC devices, the application that is used for managing your contacts, appointments, and tasks is Pocket Outlook. As you might have guessed from the name, Pocket Outlook is the mobile companion to the desktop Outlook application that ships with Microsoft Office. Figure 10.1 shows Pocket Outlook's Calendar feature.

Figure 10.1. Pocket Outlook's Calendar

graphics/10fig01.gif

One of the most interesting things about Pocket Outlook is that it supports a set of COM objects, known as the Pocket Outlook Object Model (POOM), that provide application developers with easy access to the data stored in the Pocket Outlook applications. In addition, you can also use POOM to add new contacts, schedule appointments, and provide task tracking in your own applications. You can even add menu items (or plug-ins) to the Tasks, Contacts, and Appointment applications.

In this chapter, you learn how to use the POOM interfaces, and how to integrate Outlook data in your own applications. If you are writing any application that will need contact information, scheduling, or task completion, it is a good idea to integrate it with Pocket Outlook. By doing so, you will provide the end user of your product with a way to seamlessly use the data that is already stored on the device, rather than replicating functionality. For example, suppose you are writing a project management application. By using POOM, you can integrate project completion dates with the Tasks on the device, assign tasks based on contact data, etc.

To use the Pocket Outlook Object Model interfaces within your applications, you need to include the pimstore.h header file, and define the INITGUID constant, as shown in the following example:

#define INITGUID
#include <windows.h>
#include <pimstore.h>