Export (0) Print
Expand All

About the Offline State API

Office 2007

The Offline State API supports callbacks indicating changes in a user's connection state in Outlook—for example, from being online in Outlook to being offline. The API uses a global offline object in Outlook to track such changes for a given user account profile. Notification is the only supported form of callback. As clients of this API, mail providers who want to be notified of such connection state changes do the following:

  1. Implement IMAPIOfflineNotify.
  2. Open an existing offline object for a specific profile using HrOpenOfflineObj.
  3. Determine if the object has the capability of providing online or offline notifications using IMAPIOffline::GetCapabilities.
  4. Register the object for online or offline notifications using IMAPIOfflineMgr::Advise. Mail providers can now receive notifications that Outlook sends using IMAPIOfflineNotify.
  5. On shutdown, remove registration for online and offline notifications using IMAPIOfflineMgr::Unadvise.
Bb905128.vs_note(en-us,office.12).gif  Note
In general, Outlook can notify a client of online/offline changes as well as other changes, but the Offline State API supports only notifications for online/offline changes. The client should ignore all other notifications. For more information, see IMAPIOfflineNotify::Notify and MAPIOFFLINE_NOTIFY.

For an example of a client that uses the Offline State API, see About the Sample Offline State Add-in. The Sample Offline State Add-in is a COM add-in that uses the Offline State API to monitor and change the connection state.

This API provides the following:

Definitions:

Constants for the Offline State API

Data types:

MAPIOFFLINE_ADVISEINFO
MAPIOFFLINE_CALLBACK_TYPE
MAPIOFFLINE_NOTIFY

Functions:

HrOpenOfflineObj

Interfaces:

IMAPIOffline
IMAPIOfflineMgr
IMAPIOfflineNotify


Community Additions

ADD
Show:
© 2014 Microsoft