Mitz - What was the point of the ADsSecurity dll?
dtank - I'm sure you can have your users change some data, depending on the settings. To bind (in other words log in) you need to use ADsOpenObject (http://msdn.microsoft.com
I've always found it very useful to browse Active Directory using LDP. LDP is a very simple LDAP client that comes with the Windows 2000 support tools. It shows you what the various attributes are actually called, instead of the more descriptive names you see in the AD snap-ins etc.
Beyond that, I'm not really sure what you are asking. Maybe you could give a few more details?
Main Topics
Browse All Topics





by: MitzsPosted on 2004-03-10 at 03:45:58ID: 10559735
hi
First of all You will need to download ADsSecurity.dll. Just look on net and its free to download.
Once you have that file you will need following Reference in you project
Active DS Type Library
Windows Script Host Object
AdsSecurity 2.5 Type Library
after this just put a treeview control on your form and run the project with the following code..
this will give you all the information of schema, user etc. i dont know yet to how to get name,mobile or other infor of user or groups.
Option Explicit
Private Sub Form_Load()
Dim myADS As IADs
Dim Member As IADs
Dim DirectoryObject As IADs
On Error Resume Next
Set myADS = GetObject("ADs:")
For Each Member In myADS
Me.TreeView1.Nodes.Add , , Member.ADsPath, Member.Name + "(" + Member.ADsPath + ")"
Me.TreeView1.Nodes.Add Member.ADsPath, tvwChild, Member.ADsPath + ";Dummy", "Dummy Node"
Next
End Sub
Private Sub TreeView1_Expand(ByVal Node As MSComctlLib.Node)
Dim adsParent As IADsContainer
Dim adsChild As IADs
On Error GoTo Error_Handler:
'Check to see whether this node has been previously expanded...
If Node.Children = 1 Then
'There is only one child node. Is it a dummy node?
If Node.Child.Key = Node.Key + ";Dummy" Then
'Yes.
'Delete it
Me.TreeView1.Nodes.Remove Node.Child.Key
'Create real children...
Set adsParent = GetObject(Node.Key)
For Each adsChild In adsParent
Me.TreeView1.Nodes.Add Node.Key, tvwChild, adsChild.ADsPath, adsChild.Name + " (" + adsChild.ADsPath + ")"
Me.TreeView1.Nodes.Add adsChild.ADsPath, tvwChild, adsChild.ADsPath + ";Dummy", "Dummy Node"
Next
End If
End If
Error_Handler:
End Sub
hope this helps