Online Eiffel Documentation |
Documentation Home > Technologies > EiffelCOM |
EiffelStudio |
Access Type |
COM Type | Eiffel equivalent | Description |
VARIANT_BOOL | BOOLEAN | Standard boolean |
unsigned char | CHARACTER | Standard character |
double | DOUBLE | Standard double |
float | REAL | 2 bytes real |
int | INTEGER | Standard integer |
long | INTEGER | Standard integer |
short | INTEGER | 2 bytes integer |
BSTR | STRING | Standard string |
CURRENCY | ECOM_CURRENCY | Currency value |
DATE | DATE_TIME | Standard date |
SCODE | INTEGER | Return status |
Interface IDispatch * | ECOM_INTERFACE | Automation interface |
Interface IUnknown * | ECOM_INTERFACE | Generic interface |
dispinterface | ECOM_INTERFACE | Automation interface |
Coclass Typename | TYPE_NAME | Component main class |
SAFEARRAY(TypeName) | ECOM_ARRAY [TypeName] | Array |
TypeName* | CELL [TypeName] | Pointer to type |
VARIANT | ECOM_VARIANT | Variant value |
enum | INTEGER | Enumeration |
Decimal | ECOM_DECIMAL | Decimal value |
This approach has also a lot of drawbacks: first, late binding is not an efficient way of calling a function on an interface since its identifier must first be requested and then the function called. That's two round trips which can be expensive in a distributed environment. Second, since the marshaler is built-in, it has to know in advance all the possible types that a function can accept to be able to marshal the corresponding data. There are consequently a limitation on the number of types that one can use in signatures of functions on an Automation compatible interface. The set of available types is called Variant and cover most of the standard types. It does not allow however the passing of complex user defined data types. For these reasons Automation is mostly used in scripting environments (where speed is not an important factor) to accomplish simple tasks.
As information on any interface cannot be accessed dynamically, the description of the interfaces must be provided to tools that need to handle the components such as the EiffelCOM wizard. The official way of describing components and interfaces is through IDL. Once an IDL file has been written to describe a component it can be compiled with MIDL to generate both a type library and the code for the marshaller specific to that interface.
See Also
EiffelCOM wizard
EiffelCOM library
Introduction
Generalities
COM Interfaces
Coclasses
Component Location
Deeper into COM
Copyright 1993-2006 Eiffel Software. All rights reserved. |