IPrintSchemaCapabilities::GetFeatureByKeyName method

Gets a feature from the PrintCapabilities based on a given key name.

Syntax


HRESULT GetFeatureByKeyName(
  [in]          BSTR                bstrKeyName,
  [out, retval] IPrintSchemaFeature **ppFeature
);

Parameters

bstrKeyName [in]

The key name of the feature.

ppFeature [out, retval]

The returned feature.

Return value

This method returns an HRESULT value.

Remarks

Only the following feature key names are recognized. The key names are equivalent to public Print Schema feature names as shown in the following table. The table also shows the features that have specialized option types (by default the option type is IPrintSchemaOption).

NamePrint schema feature public nameSpecialized option type
DocumentBindingDocumentBinding or JobBindAllDocuments
DocumentCollateDocumentCollate
DocumentDuplexJobDuplexAllDocumentsContiguously
DocumentHolePunchDocumentHolePunch or JobHolePunch
DocumentInputBinJobInputBin, DocumentInputBin or PageInputBin
DocumentNUpJobNUpAllDocumentsContiguously IPrintSchemaNUpOption
DocumentStapleJobStapleAllDocuments or DocumentStaple
PageMediaSizePageMediaSize IPrintSchemaPageMediaSizeOption
PageMediaTypePageMediaType
PageOrientationPageOrientation
PageOutputColorPageOutputColor
PageOutputQualityPageOutputQuality

 

When the requested feature, option or property is not found, this method returns S_FALSE and sets a NULL pointer on the output object of the feature, option or property.

So if the IPrintSchemaTicket object does not contain the specified feature, option or property, the app must obtain an IPrintSchemaCapabilities object and query it via IPrintSchemaCapabilities::GetFeatureByKeyName or via IPrintSchemaCapabilities::GetFeature.

Requirements

Target platform

Desktop

Version

Windows 8

Header

Printerextension.h

See also

IPrintSchemaCapabilities
IPrintSchemaNUpOption
IPrintSchemaOption
IPrintSchemaPageMediaSizeOption

 

 

Send comments about this topic to Microsoft

Show: