Rediger

Del via


PRINTER_DEFAULTS structure

The PRINTER_DEFAULTS structure specifies the default data type, environment, initialization data, and access rights for a printer.

Syntax

typedef struct _PRINTER_DEFAULTS {
  LPTSTR      pDatatype;
  LPDEVMODE   pDevMode;
  ACCESS_MASK DesiredAccess;
} PRINTER_DEFAULTS, *PPRINTER_DEFAULTS;

Members

pDatatype

Pointer to a null-terminated string that specifies the default data type for a printer.

pDevMode

Pointer to a DEVMODE structure that identifies the default environment and initialization data for a printer.

DesiredAccess

Specifies desired access rights for a printer. The OpenPrinter function uses this member to set access rights to the printer. These rights can affect the operation of the SetPrinter and DeletePrinter functions. The access rights can be one of the following.

Value Meaning
PRINTER_ACCESS_ADMINISTER To perform administrative tasks, such as those provided by SetPrinter.
PRINTER_ACCESS_USE To perform basic printing operations.
PRINTER_ACCESS_MANAGE_LIMITED To perform administrative tasks, such as those provided by SetPrinter and SetPrinterData. This value is available starting from Windows 8.1.
PRINTER_ALL_ACCESS To perform all administrative tasks and basic printing operations except for SYNCHRONIZE (see Standard Access Rights ).
generic security values, such as WRITE_DAC To allow specific control access rights. See Standard Access Rights.

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_DEFAULTSW (Unicode) and _PRINTER_DEFAULTSA (ANSI)

See also

Printing

Print Spooler API Structures

DeletePrinter

DEVMODE

OpenPrinter

SetPrinter