System.Director yServices.Direc toryEntry entryRoot
= new System.Director yServices.Direc toryEntr
("WinNT://danny-4649bwcv8", null, null,
AuthenticationT ypes.None )
tr
System.Director yServices.Direc toryEntries
userEntries = entryRoot.Child ren
foreac
(System.Directo ryServices.Dire ctoryEntry user in
userEntries
i
(user.SchemaCla ssName.Equals(" User")
Console.WriteLi ne(user.Name)
catch
(System.Runtime .InteropService s.COMException e
{
Console.WriteLi n
( "Error " + e)
-----Original Message----
In VB, I can write the following code to get the list of
users and groups in the domain ASIA. How do I do the same
in C Set objContainer = GetObject("WinN T://ASIA"
objContainer.Fi lter = Array("user", "group"
For Each user In objContaine
List1.AddItem user.Nam
NexThanks and Regards
Thoma
Print | Copy URL of this post
.. .
Contact Us | Rules of Conduct
©2004 Microsoft Corporation. All rights reserved. Terms of Use | Privacy Statement