Creating a Recurring Appointment

The IPOutlookApp interface function CreateItem can be used to create new contact, appointment, task, or city items. The function takes a constant indicating which type of item to create (olAppointmentItem, olContactItem, olTaskItem, or olCityItem) and returns an interface pointer of the appropriate type (for example, IAppointment, IContact, ITask, or ICity). When using classes created with the _com_ptr_t template you will need to use the Attach function to take the raw interface pointer returned from CreateItem and attach it to a class object.

The following code fragment calls CreateItem to return an IAppointment interface pointer representing a new appointment item. Notice how a raw interface pointer variable ...

Get Windows® CE 3.0 Application Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.