Enumerating print shares on local LAN...

  • Thread starter Thread starter Terry Olsen
  • Start date Start date
T

Terry Olsen

I work for a large company that has a corporate intranet. We have traveling
users that need to print to the laser printer in whatever building they are
in on a particular day. Is there a way to programatically find local print
shares and then direct all printing to that share? There are some constants
that may help.

1. Printers are shared from an NT4 server in each building. Each server is
named after a common pattern: <state (2 char)><city (3 char)>SVR01.
2. All server IP addresses end in the same octet: 10.xx.xx.51. (Routers
are 10.xx.xx.1)
3. Laptops are Win2k builds, DHCP enabled.

Any ideas on how to get started on this are greatly appreciated.
 
Hi ,
You can use the Wnetenumopen and wnetenumresource API calls to enumerate
network resources. I do not have a sample handy, but you can find some
samples at
www.allapi.net

Thanks


Anand Balasubramanian
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks
 
Back
Top