Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IPOutlookApp (Compact 7)

3/12/2014

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

  • As the root object, it provides access to all of the other objects in the Pocket Outlook Object Model (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 receives a reference to an application object. The application object is the only POOM object retrieved with CoCreateInstance.

IPOutlookApp methods Description

IPOutlookApp::Logon

Logs the user on to a POOM session.

IPOutlookApp::Logoff

Logs the user off of a POOM session.

IPOutlookApp::get_Version

Gets a three-part string that describes the version of Outlook Mobile (or Pocket Outlook) that is in use.

IPOutlookApp::GetDefaultFolder

Gets an IFolder object for one of the five folders that Outlook Mobile provides.

IPOutlookApp::CreateItem

Creates and gets a POOM item.

IPOutlookApp::GetItemFromOid

Retrieves the item specified by a Windows Embedded Compact object identifier (OID).

IPOutlookApp::get_HomeCity (deprecated)

Not supported in Windows Embedded Compact 7. Always returns E_NOTIMPL.

IPOutlookApp::put_HomeCity (deprecated)

Not supported in Windows Embedded Compact 7. Always returns E_NOTIMPL.

IPOutlookApp::get_VisitingCity (deprecated)

Not supported in Windows Embedded Compact 7. Always returns E_NOTIMPL.

IPOutlookApp::put_VisitingCity (deprecated)

Not supported in Windows Embedded Compact 7. Always returns E_NOTIMPL.

IPOutlookApp::get_CurrentCityIndex (deprecated)

Not supported in Windows Embedded Compact 7. Always returns E_NOTIMPL.

IPOutlookApp::put_CurrentCityIndex (deprecated)

Not supported in Windows Embedded Compact 7. Always returns E_NOTIMPL.

IPOutlookApp::ReceiveFromInfrared

Not supported in Windows Embedded Compact 7. Always returns E_NOTIMPL.

IPOutlookApp::get_OutlookCompatible

Returns TRUE if the mobile device is partnered with a desktop computer running Outlook; returns FALSE if the desktop computer is running Schedule+.

IPOutlookApp::GetTimeZoneFromIndex (deprecated)

Not supported in Windows Embedded Compact 7. Always returns E_NOTIMPL.

IPOutlookApp::GetTimeZoneInformationFromIndex (deprecated)

Not supported in Windows Embedded Compact 7. Always returns E_NOTIMPL.

IPOutlookApp::get_Application

Gets the main Outlook Mobile application object.

IPOutlookApp::SysFreeString

Frees a string that was previously allocated.

IPOutlookApp::VariantTimeToSystemTime

Converts the variant representation of time to its system time equivalent.

IPOutlookApp::SystemTimeToVariantTime

Converts a system time object to its variant equivalent.

The following example shows how to create an Outlook Mobile application object, log on, and display the Outlook Mobile version.

Ee485563.note(en-us,WinEmbedded.70).gifNote:
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.
#define INITGUID
#include <windows.h>
#include <pimstore.h>

HRESULT        hr;
IPOutlookApp * polApp;

// Initialize COM.
CoInitializeEx(NULL, 0);

// Get the Outlook Mobile application object.
hr = CoCreateInstance(CLSID_Application, NULL, CLSCTX_INPROC_SERVER, IID_IPOutlookApp, (LPVOID*)&polApp);

// Log on to POOM.
hr = polApp->Logon(NULL);

// Get the Outlook Mobile version, and display it in a message box.
BSTR pwszVersion = NULL;
polApp->getVersion(&pwszVersion);
MessageBox(NULL, pwszVersion, TEXT("Outlook Mobile Version"), MB_SETFOREGROUND | MB_OK);

// Free the version string.
SysFreeString(pwszVersion);

// Log off and release the POOM application object.
polApp->Logoff();
polApp->Release();

Header

pimstore.h

Library

Pimstore.lib

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.