共用方式為


MAPIOFFLINE_NOTIFY

Applies to: Office 2010 | Outlook 2010 | Visual Studio

In this article
Quick Info
Members
Remarks

This is the notification for a change in the connection state. It indicates the part of the connection state that has changed, the old connection state, and the new connection state.

Quick Info

See IMAPIOfflineNotify.

typedef struct  
{ 
      ULONG ulSize; 
      MAPIOFFLINE_NOTIFY_TYPE NotifyType; 
      ULONG ulClientToken; 
      union { 
         struct 
           { 
           ULONG ulMask; 
           ULONG ulStateOld; 
           ULONG ulStateNew; 
           } StateChange; 
             } Info; 
} MAPIOFFLINE_NOTIFY;

Members

  • ulSize
    Size of the MAPIOFFLINE_NOTIFY structure.

  • NotifyType
    Type of notification. Note that only notification on change of the connection state is supported; the only supported values are:

    • MAPIOFFLINE_NOTIFY_TYPE_STATECHANGE_START

    • MAPIOFFLINE_NOTIFY_TYPE_STATECHANGE

    • MAPIOFFLINE_NOTIFY_TYPE_STATECHANGE_DONE

  • ulClientToken
    A token defined by the client in the MAPIOFFLINE_ADVISEINFO structure in IMAPIOfflineMgr::Advise.

  • ulMask
    The part of the connection state that has changed. The only supported value is MAPIOFFLINE_STATE_OFFLINE_MASK.

  • ulStateOld
    The old connection state. The only supported values are:

    • MAPIOFFLINE_STATE_OFFLINE

    • MAPIOFFLINE_STATE_ONLINE

  • ulStateNew
    The new connection state. The only supported values are:

    • MAPIOFFLINE_STATE_OFFLINE

    • MAPIOFFLINE_STATE_ONLINE

Remarks

The Offline State API supports only notifications for online/offline changes. A client must check that Outlook returns the following values before examining the actual change:

  1. NotifyType has the value MAPIOFFLINE_NOTIFY_TYPE_STATECHANGE_START, MAPIOFFLINE_NOTIFY_TYPE_STATECHANGE, or MAPIOFFLINE_NOTIFY_TYPE_STATECHANGE_DONE. In this case, the client can assume that the change is a connection state change, and Info is of the structure StateChange.

  2. ulMask has the value MAPIOFFLINE_STATE_OFFLINE_MASK. In this case, the client can assume that the change is an online/offline connection state change, and can proceed with examining ulStateOld and ulStateNew.

It is possible that Outlook notifies a client of other changes that are not supported. In such cases, NotifyType would not be any one of the three values stated previously, or ulMask would not be MAPIOFFLINE_STATE_OFFLINE_MASK, and the client must ignore the rest of the data in Info.

See Also

Concepts

About the Offline State API

MAPI Constants

MAPIOFFLINE_NOTIFY_TYPE