The CopyMessages method copies or moves one or more messages to another folder.
HRESULT CopyMessages ( LPENTRYLIST lpMsgList, LPCIID lpInterface, LPVOID lpDestFolder, ULONG ulUIParam, LPMAPIPROGRESS lpProgress, ULONG ulFlags );
[in] Reference to an ENTRYLIST structure that contains an array of messages to copy or move; cannot be NULL.
[in] Must be NULL.
[in] Reference to the open folder to receive the copied or moved messages.
[in] Must be zero.
[in] Bitmask of flags that controls how the copy or move operation is accomplished. The following flags can be set:
The message or messages are to be moved rather than copied. If MESSAGE_MOVE is not set, the messages are copied.
This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:
The provider implements this method by calling a support object method, and the caller has passed the MAPI_DECLINE_OK flag.
The call succeeded, but not all entries were successfully copied or moved. When this warning is returned, the call should be handled as successful.