Platform SDK: MAPI |
The IProfAdmin::RenameProfile method assigns a new name to a profile.
HRESULT RenameProfile( LPTSTR lpszOldProfileName, LPTSTR lpszOldPassword, LPTSTR lpszNewProfileName, ULONG ulUIParam, ULONG ulFlags );
The IProfAdmin::RenameProfile method assigns a new name to a profile without changing its password, if it has one. If the profile to rename is in use by a client when RenameProfile is called, RenameProfile marks the profile and returns S_OK rather than attempting the rename operation while the profile is in use. When the profile is no longer being used, RenameProfile assigns it the new name.
The old and new names of the profile and the password can be up to 64 characters in length and can include the following characters:
Profile passwords are not supported on all operating system platforms; on platforms that do not support profile passwords, lpszPassword can be NULL or a pointer to a zero-length string. Currently, Windows NT Server and Windows 95 do not support passwords; Windows version 3.1 does.
The MAPI_DIALOG flag must be set in order for RenameProfile to display a user interface. If a client passes NULL in lpszOldPassword and the target profile requires a password, a dialog box must be displayed to allow the user to supply the missing password. If MAPI_DIALOG is not set in this situation, RenameProfile returns MAPI_E_LOGON_FAILED.