RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Variants.FindCustomVariantType Function

Retrieves the object that implements a custom Variant type.

Pascal
function FindCustomVariantType(const AVarType: TVarType; out CustomVariantType: TCustomVariantType): Boolean; overload;
function FindCustomVariantType(const TypeName: string; out CustomVariantType: TCustomVariantType): Boolean; overload;
C++
Boolean FindCustomVariantType(const TVarType AVarType, TCustomVariantType CustomVariantType);
Boolean FindCustomVariantType(const AnsiString TypeName, TCustomVariantType CustomVariantType);

Variants

Use FindCustomVariantType to obtain a reference to the object that implements a custom Variant type. 

TypeName is the name of the TCustomVariantType descendant class you want to retrieve. 

AVarType is the type code of Variant whose implementation class you want to retrieve. If you have an instance of a Variant whose value is a custom Variant Type, you can obtain a value for this parameter using the VarType function. 

CustomVariantType returns an instance of the TCustomVariantType descendant that implements the indicated custom Variant type. 

 

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