IProfAdmin::ChangeProfilePassword

The IProfAdmin::ChangeProfilePassword method changes the password for a profile.

Quick Info

See IProfAdmin : IUnknown.

HRESULT ChangeProfilePassword(
  LPTSTR lpszProfileName,   
  LPTSTR lpszOldPassword,   
  LPTSTR lpszNewPassword,   
  ULONG ulFlags             
);
 

Parameters

lpszProfileName
[in] Pointer to the name of the profile associated with the password to be changed.
lpszOldPassword
[in] Pointer to the current password.
lpszNewPassword
[in] Pointer to the new password.
ulFlags
[in] Bitmask of flags that controls the type of the passed-in strings. The following flag can be set:
MAPI_UNICODE
The profile name and passwords are in Unicode format. If the MAPI_UNICODE flag is not set, these strings are in ANSI format.

Return Values

S_OK
The profile's password was successfully changed.
MAPI_E_LOGON_FAILED
The password pointed to by the lpszOldPassword parameter is incorrect.
MAPI_E_NO_SUPPORT
The operating system does not support passwords.

Remarks

The IProfAdmin::ChangeProfilePassword method replaces one profile password with another. ChangeProfilePassword does not display a user interface.

Not all operating systems support passwords for their profiles. ChangeProfilePassword returns MAPI_E_NO_SUPPORT if the operating system does not support passwords. Currently, Microsoft® Windows NT® Server and Microsoft® Windows® 95 do not support passwords; Microsoft® Windows® version 3.1 does.