IPOutlookItemCollection::Remove (Windows CE 5.0)
This method removes an item from the item collection, based on the current sort order.
HRESULT Remove(int iItem);
Parameters
- iItem
[in] The one-based index for the item to remove. The index is the position of the item in the current sort order.
Return Values
S_OK indicates success. If an error occurs, the appropriate HRESULT is returned.
Remarks
You can remove only user-defined items. Items in ROM cannot be removed.
Example
The following code example shows how to remove an item from an Items collection.
void RemoveAnItem (IPOutlookApp *polApp)
{
IPOutlookItemCollection *pItems;
IFolder *pFolder;
ITask *pTask;
// Remove the fifth item in the tasks Items collection
polApp->GetDefaultFolder (olFolderTasks, &pFolder);
pFolder->get_Items (&pItems);
pItems->Remove (5)
// Release objects
pItems->Release ();
pFolder->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