Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The Itemmethod retrieves an IExceptionobject 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 IExceptionobject.
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_Startproperty of one instance of a recurring appointment, you create an exception in the exceptions collection for the recurrence pattern.
The IExceptionscollection is on the IRecurrencePatternobject, not on the IAppointmentitem itself. The IExceptionsobject can be accessed with the IRecurrencePattern::get_Exceptionsproperty 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. |
Copy Code | |
---|---|
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 |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
IExceptionsIException
Pocket Outlook Object Model Interfaces