Name

OleVariant Type

Syntax

type OleVariant;

Description

The OleVariant type is the same as the Variant type, except that an OleVariant can store only OLE-compatible types. In particular, an OleVariant cannot store a Delphi string, but must store a wide string instead.

Tips and Tricks

When you assign a value to an OleVariant, Delphi automatically converts its value to an OLE-compatible value, that is, it converts an AnsiString (varString) to a wide string (varOleStr).

See Also

AnsiString Type, PWideChar Type, String Keyword, VarCast Procedure, VarCopy Procedure, Variant Type, WideString Type

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.