RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
VarUtils.VariantChangeTypeEx Variable

VariantChangeTypeEx stores the function that converts a variant from one type to another, using locale-specific information.

Pascal
VariantChangeTypeEx: function(var Dest: TVarData; const Source: TVarData; LCID: Integer; wFlags: Word; VarType: Word): HRESULT;
C++
function(var Dest: TVarData; const Source: TVarData; LCID: Integer; wFlags: Word; VarType: Word): HRESULT VariantChangeTypeEx;

Use VariantChangeTypeEx to specify the function that converts the variant given in Source to the variant stored in Dest of type VarType, using the locale-specific information given through LCID and the parameter wFlags specifying the conversion flags.  

The function stored in VariantChangeTypeEx returns the result of the conversion operation, which can be one of the following.

Value 
Meaning 
The conversion was successful. 
The variant type of the input parameter is not valid. 
The data stored in the output parameter does not fit in the destination type. 
The argument cannot be cast to the specified type. 
Either one of the arguments is invalid. 
There is not enough memory to complete the conversion. 

Note: To make the conversion without using locale-specific information, use the VariantChangeType function.
 

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