About the Offline State API
Last modified: June 25, 2012
Applies to: Outlook
The Offline State API supports callbacks indicating changes in a user's connection state in Microsoft Outlook 2013 and Microsoft Outlook 2010—for example, from being online in Outlook 2013 or Outlook 2010 to being offline. The API uses a global offline object in Outlook 2013 or Outlook 2010 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:
Open an existing offline object for a specific profile using HrOpenOfflineObj.
Determine if the object has the capability of providing online or offline notifications using IMAPIOffline::GetCapabilities.
Register the object for online or offline notifications using IMAPIOfflineMgr::Advise. Mail providers can now receive notifications that Outlook 2013 or Outlook 2010 send using IMAPIOfflineNotify.
On shutdown, remove registration for online and offline notifications using IMAPIOfflineMgr::Unadvise.
In general, Outlook 2013 and Outlook 2010 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: