From RAD Studio API Documentation
Jump to: navigation, search


function OlePromotion(const V: TVarData;  out RequiredVarType: TVarType): Boolean; virtual;


virtual bool __fastcall OlePromotion(const TVarData &V, /* out */ System::Word &RequiredVarType);


Type Visibility Source Unit Parent
function protected
System.Variants TCustomVariantType


Indicates the type to which a Variant value must be cast to make it Automation-compatible.

Override OlePromotion to indicate when a Variant of this custom Variant type must be cast to another type before it can be auto-marshaled using an Automation interface.

V is the TVarData record for the custom Variant that the application wants to marshal.

RequiredVarType returns the type to which V must be cast before it is Automation-compatible.

OlePromotion returns true if V can be cast to an Automation-compatible type, false if there is no type to which V can be cast.

As implemented in TCustomVariantType, OlePromotion sets RequiredVarType to varOleStr and returns true if V does not already represent a Unicode string.

See Also