EnumeratedPrintQueueTypes 枚举

定义

指定打印队列的特性。Specifies attributes of print queues.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class EnumeratedPrintQueueTypes
[System.Flags]
public enum EnumeratedPrintQueueTypes
type EnumeratedPrintQueueTypes = 
Public Enum EnumeratedPrintQueueTypes
继承
EnumeratedPrintQueueTypes
属性

字段

Connections 16

连接到指定打印服务器的打印队列。A print queue that is connected to the specified print server.

DirectPrinting 2

直接将打印作业发送到打印,而不是先发送到后台打印作业的打印队列。A print queue that sends a print job directly to printing instead of spooling the job first.

EnableBidi 2048

已启用双向通信的打印机的打印队列。A print queue for a printer that has bidirectional communication enabled.

EnableDevQuery 128

当文档和打印机配置不匹配时停止其打印作业的打印队列。A print queue that holds its print jobs when the document and printer configurations do not match.

Fax 16384

服务于传真机的打印队列。A print queue that services a fax machine.

KeepPrintedJobs 256

打印完作业后将其保留在队列中的打印队列。A print queue that keeps jobs in the queue after printing them.

Local 64

作为本地打印队列安装在指定打印服务器上的打印队列。A print queue that is installed as a local print queue on the specified print server.

PublishedInDirectoryServices 8192

打印机目录中可看见的打印队列。A print queue that is visible in the directory of printers.

PushedMachineConnection 262144

使用“推入打印机连接”计算机策略安装的打印队列。A print queue that was installed by using the Push Printer Connections computer policy.

PushedUserConnection 131072

使用“推入打印机连接”用户策略安装的打印队列。A print queue that was installed by using the Push Printer Connections user policy.

Queued 1

允许队列中存在多个打印作业的打印队列。A print queue that allows multiple print jobs in the queue.

RawOnly 4096

仅对原始数据进行后台处理的打印队列。A print queue that spools only raw data.

Shared 8

共享的打印队列。A print queue that is shared.

TerminalServer 32768

通过“终端服务”中的重定向功能安装的打印队列。A print queue that is installed by the redirection feature in Terminal Services.

WorkOffline 1024

可脱机工作的打印队列。A print queue that can work offline.

示例

下面的示例演示如何使用EnumeratedPrintQueueTypes枚举获取可用打印队列的子集。The following example shows how to use the EnumeratedPrintQueueTypes enumeration to get a subset of available print queues.

// Specify that the list will contain only the print queues that are installed as local and are shared
array<System::Printing::EnumeratedPrintQueueTypes>^ enumerationFlags = {EnumeratedPrintQueueTypes::Local,EnumeratedPrintQueueTypes::Shared};

LocalPrintServer^ printServer = gcnew LocalPrintServer();

//Use the enumerationFlags to filter out unwanted print queues
PrintQueueCollection^ printQueuesOnLocalServer = printServer->GetPrintQueues(enumerationFlags);

Console::WriteLine("These are your shared, local print queues:\n\n");

for each (PrintQueue^ printer in printQueuesOnLocalServer)
{
   Console::WriteLine("\tThe shared printer " + printer->Name + " is located at " + printer->Location + "\n");
}
Console::WriteLine("Press enter to continue.");
Console::ReadLine();
// Specify that the list will contain only the print queues that are installed as local and are shared
EnumeratedPrintQueueTypes[] enumerationFlags = {EnumeratedPrintQueueTypes.Local,
                                                EnumeratedPrintQueueTypes.Shared};

LocalPrintServer printServer = new LocalPrintServer();

//Use the enumerationFlags to filter out unwanted print queues
PrintQueueCollection printQueuesOnLocalServer = printServer.GetPrintQueues(enumerationFlags);

Console.WriteLine("These are your shared, local print queues:\n\n");

foreach (PrintQueue printer in printQueuesOnLocalServer)
{
    Console.WriteLine("\tThe shared printer " + printer.Name + " is located at " + printer.Location + "\n");
}
Console.WriteLine("Press enter to continue.");
Console.ReadLine();
' Specify that the list will contain only the print queues that are installed as local and are shared
Dim enumerationFlags() As EnumeratedPrintQueueTypes = {EnumeratedPrintQueueTypes.Local, EnumeratedPrintQueueTypes.Shared}

Dim printServer As New LocalPrintServer()

'Use the enumerationFlags to filter out unwanted print queues
Dim printQueuesOnLocalServer As PrintQueueCollection = printServer.GetPrintQueues(enumerationFlags)

Console.WriteLine("These are your shared, local print queues:" & vbLf & vbLf)

For Each printer As PrintQueue In printQueuesOnLocalServer
    Console.WriteLine(vbTab & "The shared printer " & printer.Name & " is located at " & printer.Location & vbLf)
Next printer
Console.WriteLine("Press enter to continue.")
Console.ReadLine()

注解

将这些值与GetPrintQueues方法结合使用以列出可用打印队列的子集。Use these values with the GetPrintQueues method to list subsets of available print queues.

PushedMachineConnectionPushedUserConnection , 请参阅允许计算机和用户自动连接到打印机的策略。PushedMachineConnection and PushedUserConnection refer to policies that enable automated connection of machines and users to printers. 请参阅 "打印管理" 循序渐进指南中的"使用组策略向用户或计算机部署打印机"一节。See the section "Deploying Printers to Users or Computers by Using Group Policy" in the Step-by-Step Guide for Print Management.

适用于

另请参阅