Using GetFeatureAttribute

Important

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 the Print support app design guide.

This function is supported only for PostScript Printer Driver (PPD) features. If a certain attribute isn't available, GetFeatureAttribute returns E_INVALIDARG.

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

Feature attribute Output parameters
DisplayName pdwDataType: kADT_UNICODE

pbData: null-terminated Unicode string of the feature keyword name's translation string

pcbNeeded: byte count of the Unicode string pointed to by pbData (including the null terminator)

This feature attribute is available to any PPD feature EnumFeatures can return.
DefaultOption pdwDataType: kADT_ASCII

pbData: null-terminated ASCII string of the default option keyword name

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

This feature attribute is available to any PPD feature EnumFeatures can return.
OpenUIType pdwDataType: kADT_ASCII

pbData: null-terminated ASCII string containing one of following types: "PickOne", "PickMany", "Boolean"

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

This feature attribute is available to any PPD feature EnumFeatures can return.
OpenGroupType pdwDataType: kADT_ASCII

pbData: For features defined within the PPD's "OpenGroup: InstallableOptions ... CloseGroup: InstallableOptions" pair, a null-terminated ASCII string of "InstallableOptions" is returned. For other features, an empty ASCII string (which has only the null terminator) is returned.

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

This feature attribute is available to any PPD feature that EnumFeatures can return.
OrderDependencyValue pdwDataType: kADT_LONG

pbData: the relative order specified by the PPD's OrderDependency or NonUIOrderDependency keyword for this feature. Notice that the first parameter of these keywords is a real number that is converted to a LONG and returned.

pcbNeeded: sizeof(LONG)

This attribute is available only for a PPD feature that has an OrderDependency or NonUIOrderDependency entry in the PPD, and the entry omits optionKeyword.
OrderDependencySection pdwDataType: kADT_ASCII

pbData: null-terminated ASCII string containing one of following section names: "ExitServer", "Prolog", "DocumentSetup", "PageSetup", "JCLSetup", or "AnySetup"

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

This attribute is available only for a PPD feature that has an OrderDependency or NonUIOrderDependency entry in the PPD, and the entry omits optionKeyword.