Partager via


Copying a Profile

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

One way to create a profile is to copy from an existing profile and alter the necessary message services and service providers. Copying a profile involves using a profile administration object, provided by MAPI through the MAPIAdminProfiles function.

To copy a profile

  1. Call MAPIAdminProfiles to retrieve an IProfAdmin interface pointer.

  2. Call IProfAdmin::GetProfileTable to access the profile table.

  3. Build a property restriction with an SPropertyRestriction structure to match PR_DISPLAY_NAME (PidTagDisplayName) with the name of the profile to be copied.

  4. Call IMAPITable::FindRow to locate the appropriate row in the profile table.

  5. Call IProfAdmin::CopyProfile, passing the value of the PR_DISPLAY_NAME column as the lpszOldProfileName parameter.