PrintServer Class

Represents a server that hosts one or more printers

For a list of all members of this type, see PrintServer Members.

System.Object
   System.MarshalByRefObject
      PrinterQueueWatch.PrintServer

[Visual Basic]
Public Class PrintServer
[C#]
public class PrintServer 
[C++]
public __gc class PrintServer 
[JScript]
public class PrintServer

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

The PrintServer class provides information about the server

Example

The following example returns the list of printer drivers installed on the named printer

[Visual Basic] 
Public Sub ListPrintDrivers(ByVal ServerName As String)

 Try
   Dim Server As New PrintServer(ServerName)
   For Each pd As PrinterDriver In Server.PrinterDrivers
      Trace.WriteLine(pd.Name)
   Next pd
 Catch
   Trace.WriteLine("Server not found")
 End Try

End Sub

Requirements

Version : Release 2.0.1 or higher

Namespace: PrinterQueueWatch

Platforms: Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

Assembly: PrinterQueueWatch (in PrinterQueueWatch.dll)

See Also

© 2003 Merrion Computing Ltd. All rights reserved.