次の方法で共有


SetPasswordActive (Windows Embedded CE 6.0)

1/6/2010

This function activates the current system password.

Note   The default Local Authentication Plugin (LAP) blocks the usage of this function and the CheckPassword function. Applications should not use these functions for authenticating the user. Use the VerifyUser and the CreateEnrollmentConfigDialog functions instead. For more information, see Local Authentication Plugin (LAP).

Syntax

BOOL SetPasswordActive(
  BOOL bActive, 
  LPWSTR lpszPassword 
);

Parameters

  • bActive
    Specifies the state of the password. If parameter is set to TRUE, the current password is activated. If this parameter is set to FALSE, the current password is deactivated.
  • lpszPassword
    Pointer to a null-terminated string containing the password.

Return Value

TRUE indicates that the password has been successfully activated or deactivated. FALSE indicates failure.

Remarks

This function can activate or deactivate the password without requiring the password to be stored each time, thereby allowing the device to remember the password unless a cold-boot occurs. To activate or deactivate the password, lpszPassword must match the current 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

Header windbase.h
Windows Embedded CE Windows CE 2.10 and later

See Also

Reference

File System Password Functions
CheckPassword
GetPasswordActive
SetPassword