Quickstart Guide to Screensavers, Page 5
Your screensaver needs to handle passwords. This section will deal with allowing the user to change their password. We will later look at prompting the user for a password, plus verifying its authenticity.
Changing the Password
- Add the following code to a module in your screensaver application:
Declare Function PwdChangePassword& Lib "mpr" _ Alias "PwdChangePasswordA" (ByVal lpcRegkeyname$, _ ByVal hwnd&, ByVal uiReserved1&, ByVal uiReserved2&) Public Sub ChangePassword() Dim dispHWND As Long ' Get handle of the Display Properties window dispHWND = CLng(Right(Command, Len(Command) - 3)) ' Call the change password screen Call PwdChangePassword("SCRSAVE", dispHWND, 0, 0)End Sub- When a password change is requested (see Determining the Mode), run the ChangePassword method
0 Comments (click to add your comment)
Networking Solutions
