Skip to content

Instantiating Automation Controller Objects

Unlike ActiveX controls or Embedded Document objects, Automation Controller objects are instantiated entirely in code. This is simply a matter of writing an object declaration block for the Automation object's wrapper class.

The example below shows the object declaration for the Simple Automation Controller COM sample:

Object oAutomationTest is a cComAutoTest
End_Object

Additionally, you can write an OnCreate event handler inside the object declaration to initialize the COM object's properties when it is attached to its Automation Server.

The COM object is not ready to use in your DataFlex application until it has been attached to its Automation server.

See Also