Поделиться через


IExceptions::Item (Windows CE 5.0)

Send Feedback

This method retrieves an Exception from the Exceptions collection for a recurring Appointment.

HRESULT Item(intiIndex,IException** ppException);

Parameters

  • iIndex
    [in] The one-based index for an Exception.
  • ppException
    [out] Pointer to the Exception.

Return Values

S_OK indicates success. If an error occurs, the appropriate HRESULT is returned.

Remarks

An Exception object is created when a recurring Appointment item 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 Exceptions collection object is on the IRecurrencePattern interface, not on the IAppointment interface. The Exceptions object can be accessed with the get_Exceptions property method, of the RecurrencePattern object.

Example

The following code example gets the first exception item in the Exceptions collection of a recurring Appointment.

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);

  // Release objects
  pRec->Release ();
  pExceptions->Release ();
  pException->Release ();
}

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Pimstore.h.
Link Library: Pimstore.lib.

See Also

IExceptions | IExceptions Properties

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.