Verify Users Log-in Password

This is not very secure… so we need to verify that the user sending the message is the one who logged into Win95 or WinNT.

I searched and searched on how to do this, with no luck. After posting this message on a new group, I was sent the answer and it’s surprising easy! It’s too bad that Microsoft has to make it so hard for use to find.

Win95

Private Declare Function WNetVerifyPassword Lib "mpr.dll" Alias _
"WNetVerifyPasswordA" (ByVal lpszPassword As String, _
ByRef pfMatch As Long) As Long
 
Function VerifyPassWin95(sPassword As String) As Boolean
Dim lRetVal As Long
  If (WNetVerifyPassword(sPassword, lRetVal)) <> 0 Then
    MsgBox "VerifyPassWin95: Application Error"
    Else
      If lRetVal <> 0 Then
        VerifyPassWin95 = True
        Else
          VerifyPassWin95 = False
      End If
  End If
End Function

 

Tip Submitted By: David McCarter
Code By: Jeff Hong YAN

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s