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 a short by ref variant as a variant:

VARIANT var = lrc_variant_short_by_ref( "15" );

lrc_save_variant_short_by_ref( "param-name", var );

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