다음을 통해 공유


IMAPIFolder::GetMessageStatus

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Obtains the status associated with a message in a particular folder (for example, whether that message is marked for deletion).

HRESULT GetMessageStatus(
  ULONG cbEntryID,
  LPENTRYID lpEntryID,
  ULONG ulFlags,
  ULONG FAR * lpulMessageStatus
);

Parameters

  • cbEntryID
    [in] The byte count in the entry identifier pointed to by the lpEntryID parameter.

  • lpEntryID
    [in] A pointer to the entry identifier for the message whose status is obtained.

  • ulFlags
    [in] Reserved; must be zero.

  • lpulMessageStatus
    [out] A pointer to a pointer to a bitmask of flags that indicate the message's status. Bits 0 through 15 are reserved and must be zero; bits 16 through 31 are available for implementation-specific use. The following flags can be set:

    • MSGSTATUS_DELMARKED
      The message has been marked for deletion.

    • MSGSTATUS_HIDDEN
      The message is not to be displayed.

    • MSGSTATUS_HIGHLIGHTED
      The message is to be displayed highlighted.

    • MSGSTATUS_REMOTE_DELETE
      The message has been marked for deletion at the remote message store without downloading to the local client.

    • MSGSTATUS_REMOTE_DOWNLOAD
      The message has been marked for downloading from the remote message store to the local client.

    • MSGSTATUS_TAGGED
      The message has been tagged for a client-defined purpose.

Return Value

  • S_OK
    The message status was successfully retrieved.

Remarks

The IMAPIFolder::GetMessageStatus method returns the status of a message. Message status is stored in the message's PR_MSG_STATUS (PidTagMessageStatus) property.

Notes to Implementers

How the message status bits are set, cleared, and used depends completely on your implementation, except that bits 0 through 15 are reserved and must be zero. If you store messages in the IPM subtree, MAPI reserves bits 16 through 31 for use by IPM clients. If you store messages in other subtrees, you can use bits 16 through 31 for your own purposes.

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

MyMAPIFormViewer.cpp

CMyMAPIFormViewer::GetNextMessage

MFCMAPI uses the IMAPIFolder::GetMessageStatus method to get the status of the next message to be displayed.

MAPIFormFunctions.cpp

OpenMessageNonModal and OpenMessageModal

MFCMAPI uses the IMAPIFolder::GetMessageStatus method to get the status of the message to be displayed to pass to the form viewer, which is either CMyMAPIFormViewer or IMAPISession::ShowForm.

See Also

Reference

IMAPIFolder::SetMessageStatus

IMAPISession::ShowForm

PidTagMessageStatus Canonical Property

IMAPIFolder : IMAPIContainer

Concepts

MFCMAPI as a Code Sample