DOMU DOMU

Titulky
Progr.jazyky
Databßze
Inter/Intranet
COM
SystΘm(novΘ)
VS 6.0 (novΘ)

Katalog odkaz∙

  • Databßze
  • Internet / Intranet
  • Komponenty
  • Progr. jazyky
  • Win32

    Reklama





  • Aktußlnφ Φlßnky

    Zp∙sob, jak zφskat heslo z screensaveru.

    Zdrojov² k≤d programu, kter² zφskß heslo nastavenΘ v screensaveru.

    '***************************************************************
    'Windows API/Global Declarations for :GetScreenSaverPassword
    '***************************************************************


    Declare Function PwdChangePassword Lib "mpr" Alias "PwdChangePasswordA"_
    (ByVal lpcRegkeyname As String, ByVal hwnd As Long, ByVal uiReserved1 As_
    Long, ByVal uiReserved2 As Long) As Long




    '***************************************************************
    ' Name: GetScreenSaverPassword
    ' Description:How to get the Screen Saver Password
    ' By: Southern Cross
    'Assumes:'SCRSAVE is the key in the registry under
    'HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\PwdProvider\
    ' SCRSAVE
    'CResult2 is like you said the hwnd of the Display Properties For
    ' m
    'The last two must be Zero
    '
    '***************************************************************

    'Place in Sub Main
    '-----------------------
    Dim CResult As String, CResult1 As String, CResult2 As String
    Dim CBack As Long
    CResult = Left(Command, 2)


    If CResult = "/a" Then
    CResult1 = Len(Command) - 3
    CResult2 = Right(Command, CResult1)
    CBack = PwdChangePassword("SCRSAVE", CResult2, 0, 0)
    End
    End If


    'To retrieve the password...
    'Place in Module
    '-------------------


    Declare Function VerifyScreenSavePwd Lib "password.cpl" (ByVal hwnd As_
    Long) As Boolean
    'Place in Form (Query Unload)
    '-------------------
    Dim Result As Boolean
    Result = VerifyScreenSavePwd(Me.hwnd)


    If Result = True Then
    Cancel = True
    End If

    'Result will be true if the user entered the correct password and
    ' false if
    'they gave up and pressed cancel. Don't forget to disable Ctrl-Al
    ' t-Del and
    'Alt-Tab.



    Michal Blßha (SPRINX)
    blaha@sprinx.cz
    24.6.1999


    (c) 1998 SPRINX s.r.o. a auto°i Φlßnk∙.
    redakce@developer.cz