RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomVariantType.CastToOle Method

Converts data in the format of this custom System::Variant type to a format that can be used by COM Variants.

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

Override CastToOle to change the way this custom type is converted for use in COM interface calls. CastToOle converts this custom System::Variant type to the closest Automation-compatible System::Variant type. 

Dest is a TVarData record that returns the System::Variant's data stored in an Automation-compatible format. 

Source is a TVarData record that represents the data from a System::Variant of this custom type. 

As implemented in TCustomVariantType, CastToOle calls the OlePromotion method to determine the Automation-compatible type to which Source should be converted. It then calls the CastTo method to perform the actual conversion. 

 

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