Using GetGlobalAttribute

Important

The modern print platform is Windows' preferred means of communicating with printers. We recommend that you use Microsoft's IPP inbox class driver, along with Print Support Apps (PSA), to customize the print experience in Windows 10 and 11 for printer device development.

For more information, see Modern print platform and the Print support app design guide.

All of the global attribute names are the same as the keyword names defined in PostScript Printer Description File Format Specification, v4.3. Refer to this specification for their semantics. (This resource may not be available in some languages and countries.)

In the following table, the pdwDataType parameter takes values of the EATTRIBUTE_DATATYPE enumerated type.

Global attribute Output parameters
CenterRegistered pdwDataType: kADT_BOOL

pbData: TRUE or FALSE

pcbNeeded: sizeof(BOOL)
ColorDevice pdwDataType: kADT_BOOL

pbData: TRUE or FALSE

pcbNeeded: sizeof(BOOL)
Extensions pdwDataType: kADT_ASCII

pbData: ASCII string (in MULTI_SZ format) containing registered values of extensionOption the printer supports.

pcbNeeded: byte count of the ASCII string pointed to by pbData (including the last null character).

"FileSystem: True" is treated as if Extensions had the "FileSystem" option. "FileSystem: False" is treated as if Extensions didn't have the "FileSystem" option.
FileVersion pdwDataType: kADT_DWORD

pbData: a DWORD whose high-order word contains the major version number, and whose low-order word contains the minor version number.

pcbNeeded: sizeof(DWORD)
FreeVM pdwDataType: kADT_DWORD

pbData: value of FreeVM

pcbNeeded: sizeof(DWORD)
LandscapeOrientation pdwDataType: kADT_ASCII

pbData: NULL-terminated ASCII string of either "Plus90" or "Minus90".

pcbNeeded: byte count of the ASCII string pointed to by pbData (including the last null character).

"Minus90" is returned only when the PPD contains "LandscapeOrientation: Minus90". In all other cases, "Plus90" is returned.
LanguageEncoding pdwDataType: kADT_ASCII

pbData: NULL-terminated ASCII string containing one of the following encodingOption values:

"ISOLatin1"

"Unicode"

"JIS83-RKSJ"

"None"

pcbNeeded: byte count of the ASCII string pointed to by pbData (including the last null character).

"WindowsANSI" is treated the same as "ISOLatin1". Other encodingOption values aren't supported.

If LanguageEncoding is absent, LanguageVersion is used to deduce the return value.
LanguageLevel pdwDataType: kADT_DWORD

pbData: PostScript language level supported by the printer

pcbNeeded: sizeof(DWORD)
NickName pdwDataType: kADT_UNICODE

pbData: NULL-terminated Unicode string of the PPD's ShortNickName value if ShortNickName is present, or NickName value if ShortNickName is absent.

pcbNeeded: byte count of the Unicode string pointed to by pbData (including the last null character)
PPD-Adobe pdwDataType: kADT_DWORD

pbData: a DWORD whose high-order word contains the major version number, and whose low-order word contains the minor version number.

pcbNeeded: sizeof(DWORD)
PrintPSErrors pdwDataType: kADT_BOOL

pbData: TRUE or FALSE

pcbNeeded: sizeof(BOOL)

If PrintPSErrors is absent, it's assumed to be TRUE.
Product pdwDataType: kADT_BINARY

pbData: the Product value

pcbNeeded: byte count of output binary data

Only the first Product entry is returned.
Protocols pdwDataType: kADT_ASCII

pbData: ASCII string (in MULTI_SZ format) containing registered values of protocolOption the printer supports.

pcbNeeded: byte count of the ASCII string pointed to by pbData (including the last null character)
PSVersion pdwDataType: kADT_BINARY

pbData: the PSVersion value

pcbNeeded: byte count of output binary data

Only the first PSVersion entry is returned.
SuggestedJobTimeout pdwDataType: kADT_DWORD

pbData: the SuggestedJobTimeout value. If it's absent from the PPD, returns 0 by default.

pcbNeeded: sizeof(DWORD)
SuggestedWaitTimeout pdwDataType: kADT_DWORD

pbData: the SuggestedWaitTimeout value. If it isn't present in the PPD, returns 300 by default.

pcbNeeded: sizeof(DWORD)
Throughput pdwDataType: kADT_DWORD

pbData: the Throughput value. If it isn't present in the PPD, returns 0 by default.

pcbNeeded: sizeof(DWORD)
TTRasterizer pdwDataType: kADT_ASCII

pbData: a NULL-terminated ASCII string containing one of following rasterizerOption values:

"None"

"Accept68K"

"Type42"

"TrueImage"

pcbNeeded: byte count of the ASCII string pointed to by pbData (including the last null character).

If the*TTRasterizer entry is absent, "None" is returned.