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.

public:
 PrintQueue(System::Printing::PrintServer ^ printServer, System::String ^ printQueueName);
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName);
new System.Printing.PrintQueue : System.Printing.PrintServer * string -> System.Printing.PrintQueue

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.

PrintQueue(PrintServer, String, Int32)

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

public:
 PrintQueue(System::Printing::PrintServer ^ printServer, System::String ^ printQueueName, int printSchemaVersion);
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, int printSchemaVersion);
new System.Printing.PrintQueue : System.Printing.PrintServer * string * int -> System.Printing.PrintQueue

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".

PrintQueue(PrintServer, String, PrintQueueIndexedProperty[])

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

public:
 PrintQueue(System::Printing::PrintServer ^ printServer, System::String ^ printQueueName, cli::array <System::Printing::PrintQueueIndexedProperty> ^ propertyFilter);
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, System.Printing.PrintQueueIndexedProperty[] propertyFilter);
new System.Printing.PrintQueue : System.Printing.PrintServer * string * System.Printing.PrintQueueIndexedProperty[] -> System.Printing.PrintQueue

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.

PrintQueue(PrintServer, String, PrintSystemDesiredAccess)

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

public:
 PrintQueue(System::Printing::PrintServer ^ printServer, System::String ^ printQueueName, System::Printing::PrintSystemDesiredAccess desiredAccess);
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, System.Printing.PrintSystemDesiredAccess desiredAccess);
new System.Printing.PrintQueue : System.Printing.PrintServer * string * System.Printing.PrintSystemDesiredAccess -> System.Printing.PrintQueue

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.

PrintQueue(PrintServer, String, String[])

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

public:
 PrintQueue(System::Printing::PrintServer ^ printServer, System::String ^ printQueueName, cli::array <System::String ^> ^ propertyFilter);
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, string[] propertyFilter);
new System.Printing.PrintQueue : System.Printing.PrintServer * string * string[] -> System.Printing.PrintQueue

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.

PrintQueue(PrintServer, String, Int32, PrintSystemDesiredAccess)

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

public:
 PrintQueue(System::Printing::PrintServer ^ printServer, System::String ^ printQueueName, int printSchemaVersion, System::Printing::PrintSystemDesiredAccess desiredAccess);
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, int printSchemaVersion, System.Printing.PrintSystemDesiredAccess desiredAccess);
new System.Printing.PrintQueue : System.Printing.PrintServer * string * int * System.Printing.PrintSystemDesiredAccess -> System.Printing.PrintQueue

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".

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.

public:
 PrintQueue(System::Printing::PrintServer ^ printServer, System::String ^ printQueueName, cli::array <System::Printing::PrintQueueIndexedProperty> ^ propertyFilter, System::Printing::PrintSystemDesiredAccess desiredAccess);
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, System.Printing.PrintQueueIndexedProperty[] propertyFilter, System.Printing.PrintSystemDesiredAccess desiredAccess);
new System.Printing.PrintQueue : System.Printing.PrintServer * string * System.Printing.PrintQueueIndexedProperty[] * System.Printing.PrintSystemDesiredAccess -> System.Printing.PrintQueue

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.

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

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

public:
 PrintQueue(System::Printing::PrintServer ^ printServer, System::String ^ printQueueName, cli::array <System::String ^> ^ propertyFilter, System::Printing::PrintSystemDesiredAccess desiredAccess);
public PrintQueue (System.Printing.PrintServer printServer, string printQueueName, string[] propertyFilter, System.Printing.PrintSystemDesiredAccess desiredAccess);
new System.Printing.PrintQueue : System.Printing.PrintServer * string * string[] * System.Printing.PrintSystemDesiredAccess -> System.Printing.PrintQueue

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