RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomVariantType.VarDataCopy Method

Copies the data from one built-in System::Variant type to another.

Pascal
procedure VarDataCopy(var Dest: TVarData; const Source: TVarData);
C++
__fastcall VarDataCopy(TVarData Dest, const TVarData Source);

Call VarDataCopy from the implementation of a TCustomVariantType descendant to clear the data from a destination System::Variant and then copy the TVarData record from another System::Variant. VarDataCopy can handle data that is stored indirectly (when the VType field includes varByRef). Do not use VarDataCopy as the entire implementation of the Copy method, as this will lead to a circular reference. 

Dest is the TVarData record that receives the copy. 

Source is the TVarData record to be copied. 

 

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