I basically need a list of printers that's returned by the Find Printers
dialog ( http://www.sqleffects.com/mystuff/findPrinters.png ). I've
tried the path of
DirectoryEntry entry = new DirectoryEntry( strPath);
DirectorySearch er mySearcher = new DirectorySearch er(entry);
mySearcher.Filt er = "(objectCategor y=printer)"
foreach(SearchR esult result in mySearcher.Find All())
{
strName = result.GetDirec toryEntry().Nam e;
}
but nothing was returned.
I am wondering what mechanism the Find Printers dialog is using? Is it
hitting up the active directory? How does it find all the printers?
Thanks.
dialog ( http://www.sqleffects.com/mystuff/findPrinters.png ). I've
tried the path of
DirectoryEntry entry = new DirectoryEntry( strPath);
DirectorySearch er mySearcher = new DirectorySearch er(entry);
mySearcher.Filt er = "(objectCategor y=printer)"
foreach(SearchR esult result in mySearcher.Find All())
{
strName = result.GetDirec toryEntry().Nam e;
}
but nothing was returned.
I am wondering what mechanism the Find Printers dialog is using? Is it
hitting up the active directory? How does it find all the printers?
Thanks.
Comment