IPOutlookItemCollection::Remove
The Remove method removes an item from the item collection, based on the current sort order.
Syntax
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
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
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
Smartphone: Windows Mobile 2002 and later
OS Versions: Windows CE 3.0 and later
Header: pimstore.h
Library: pimstore.lib
See Also
Pocket Outlook Object Model API Interfaces
Last updated on Friday, April 22, 2005
© 2005 Microsoft Corporation. All rights reserved.
Send feedback on this topic to the authors.