| Platform SDK: MAPI |
Your container's IABContainer::CopyEntries method is called when one or more recipients from the same or another container are to be copied into this container. CopyEntries has four input parameters: an array of entry identifiers representing the recipients to be copied, a window handle for the progress indicator, a progress object pointer, and a flags value. Your provider should display progress if the AB_NO_DIALOG flag is not set and use the progress object from the lpProgress parameter if it is not NULL. If lpProgress is NULL, call IMAPISupport::DoProgressDialog to use the MAPI progress object. For more information about displaying progress, see Displaying a Progress Indicator.
In addition to AB_NO_DIALOG to suppress a progress indicator, one of two other flags can be set to request a type of duplicate entry checking: CREATE_CHECK_DUP_LOOSE or CREATE_CHECK_DUP_STRICT. The CREATE_CHECK_DUP_LOOSE and CREATE_CHECK_DUP_STRICT flags are only suggestions as to how your provider determines duplicate entries and can be ignored. MAPI suggests that your provider implement support for these flags as follows.
| Duplicate entry flag | Suggested implementation |
|---|---|
| CREATE_CHECK_DUP_LOOSE | Check if the display name in the entry to be created matches the display name of an entry already in the container. |
| CREATE_CHECK_DUP_STRICT | Check if both the display name and the search key in the entry to be created match the display name and search key of a container entry. |
The last flag, CREATE_REPLACE, indicates that the new entry should replace the existing one if your provider has determined that an entry to be created is a duplicate of an entry already in your container.
If your provider is a personal address book, include the PR_DETAILS_TABLE property in every copy operation. Including the details display table of a copied recipient allows your container to display the details of the recipient rather than having to call the original container to create the display.
To implement IABContainer::CopyEntries