How To Programmatically Share a Printer Under Windows NT (176704)
The information in this article applies to:
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Professional
- Microsoft Platform Software Development Kit (SDK) 1.0
This article was previously published under Q176704 SUMMARY
In Windows NT, printers may be shared (or shares removed) using the Win32
SDK API SetPrinter(). The PRINTER_INFO_2 structure contains an Attributes member and a pShareName member that can be used for this purpose. Note that the printer must be opened with administrative permissions for the SetPrinter() call to be successful.
NOTE: On Windows 95 and Windows 98, there is no way to programmatically share a printer.
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbhowto KB176704 |
---|
|