05-29-2012, 04:47 PM
I believe that simply editing the code and adding in one line should do the trick!
Code:
Public Function IsNTPasswordValid(ByVal Username As String, ByVal Password As String, Optional ByVal Domain As String = "") As Boolean
Dim Token As New IntPtr
LogonUser(Username, Domain, Password, LogonType.LOGON32_LOGON_INTERACTIVE, 0, Token)
CloseHandle(Token)
If Token.ToInt32 <> 0 Then
Return True
Else
Return False
End If
End Function