RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
VarUtils.VariantCopy Function

Clears the destination variant and makes a copy of the source variant.

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

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

The possible return values of VariantCopy 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. 
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!