IPrintSchemaTicket::GetFeature method

Gets a named feature from the PrintTicket, by name and full namespace URI.

Syntax

HRESULT GetFeature(
  BSTR                bstrName,
  BSTR                bstrNamespaceUri,
  IPrintSchemaFeature **ppFeature
);

Parameters

bstrName

The base name of the name attribute value of the feature element. For example, for the Print Schema feature <psf:Feature name="psk:JobOutputBin">, the base name of the feature is "JobOutputBin".

bstrNamespaceUri

The namespace URI of the name attribute value of the feature element. For example, the namespace URI of the public Print Schema feature "JobOutputBin" is "http://schemas.microsoft.com/windows/2003/08/printing/printschemakeywords". If the feature is not defined in the public Print Schema, then this should be the URI of the private namespace defining the feature.

ppFeature

The returned feature.

Return Value

This method returns an HRESULT value.

Remarks

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

   
Minimum supported client Windows 8
Target Platform Desktop
Header printerextension.h

See Also

IPrintSchemaCapabilities

IPrintSchemaCapabilities::GetFeature

IPrintSchemaCapabilities::GetFeatureByKeyName

IPrintSchemaFeature

IPrintSchemaTicket