大网数据广告活动
打印与设备

PRINTER_DEFAULTS structure (Winspool.h)

· 52CE 我爱测

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

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

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。