从局域网中找出所有的机器
foreach(DirectoryEntry domain in root.Children)
{
lb_pcName.Items.Add(""★★★""+domain.Name+""★★★"");
foreach(DirectoryEntry pc in domain.Children)
{
if(pc.Name!=""Schema"")//Schema是结束标记
lb_pcName.Items.Add("" ""+pc.Name);
}
}
{
lb_pcName.Items.Add(""★★★""+domain.Name+""★★★"");
foreach(DirectoryEntry pc in domain.Children)
{
if(pc.Name!=""Schema"")//Schema是结束标记
lb_pcName.Items.Add("" ""+pc.Name);
}
}