PrintSystemDesiredAccess 열거형

정의

인쇄 개체의 여러 가지 액세스 권한 또는 액세스 수준을 지정합니다.

public enum class PrintSystemDesiredAccess
public enum PrintSystemDesiredAccess
type PrintSystemDesiredAccess = 
Public Enum PrintSystemDesiredAccess
상속
PrintSystemDesiredAccess

필드

AdministratePrinter 983052

인쇄 작업 일시 중지 및 다시 시작, 대기열에서 모든 작업 삭제 등 인쇄 대기열에 대해 모든 관리 작업을 수행할 수 있는 권한입니다. 이 액세스 수준에는 UsePrinter의 모든 권한도 포함됩니다.

AdministrateServer 983041

인쇄 서버에 대해 모든 관리 작업을 수행할 수 있는 권한입니다. 이 액세스 수준에는 서버에서 호스팅하는 인쇄 대기열에 대한 AdministratePrinter 권한이 포함되지 않습니다.

EnumerateServer 131074

인쇄 서버의 대기열을 나열할 수 있는 권한입니다.

None 0

권한이 없습니다.

UsePrinter 131080

대기열에 인쇄 작업을 추가하고 자신의 인쇄 작업을 삭제 및 열거할 수 있는 권한입니다.

예제

다음 예제에서는 기존 프린터 위치, 포트 및 공유 상태에만 해당 속성에 다른 두 번째 프린터를 설치 하려면이 열거형을 사용 하는 방법을 보여 줍니다.

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

설명

액세스의 각 수준에서 사용할 수 있는 권한이 다음에 따라 달라 집니다.

  • 인쇄 서버 인지 여부는 컴퓨터나 인쇄 서버 장비입니다.

  • 사용 되는 운영 체제입니다.

  • 설치 된 보안 업데이트 합니다.

  • 지원 되는 보안 정책입니다.

이러한 이유로 액세스 오른쪽 설명 "멤버" 섹션에는 일반적으로 각 액세스 수준에 해당 하는 권한이 있지만 나열 된 액세스 수준이 특정 시스템에 더 많거나 적은 권한을 제공할 수 있습니다.

이러한 값을 매개 변수로 사용 주로 PrintServerPrintQueue 생성자입니다. 생성자는 다른 종류의 개체에만 적용할 수 있는 값을 사용 하는 경우 예외를 throw 합니다. 예를 들어 AdministratePrinter를 전달 하지 마십시오는 PrintServer 생성자입니다.

적용 대상