IMAPIFolder::CopyFolder (Compact 7)
3/12/2014
The CopyFolder method moves a subfolder. Copying a subfolder is not supported in Messaging in Windows Embedded Compact 7.
Syntax
HRESULT CopyFolder (
ULONG cbEntryID,
LPENTRYID lpEntryID,
LPCIID lpInterface,
LPVOID lpDestFolder,
LPTSTR lpszNewFolderName,
ULONG ulUIParam,
LPMAPIPROGRESS lpProgress,
ULONG ulFlags
);
Parameters
- cbEntryID
[in] Count of bytes in the entry identifier pointed to by lpEntryID.
- lpEntryID
[in] Reference to an ENTRYID structure that represents the entry identifier of the subfolder to move; cannot be NULL.
- lpInterface
[in] Ignored.
- lpDestFolder
[in] Reference to the open folder to receive the moved subfolder.
- lpszNewFolderName
[in] Must be NULL.
- ulUIParam
[in] Ignored.
- lpProgress
[in] Ignored.
ulFlags
[in] Bitmask of flags that controls the move operation. The following flags can be set:FOLDER_MOVE
This flag is required. The subfolder is to be moved.
MAPI_UNICODE
The name of the destination folder is in Unicode format.
Return Value
This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, MAPI_E_INVALID_PARAMETER as well as the following:
- S_OK
Indicates success.
- MAPI_E_COLLISION
The name of the folder being moved is the same as that of a subfolder in the destination folder. The message store provider requires that folder names be unique.
- MAPI_E_FOLDER_CYCLE
The source folder directly or indirectly contains the destination folder. Significant work might have been performed before this condition was discovered, so the source and destination folder might be partially modified.
- E_NOTIMPL
The ulFlags parameter does not specify FOLDER_MOVE.
Remarks
The CopyFolder method moves a subfolder from one location to another. The subfolder being moved is added to the destination folder as a subfolder. Copying a subfolder is not supported in Messaging. Folders canot be copied or moved between stores.
When CopyFolder is unable to complete, do not assume that no work was done. CopyFolder might have been able to move one or more of the messages and subfolders before encountering the error.
Depending on the message store provider, the entry identifier of the original message may or may not be preserved in the copied message. MAPI recommends that entry identifiers be preserved whenever possible, but it is not a requirement. You can generally depend on the following:
- When moving a folder to another location within the same message store, the entry identifier might or might not change, depending on the message store provider.
Requirements
Header |
mapidefs.h |
Library |
cemapi.lib |