Last modified: July 23, 2011

Applies to: Outlook

Returns information from a message site object about the message site's capabilities for the current message.

HRESULT GetSiteStatus(
  ULONG FAR * lpulStatus


[out] A pointer to a bitmask of flags that provides information about message status. The following flags can be set:


The message can be copied.


The message can be deleted.


When deleted, a message is moved to a Deleted Items folder in its message store instead of being immediately removed from its message store.


The message can be moved.


A new message can be created.


The message can be saved.


The message can be submitted.


The call succeeded and has returned the expected value or values.

Form objects call the IMAPIMessageSite::GetSiteStatus method to obtain the message site object's capabilities for the current message. The flags returned in the lpulStatus parameter provide information about the message site. Typically, a form enables or disables menu commands, depending on information the flags provide about the capabilities of the message site implementation. If a new message is loaded into a form by the IPersistMessage::SaveCompleted method or the IPersistMessage::Load method, the status flags must be checked. Some message site objects, especially read-only objects, do not allow messages to be saved or deleted.

The IMAPIMessageSite::GetSiteStatus method may require the client application to do some calculation to determine what operations can or cannot be performed on the current message. Typically, that involves looking at the status row for the current message's message store provider, or querying the store provider to determine which actions the client application can perform by using the message store. For example, to determine whether to return the MAPI_DELETE_IS_MOVE flag, check the message store object's PR_IPM_WASTEBASKET_ENTRYID (PidTagIpmWastebasketEntryId) property to see whether there is a Deleted Items folder in the message store.

For a list of interfaces related to form servers, see MAPI Form Interfaces.

For MFCMAPI sample code, see the following table.






MFCMAPI uses the IMAPIMessageSite::GetSiteStatus method to get the status of the specified site. It can return VCSTATUS_NEW_MESSAGE, VCSTATUS_SAVE, or VCSTATUS_SUBMIT.

© 2016 Microsoft