Share this page

# lrc_save_variant_<Type-Name>_by_ref

Parameterization ("save") Functions

Saves a variable of the specified type stored as a reference in a variant, to a string parameter.

    int lrc_save_variant_<Type-Name>_by_ref( const char* param_name, VARIANT val );

param_name | The name of the string parameter in which to store the value.
val | A reference to the value to be saved.

The lrc_save_variant_<Type-Name>_by_ref family of functions are generated by VuGen to save a variant variable of the specified <type_name> stored by reference in a variant, as a string parameter.

VuGen generates these functions as commented-out calls. To use the parameter, change the recorded param_name argument to a meaningful name and uncomment the call.

To save a value from a variant, (not stored by reference) to a string, use the lrc_save_VARIANT or lrc_save_variant_<Type-Name> function.

The calls in this group are:

    int lrc_save_variant_short_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_ushort_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_char_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_int_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_uint_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_ulong_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_BYTE_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_long_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_float_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_double_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_bool_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_scode_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_currency_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_date_by_ref( const char* param_name, VARIANT val );

    int lrc_save_variant_BSTR_by_ref( const char* param_name, VARIANT val );

## Return Values

lrc Return Values

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

This example saves the Boolean value "true" to a string:

    VARIANT_BOOL var = lrc_bool("true");

    lrc_save_bool("param-name",var);

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: