Previous Table of Contents Next


19.9.7 Mapping for Automation Basic Data Types


   19.9.7.1 Basic automation types

   The basic data types allowed by Automation as parameters and return values are detailed in Section 19.3, “Mapping for Basic Data Types,? on page 19-9.

   The formal mapping of CORBA types to Automation types is shown in Table 19-8.

   Table 19-8 Mapping of Automation Types to OMG IDL Types

OLE Automation Type

OMG IDL Type

boolean boolean
short short
double double
float float
long long
BSTR string
CURRENCY COM::Currency
DATE double
SCODE long

   Note – The mapping of BSTR to WString breaks backwards compatibility where BSTR was mapped to string.

   The Automation CURRENCY type is a 64-bit integer scaled by 10,000, giving a fixed point number with 15 digits left of the decimal point and 4 digits to the right. The COM::Currency type is thus defined as follows:

   19-42 Common Object Request Broker Architecture (CORBA), v3.0 July 2002

   module COM

   {struct Currency{unsigned long lower;long upper;}

   }

   This mapping of the CURRENCY type is transitional and should be revised when the extended data types revisions to OMG IDL are adopted. These revisions are slated to include a 64-bit integer.

   The Automation DATE type is an IEEE 64-bit floating-point number representing the number of days since December 30, 1899.