TestPassword



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

(testpassword.html)- by Paolo Puglisi - Modifica del 25/3/2019