IMAPISupport::CopyMessages

The IMAPISupport::CopyMessages method copies or moves messages from one folder to another folder.

Quick Info

See IMAPISupport : IUnknown.

HRESULT CopyMessages(
  LPCIID lpSrcInterface,   
  LPVOID lpSrcFolder,      
  LPENTRYLIST lpMsgList,   
  LPCIID lpDestInterface,   
  LPVOID lpDestFolder,     
  ULONG ulUIParam,         
  LPMAPIPROGRESS lpProgress,   
  ULONG ulFlags            
);
 

Parameters

lpSrcInterface
[in] Pointer to the interface identifier (IID) representing the interface to be used to access the folder containing the messages to be copied or moved.
lpSrcFolder
[in] Pointer to the folder containing the messages to be copied or moved.
lpMsgList
[in] Pointer to an array of entry identifiers identifying the messages to be copied or moved.
lpDestInterface
[in] Pointer to the interface identifier (IID) representing the interface to be used to access the destination folder for the copied or moved messages.
lpDestFolder
[in] Pointer to the destination folder for the copied or moved messages. This folder must be open.
ulUIParam
[in] Pointer to a progress object for displaying a progress indicator. If NULL is passed in lpProgress, the message store provider displays a progress indicator using the MAPI progress object implementation. The lpProgress parameter is ignored unless the MESSAGE_DIALOG flag is set in ulFlags.
lpProgress
[in] Pointer to a progress object for displaying a progress indicator. If NULL is passed in lpProgress, the message store provider displays a progress indicator using the MAPI progress object implementation. The lpProgress parameter is ignored unless the MESSAGE_DIALOG flag is set in ulFlags.
ulFlags
[in] Bitmask of flags that controls how the copy or move operation is accomplished. The following flags can be set:
MESSAGE_DIALOG
Requests the display of a progress indicator.
MESSAGE_MOVE
The messages should be moved, rather than copied. If MESSAGE_MOVE is not set, the messages are copied.

Return Values

S_OK
The copy or move operation was successful.
MAPI_E_USER_CANCEL
The user canceled the operation, typically by clicking the Cancel button in a dialog box.

Remarks

The IMAPISupport::CopyMessages method is implemented for message store provider support objects. Message store providers can call CopyMessages in their implementation of IMAPIFolder::CopyMessages to copy or move one or more messages from one folder to another. As part of the CopyMessages call, the message store provider can specify that MAPI display a progress indicator.