共用方式為


2.2.3.8 Printer Notification Values

The Printer Notification Values specify types of changes in printer data and/or state for which print clients can be notified.

The following constants can be used in the fdwOptions parameters of the RpcRemoteFindFirstPrinterChangeNotification (section 3.1.4.10.3) and RpcRemoteFindFirstPrinterChangeNotificationEx (section 3.1.4.10.4) methods. They specify the categories of printers for which change notifications are returned.

Name/value

Description

0x00000000

Return notifications for 2D printers only.

PRINTER_NOTIFY_CATEGORY_ALL

0x00010000

Return notifications for both 2D and 3D printers.<160><161>

PRINTER_NOTIFY_CATEGORY_3D

0x00020000

Return notifications for 3D printers only.<162>

The following constants can be used in the Data member of an RPC_V2_NOTIFY_INFO_DATA (section 2.2.1.13.4) structure.<163> Reserved members are specified by Notification Data Type Values (section 2.2.3.5), and String values are specified in PRINTER_INFO (section 2.2.1.10) structures. The print server passes these notification values to a print client using RpcRouterReplyPrinterEx (section 3.2.4.1.4).

Name/value

Description

PRINTER_NOTIFY_FIELD_ATTRIBUTES

0x000D

Specifies that printer attributes have changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new Attributes value.

PRINTER_NOTIFY_FIELD_AVERAGE_PPM

0x0015

Specifies that the average pages per minute for the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new AveragePPM value.

PRINTER_NOTIFY_FIELD_BRANCH_OFFICE_PRINTING

0x001C

Specifies that the EnableBranchOfficePrinting printer data value (section 2.2.3.11) for the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new value for the EnableBranchOfficePrinting printer data value.<164>

PRINTER_NOTIFY_FIELD_BYTES_PRINTED

0x0019

Specifies that the number of bytes that have been printed has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new cTotalBytes value.

PRINTER_NOTIFY_FIELD_CJOBS

0x0014

Specifies that the number of print jobs that are queued for the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new cJobs value.

PRINTER_NOTIFY_FIELD_COMMENT

0x0005

Specifies that the printer comment has changed.

Reserved contains TABLE_STRING, and Data.String contains the new comment (pComment in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_DATATYPE

0x000B

Specifies that the printer default data type has changed.

Reserved contains TABLE_STRING, and Data.String contains the new comment (pDatatype in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY

0x000F

Specifies that the default priority for the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new DefaultPriority.

PRINTER_NOTIFY_FIELD_DEVMODE

0x0007

Specifies that the default _DEVMODE (section 2.2.2.1) structure for the printer has changed.

Reserved contains TABLE_DEVMODE, and Data.DevMode contains the new DEVMODE structure (pDevMode in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_DRIVER_NAME

0x0004

Specifies that the printer driver for the printer has changed.

Reserved contains TABLE_STRING, and Data.String contains the new printer driver name (pDriverName in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_LOCATION

0x0006

Specifies that the printer location has changed.

Reserved contains TABLE_STRING, and Data.String contains the new location description value (pLocation in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_OBJECT_GUID

0x001A

Specifies that the printer object GUID has changed.<165>

Reserved contains TABLE_STRING, and Data.String contains the new printer GUID value (pszObjectGUID in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_PAGES_PRINTED

0x0017

Specifies that the number of pages that have been printed for the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new PagesPrinted value.

PRINTER_NOTIFY_FIELD_PARAMETERS

0x000A

Specifies that the default print processor parameters for the printer have changed.

Reserved contains TABLE_STRING, and Data.String contains the new print processor parameters value (pParameters in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_PORT_NAME

0x0003

Specifies that the default port name for the printer has changed.

Reserved contains TABLE_STRING, and Data.String contains the new port name value (pPortName in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_PRINTER_NAME

0x0001

Specifies that the printer name has changed.

Reserved contains TABLE_STRING, and Data.String contains the new printer name value (pPrinterName in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR

0x0009

Specifies that the print processor associated with the printer has changed.

Reserved contains TABLE_STRING, and Data.String contains the new print processor name value (pPrintProcessor in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_PRIORITY

0x000E

Specifies that the current priority for the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new Priority value.

PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR

0x000C

Specifies that the security descriptor for the printer has changed.

Reserved contains TABLE_SECURITYDESCRIPTOR, and Data.SecurityDescriptor contains the new security descriptor value (pSecurityDescriptor in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_SEPFILE

0x0008

Specifies that the separator page for the printer has changed.

Reserved contains TABLE_STRING, and Data.String contains the new separator page value (pSepFile in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_SERVER_NAME

0x0000

Specifies that the server name for the printer has changed.

Reserved contains TABLE_STRING, and Data.String contains the new server name value (pServerName in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_SHARE_NAME

0x0002

Specifies that the printer share name has changed.

Reserved contains TABLE_STRING, and Data.String contains the new share name value (pShareName in PRINTER_INFO structures).

PRINTER_NOTIFY_FIELD_START_TIME

0x0010

Specifies that the earliest start time for the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new StartTime value.

PRINTER_NOTIFY_FIELD_STATUS

0x0012

Specifies that the status for the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new Status value.

PRINTER_NOTIFY_FIELD_TOTAL_BYTES

0x0018

Specifies that the total number of bytes that have been printed on the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new cTotalBytes value.

PRINTER_NOTIFY_FIELD_TOTAL_PAGES

0x0016

Specifies that the total number of pages that have been printed on the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new cTotalPagesPrinted value.

PRINTER_NOTIFY_FIELD_UNTIL_TIME

0x0011

Specifies that the latest print time for the printer has changed.

Reserved contains TABLE_DWORD, and Data.dwData[0] contains the new UntilTime value.