Bewerken

Delen via


IPrinterScriptablePropertyBag::SetString method (printerextension.h)

Writes a string property.

Syntax

HRESULT SetString(
  [in] BSTR bstrName,
  [in] BSTR bstrValue
);

Parameters

[in] bstrName

The property to set.

[in] bstrValue

The property value to set.

Return value

This method returns an HRESULT value.

Remarks

A call to SetString will throw an exception, if the specified property is not found. We recommend that you use a try-catch statement around calls to this method, to allow your app to handle any failures gracefully.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Desktop
Header printerextension.h

See also

IPrinterScriptablePropertyBag