EnumeratedPrintQueueTypes 列挙型

定義

印刷キューの属性を指定します。

この列挙体は、メンバー値のビットごとの組み合わせをサポートしています。

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

フィールド

Connections 16

指定したプリント サーバーに接続される印刷キューです。

DirectPrinting 2

印刷ジョブを最初にスプールせずに直接印刷に送信する印刷キューです。

EnableBidi 2048

双方向通信が有効なプリンターの印刷キューです。

EnableDevQuery 128

ドキュメントとプリンターの構成が一致しない場合に印刷ジョブを保留する印刷キューです。

Fax 16384

FAX に情報を提供する印刷キューです。

KeepPrintedJobs 256

印刷後、キューにジョブを保持する印刷キューです。

Local 64

指定したプリント サーバーにローカル印刷キューとしてインストールされる印刷キューです。

PublishedInDirectoryServices 8192

プリンターのディレクトリに表示される印刷キューです。

PushedMachineConnection 262144

プリンター接続のプッシュ コンピューター ポリシーを使用してインストールされた印刷キューです。

PushedUserConnection 131072

プリンター接続のプッシュ ユーザー ポリシーを使用してインストールされた印刷キューです。

Queued 1

キュー内で複数の印刷ジョブを許可する印刷キューです。

RawOnly 4096

未処理データのみをスプールする印刷キューです。

Shared 8

共有される印刷キューです。

TerminalServer 32768

ターミナル サービスのリダイレクト機能によってインストールされる印刷キューです。

WorkOffline 1024

オフラインで動作可能な印刷キューです。

次の例は、 EnumeratedPrintQueueTypes 列挙を使用して、使用可能な印刷キューのサブセットを取得する方法を示しています。

// 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 サブセットを一覧表示するには、 メソッドでこれらの値を使用します。

PushedMachineConnection プリンターへのマシンと PushedUserConnection ユーザーの自動接続を有効にするポリシーを参照してください。 印刷管理のステップ バイ ステップ ガイド「グループ ポリシーを使用したユーザーまたはコンピューターへのプリンターの展開」セクションを参照してください。

適用対象

こちらもご覧ください