Copying a Profile
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
-
Call MAPIAdminProfiles to retrieve an IProfAdmin interface pointer.
-
Call IProfAdmin::GetProfileTable to access the profile table.
-
Build a property restriction with an SPropertyRestriction structure to match PR_DISPLAY_NAME with the name of the profile to be copied.
-
Call IMAPITable::FindRow to locate the appropriate row in the profile table.
-
Call IProfAdmin::CopyProfile, passing the value of the PR_DISPLAY_NAME column as the lpszOldProfileName parameter.