Basics of working with COM / ActiveX
COM (Component Object Model) is a technology developed by Microsoft for inter-process communication on Windows. The Vertec desktop and Cloud App can be accessed via a COM interface (or ActiveX interface) and thus be remotely controlled by other software running on Windows (especially all locally installed Microsoft Office apps). The apps serve as an “out-of-process” COM server for the corresponding applications.
By means of Com forwarding, the interfaces cloud ready can also be operated in a cloud extension manner.
For a description of the available interfaces, see Com interfaces.
Both Vertec.Desktop.exe and Vertec.Cloud.exe contain the Vertec Type Library, which can be integrated into the external application to access the object catalog, code completion and compile-time type checking.
The difference between a Desktop App and a Cloud App is that the Cloud App provides a local COM server, although there is no business logic at all. This is simulated with a proxy to the actual COM server running on the server in the Vertec session. The traffic runs over the normal data line (and is therefore not suitable for data migrations or larger amounts of data).
For the use of the COM interface, the integration of the type library is not necessary or, in the case of the Cloud App, also not possible, because there is no business logic and the connection to the COM server is made with a proxy.
The Desktop App can also be accessed without a connection to the Type Library.
We always recommend the use without the Type Library, as this application can be used with the Desktop App and the Cloud App or on Windows both in Cloud Suite and On-Premises.
This means that not directly to the types such as e.g. IVtcObject, App etc. because the system does not know them without a type library. The declaration of objects, object lists, session etc. is therefore performed on Object. For:
Dim Projektbearbeiter as IVtcObject
So you write:
Dim Projektbearbeiter as Object
The corresponding Com interfaces are available during operation as soon as the object is loaded.
Since the COM server is available directly for the Desktop App and via proxy for the Cloud App, different interface names result, but the usage is identical.
| Desktop App | Cloud App |
|---|---|
| app | ComCoClass |
| IVtcObject | VtcObjectProxy |
| IVtcObjectList | VtcObjectListProxy |
| ITimEditor | TimEditorProxy |
| ... |
The detailed description can be found in the article Com interfaces.
In features that accept Vertec objects as parameters, no Variant declared objects are passed, otherwise the message Invalid procedure call or invalid argument appears .
Are the Vertec objects as Object declared, everything works smoothly.