IPrintSchemaParameterInitializer::put_Value method

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(
  VARIANT *pVar
);

Parameters

pVar

Return Value

None

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 DataType Variant type Variant value
PrintSchemaParameterDataType_Integer V_VT(pVar) is VT_I4 V_I4(pVar)
PrintSchemaParameterDataType_NumericString V_VT(pVar) is VT_BSTR V_BSTR(pVar)
PrintSchemaParameterDataType_String V_VT(pVar) is VT_BSTR V_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
Target Platform Windows
Header printerextension.h

See Also

IPrintSchemaParameterInitializer