05-29-2012, 12:50 AM
Many thanks for your help,
It looks a good code and most of it works but 1 line there is only 1 error
it states function IsNTPasswordValid don't return a value on all code paths are you missing a "Return" statement any help would be appricated but other than that fucntion the code is excepted any reasion why this maybe the case
Kind Regards
Bradley
It looks a good code and most of it works but 1 line there is only 1 error
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
End Function
it states function IsNTPasswordValid don't return a value on all code paths are you missing a "Return" statement any help would be appricated but other than that fucntion the code is excepted any reasion why this maybe the case
Kind Regards
Bradley