Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie VB6 DLL ASP Question...Help Please

Status
Not open for further replies.

Cranger

Programmer
Apr 4, 2001
54
0
0
US
Not necessarily looking for someone to write the code, but have been looking for examples and I can not find. I want to take the below code and make it a DLL so I can call it from VB or ASP applications. Any help greatly appreciated.

Dim strUserName
Dim strPassword

On Error GoTo displaymessage:

Set oADsNamespace = GetObject("LDAP:")
Set oADsObject = oADsNamespace.OpenDSObject("LDAP://domainname.local", "domainname\" & strUserName, strPassword, 0)

If (Err.Number = 0) Then
MsgBox "USER AUHTENTICATED!"
Exit Sub
End If

displaymessage:
MsgBox "Invalid Username or Password
 
Open VB. Select "ActiveX DLL" when asked for a type of project. Put your code in the class moduel there, inside a method declaration, such as ValidateLogin.

If you need more help, post back with more specific questions.

HTH

Bob
 
Thanks.

I guess I am getting lazy and anxious in my old age. I just got the VB call working and finished the ASP call earlier. I am good to go.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top