Advertisement
2002VB Windows System Services #19056

Test for domain/user/password combination.

Allow You to test Domain/User/Password combination ...

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Private Sub Command1_Click()
Dim szDomain As String
Dim szUser As String
Dim szPassword As String
Dim lToken As Long
Dim lResult As Long
szDomain = Text1.Text & Chr(0)
szUser = Text2.Text & Chr(0)
szPassword = Text3.Text & Chr(0)
lToken = 0&
lResult = LogonUser(szUser, _
       szDomain, _
       szPassword, _
       ByVal LOGON32_LOGON_BATCH, _
       ByVal LOGON32_PROVIDER_DEFAULT, _
       lToken)
If lResult = 0 Then
 MsgBox "Error: " & Err.LastDllError
Else
 If lToken = 0 Then
 MsgBox "Not Valid user, password or domain"
 Else
 MsgBox "Valid User"
 End If
End If
End Sub
Upload
Original Comments (3)
Recovered from Wayback Machine