OlItemType (Compact 7)
3/12/2014
The OlItemType enumeration identifies the PIM item type.
Syntax
enum OlItemType {
olUndefinedItem = 0,
olAppointmentItem = 1,
olContactItem = 2,
olTaskItem = 3,
olNoteItem = 4,
olMailItem = 5,
olCityItem = 102
};
Elements
- olUndefinedItem
A generic PIM item. Applies to Windows Embedded Compact 7.
- olAppointmentItem
An Appointment item.
- olContactItem
A Contact item.
- olTaskItem
A Task item.
- olNoteItem
A Note item. Applies to Windows Embedded Compact 7.
- olMailItem
A Message item. Applies to Windows Embedded Compact 7.
- olCityItem
A City item.
Example
Description
The following code example demonstrates how to use OlItemType to create a Contact item.
Note
To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.
Code
hr = ExampleCreateContact(polApp, olContactItem, "John Doe", "4255551212");
HRESULT ExampleCreateContact(__in IPOutlookApp *polApp, int olItemType, __in BSTR szName, __in BSTR szHomePhone)
{
HRESULT hr = S_OK;
IDispatch * pDispatch = NULL;
IContact * pContact = NULL;
hr = polApp->CreateItem(olItemType, &pDispatch);
hr = pDispatch->QueryInterface(IID_IContact, (void **)&pContact);
hr = pContact->put_FirstName(szName);
hr = pContact->put_BusinessTelephoneNumber(szHomePhone);
hr = pContact->Save();
RELEASE(pContact);
RELEASE(pDispatch);
return hr;
}
Requirements
Header |
pimstore.h |
Library |
Pimstore.lib |
See Also
Reference
Pocket Outlook Object Model Enumerations
Pocket Outlook Object Model Interfaces
IFolder::AddItemToInfraredFolder
IItem::get_DefaultItemType
IPOutlookApp::CreateItem