IExceptions::Item (Compact 7)

3/12/2014

The Item method retrieves an IException object from the exceptions collection for a recurring IAppointment.

Syntax

HRESULT Item(
    int iIndex,
    IException ** ppExcept
);

Parameters

  • iIndex
    [in] The one-based index for an exception.
  • ppException
    [out] Reference to the IException object.

Return Value

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    The method completed successfully.

Remarks

An exception object is created when a recurring Appointment is altered. For example, if you change the Start property of one instance of a recurring appointment, you create an exception in the exceptions collection for the recurrence pattern.

The IExceptions collection is on the IRecurrencePattern object, not on the IAppointment item itself. The IExceptions object can be accessed with the IRecurrencePattern::get_Exceptions property method.

Code Example

The following code example demonstrates how to get the first exception item in the exceptions collection of a recurring Appointment.

Note

To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.

void GetFirstExceptionItem(IAppointment * pAppt)
{
    IRecurrencePattern * pRec;
    IExceptions        * pExceptions;
    IException         * pException;

    // Get the Exception item.
    pAppt->GetRecurrencePattern(&pRec);
    pRec->get_Exceptions(&pExceptions);
    pExceptions->Item(1, &pException);

    // Free resources.
    pRec->Release();
    pExceptions->Release();
    pException->Release();
}

Requirements

Header

pimstore.h

Library

Pimstore.lib

See Also

Reference

IExceptions
IException
Pocket Outlook Object Model Interfaces
Pocket Outlook Object Model Enumerations