RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
VarUtils.VariantCopyInd Function

Clears the destination variant and makes a copy of the source variant, including the case when the source is of varByRef type.

Pascal
function VariantCopyInd(var Dest: TVarData; const Source: TVarData): HRESULT; stdcall;
C++
__stdcall HRESULT VariantCopyInd(TVarData Dest, const TVarData Source);

Use VariantCopyInd to copy the source variant given through Source to the destination variant denoted by Dest, after clearing up Dest using a call to VariantClear.  

In the case when the source is of varByRef type, VariantCopyInd performs the indirection and copies the correct information.  

The possible return values of VariantCopyInd are given in the following table, together with their meaning.

Value 
Meaning 
The operation was completed successfully. 
The variant type of the input parameter is not valid. 
Either one of the arguments is invalid. 
There is not enough memory to complete the operation. 
An unexpected error occurred. 
The application raised an exception. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!