PRINTER_INFO_5 structure

The PRINTER_INFO_5 structure specifies detailed printer information.

Syntax


typedef struct _PRINTER_INFO_5 {
  LPTSTR pPrinterName;
  LPTSTR pPortName;
  DWORD  Attributes;
  DWORD  DeviceNotSelectedTimeout;
  DWORD  TransmissionRetryTimeout;
} PRINTER_INFO_5, *PPRINTER_INFO_5;

Members

pPrinterName

A pointer to a null-terminated string that specifies the name of the printer.

pPortName

A pointer to a null-terminated string that identifies the port(s) used to transmit data to the printer. If a printer is connected to more than one port, the names of each port must be separated by commas (for example, "LPT1:,LPT2:,LPT3:").

Attributes

The printer attributes. This member can be any reasonable combination of the following values.

ValueMeaning
PRINTER_ATTRIBUTE_DIRECTJob is sent directly to the printer (it is not spooled).
PRINTER_ATTRIBUTE_DO_COMPLETE_FIRSTIf set and printer is set for print-while-spooling, any jobs that have completed spooling are scheduled to print before jobs that have not completed spooling.
PRINTER_ATTRIBUTE_ENABLE_DEVQIf set, DevQueryPrint is called. DevQueryPrint may fail if the document and printer setups do not match. Setting this flag causes mismatched documents to be held in the queue.
PRINTER_ATTRIBUTE_HIDDENReserved.
PRINTER_ATTRIBUTE_KEEPPRINTEDJOBSIf set, jobs are kept after they are printed. If unset, jobs are deleted.
PRINTER_ATTRIBUTE_LOCALPrinter is a local printer.
PRINTER_ATTRIBUTE_NETWORKPrinter is a network printer connection.
PRINTER_ATTRIBUTE_PUBLISHED Indicates whether the printer is published in the directory service.
PRINTER_ATTRIBUTE_QUEUEDIf set, the printer spools and starts printing after the last page is spooled. If not set and PRINTER_ATTRIBUTE_DIRECT is not set, the printer spools and prints while spooling.
PRINTER_ATTRIBUTE_RAW_ONLYIndicates that only raw data type print jobs can be spooled.
PRINTER_ATTRIBUTE_SHAREDPrinter is shared.

 

In Windows XP and later versions of Windows, the following value can also be used.

ValueMeaning
PRINTER_ATTRIBUTE_FAX If set, printer is a fax printer. This can only be set by AddPrinter, but it can be retrieved by EnumPrinters and GetPrinter.

 

In Windows Vista and later versions of Windows, the following values can also be used.

ValueMeaning
PRINTER_ATTRIBUTE_FRIENDLY_NAME A computer has connected to this printer and given it a friendly name.
PRINTER_ATTRIBUTE_MACHINE Printer is a per-machine connection.
PRINTER_ATTRIBUTE_PUSHED_USER The printer was installed by using the Push Printer Connections user policy.
PRINTER_ATTRIBUTE_PUSHED_MACHINE The printer was installed by using the Push Printer Connections computer policy.

 

DeviceNotSelectedTimeout

This value is not used.

TransmissionRetryTimeout

This value is not used.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winspool.h (include Windows.h)

Unicode and ANSI names

_PRINTER_INFO_5W (Unicode) and _PRINTER_INFO_5A (ANSI)

See also

Printing
Print Spooler API Structures
EnumPrinters
GetPrinter
SetPrinter
PRINTER_INFO_1
PRINTER_INFO_2
PRINTER_INFO_3
PRINTER_INFO_4

 

 

Show: