Data Types

The invoke method of the IDispatch class uses the VARIANT data type to pass properties and return values and method parameters. These variant types are mapped to JADE equivalents for the properties and methods of the generated ActiveX interface classes.

The following table lists the JADE primitive types that are used for each of the VARIANT types.

Variant Type Description C++ Type JADE Primitive Type
VT_I2 2 byte integer short Integer
VT_I4 4 byte integer long Integer
VT_UI1 Unsigned char unsigned char Character
VT_UI2 Unsigned 2 byte integer unsigned short Integer
VT_UI4 Unsigned 4 byte integer unsigned long Integer
VT_INT Machine integer int Integer
VT_UINT Machine unsigned integer unsigned int Integer
VT_R4 4 byte real float Real
VT_R8 8 byte real double Real
VT_CY Currency CY (__int64) Decimal
VT_18 8 byte integer _int64 Decimal
VT_U18 Unsigned 8 byte integer unsigned _int64 Decimal
VT_BOOL Boolean bool Boolean
VT_ERROR Error code long Integer
VT_DATE Date DATE TimeStamp
VT_BSTR Binary string BSTR String
VT_ARRAY Safearray pointer SAFEARRAY Array
VT_VARIANT Variant pointer VARIANT Any
VT_UNKNOWN IUnknown pointer IUnknown IUnknown
VT_DISPATCH IDispatch pointer IDispatch IDispatch
VT_Decimal Decimal No C++ equivalent Decimal

Array types are not supported. An interface method defined with a parameter or return value that is an array type is generated but an exception is raised when that method is executed.