EnumeratedPrintQueueTypes Wyliczenie

Definicja

Określa atrybuty kolejek wydruku.

To wyliczenie obsługuje bitową kombinację jego wartości składowych.

public enum class EnumeratedPrintQueueTypes
[System.Flags]
public enum EnumeratedPrintQueueTypes
[<System.Flags>]
type EnumeratedPrintQueueTypes = 
Public Enum EnumeratedPrintQueueTypes
Dziedziczenie
EnumeratedPrintQueueTypes
Atrybuty

Pola

Connections 16

Kolejka wydruku połączona z określonym serwerem wydruku.

DirectPrinting 2

Kolejka wydruku, która wysyła zadanie drukowania bezpośrednio do drukowania zamiast buforowania zadania.

EnableBidi 2048

Kolejka wydruku dla drukarki z włączoną komunikacją dwukierunkową.

EnableDevQuery 128

Kolejka wydruku, która przechowuje zadania drukowania, gdy konfiguracje dokumentu i drukarki nie są zgodne.

Fax 16384

Kolejka wydruku, która obsługuje faks.

KeepPrintedJobs 256

Kolejka wydruku, która przechowuje zadania w kolejce po ich wydrukowaniu.

Local 64

Kolejka wydruku zainstalowana jako lokalna kolejka wydruku na określonym serwerze wydruku.

PublishedInDirectoryServices 8192

Kolejka wydruku widoczna w katalogu drukarek.

PushedMachineConnection 262144

Kolejka wydruku zainstalowana przy użyciu zasad komputera Połączenia drukarki wypychanej.

PushedUserConnection 131072

Kolejka wydruku zainstalowana przy użyciu zasad użytkownika Połączenia drukarki wypychanej.

Queued 1

Kolejka wydruku, która umożliwia wykonywanie wielu zadań drukowania w kolejce.

RawOnly 4096

Kolejka wydruku, która buforuje tylko nieprzetworzone dane.

Shared 8

Udostępniona kolejka wydruku.

TerminalServer 32768

Kolejka wydruku zainstalowana przez funkcję przekierowania w usługach terminalowych.

WorkOffline 1024

Kolejka wydruku, która może działać w trybie offline.

Przykłady

W poniższym przykładzie pokazano, jak za pomocą EnumeratedPrintQueueTypes wyliczenia uzyskać podzbiór dostępnych kolejek wydruku.

// 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()

Uwagi

Użyj tych wartości z GetPrintQueues metodą , aby wyświetlić listę podzestawów dostępnych kolejek wydruku.

PushedMachineConnection i PushedUserConnection zapoznaj się z zasadami, które umożliwiają automatyczne łączenie maszyn i użytkowników z drukarkami. Zobacz sekcję "Wdrażanie drukarek dla użytkowników lub komputerów przy użyciu zasady grupy" w przewodniku krok po kroku dotyczącym zarządzania drukowaniem.

Dotyczy

Zobacz też