共用方式為


2.2.1.10.3 PRINTER_INFO_2

The PRINTER_INFO_2 structure provides information about a printer.

 typedef struct _PRINTER_INFO_2 {
   [string] wchar_t* pServerName;
   [string] wchar_t* pPrinterName;
   [string] wchar_t* pShareName;
   [string] wchar_t* pPortName;
   [string] wchar_t* pDriverName;
   [string] wchar_t* pComment;
   [string] wchar_t* pLocation;
   ULONG_PTR pDevMode;
   [string] wchar_t* pSepFile;
   [string] wchar_t* pPrintProcessor;
   [string] wchar_t* pDatatype;
   [string] wchar_t* pParameters;
   ULONG_PTR pSecurityDescriptor;
   DWORD Attributes;
   DWORD Priority;
   DWORD DefaultPriority;
   DWORD StartTime;
   DWORD UntilTime;
   DWORD Status;
   DWORD cJobs;
   DWORD AveragePPM;
 } PRINTER_INFO_2;

pShareName: An optional pointer to a string that specifies the share name for the printer. This string MUST be ignored unless the Attributes member contains the PRINTER_ATTRIBUTE_SHARED flag. For rules governing path names, see section 2.2.4.9.

pDriverName: This member is a pointer to a string that specifies the name of the printer driver. For rules governing printer driver names, see section 2.2.4.3.

pLocation: An optional pointer to a string that specifies the location of the printer.

pSepFile: An optional pointer to a string that specifies the name of a file whose contents are used to create a separator page. This page is used to separate print jobs sent to the printer. For rules governing path names, see section 2.2.4.9.

pPrintProcessor: An optional pointer to a string that specifies the name of the print processor used by the printer. For rules governing print processor names, see section 2.2.4.11.

If this member is NULL on input, the server SHOULD use the print processor that is associated with the printer driver identified by the string pointed to by the pDriverName member.

pDatatype: An optional pointer to a string that specifies the default data format used to record print jobs on the printer. For rules governing data type names, see section 2.2.4.2.

If this member is NULL on input, the server MUST choose a default data type from one of the data types supported by the print processor associated with the printer.<58>

pParameters: An optional pointer to a string that specifies the default print processor parameters.

Priority: The value of this member specifies a priority value that the spooler uses to route each print job. The value of this member MUST be from 0 through 99, inclusive.

DefaultPriority: The value of this member specifies the default priority value assigned to each print job. The value of this member MUST be from 0 through 99, inclusive.

StartTime: The value of this member specifies the earliest time that a job can be printed. The time is expressed as the number of minutes after 12:00 AM GMT within a 24-hour boundary.

UntilTime: The value of this member specifies the latest time that a job can be printed. The time is expressed as the number of minutes after 12:00 AM GMT within a 24-hour boundary.

cJobs: The value of this member specifies the number of print jobs that have been queued for the printer.

AveragePPM: The value of this member specifies the average pages per minute that have been printed on the printer.

All members not defined in this section are specified in sections 2.2.1.3.6 and 2.2.1.3.