ActiveX to Java primitive data type conversion values
All primitive Java data types are automatically converted to native ActiveX Automation types. However, not all Automation data types are converted to Java types (for example, VT_DATE). Variant data types are used for data conversion.
Variant data types are a requirement of any Automation interface, and are used automatically by Visual Basic and VBScript. The following tables provide details about how primitive data types are converted between Automation types and Java types.
data type conversion. Conversion details for primitive
Visual Basic Type Variant Type Java Type Notes Byte VT_I1 byte Byte in Visual Basic is unsigned, but is signed in Java data type. Boolean VT_BOOL boolean
Integer VT_I2 short
Long VT_I4 int
Currency VT_CY long
Single VT_R4 float
Double VT_R8 double
String VT_BSTR java.lang.String
String VT_BSTR char
Date VT_DATE n/a
Subtopics
- Example: ActiveX client application using helper methods for data type conversion
Generally, data type conversion between ActiveX (Visual Basic and VBScript) and Java methods occurs automatically, as described in ActiveX to EJB bridge, converting data types. However, the byte helper function and currency helper function are provided for cases where automatic conversion is not possible:
Related tasks
Use application clients