IPOutlookItemCollection::Item (Windows CE 5.0)
This method retrieves an item from a folder, based on the current sort order.
HRESULT Item(int iItem,IDispatch** ppolItem);
Parameters
- iItem
[in] The one-based index for the item to retrieve. The index is the position of the item in the current sort order. - ppolItem
[out] Pointer to the retrieved item.
Return Values
S_OK indicates success. If an error occurs, the appropriate HRESULT is returned.
Remarks
None.
Example
The following code example shows how to retrieve an item from an Items collection.
void GetAnItem (IPOutlookApp *polApp)
{
IPOutlookItemCollection *pItems;
ITask *pTask;
// Get the fifth item in the tasks folder.
polApp->GetDefaultFolder (olFolderTasks, &pFolder)
pFolder->get_Items (&pItems);
pItems->Item (5,(IDispatch **)&pTask);
// Do something with the task here...
// ...
// Release objects
pItems->Release ();
pTask->Release ();
}
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Pimstore.h.
Link Library: Pimstore.lib.
See Also
IPOutlookItemCollection | IPOutlookItemCollection Properties
Send Feedback on this topic to the authors