[[Property:title|Eiffel Project Processing]]
[[Property:weight|3]]
[[Property:uuid|d94c4060-af70-930b-5023-1c2b2d069633]]
The EiffelCOM Wizard can be used to add a COM interface to an existing Eiffel project. The advantage of that approach is that it doesn't require any knowledge about IDL. The EiffelCOM Wizard will take care of generating the IDL from the Eiffel facade class. The generated IDL will define one coclass containing one interface that corresponds to the contract view of the facade class.
==Designing the Facade Class==
The facade class should be designed so that it exposes the functionality of the Eiffel system that needs to be accessed from clients of the component. Only the public routines will be exported to the IDL and thus to clients (the class should not have any public attributes, see the list of requirements below).
There are some rules that the facade class must follow for the COM wizard to be able to generate correct IDL:
* The facade class must have a creation procedure called make that does not take any argument. This is the procedure that will be called by the EiffelCOM runtime to initialize the Eiffel object when a COM call arrives from a client.
* The arguments and objects returned by the public routines of the facade class must be of one of the following types: [[ref:libraries/base/reference/character_8_chart| CHARACTER_8 ]] , [[ref:libraries/base/reference/integer_32_chart| INTEGER_32 ]] , [[ref:libraries/base/reference/real_32_chart| REAL_32 ]] , [[ref:libraries/base/reference/real_64_chart| REAL_64 ]] , [[ref:libraries/base/reference/boolean_chart| BOOLEAN ]] , [[ref:libraries/base/reference/integer_32_ref_chart| INTEGER_32_REF ]] , [[ref:libraries/base/reference/boolean_ref_chart| BOOLEAN_REF ]] , [[ref:libraries/base/reference/real_32_ref_chart| REAL_32_REF ]] , [[ref:libraries/base/reference/character_8_ref_chart| CHARACTER_8_REF ]] , [[ref:libraries/base/reference/real_64_ref_chart| REAL_64_REF ]] , [[ref:libraries/base/reference/string_8_chart| STRING_8 ]] , [[ref:libraries/com/reference/ecom_currency_chart| ECOM_CURRENCY ]] , [[ref:libraries/com/reference/ecom_decimal_chart| ECOM_DECIMAL ]] , [[ref:libraries/com/reference/ecom_interface_chart| ECOM_INTERFACE]] , or [[ref:libraries/com/reference/ecom_array_chart| ECOM_ARRAY]] . Features with arguments or return objects that are of a type not in this list are excluded from the generated IDL file and are not accessible to clients.
* The facade class should not contain any public attribute, only routines can be exported to COM clients.
* The facade class must belong to a successfully compiled Eiffel project.
{{seealso|[[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Accessing a COM Component|Accessing a COM Component]] , [[Reusing a COM Component|Reusing a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}