Author:halw

Date:2008-09-25T01:53:30.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@42 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2008-09-25 01:53:30 +00:00
parent 24ad6cc4ac
commit c9b9c2adcd
19 changed files with 49 additions and 82 deletions

View File

@@ -1,5 +1,4 @@
[[Property:title|EiffelCOM Content]]
[[Property:link_title|EiffelCOM Interface Content]]
[[Property:title|EiffelCOM Interface Content]]
[[Property:weight|-2]]
[[Property:uuid|a6543000-6009-970e-8a68-a6f3b18c1fc6]]
The EiffelCOM library includes the following clusters:
@@ -9,7 +8,7 @@ The EiffelCOM library includes the following clusters:
* A [[ref:libraries/com/reference/index|Support]] cluster provides access to helper classes.
{{seealso| '''See Also''' <br/>
[[EiffelCOM|The Component Object Model]] <br/>
[[About COM and Eiffel]] <br/>
[[EiffelCOM Wizard|EiffelCOM wizard]] }}

View File

@@ -13,14 +13,14 @@ ECOM_EXCEPTION provides support for triggering and catching exceptions. Accordin
The status code is mapped by the EiffelCOM runtime to Eiffel exceptions. To raise COM-specific exceptions, the class ECOM_EXCEPTION provides the feature <eiffel>trigger</eiffel>:
<code>
trigger (code: INTEGER)
trigger (code: INTEGER)
-- Raise exception with code `code'.
-- See class ECOM_EXCEPTION_CODES for possible values.
</code>
The class also has several features that help analyzing exceptions and error codes received from the COM runtime.
<code>
hresult: INTEGER
hresult: INTEGER
-- Original HRESULT.
require
applicable: is_developer_exception
@@ -83,32 +83,32 @@ which specifies the actual type of the variant. The class has multiple features
<eiffel>ECOM_VARIANT_ACCESS</eiffel> provides the feature:
<code>
missing: ECOM_VARIANT
-- Value representing the default value of a COM optional argument.
-- Equivalent to an omitted VB argument, or C++ vtMissing, or .NET System.Reflection.Missing.
</code>
missing: ECOM_VARIANT
-- Value representing the default value of a COM optional argument.
-- Equivalent to an omitted VB argument, or C++ vtMissing, or .NET System.Reflection.Missing.
</code>
Many COM Automation servers have routines that take arguments with default values. This is very common, for example, in Microsoft Office applications such as Excel and Word. In Visual Basic, such arguments are optional and, when omitted, the server uses the default value. In languages that cannot omit arguments, a special VARIANT value representing the omitted argument must be passed. EiffelCOM applications can pass missing for this purpose.
For example, the following adds a new workbook to Excel. The default argument tells Excel to decide for itself how many worksheets to put in the new workbook:
<code>
class
MY_EXCEL_APPLICATION
class
MY_EXCEL_APPLICATION
inherit
APPLICATION_PROXY
inherit
APPLICATION_PROXY
ECOM_VARIANT_ACCESS
ECOM_VARIANT_ACCESS
feature
feature
add_workbook is
local
workbook: WORKBOOK_PROXY
do
workbook := workbooks.add (missing, 0)
end
</code>
add_workbook is
local
workbook: WORKBOOK_PROXY
do
workbook := workbooks.add (missing, 0)
end
</code>

View File

@@ -4,17 +4,12 @@
Type: Library <br/>
Platform: Windows <br/>
==EiffelCOM Library==
See:
* [[EiffelCOM Introduction|Introduction]]
* [[EiffelCOM Content|Content]]
* [[ref:libraries/com/reference/index|Reference]]
The EiffelCOM library provides support classes for the code generated by the EiffelCOM wizard. It has wrappings for standard COM data types such as VARIANT, SAFEARRAY, CURRENCY, DECIMAL, IUnknown, IDispatch, etc.
{{seealso| '''See Also''' <br/>
[[EiffelCOM|The Component Object Model]] <br/>
[[EiffelCOM Wizard|EiffelCOM wizard]] }}