IProfAdmin::ChangeProfilePassword

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

Quick Info

See IProfAdmin : IUnknownEHPDWT.

 

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 the Unicode format. If the MAPI_UNICODE flag is not set, these strings are in the ANSI format.

 

Return Values

S_OK

The profile s password was successfully changed.

MAPI_E_LOGON_FAILED

The password pointed to by lpszOldPassword is incorrect.

MAPI_E_NO_SUPPORT

The operating system does not support passwords.

 

Remarks

The IProfAdmin::ChangeProfilePassword method replace 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, Windows NT Server and Windows 95 do not support passwords; Windows version 3.1 does.