次の方法で共有


IExceptions::Item (Windows Embedded CE 6.0)

1/6/2010

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 IAppointment::get_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
Windows Embedded CE Windows CE 2.0 and later

See Also

Reference

IExceptions
IException
Pocket Outlook Object Model Interfaces

Other Resources

Pocket Outlook Object Model Enumerations