Last modified: July 23, 2011
Applies to: Outlook
Copies one or more entries, typically messaging users or distribution lists.
The IABContainer::CopyEntries method copies entries from the same container or a different container. A call to CopyEntries is functionally equivalent to making the following calls for each entry to be copied:
The IABContainer::CreateEntry method to create the new entry.
The IMAPIProp::GetProps method to read properties from the entry to be copied.
The IMAPIProp::SetProps method to write properties to the new entry.
The new entry's IMAPIProp::SaveChanges method to perform a save.
The new entry's IUnknown::Release method to release the container's reference.
All containers that support the IABContainer::CopyEntries method must be modifiable. Set your container's AB_MODIFIABLE flag in its PR_CONTAINER_FLAGS (PidTagContainerFlags) property to indicate that it is modifiable.
You must support all of the flags; however, the interpretation and use of these flags is implementation specific—that is, you can determine what the semantics of the CREATE_CHECK_DUP_LOOSE and CREATE_CHECK_DUP_STRICT flags mean in the context of your implementation. If you cannot or do not determine whether an entry is a duplicate, always allow the entry to be copied.
If the CREATE_REPLACE flag is set, always copy the entry regardless of whether CREATE_CHECK_DUP_LOOSE or CREATE_CHECK_DUP_STRICT is set and whether the entry is a duplicate.
If CREATE_REPLACE is not set and CREATE_CHECK_DUP_STRICT is set, check for duplicates. If an entry is determined to be a duplicate, do not copy the entry.
You do not need to support CREATE_REPLACE; not supporting CREATE_REPLACE means that you can safely ignore it and always perform a copy.
Return the warning MAPI_W_PARTIAL_COMPLETION only if a nonduplicate entry cannot be copied.
Use the CREATE_CHECK_DUP_LOOSE and CREATE_CHECK_DUP_STRICT flags to indicate to the provider how you want the container to perform duplicate-entry checking. If you need to have an entry added regardless of whether it is a duplicate, either do not set either of these flags or set the CREATE_REPLACE flag. CREATE_REPLACE indicates that you do not care if an entry is a duplicate; you always want it to replace the original entry.