Results 1 to 4 of 4

Thread: Validating Windows Login/Password

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    7

    Validating Windows Login/Password

    How do I validate a Windows Login/Password against the user's network domain from within a VB6 app? I'm not necessarily interested in who is currently logged onto the workstation. Rather, I'd like to have the user log into my app using their network login and password and I want to be able to validate that the password matches the user's network account password.

    Any help would be greatly appreciated.

    Thanks

  2. #2
    Addicted Member Sheppe's Avatar
    Join Date
    Sep 2002
    Location
    Kelowna, BC
    Posts
    245
    Here's a DLL I wrote to do exactly as you request. It exposes one function, Function AuthenticateUser(User As String, Password As String, Domain As String) As Boolean. You can use the object browser to check it out, if ya like.

    VB Code:
    1. Dim AU As Authenticate_User.AuthenticateUser
    2.     Set AU = New Authenticate_User.AuthenticateUser
    3.    
    4.     If AU.AuthenticateUser("inspector", "jones", "mydomain") Then
    5.         MsgBox "YAY"
    6.     Else
    7.         MsgBox "NAY"
    8.     End If

    PM me if there are any questions.
    Attached Files Attached Files
    [vbcode]
    On Error Goto Hell
    [/vbcode]
    Sheppe Pharis, MCSD
    Check out http://www.vb-faq.com
    Click here for access to the free Code-Express source code and component sharing network for VB6
    Want a better way to skin your .NET applications? Click here!

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    7
    Thank you very much Sheppe, I'll check it out.

  4. #4
    New Member
    Join Date
    Sep 2002
    Location
    Ohio
    Posts
    8

    Using in VB.NET

    Sheppe,

    Excellent DLL. That works great. However, I need to be able to have the same functionality in a .NET app without the need to register the DLL in the registry. Could I see the code behind your DLL and maybe I can adapt it to my .NET app?

    I sure would appreciate it!

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width