The COM API is based on the front call technique as described
in Front End Functions. All COM functions are grouped in the WinCOM
front end function module.
Table 1. COM API functions
Function name |
Description |
CreateInstance |
This function creates an instance
of a registered COM object. |
CallMethod |
This function calls a method on
a specified object. |
GetProperty |
This function gets a property
of an object. |
SetProperty |
This function sets a property
of an object. |
GetError |
This function gets a description
of the last error which occurred. |
ReleaseInstance |
This function releases an Instance
(also frees memory). |
Supported syntax
COM language syntax is
very flexible and allows lots of notation. Genero WinCOM API is slightly
more strict:
- := notation is allowed in version 2.00.1e
(or later) only; for instance: myFunction(SourceType:=3)
- "no parenthesis" notation is not allowed; for instance: myFunction
3 must be writtenmyFunction(3)
- numeric constants are allowed in version 2.00.1e (or later) only.
The constant list depends on the application used via WinCOM, therefore
the list is configurable: a file named etc/WinCOM.cst gathers all
the constants provided today by Microsoft™ for
Office XP. It can be modified to add user-defined constants. Example
with Word: CALL ui.Interface.frontCall("WINCOM","SetProperty",
[wdapp,"Selection.Font.Bold","9999998"],[wddoc]) Here,
"9999998" stands for the constant wdToggle (see etc/WinCOM.cst).
- There is no way to handle an array as a method argument. This
is also due to 4GL limitation: you can't pass 4GL Arrays to frontcalls.