System.VarUtils.VariantChangeTypeEx

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

VariantChangeTypeEx: function(var Dest: TVarData; const Source: TVarData;
LCID: Integer; wFlags: Word; VarType: Word): HRESULT; stdcall;

C++

extern DELPHI_PACKAGE HRESULT __stdcall (*VariantChangeTypeEx)(TVarData &Dest, const TVarData &Source, int LCID, System::Word wFlags, System::Word VarType);

Properties

Type Visibility Source Unit Parent
variable public
System.VarUtils.pas
System.VarUtils.hpp
System.VarUtils System.VarUtils

Description

VariantChangeTypeEx stores the function that converts a variant from one type to another, using locale-specific information.

Use VariantChangeTypeEx to specify the function that converts the variant given in Source to the variant stored in Dest of type VarType, using the locale-specific information given through LCID and the parameter wFlags specifying the conversion flags.

The function stored in VariantChangeTypeEx returns the result of the conversion operation, which can be one of the following.



Value Meaning

VAR_OK

The conversion was successful.

VAR_BADVARTYPE

The variant type of the input parameter is not valid.

VAR_OVERFLOW

The data stored in the output parameter does not fit in the destination type.

VAR_TYPEMISMATCH

The argument cannot be cast to the specified type.

VAR_INVALIDARG

Either one of the arguments is invalid.

VAR_OUTOFMEMORY

There is not enough memory to complete the conversion.



Note: To make the conversion without using locale-specific information, use the VariantChangeType function.

See Also