Basics for working with COM / ActiveX on Windows
Product line
Standard
|Expert
Operating mode
CLOUD ABO
|ON-PREMISES
Modules
Services & CRM
Budget & Phases
Purchases
Resource Planning
Business Intelligence
COM (Component Object Model) is a technology developed by Microsoft for interprocess communication under Windows ( Source ). The Vertec desktop and cloud apps can be accessed via a COM extension (or Activex interface) and can thus be remotely controlled by other software running on Windows (in particular all locally installed Microsoft Office apps). The apps serve as “out-of-process” COM servers for the corresponding applications.
Basically, all entries in Vertec can also be entered from an external program and read into Vertec via COM extension. In the article Import and export examples there are some Excel examples for handling the Vertec COM extension.
The description of the available interfaces can be found in the article COM Interfaces .
Both Vertec.Desktop.exe and Vertec.Cloud.exe contain the Vertec Type Library, which can be included in the external application to gain access to the object catalog, code completion, and compile-time type checking.
The difference between Desktop App and Cloud app is that the Cloud app offers a COM server locally, even though there is no business logic at all. This is simulated by 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 extension, 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 using it without the Type Library, as this application can be used with the Desktop App and the Cloud app or on Windows both in the Cloud Suite and on-premises.
This means that there is no direct reference to the types such as e.g. IVtcObject
, App
etc. can be accessed, since the system does not know them without a Type Library. The declaration of objects, object lists, session etc. therefore takes place on Object
. Instead of:
Dim Project user as IvtcObject
So you write:
Dim project user as Object
The corresponding COM Interfaces are present during operation as soon as the object is loaded.
Since the COM server is available directly in the Desktop App and via proxy in 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 functions 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.