Düzenle

Aracılığıyla paylaş


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.

Value Meaning
PRINTER_ATTRIBUTE_DIRECT Job is sent directly to the printer (it is not spooled).
PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST If 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_DEVQ If 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_HIDDEN Reserved.
PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS If set, jobs are kept after they are printed. If unset, jobs are deleted.
PRINTER_ATTRIBUTE_LOCAL Printer is a local printer.
PRINTER_ATTRIBUTE_NETWORK Printer is a network printer connection.
PRINTER_ATTRIBUTE_PUBLISHED Indicates whether the printer is published in the directory service.
PRINTER_ATTRIBUTE_QUEUED If 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_ONLY Indicates that only raw data type print jobs can be spooled.
PRINTER_ATTRIBUTE_SHARED Printer is shared.

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

Value Meaning
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.

Value Meaning
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

Requirement Value
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