IPOutlookItemCollection::Add (Windows CE 5.0)
This method creates a new item for a folder in the Items collection. The item type depends on the folder type.
HRESULT Add(IDispatch** ppolItem);
Parameters
- ppolItem
[out] Pointer to the new item.
Return Values
S_OK indicates success. If an error occurs, the appropriate HRESULT is returned.
Remarks
This method creates an item in memory. Call Save on the item to save it to the collection.
Example
The following code example shows how to add an item to an Items collection.
void CreateTask (IPOutlookApp *polApp)
{
IPOutlookItemCollection *pItems;
ITask *pTask;
pFolder->get_Items (&pItems);
pItems->Add ((IDispatch**)&pTask)
// Commit the item to the store
pTask->Save ();
// 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