IPOutlookApp::CreateItem
The CreateItem method creates and gets a Pocket Outlook item. The item is created in the default folder for the specified type.
Syntax
HRESULT CreateItem(
int olItem,
IDispatch ** ppolItem
);
Parameters
- olItem
[in] Specifies which OlItemType enumeration item to create. - ppolItem
[out] Reference to the new item.
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.
Example
The following code example shows how to create a new Pocket Outlook contact item.
void CreateAnItem(IPOutlookApp * polApp)
{
IContact * pContact;
polApp->CreateItem(olContactItem, (IDispatch**)&pContact);
pContact->Release();
}
Remarks
This method creates an item without having to first retrieve the appropriate folder. The new item is created in memory. You must save the item to the designated collection.
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
Pocket Outlook Object Model API Enumerations
Last updated on Friday, April 22, 2005
© 2005 Microsoft Corporation. All rights reserved.
Send feedback on this topic to the authors.