PrintQueue Constructors

Definition

Initializes a new instance of the PrintQueue class.

Overloads

PrintQueue(PrintServer, String)

Initializes a new instance of PrintQueue class using the specified PrintServer and queue name.

PrintQueue(PrintServer, String, Int32)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and print schema version.

PrintQueue(PrintServer, String, PrintQueueIndexedProperty[])

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and array of PrintQueueIndexedProperty values to initialize.

PrintQueue(PrintServer, String, PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and desired access.

PrintQueue(PrintServer, String, String[])

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and array of property names to initialize.

PrintQueue(PrintServer, String, Int32, PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, print schema version, and desired access.

PrintQueue(PrintServer, String, PrintQueueIndexedProperty[], PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class with the specified PrintServer, queue name, array of PrintQueueIndexedProperty values to initialize, and desired access.

PrintQueue(PrintServer, String, String[], PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, property filter, and desired access.

PrintQueue(PrintServer, String)

Initializes a new instance of PrintQueue class using the specified PrintServer and queue name.

C#
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName);

Parameters

printServer
PrintServer

The print server to host the print queue.

printQueueName
String

The name of the print queue.

Remarks

PrintQueue constructors that do not include a PrintSystemDesiredAccess parameter default to UsePrinter access.

Applies to

.NET Framework 4.8.1 og andre versjoner
Produkt Versjoner
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

PrintQueue(PrintServer, String, Int32)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and print schema version.

C#
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, int printSchemaVersion);

Parameters

printServer
PrintServer

The print server that hosts the print queue.

printQueueName
String

The name of the print queue.

printSchemaVersion
Int32

The version of the Print Schema to use.

Remarks

PrintQueue constructors that do not include a PrintSystemDesiredAccess parameter default to UsePrinter access.

The Print Schema version released with Windows Vista is "1".

Applies to

.NET Framework 4.8.1 og andre versjoner
Produkt Versjoner
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

PrintQueue(PrintServer, String, PrintQueueIndexedProperty[])

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and array of PrintQueueIndexedProperty values to initialize.

C#
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, System.Printing.PrintQueueIndexedProperty[] propertyFilter);

Parameters

printServer
PrintServer

The print server that hosts the print queue.

printQueueName
String

The name of the print queue.

propertyFilter
PrintQueueIndexedProperty[]

An array of PrintQueueIndexedProperty values that specifies the property values to initialize.

Remarks

PrintQueue constructors that do not include a PrintSystemDesiredAccess parameter default to UsePrinter access.

The use of a constructor with the propertyFilter parameter improves performance.

Applies to

.NET Framework 4.8.1 og andre versjoner
Produkt Versjoner
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

PrintQueue(PrintServer, String, PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and desired access.

C#
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, System.Printing.PrintSystemDesiredAccess desiredAccess);

Parameters

printServer
PrintServer

The print server that hosts the print queue.

printQueueName
String

The name of the print queue.

desiredAccess
PrintSystemDesiredAccess

One of the PrintSystemDesiredAccess values that specifies the type of access to the print queue that your program needs.

Exceptions

desiredAccess is a value that can be applied only to a PrintServer object, not a PrintQueue object. For example, AdministrateServer.

Applies to

.NET Framework 4.8.1 og andre versjoner
Produkt Versjoner
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

PrintQueue(PrintServer, String, String[])

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, and array of property names to initialize.

C#
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, string[] propertyFilter);

Parameters

printServer
PrintServer

The print server that hosts the print queue.

printQueueName
String

The name of the print queue.

propertyFilter
String[]

An array of the names of properties to initialize.

Remarks

PrintQueue constructors that do not include a PrintSystemDesiredAccess parameter default to UsePrinter access.

The use of a constructor with the propertyFilter parameter improves performance.

Applies to

.NET Framework 4.8.1 og andre versjoner
Produkt Versjoner
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

PrintQueue(PrintServer, String, Int32, PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, print schema version, and desired access.

C#
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, int printSchemaVersion, System.Printing.PrintSystemDesiredAccess desiredAccess);

Parameters

printServer
PrintServer

The print server that hosts the print queue.

printQueueName
String

The name of the print queue.

printSchemaVersion
Int32

The version of the Print Schema to use.

desiredAccess
PrintSystemDesiredAccess

One of the PrintSystemDesiredAccess values that specifies the type of access to the print queue that your program needs.

Exceptions

desiredAccess is a value that can be applied only to a PrintServer object, not a PrintQueue object. For example, AdministrateServer.

Remarks

The Print Schema version released with Windows Vista is "1".

Applies to

.NET Framework 4.8.1 og andre versjoner
Produkt Versjoner
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

PrintQueue(PrintServer, String, PrintQueueIndexedProperty[], PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class with the specified PrintServer, queue name, array of PrintQueueIndexedProperty values to initialize, and desired access.

C#
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, System.Printing.PrintQueueIndexedProperty[] propertyFilter, System.Printing.PrintSystemDesiredAccess desiredAccess);

Parameters

printServer
PrintServer

The print server that hosts the print queue.

printQueueName
String

The name of the print queue.

propertyFilter
PrintQueueIndexedProperty[]

An array of PrintQueueIndexedProperty values that specifies the properties to initialize.

desiredAccess
PrintSystemDesiredAccess

One of the PrintSystemDesiredAccess values that specifies the type of access to the print queue that your program needs.

Exceptions

desiredAccess is a value that can be applied only to a PrintServer object, not a PrintQueue object. For example, AdministrateServer.

Remarks

The use of a constructor with the propertyFilter parameter improves performance.

Applies to

.NET Framework 4.8.1 og andre versjoner
Produkt Versjoner
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

PrintQueue(PrintServer, String, String[], PrintSystemDesiredAccess)

Initializes a new instance of PrintQueue class using the specified PrintServer, queue name, property filter, and desired access.

C#
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, string[] propertyFilter, System.Printing.PrintSystemDesiredAccess desiredAccess);

Parameters

printServer
PrintServer

The print server that hosts the print queue.

printQueueName
String

The name of the print queue.

propertyFilter
String[]

An array of the names of properties to initialize.

desiredAccess
PrintSystemDesiredAccess

One of the PrintSystemDesiredAccess values that specifies the type of access to the print queue that your program needs.

Exceptions

desiredAccess is a value that can be applied only to a PrintServer object, not a PrintQueue object. For example, AdministrateServer.

Remarks

The use of a constructor with the propertyFilter parameter improves performance.

Applies to

.NET Framework 4.8.1 og andre versjoner
Produkt Versjoner
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9