Export (0) Print
Expand All

IPOutlookApp

Send Feedback

The IPOutlookApp interface represents the Outlook Mobile application object. The Outlook Mobile application object serves the following purposes:

  • As the root object, it provides access to all other objects in the POOM hierarchy.
  • It provides direct access to newly created items without having to traverse the object hierarchy.
  • It provides direct access to existing items.

An application creates this interface by calling CoCreateInstance, using the CLSID_Application globally unique identifier (GUID), and receiving a reference to an application object. The application object is the only POOM object retrieved with CoCreateInstance.

Methods in Vtable Order

IPOutlookApp methods PPC SP Description
Logon X X Logs the user on to a POOM Session.
Logoff X X Logs the user off of a POOM Session.
get_Version X X Gets a three-part string describing the version of Pocket Outlook or Outlook Mobile that is in use.
GetDefaultFolder X X Gets an IFolder object for one of the five folders provided by Outlook Mobile.
CreateItem X X Creates and gets a POOM item.
GetItemFromOid X X Retrieves the item specified by a Windows CE object identifier (OID).
get_HomeCity X X Gets an ICity object that represents the user's home city.
put_HomeCity X X Sets an ICity object that represents the user's home city.
get_VisitingCity X X Gets an ICity object that represents the city in which the user is currently visiting.
put_VisitingCity X X Sets an ICity object that represents the city in which the user is currently visiting.
get_CurrentCityIndex X X Gets either HomeCity or VisitingCity, depending on whether the current city in use by World Clock is the home or visiting city.
put_CurrentCityIndex X X Sets either HomeCity or VisitingCity, depending on whether the current city in use by World Clock is the home or visiting city.
ReceiveFromInfrared X X Initiates reception of an item over an infrared link.
get_OutlookCompatible X X Returns TRUE if the Windows Mobile–based device is partnered with a desktop computer running Outlook and returns FALSE if the desktop computer is running Schedule+.
GetTimeZoneFromIndex X X Uses a time zone index to return the POOM ITimeZone object for the corresponding time zone.
GetTimeZoneInformationFromIndex X X Uses a time zone index to get the TIME_ZONE_INFORMATION structure (declared in Winbase.h) for the corresponding time zone.
get_Application X X Gets the main Outlook Mobile application object.
SysFreeString X X Frees a string that was previously allocated.
VariantTimeToSystemTime X X Converts the Variant representation of time to it's system time equivalent.
SystemTimeToVariantTime X X Converts a system time object to it's Variant equivalent.

Example

The following example shows how to create an Outlook Mobile application object, log the user on, and display the Pocket Outlook or Outlook Mobile 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 POOM.
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("Pocket Outlook 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

Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 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


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft