System.Variants.TCustomVariantType.OlePromotion

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

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

C++

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

プロパティ

種類 可視性 ソース ユニット
function protected
System.Variants.pas
System.Variants.hpp
System.Variants TCustomVariantType

説明

オートメーション互換にするためにバリアント値をキャストする型を示します。

OlePromotion メソッドをオーバーライドすると,このカスタムバリアント型のバリアントをほかの型にキャストしてから,オートメーションインターフェースを使って自動マーシャリングできます。

V は,アプリケーションでマーシャリングするカスタムバリアント型の TVarData レコードです。

RequiredVarType は,オートメーション互換になる前に,V をキャストする型を返します。

OlePromotion は,V がオートメーション互換の型にキャストできる場合は true,V をキャストできる型がない場合は false を返します。

TCustomVariantType での OlePromotion は,RequiredVarType を varOleStr に設定し,V が Unicode 文字列を表していない場合は true を返します。

関連項目