IPrintSchemaParameterInitializer::Value property

The Value (put_Value) property modifies the value of the IPrintSchemaParameterInitializer object.

In PrintTicket XML, that’s the value of the <psf:Value> child element for the <psf:ParameterInit> element.

This property is write-only.

Syntax


HRESULT put_Value(
  [in] VARIANT pVar
);

Property value

The value of the IPrintSchemaParameterInitializer object.

Error codes

Returns an HRESULT value, if the property call was successful. Otherwise it returns the appropriate error code.

Remarks

The Value (put_Value) property passes the new value as a Variant. Here's what the receiving function expects in the Variant type, and where the function will look for the new value, depending on the different parameter data types:

Parameter DataTypeVariant typeVariant value
PrintSchemaParameterDataType_IntegerV_VT(pVar) is VT_I4V_I4(pVar)
PrintSchemaParameterDataType_NumericStringV_VT(pVar) is VT_BSTRV_BSTR(pVar)
PrintSchemaParameterDataType_StringV_VT(pVar) is VT_BSTRV_BSTR(pVar)

 

If the input Variant type doesn’t match the parameter data type as shown in the preceding table, then the put_Value property call will return E_INVALIDARG.

In the case of the PrintSchemaParameterDataType_NumericString parameter data type, the function will also validate that the V_BSTR(pVar) string only contains numeric characters. If the function finds any non-numeric characters, then the put_Value property call will return E_INVALIDARG.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Header

Printerextension.h

See also

IPrintSchemaParameterInitializer

 

 

Send comments about this topic to Microsoft

Show: