[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: VB/COM client?



Hi Allan,

I could connect to openLDAP with ADSI object model, it's same used to
manager Active Directory in Windows 2000.

Some references might help:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/adsi
/active_directory_service_interfaces_adsi.asp

http://aspn.activestate.com/ASPN/Python/Reference/Products/ActivePython/win3
2com/win32com/help/adsi.html

Some code example:
----------------------> Read LDAP Entry <--------------------

'**********************************************************
' Enter the LDAP Path
'**********************************************************
const strLDAPAdmin = "cn=Manager,dc=example,dc=com"
const strLDAPpasswd = "secret"
const strSourceLdapPath =
"LDAP://ldap.example.com/dc=com/dc=example/ou=Accounts";

Set oLDAP = GetObject("LDAP:")
If Err.Number <> 0 Then
   Msgbox Err.Number & Err.Description
End If


'**********************************************************
' This must be set to the Admin Account on the the LDAP Source
'**********************************************************
Set oADsContainer = oLDAP.OpenDSObject(strSourceLdapPath, strLDAPAdmin,
strLDAPpasswd, 0)
If Err.Number <> 0 Then
   Msgbox Err.Number & Err.Description
End If

strMsg = ""
For Each oADsUser In oADsContainer
   strMsg = strMsg & "Class: " & oADsUser.Class & vbCRLF & _
	 "cn: " & oADsUser.cn & vbCRLF & _
	 "mail: " & oADsUser.mail & vbCRLF  & vbCRLF
Next
----------------------> Read LDAP Entry <--------------------

* Looking at documentation seems to work with TLS connection, I didn't try
it. good luck !


Att, 

Gustavo Arjones 
ICQ #56338947 


> -----Original Message-----
> From: Allan Streib [mailto:astreib@indiana.edu]
> Sent: Friday, January 11, 2002 6:03 PM
> To: OpenLDAP List
> Subject: VB/COM client?
> 
> 
> Anybody know of any Visual BASIC components that act as an 
> LDAP client?  
> I have a developer here who needs to talk to our OpenLDAP 
> server from a 
> VB program.  The only wrinkle might be that it also needs to 
> be over SSL.
> 
> Thanks!
> 
> Allan
>