IPrintCoreHelperPS::GetOptionAttribute method (prcomoem.h)
The IPrintCoreHelperPS::GetOptionAttribute method retrieves the option attribute list or the value of a specific option attribute.
Syntax
HRESULT GetOptionAttribute(
[in] PCSTR pszFeatureKeyword,
[in] PCSTR pszOptionKeyword,
[in] PCSTR pszAttribute,
[out] PDWORD pdwDataType,
[out] PBYTE *ppbData,
[out] PDWORD pcbSize
);
Parameters
[in] pszFeatureKeyword
A pointer to a caller-supplied buffer that contains an ANSI string that specifies the feature keyword to query for.
[in] pszOptionKeyword
A pointer to a caller-supplied buffer that contains an ANSI string that specifies the option keyword to query for. This value can be obtained from a prior call to IPrintCoreHelperPS::EnumOptions.
[in] pszAttribute
A pointer to a caller-supplied buffer that contains an ANSI string that specifies the attribute requested. If this parameter is NULL, the caller is requesting a list of all supported attribute names for the option instead of specifying a specific attribute name for the option.
[out] pdwDataType
A pointer to a variable that receives a value that specifies the data type of the requested attribute. This value is an enumerator of the EATTRIBUTE_DATATYPE enumeration type, which is defined in printoem.h.
[out] ppbData
A pointer to a callee-allocated buffer containing the requested data. Upon completion of this method, the caller does not need to release this buffer.
[out] pcbSize
A pointer to a variable that receives the size, in bytes, of the buffer that is pointed to by the pbData parameter.
Return value
IPrintCoreHelperPS::GetOptionAttribute should return one of the following values.
Return code | Description |
---|---|
S_OK | The method succeeded. |
E_FAIL | The method failed. |
E_INVALIDARG | The method attempted to query for a nonexistent attribute. This value might also mean that the feature keyword name or option keyword name were not recognized. |
E_OUTOFMEMORY | The value in pcbSize was smaller than the number of bytes to be written to the output buffer that is pointed to by pbData. |
Remarks
If IPrintCoreHelperPS::GetOptionAttributeis called with its pszAttribute and pbData parameters set to NULL, the method returns with pcbSize set to the number of bytes that are needed for the list of all of the supported attribute names for the option. If this method is called a second time, with pszAttribute set to NULL and pbData pointing to a buffer of the size that was specified in pcbSize in the previous call, the method returns with pdwDataType set to kADT_ASCII (an enumerator of the EATTRIBUTE_DATATYPE enumeration type) and pbData pointing to a NULL-delimited list of all of the supported attribute names for the option. This list is terminated with two null characters.
For more information about IPrintCoreHelperPS::GetOptionAttribute, see Using GetOptionAttribute.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | prcomoem.h (include Prcomoem.h) |