IMAPIFolder::CopyMessages (Compact 7)
3/12/2014
This method copies or moves one or more messages to another folder.
Syntax
HRESULT CopyMessages (
LPENTRYLIST lpMsgList,
LPCIID lpInterface,
LPVOID lpDestFolder,
ULONG ulUIParam,
LPMAPIPROGRESS lpProgress,
ULONG ulFlags
);
Parameters
- lpMsgList
[in] Pointer to the reference to an ENTRYLIST structure that contains an array of messages to copy or move. Cannot be NULL.
- lpInterface
[in] Must be NULL.
- lpDestFolder
[in] Pointer to the reference to the open folder that will receive the copied or moved messages.
- ulUIParam
[in] Must be zero.
- lpProgress
[in] Ignored.
ulFlags
[in] Bitmask of flags that controls how the copy or move operation is accomplished. The following flags can be set:MESSAGE_MOVE
The message or messages are to be moved rather than copied. If the MESSAGE_MOVE flag is not set, the messages are copied.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
The method succeeded. |
MAPI_E_DECLINE_COPY |
The provider implements this method by calling a support object method, and the caller passed the MAPI_DECLINE_OK flag. |
MAPI_W_PARTIAL_COMPLETION |
The call succeeded, but not all entries were successfully copied or moved. When this warning is returned, the call must be handled as successful. |
E_FAIL |
The method failed due to an unspecified error. |
E_INVALIDARG |
The method failed because one or more of the arguments is not valid. |
E_OUTOFMEMORY |
The method failed because it needs more memory resources. |
E_UNEXPECTED |
The method failed due to an unexpected error. |
Remarks
Messages that are open with read/write access can be moved or copied. Messages cannot be copied or moved between stores.
When the CopyMessages method is unable to finish the copy or move, do not assume that the method did not work. CopyMessages might have copied or moved one or more messages before encountering the error.
Requirements
Header |
mapidefs.h |
Library |
cemapi.lib |