Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This interface is not supported in Windows CE Platform Builder 3.0.
This interface represents the Pocket Outlook Application object. The Pocket Outlook Application object has several purposes:
- As the root object, it provides access to all other objects in the Pocket Outlook hierarchy.
- It provides direct access to new items created by using CreateItem, without having to traverse the object hierarchy.
- It provides direct access to existing items by using GetItemFromOid.
An application creates this interface by calling the COM CoCreateInstance function, using the CLSID_Application globally unique identifier (GUID), and receiving a pointer to an Application object. The Application object is the only Pocket Outlook object you retrieve with the CoCreateInstance function.
Methods in Vtable Order
| Method | Description |
|---|---|
| IPOutlookApp::Logon | Logs the user on to a Pocket Outlook session. |
| IPOutlookApp::Logoff | Logs the user off of a Pocket Outlook session. |
| IPOutlookApp::GetDefaultFolder | Gets one of the five folder objects (calendar, tasks, contacts, cities, or infrared). |
| IPOutlookApp::CreateItem | Creates an appointment, task, contact, or city item. |
| IPOutlookApp::ReceiveFromInfrared | Initiates reception of an item through an infrared link. |
| IPOutlookApp::GetTimeZoneFromIndex | Gets time zone object. |
| IPOutlookApp::GetTimeZoneInformationFromIndex | Fills a TIME_ZONE_INFORMATION structure (C or C++ only). |
| IPOutlookApp::GetItemFromOid | Reads an item from its OID. |
| IPOutlookApp::SysFreeString | Frees strings return from functions on a Palm PC. (On other devices this method calls SysFreeString.) |
Code Example [Visual Basic]
The following Visual Basic® code snippet shows how to create an application object, log on the user, and display the Pocket Outlook version.
Dim polApp as PocketOutlook.Application
Set polApp = CreateObject("PocketOutlook.Application")
polApp.Logon
MsgBox polApp.Version
Code Example [C++]
The following C++ code snippet shows how to get the Application object, logon the user, 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 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
| Runs On | Versions | Defined in | Include | Link to |
|---|---|---|---|---|
| Windows CE OS | 2.0 and later | pimstore.h |
See Also
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.