RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Variants.VarCopyNoInd Function

Copies a Variant.

Pascal
procedure VarCopyNoInd(var Dest: Variant; const Source: Variant);
C++
VarCopyNoInd(Variant Dest, const Variant Source);

Variants

VarCopyNoInd copies the variant given by Source into the variant given by Dest. Calling VarCopyNoInd in C++ or Delphi code is equivalent to a simple variant assignment in Delphi code. 

Dest can be a Variant or an OleVariant, and it must be possible to assign a value to it.  

Source is defined as a Variant, but an OleVariant is also allowed because it is a compatible type. However, Source can't have a VarType that includes the varByRef bit. 

The following table lists the expected behavior when using Variant and OleVariant types as parameters:

Dest  
Source 
Behavior 
Variant  
OleVariant  
Works as expected.  
Variant  
Variant  
Works as expected.  
OleVariant  
OleVariant  
Works as expected.  
OleVariant  
Variant  
Source should be implicitly cast to an OleVariant.  

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!