Share via


SetPassword (Windows CE 5.0)

Send Feedback

This function sets the system password.

BOOL SetPassword(LPWSTRlpszOldPassword,LPWSTRlpszNewPassword );

Parameters

  • lpszOldPassword
    Pointer to a null-terminated string containing the old password.
  • lpszNewPassword
    Pointer to a null-terminated string containing the new password.

Return Values

If lpszNewPassword is NULL, the active password is disabled. If lpszNewPassword is not NULL, it is used as the new password. TRUE is returned in both cases.

If lpszOldPassword is NULL and an active password exists or if lpszOldPassword is not NULL and is not the active password, FALSE is returned.

Remarks

If lpszOldPassword is NULL and no active password exists, lpszNewPassword is used as the new password.

To use this function, you must include the Password component, Fspass, in your Cesysgen.bat file.

For a sample implementation of this function, see %_WINCEROOT%\Public\Wceshellfe\Oak\Ctlpnl\Cplmain\Passwd.cpp.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Windbase.h.

See Also

CheckPassword | GetPasswordActive | SetPasswordActive

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.