Skip to content

Latest commit

 

History

History
182 lines (123 loc) · 6.25 KB

nf-prcomoem-iprintcoreui2-getfeatureattribute.md

File metadata and controls

182 lines (123 loc) · 6.25 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:prcomoem.IPrintCoreUI2.GetFeatureAttribute
IPrintCoreUI2::GetFeatureAttribute (prcomoem.h)
The IPrintCoreUI2::GetFeatureAttribute method retrieves the feature attribute list or the value of a specific feature attribute.
print\iprintcoreui2_getfeatureattribute.htm
print
04/20/2018
IPrintCoreUI2::GetFeatureAttribute
GetFeatureAttribute, GetFeatureAttribute method [Print Devices], GetFeatureAttribute method [Print Devices],IPrintCoreUI2 interface, IPrintCoreUI2 interface [Print Devices],GetFeatureAttribute method, IPrintCoreUI2.GetFeatureAttribute, IPrintCoreUI2::GetFeatureAttribute, prcomoem/IPrintCoreUI2::GetFeatureAttribute, print.iprintcoreui2_getfeatureattribute, print_unidrv-pscript_ui_47513174-ac2c-4c61-9847-35244e31c486.xml
prcomoem.h
Prcomoem.h
Desktop
Windows
IPrintCoreUI2::GetFeatureAttribute
prcomoem/IPrintCoreUI2::GetFeatureAttribute
APIRef
kbSyntax
COM
prcomoem.h
IPrintCoreUI2::GetFeatureAttribute

IPrintCoreUI2::GetFeatureAttribute

-description

The IPrintCoreUI2::GetFeatureAttribute method retrieves the feature attribute list or the value of a specific feature attribute.

-parameters

-param poemuiobj [in]

Pointer to the current context, an OEMUIOBJ structure.

-param dwFlags [in]

Is reserved and must be set to zero.

-param pszFeatureKeyword [in]

Pointer to a caller-supplied buffer containing an ASCII string specifying the single feature keyword to query for. This value can be obtained from a prior call to IPrintCoreUI2::EnumFeatures.

-param pszAttribute [in]

Pointer to a caller-supplied buffer containing an ASCII string specifying the single attribute requested. If this parameter is NULL, the caller is requesting a list of all supported feature attribute names, as opposed to specifying a specific feature attribute name.

-param pdwDataType [out]

Pointer to a memory location that receives a value specifying the data type of the requested attribute. This value is an enumerator of the EATTRIBUTE_DATATYPE enumeration, which is defined in printoem.h.

-param pbData [out]

Pointer to a caller-supplied buffer that receives the requested data. To simply query for the number of bytes needed to fulfill a request, set this parameter to NULL.

-param cbSize [in]

Specifies the size, in bytes of the buffer pointed to by pbData.

-param pcbNeeded [out]

Pointer to a memory location that receives the actual size, in bytes, of the requested data.

-returns

This method must return one of the following values.

Return code Description
S_OK
The method succeeded.
E_OUTOFMEMORY
The value in cbSize was smaller than the number of bytes to be written to the output buffer (the buffer pointed to by pbData).

The method was called with pbData set to NULL.

E_INVALIDARG
The method attempted to query for a nonexistent attribute.

The feature keyword was not recognized.

The poemuiobj parameter pointed to an invalid context object.

E_FAIL
The method failed

-remarks

This method is supported only for Windows XP Pscript5 plug-ins, not for Unidrv plug-ins.

If this method is called with its pszAttribute and pbData parameters set to NULL, the method returns with *pcbNeeded set to the number of bytes needed for the list of all supported attribute names for the feature. If the method is called a second time, with pszAttribute set to NULL and pbData pointing to a buffer of the size specified in *pcbNeeded in the previous call, the method returns with *pdwDataType set to kADT_ASCII (an enumerator of the EATTRIBUTE_DATATYPE enumerated type) and pbData pointing to a null-delimited list of all supported attribute names for the feature. This list is terminated with two null characters.

To reduce the need to make two calls per data access, pass the method an output buffer of a fixed size (1 KB, for example), and then check the function return value. If the method returns S_OK, the buffer already contains the data of interest. If the method returns E_OUTOFMEMORY, the value in *pcbNeeded is the buffer size needed to hold the data of interest. The caller should then allocate a buffer of that larger size and proceed with a second call to the method.

For more information, see Using GetFeatureAttribute.

-see-also

IPrintCoreUI2

IPrintCoreUI2::EnumFeatures

IPrintCoreUI2::GetGlobalAttribute

IPrintCoreUI2::GetOptionAttribute

OEMUIOBJ