PrintServer.InstallPrintQueue 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
인쇄 서버에 인쇄 큐 및 관련 프린터 드라이버를 설치합니다.
오버로드
| Name | Description |
|---|---|
| InstallPrintQueue(String, String, String[], String, PrintPropertyDictionary) |
인쇄 서버에 인쇄 큐 및 관련 프린터 드라이버를 설치합니다. |
| InstallPrintQueue(String, String, String[], String, PrintQueueAttributes) |
인쇄 서버에 인쇄 큐 및 관련 프린터 드라이버를 설치합니다. |
| InstallPrintQueue(String, String, String[], String, PrintQueueAttributes, PrintQueueStringProperty, Int32, Int32) |
인쇄 서버에 우선 순위가 지정된 인쇄 큐 및 관련 프린터 드라이버를 설치합니다. |
| InstallPrintQueue(String, String, String[], String, PrintQueueAttributes, String, String, String, String, Int32, Int32) |
인쇄 서버에 공유, 우선 순위가 지정된 인쇄 큐 및 관련 프린터 드라이버를 설치합니다. |
InstallPrintQueue(String, String, String[], String, PrintPropertyDictionary)
인쇄 서버에 인쇄 큐 및 관련 프린터 드라이버를 설치합니다.
public:
System::Printing::PrintQueue ^ InstallPrintQueue(System::String ^ printQueueName, System::String ^ driverName, cli::array <System::String ^> ^ portNames, System::String ^ printProcessorName, System::Printing::IndexedProperties::PrintPropertyDictionary ^ initialParameters);
public System.Printing.PrintQueue InstallPrintQueue(string printQueueName, string driverName, string[] portNames, string printProcessorName, System.Printing.IndexedProperties.PrintPropertyDictionary initialParameters);
member this.InstallPrintQueue : string * string * string[] * string * System.Printing.IndexedProperties.PrintPropertyDictionary -> System.Printing.PrintQueue
Public Function InstallPrintQueue (printQueueName As String, driverName As String, portNames As String(), printProcessorName As String, initialParameters As PrintPropertyDictionary) As PrintQueue
매개 변수
- printQueueName
- String
새 큐의 이름입니다.
- driverName
- String
프린터 드라이버의 경로 및 이름입니다.
- portNames
- String[]
새 큐에서 사용하는 포트의 ID입니다.
- printProcessorName
- String
인쇄 프로세서의 이름입니다.
- initialParameters
- PrintPropertyDictionary
초기화되는 매개 변수입니다.
반품
새 PrintQueue.
예제
다음 예제에서는 이 메서드(메서드를 상속하는 개체에서 LocalPrintServerPrintServer호출됨)를 사용하여 위치, 포트 및 공유 상태의 기존 프린터와 속성이 다른 두 번째 프린터를 설치하는 방법을 보여 줍니다.
LocalPrintServer myLocalPrintServer = new LocalPrintServer(PrintSystemDesiredAccess.AdministrateServer);
PrintQueue sourcePrintQueue = myLocalPrintServer.DefaultPrintQueue;
PrintPropertyDictionary myPrintProperties = sourcePrintQueue.PropertiesCollection;
// Share the new printer using Remove/Add methods
PrintBooleanProperty shared = new PrintBooleanProperty("IsShared", true);
myPrintProperties.Remove("IsShared");
myPrintProperties.Add("IsShared", shared);
// Give the new printer its share name using SetProperty method
PrintStringProperty theShareName = new PrintStringProperty("ShareName", "\"Son of " + sourcePrintQueue.Name +"\"");
myPrintProperties.SetProperty("ShareName", theShareName);
// Specify the physical location of the new printer using Remove/Add methods
PrintStringProperty theLocation = new PrintStringProperty("Location", "the supply room");
myPrintProperties.Remove("Location");
myPrintProperties.Add("Location", theLocation);
// Specify the port for the new printer
String[] port = new String[] { "COM1:" };
// Install the new printer on the local print server
PrintQueue clonedPrinter = myLocalPrintServer.InstallPrintQueue("My clone of " + sourcePrintQueue.Name, "Xerox WCP 35 PS", port, "WinPrint", myPrintProperties);
myLocalPrintServer.Commit();
// Report outcome
Console.WriteLine("{0} in {1} has been installed and shared as {2}", clonedPrinter.Name, clonedPrinter.Location, clonedPrinter.ShareName);
Console.WriteLine("Press Return to continue ...");
Console.ReadLine();
Dim myLocalPrintServer As New LocalPrintServer(PrintSystemDesiredAccess.AdministrateServer)
Dim sourcePrintQueue As PrintQueue = myLocalPrintServer.DefaultPrintQueue
Dim myPrintProperties As PrintPropertyDictionary = sourcePrintQueue.PropertiesCollection
' Share the new printer using Remove/Add methods
Dim [shared] As New PrintBooleanProperty("IsShared", True)
myPrintProperties.Remove("IsShared")
myPrintProperties.Add("IsShared", [shared])
' Give the new printer its share name using SetProperty method
Dim theShareName As New PrintStringProperty("ShareName", """Son of " & sourcePrintQueue.Name & """")
myPrintProperties.SetProperty("ShareName", theShareName)
' Specify the physical location of the new printer using Remove/Add methods
Dim theLocation As New PrintStringProperty("Location", "the supply room")
myPrintProperties.Remove("Location")
myPrintProperties.Add("Location", theLocation)
' Specify the port for the new printer
Dim port() As String = { "COM1:" }
' Install the new printer on the local print server
Dim clonedPrinter As PrintQueue = myLocalPrintServer.InstallPrintQueue("My clone of " & sourcePrintQueue.Name, "Xerox WCP 35 PS", port, "WinPrint", myPrintProperties)
myLocalPrintServer.Commit()
' Report outcome
Console.WriteLine("{0} in {1} has been installed and shared as {2}", clonedPrinter.Name, clonedPrinter.Location, clonedPrinter.ShareName)
Console.WriteLine("Press Return to continue ...")
Console.ReadLine()
적용 대상
InstallPrintQueue(String, String, String[], String, PrintQueueAttributes)
인쇄 서버에 인쇄 큐 및 관련 프린터 드라이버를 설치합니다.
public:
System::Printing::PrintQueue ^ InstallPrintQueue(System::String ^ printQueueName, System::String ^ driverName, cli::array <System::String ^> ^ portNames, System::String ^ printProcessorName, System::Printing::PrintQueueAttributes printQueueAttributes);
public System.Printing.PrintQueue InstallPrintQueue(string printQueueName, string driverName, string[] portNames, string printProcessorName, System.Printing.PrintQueueAttributes printQueueAttributes);
member this.InstallPrintQueue : string * string * string[] * string * System.Printing.PrintQueueAttributes -> System.Printing.PrintQueue
Public Function InstallPrintQueue (printQueueName As String, driverName As String, portNames As String(), printProcessorName As String, printQueueAttributes As PrintQueueAttributes) As PrintQueue
매개 변수
- printQueueName
- String
새 큐의 이름입니다.
- driverName
- String
프린터 드라이버의 경로 및 이름입니다.
- portNames
- String[]
새 큐에서 사용하는 포트의 ID입니다.
- printProcessorName
- String
인쇄 프로세서의 이름입니다.
- printQueueAttributes
- PrintQueueAttributes
새 큐의 특성(플래그)입니다.
반품
새로 만든 PrintQueue.
적용 대상
InstallPrintQueue(String, String, String[], String, PrintQueueAttributes, PrintQueueStringProperty, Int32, Int32)
인쇄 서버에 우선 순위가 지정된 인쇄 큐 및 관련 프린터 드라이버를 설치합니다.
public:
System::Printing::PrintQueue ^ InstallPrintQueue(System::String ^ printQueueName, System::String ^ driverName, cli::array <System::String ^> ^ portNames, System::String ^ printProcessorName, System::Printing::PrintQueueAttributes printQueueAttributes, System::Printing::PrintQueueStringProperty ^ printQueueProperty, int printQueuePriority, int printQueueDefaultPriority);
public System.Printing.PrintQueue InstallPrintQueue(string printQueueName, string driverName, string[] portNames, string printProcessorName, System.Printing.PrintQueueAttributes printQueueAttributes, System.Printing.PrintQueueStringProperty printQueueProperty, int printQueuePriority, int printQueueDefaultPriority);
member this.InstallPrintQueue : string * string * string[] * string * System.Printing.PrintQueueAttributes * System.Printing.PrintQueueStringProperty * int * int -> System.Printing.PrintQueue
Public Function InstallPrintQueue (printQueueName As String, driverName As String, portNames As String(), printProcessorName As String, printQueueAttributes As PrintQueueAttributes, printQueueProperty As PrintQueueStringProperty, printQueuePriority As Integer, printQueueDefaultPriority As Integer) As PrintQueue
매개 변수
- printQueueName
- String
새 큐의 이름입니다.
- driverName
- String
프린터 드라이버의 경로 및 이름입니다.
- portNames
- String[]
새 큐에서 사용하는 포트의 ID입니다.
- printProcessorName
- String
인쇄 프로세서의 이름입니다.
- printQueueAttributes
- PrintQueueAttributes
새 큐의 특성(플래그)입니다.
- printQueueProperty
- PrintQueueStringProperty
새 큐의 주석, 위치 또는 공유 이름입니다.
- printQueuePriority
- Int32
인쇄 서버에서 호스트하는 다른 큐를 기준으로 이 인쇄 큐의 우선 순위를 지정하는 1부터 99까지의 값입니다.
- printQueueDefaultPriority
- Int32
큐로 전송되는 인쇄 작업의 기본 우선 순위를 지정하는 1에서 99까지의 값입니다.
반품
새로 만든 PrintQueue.
설명
매개 변수를 printQueueProperty 사용하여 큐 ShareNameCommentLocation 또는 속성 중 하나만 초기화합니다. 둘 이상을 초기화하려면 이 메서드의 오버로드를 InstallPrintQueue(String, String, String[], String, PrintQueueAttributes, String, String, String, String, Int32, Int32) 사용합니다.
적용 대상
InstallPrintQueue(String, String, String[], String, PrintQueueAttributes, String, String, String, String, Int32, Int32)
인쇄 서버에 공유, 우선 순위가 지정된 인쇄 큐 및 관련 프린터 드라이버를 설치합니다.
public:
System::Printing::PrintQueue ^ InstallPrintQueue(System::String ^ printQueueName, System::String ^ driverName, cli::array <System::String ^> ^ portNames, System::String ^ printProcessorName, System::Printing::PrintQueueAttributes printQueueAttributes, System::String ^ printQueueShareName, System::String ^ printQueueComment, System::String ^ printQueueLocation, System::String ^ printQueueSeparatorFile, int printQueuePriority, int printQueueDefaultPriority);
public System.Printing.PrintQueue InstallPrintQueue(string printQueueName, string driverName, string[] portNames, string printProcessorName, System.Printing.PrintQueueAttributes printQueueAttributes, string printQueueShareName, string printQueueComment, string printQueueLocation, string printQueueSeparatorFile, int printQueuePriority, int printQueueDefaultPriority);
member this.InstallPrintQueue : string * string * string[] * string * System.Printing.PrintQueueAttributes * string * string * string * string * int * int -> System.Printing.PrintQueue
Public Function InstallPrintQueue (printQueueName As String, driverName As String, portNames As String(), printProcessorName As String, printQueueAttributes As PrintQueueAttributes, printQueueShareName As String, printQueueComment As String, printQueueLocation As String, printQueueSeparatorFile As String, printQueuePriority As Integer, printQueueDefaultPriority As Integer) As PrintQueue
매개 변수
- printQueueName
- String
새 큐의 이름입니다.
- driverName
- String
프린터 드라이버의 경로 및 이름입니다.
- portNames
- String[]
새 큐에서 사용하는 포트의 ID입니다.
- printProcessorName
- String
인쇄 프로세서의 이름입니다.
- printQueueAttributes
- PrintQueueAttributes
새 큐의 특성(플래그)입니다.
- printQueueShareName
- String
새 큐의 공유 이름입니다.
- printQueueComment
- String
Microsoft Windows UI에서 사용자에게 표시되는 큐에 대한 설명입니다.
- printQueueLocation
- String
새 큐의 위치입니다.
- printQueueSeparatorFile
- String
각 인쇄 작업의 시작 부분에 삽입되는 파일의 경로입니다.
- printQueuePriority
- Int32
인쇄 서버에서 호스트하는 다른 큐를 기준으로 큐의 우선 순위를 지정하는 1부터 99까지의 값입니다.
- printQueueDefaultPriority
- Int32
큐로 전송되는 새 인쇄 작업의 기본 우선 순위를 지정하는 1에서 99까지의 값입니다.
반품
새로 만든 PrintQueue.
설명
큐 ShareNameCommentLocation 의 세 가지 또는 속성을 모두 초기화하지 않으려면 하나 이상의 printQueueShareNameprintQueueComment에 대해 빈 문자열을 printQueueLocation전달할 수 있습니다. 이러한 속성 중 하나만 초기화하려면 이 메서드의 오버로드를 InstallPrintQueue(String, String, String[], String, PrintQueueAttributes, PrintQueueStringProperty, Int32, Int32) 사용합니다.