Programmer's Guide > Using the AOM > Using COM to Access the AOM > COM Objects and ACL
  
COM Objects and ACL
You can use ACL (Arbortext Command Language) to call most COM (Component Object Model) objects which export the IDispatch interface and which include a type library.
You can use this functionality, for example, to invoke an application or DLL written in Visual Basic. Such an external application can, in turn, invoke Arbortext Editor or an Arbortext PE sub-process using its COM interface to access or change a document. Keep in mind that calling COM objects from VBScript or JScript scripts is more straightforward than calling COM objects from ACL (refer to Accessing COM Using JScript or VBScript).
ACL includes a set of functions to support COM calls: com_attach, com_call, com_prop_get, com_prop_put, and com_release.
Use the com_attach function to attach to a COM object and return a handle that can be used to invoke the object. After a successful com_attach, you can use the object handle to make calls to com_call, com_prop_get, or com_prop_set to invoke a method or get or set a property in a COM interface. Use the com_release function to release an object attached by com_attach or one returned by another interface. These functions are documented in the Arbortext Command Language Reference.
Arbortext Editor and the Arbortext PE sub-process use the type library associated with a COM interface to determine the type of each argument and the return value of a method or property invoked using an ACL function. This makes it possible, for example, to pass ACL variables to COM methods that expect parameters passed by reference and have the COM object return results to ACL by changing the value of the variable.
Arbortext Editor and Arbortext Publishing Engine have some restrictions and limitations in their support for calling COM interfaces, many of which are inherent to ACL:
Named arguments are not supported.
Arguments can be omitted only at the end of the argument list
You cannot pass an ACL array to a COM interface as an array. You can pass a member of an ACL array as an individual argument.
A called COM interface function can't return an array and have it converted into an ACL array.
You cannot use the other information in a type library (such as enum definitions) in ACL.
There is no implicit support for the implied Value, _NewEnum, or Evalute methods and properties even though it may be possible to call them explicitly.