Progress
External Program
Interfaces


Obtaining Access To COM Objects

To access a COM object, you have to define a component handle for it and set the handle value using the appropriate object instantiation:

DEFINE VARIABLE hCOMobject AS COM-HANDLE. 
/* ... Instantiate COM object, setting hCOMobject ... */ 
/* ... Access COM object properties and methods using hCOMobject ... */ 
/* ... Access ActiveX control events using OCX event procedures ... */ 

To instantiate an Automation object, you use the CREATE Automation Object statement. For more information, on instantiating Automation objects, see ActiveX Automation Support."

To instantiate an ActiveX control, you use the AppBuilder at design time to select and configure the control, and to generate the 4GL that instantiates the control at run time. This AppBuilder-generated 4GL includes the CREATE Widget statement to create the control-frame widget and the LoadControls( ) method to associate the control instance with the control-frame COM object. For more information on instantiating ActiveX controls, see ActiveX Control Support."

Access to COM object properties and methods is the same for both Automation objects and ActiveX controls. Progress supports event management for both Automation objects and ActiveX controls. For information on ActiveX Automation object event management, see ActiveX Automation Support." For information on ActiveX control event management, see ActiveX Control Support."


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095