Previous Table of Contents Next


19.3.1 Basic Automation Types


   Table 19-1 lists the basic data types supported by Automation. The table contains fewer data types than those allowed by ODL because not all types recognized by ODL can be handled by the marshaling of IDispatch interfaces and by the implementation of ITypeInfo::Invoke. Arguments and return values of operations and properties are restricted to these basic types.

   Table 19-1 Automation Basic Types

Type Description
boolean True = -1, False = 0.
double 64-bit IEEE floating-point number.
float 32-bit IEEE floating-point number.
long 32-bit signed integer.
short 16-bit signed integer.
void Allowed only as a return type for a function, or in a function parameter list to indicate no parameters.
BSTR Length-prefixed string. Prefix is an integer.

Type Description
CURRENCY 8-byte fixed-point number.
DATE 64-bit floating-point fractional number of days since December 30, 1899.
SCODE Built-in error type. In Win16, does not include additional data contained in an HRESULT. In Win32, identical to HRESULT.
IDispatch * Pointer to IDispatch interface. From the viewpoint of the mapping, an IDispatch pointer parameter is an object reference.
IUnknown * Pointer to IUnknown interface. (Any OLE interface can be represented by its IUnknown interface.)

   The formal mapping of CORBA types to Automation types is shown in Table 19-2. Table 19-2 OMG CORBA to Automation Data Type Mappings

CORBA Type OLE Automation Type
boolean VARIANT_BOOL
char UI1
double double
float float
long long
octet short
short short
unsigned long long
unsigned short long