The DataView Server addresses the ActiveX Automation Interface with the help of three new (C language) API functions, dal_gfi_ole_cre, dal_gfi_ole_cal and dal_gfi_ole_del. dal_gfi_ole_cre takes care of starting up the COM server (the application), creates a COM object and assigns it a reference name. The reference name is needed to identify the COM object to the DataView server, and to enable communication via strings between the server and client. dal_gfi_ole_cal uses a complex automation command to call a COM interface's methods and access or modify its properties. dal_gfi_ole_del deletes the COM object when it is no longer needed.
You create and delete COM Objects with dal_gfi_ole_cre and dal_gfi_ole_del.
O:
COM Class name", or an -> error message.
Input Parameters | char *nam -> Reference name for COM Object |
Output Parameters | none |
Return Value |
0 -> OK ~0 -> Error code (-> see Handling Errors) |
You execute methods or access and alter properties with dal_gfi_ole_cal. This function passes a complex -> Automation Command (a string) to the COM interface. The string must contain the method calls and the reference name of the COM object. This makes it possible to chain calls together and make assignments within a call. Since the COM object determines the return type for a call dynamically at runtime, both the type and the value are returned to the DataView server packaged in a string.
Input Parameters | char *cmd -> Automation command |
Output Parameters |
char **res -> Result string dtvlong len -> Length of result string |
Return Value |
0 -> OK ~0 -> Error code (-> see Handling Errors) |
:
Return value" or an -> error message. The type is either one of the standard DataView types or an additional type 'O', to allow the return value to be a COM object (in which case the stringized return value is the COM class name). If method parameters are returned, they are concatenated in the order they appear in the method's definition, separated by null: "Type1:
Return value10
Type2:
Return value20 ...
TypeN:
Return valueN00
".