ActiveX datatype support

Table 18-1 the datatypes and argument modes supported by EAServer Manager, and their corresponding CORBA IDL and ActiveX types. Each IDE script language uses a different syntax to represent these types. See your tool’s documentation for more information.

For client development, most IDEs provide some way to view the interfaces exposed by registered automation servers. If your IDE provides an object browser, you can look up the interface for the proxy object and see it displayed in the IDE’s specific syntax. For example, in Visual Basic, you can browse registered ActiveX interfaces using the Object Browser window.

For component development, you can code your component methods to use supported ActiveX datatypes, then import the DLL or type library into EAServer Manager to define the component’s IDL interface.

Argument modes specify how an argument is passed:

Use in when the parameter is used to pass a value without changing the value. All parameters specified as in arguments are passed by value except for the string datatype (BSTR*). Use inout when the parameter is used to pass a value and change it. In the inout and out argument modes, the datatype of the parameter being passed must be identical to the datatype used for the same parameter in the server component method. Otherwise, no coercion is performed and an exception is thrown.

Table 18-1 the datatypes and argument modes supported by EAServer Manager, and their corresponding CORBA IDL and ActiveX types. The ActiveX column contains ActiveX datatype specification as it is defined at runtime in the ActiveX VARIANTARG structure. The ActiveX datatypes are used by OLE automation to pass data. For information on how your IDE’s datatypes correspond to these types, see your IDE’s documentation.

Table 18-1: ActiveX datatypes

EAServer Manager

CORBA IDL type

Argument mode

ActiveX (automation) type

boolean

boolean

in inout out return

VT_BOOL VT_BOOL | VT_BYREF VT_BOOL | VT_BYREF VT_BOOL

integer<16>

short

in inout out return

VT_I2 VT_I2 | VT_BYREF VT_I2 | VT_BYREF VT_I2

integer<32>

long

in inout out return

VT_I4 VT_I4 | VT_BYREF VT_I4 | VT_BYREF VT_I4

float

float

in inout out return

VT_R4 VT_R4 | VT_BYREF VT_R4 | VT_BYREF VT_R4

double

double

in inout out return

VT_R8 VT_R8 | VT_BYREF VT_R8 | VT_BYREF VT_R8

string

string

in inout out return

VT_BSTR VT_BSTR | VT_BYREF

octet

octet

in inout out return

VT_UI1 VT_UI1 | VT_BYREF VT_UI1 | VT_BYREF VT_UI1

binary

BCD::Binary

in inout out return

VT_ARRAY | VT_UI1 (safe array) VT_ARRAY | VT_UI1 | VT_BYREF VT_ARRAY | VT_UI1 | VT_BYREF VT_ARRAY | VT_UI1 (safe array)

decimal

BCD::Decimal

in inout out return

VT_R8 VT_R8 | VT_BYREF VT_R8 | VT_BYREF VT_R8

money

BCD::Money

in inout out return

VT_CY VT_CY | VT_BYREF VT_CY | VT_BYREF VT_CY

date

MJD::Date

in inout out return

VT_DATE VT_DATE | VT_BYREF VT_DATE | VT_BYREF VT_DATE

time

MJD::Time

in inout out return

VT_DATE VT_DATE | VT_BYREF VT_DATE | VT_BYREF VT_DATE

timestamp

MJD::Timestamp

in inout out return

VT_DATE VT_DATE | VT_BYREF VT_DATE | VT_BYREF VT_DATE

ResultSet

TabularResults:: ResultSet

out return

VT_DISPATCH VT_DISPATCH | VT_BYREF

ResultSets

TabularResults:: ResultSets

out return

VT_DISPATCH VT_DISPATCH | VT_BYREF

interface (any IDL interface)

interface

in inout out return

VT_DISPATCH VT_DISPATCH | VT_BYREF VT_DISPATCH | VT_BYREF VT_DISPATCH

structure (any IDL structure)

See “Structure support”.

in inout out return

VT_DISPATCH VT_DISPATCH | VT_BYREF VT_DISPATCH | VT_BYREF VT_DISPATCH

enum (any IDL enum)

See “IDL enumeration support”.

in inout out return

VT_DISPATCH VT_DISPATCH | VT_BYREF VT_DISPATCH | VT_BYREF VT_DISPATCH

typedef (any IDL type alias)

See “IDL typedef support”.

in inout out return

VT_DISPATCH VT_DISPATCH | VT_BYREF VT_DISPATCH | VT_BYREF VT_DISPATCH

union (any IDL union)

See “Union support”.

in inout out return

VT_DISPATCH VT_DISPATCH | VT_BYREF VT_DISPATCH | VT_BYREF VT_DISPATCH

sequence (any IDL sequence)

JCollection (See “Sequence support”.)

in inout out return

VT_DISPATCH VT_DISPATCH | VT_BYREF VT_DISPATCH | VT_BYREF VT_DISPATCH

IDL attributes are not supported by ActiveX clients.

Because the Timestamp datatype maps to the OLE date datatype, which does not represent thousandths of a second, you could lose precision when accessing a timestamp parameter from a Java component.

ResultSet or ResultSets datatypes can only be specified as a return type.

Only byte arrays are supported—no other type of array is supported. You can also use IDL sequences in lieu of arrays. The EAServer JCollection interface is used by both clients and components to represent IDL sequences. See “Sequence support” for more information.

If you develop your component using Visual C++ and the parameter type is BSTR *, then the IDL signature for the parameter argument mode must be inout. In the IDL file, change the parameter mode to inout, regenerate and reregister the .tlb and .reg files, and modify the ActiveX client to pass the string argument by reference.

You can define get and set methods that control runtime properties for your component. However, using get and set methods to access properties over a network decreases performance.