SetPassword (coredll)
Last changed: -64.199.116.42

.
Summary
This function sets the system password.

C# Signature:

    [DllImport("coredll", EntryPoint = "SetPassword")]
    [return: MarshalAs(UnmanagedType.Bool)]
    public static extern bool SetPassword([MarshalAs(UnmanagedType.LPWStr)] string oldPassword, [MarshalAs(UnmanagedType.LPWStr)] string newPassword);

VB Signature:

<DllImport("coredll", EntryPoint := "SetPassword")>

Public Shared Declare Function SetPassword Lib "coredll" Alias "SetPassword" (<MarshalAs(UnmanagedType.LPWStr)> oldPassword As String,<MarshalAs(UnmanagedType.LPWStr)> newPassword As String) As<MarshalAs(UnmanagedType.Bool)> Boolean

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

For a system starting with no password, pass null in for the old password. If a password was previously entered and no password is currently stored, use the empty string for the old password.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation