VarArrayRef Function
VarArrayRef
creates a new
Variant
array with the varByRef
bit set in the Variant
’s
VarType
. The new Variant
refers
directly to the array data in V
. Any changes to
the dimensions or contents of V
are also reflected
in the new array.
VarArrayRef
is a real function.
Once you have created the reference, you must take care not to let
the reference outlive the original array. If both
Variant
s are in the same scope, you are fine, but
do not return the reference array from a function where the original
array is local to the function.