IExceptions::Item
The Item method retrieves an Exception object from the exceptions collection for a recurring IAppointment object.
Syntax
HRESULT Item(
int iIndex,
IException** ppExcept
);
Parameters
- iIndex
[in] The one-based index for an exception. - ppExcept
[out] Reference to the exception.
Return Values
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 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 IExceptions collection is on the IRecurrencePattern object, not on the IAppointment item itself. The IExceptions object can be accessed with the IRecurrencePatterns::get_Exceptions property method.
Code Example
The following code example gets 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);
// Release objects.
pRec->Release();
pExceptions->Release();
pException->Release();
}
Requirements
Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: pimstore.h
Library: pimstore.lib
See Also
IExceptions | IException | Pocket Outlook Object Model API Interfaces | Pocket Outlook Object Model API Enumerations
Send Feedback on this topic to the authors