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.
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:
Dim AU As Authenticate_User.AuthenticateUser
Set AU = New Authenticate_User.AuthenticateUser
If AU.AuthenticateUser("inspector", "jones", "mydomain") Then
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?