Share this page

# lrc_Get<Type-Name>ArrayFromVariant

Array Types and Functions

Extracts an array of Type-Name from a variant.

    <Type-Name>lrc_Get<Type-Name>ArrayFromVariant( const VARIANT* var );

Var | A pointer to a variant.

The lrc_Get<Type-Name>ArrayFromVariant family of functions extracts an array of the type given in Type-Name from a variant.

The calls include:

    VARIANT lrc_GetBoolArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetBstrArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetByteArrayFromVariant( const VARIANT* var );

    VARIANTlrc_GetCharArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetCoObjectArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetCoInstanceArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetCurrencyArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetDateArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetDispObjectArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetDoubleArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetErrorArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetFloatArrayFromVariant( const VARIANT* var );

    VARIANTlrc_GetIntArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetLongArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetShortArrayFromVariant( const VARIANT* var );

    VARIANTlrc_GetUintArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetUlongArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetUshortArrayFromVariant( const VARIANT* var );

    VARIANT lrc_GetVariantArrayFromVariant( const VARIANT* var );

## Return Values

lrc Return Values

## Parameterization

Parameterization is not applicable to this function.

## Example

This example gets a float array from a variant:

    {
        FloatArray array1;
        FloatArray array0;
        VARIANT var;
        array1 = 0;
        array0 = Create1DFloatArray(0, 5);
        PutElementIn1DFloatArray(array0, 0, lrc_float("1.1"));
        PutElementIn1DFloatArray(array0, 1, lrc_float("20.02"));
        PutElementIn1DFloatArray(array0, 2, lrc_float("300.003"));
        PutElementIn1DFloatArray(array0, 3, lrc_float("4000"));
        PutElementIn1DFloatArray(array0, 4, lrc_float("50000"));
        var = lrc_variant_FloatArray_by_ref(array0);
        array1 = lrc_GetFloatArrayFromVariant(&var);
        return 0;
    }

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: