Поделиться через


IMAPIStatus::ChangePassword

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.

Modifies a service provider's password without displaying a user interface. This method is optionally supported in status objects that service providers implement.

HRESULT ChangePassword(
  LPTSTR lpOldPass,
  LPTSTR lpNewPass,
  ULONG ulFlags
);

Parameters

  • lpOldPass
    [in] A pointer to the old password.

  • lpNewPass
    [in] A pointer to the new password.

  • ulFlags
    [in] A bitmask of flags that controls the format of the passwords. The following flag can be set:

    • MAPI_UNICODE
      The passwords are in Unicode format. If the MAPI_UNICODE flag is not set, the passwords are in ANSI format.

Return Value

  • S_OK
    The password modification was successful.

  • MAPI_E_NO_ACCESS
    The old password pointed to by lpOldPass is invalid.

  • MAPI_E_NO_SUPPORT
    The status object does not support this operation, as indicated by the absence of the STATUS_CHANGE_PASSWORD flag in the status object's PR_RESOURCE_METHODS (PidTagResourceMethods) property.

Remarks

Not all status objects support the IMAPIStatus::ChangePassword method. It is supported only by service providers that require clients to enter a password. None of the status objects that MAPI implements support the password change operation.

ChangePassword modifies a password programmatically, without user interaction.

Notes to Implementers

Remote transport providers implement ChangePassword as specified here. There are no special considerations.

See Also

Reference

PidTagResourceMethods Canonical Property

IMAPIStatus : IMAPIProp