Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Binary..
#4
Hmmph you should try testing if inputting anything into login username & password works. If so its most likely your PasswordOK sub.

Here you go:
Code:
Function PasswordOK(ByVal Name As String, ByVal Password As String) As Boolean
Dim FileName As String
Dim RightPassword As String * NAME_LENGTH
Dim nFileNum As Integer

    PasswordOK = False
    
    If AccountExist(Name) Then
        FileName = App.Path & "\Accounts\" & Trim$(Name) & ".dat"
        nFileNum = FreeFile
        Open FileName For Binary As #nFileNum
        
        Get #nFileNum, 20, RightPassword
        
        Close #nFileNum
        
        If UCase$(Trim$(Password)) = UCase$(Trim$(RightPassword)) Then
            PasswordOK = True
        End If
    End If
    
End Function

:: Pando
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)