IPOutlookApp:IUnknown (Windows CE 5.0)
This interface represents the POOM Application object. This object serves several purposes:
- As the root object, it provides access to all other objects in the Pocket Outlook hierarchy.
- It provides direct access to newly created items through CreateItem, without having to traverse the object hierarchy.
- It provides direct access to existing items through GetItemFromOid.
An application creates this interface by calling CoCreateInstance, using the CLSID_Application globally unique identifier (GUID), and receiving a pointer to an Application object. The Application object is the only POOM object retrieved with CoCreateInstance.
Methods in Vtable Order
Method | Description |
---|---|
Logoff | Logs the user off of an Pocket Outlook session. |
GetDefaultFolder | Gets one of the folder objects: calendar, tasks, contacts, or infrared. |
CreateItem | Creates an appointment, task, or contact item. |
ReceiveFromInfrared | Initiates reception of an item through an infrared link. |
GetTimeZoneFromIndex | Gets time zone object. |
GetTimeZoneInformationFromIndex | Fills a TIME_ZONE_INFORMATION structure (C or C++ only). |
GetItemFromOid | Reads an item from its OID. |
SysFreeString | Frees strings return from functions on a Palm-size PC. On other devices this method calls SysFreeString. |
Example
The following example shows how to create an Application object, log the user on, and display the Pocket Outlook version.
#define INITGUID
#include <windows.h>
#include <pimstore.h>
HRESULT hr;
IPOutlookApp *polApp;
// Initialize COM for Pocket Outlook
if (FAILED(CoInitializeEx(NULL, 0))) return FALSE;
// Get the application object.
hr = CoCreateInstance (CLSID_Application, NULL, CLSCTX_INPROC_SERVER,
IID_IPOutlookApp, (LPVOID*)&polApp);
if (FAILED(hr)) return FALSE;
// Log on to Pocket Outlook.
hr = polApp->Logon (NULL);
if (FAILED(hr)) return FALSE;
// Get the version and display it in a message box.
BSTR pwszVersion = NULL;
polApp->getVersion (&pwszVersion);
MessageBox (NULL, pwszVersion, TEXT ("POOM Version"), MB_SETFOREGROUND |
MB_OK);
// Free the version string
SysFreeString (pwszVersion);
// Note: For Palm-size PC version 1.0 use the Application method:
// polApp->SysFreeString (pwszVersion);
// Log off and release the Application object
polApp->Logoff ();
polApp->Release ();
return TRUE;
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Pimstore.h.
Link Library: Pimstore.lib.
See Also
Send Feedback on this topic to the authors