Send Feedback

The ProcessMessage method processes incoming messages, which can be moved, modified, or deleted.


HRESULT ProcessMessage (
  IMsgStore * pMsgStore,
  ULONG cbMsg,
  ULONG cbDestFolder,
  LPENTRYID lpDestFolder,
  ULONG * pulEventType,
  MRCHANDLED * pHandled


  • pMsgStore
    [in] Reference to IMsgStore, representing the message store that contains the incoming messages.
  • cbMsg
    [in] The size of lpMsg in bytes.
  • lpMsg
    [in] The ENTRYID of the message.
  • cbDestFolder
    [in] The size of lpDestFolder in bytes.
  • lpDestFolder
    [in] The ENTRYID of the folder that incoming messages are moved to.
  • pulEventType
    [out] A combination of fnev bit flags that indicate the type of action that the client performed on the message. This flag must be set by the client so that the transport can properly handle the message if it has changed. For more information about these flags, see Remarks.
  • pHandled
    [out] The type of message handling that occurred during the processing, described by the MRCHANDLED enumeration.

Return Values

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    Indicates success.


The bit flags described in the following table can be used in the *pulEventType parameter. They are defined in the mapidefs.h header file.

Flag Value Description
fnevObjectCreated 0x00000004 The client created the message.
fnevObjectDeleted 0x00000008 The client deleted the message.
fnevObjectModified 0x00000010 The client modified the message.
fnevObjectMoved 0x00000020 The client moved the message.
fnevObjectCopied 0x00000040 The client copied the message.


Pocket PC: Windows Mobile 2003 and later
Smartphone: Windows Mobile 2003 and later
OS Versions: Windows CE .NET 4.2 and later
Header: cemapi.h
Library: cemapi.lib

See Also

IMailRuleClient | Messaging

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.