[Lazarus] ActiveX, TOLEControl

Dennis dec12 at avidsoft.com.hk
Wed Oct 19 11:21:25 CEST 2016



LacaK via Lazarus wrote:
> Hi *,
>
> I need help with OCX component (not visual I guess), which I need use 
> in Lazarus application (to control another application, which supplies 
> this OCX control).
> I have imported type library using importtl.exe (new unit was created 
> successfully)
>
> Then in program I have created instance:
>   v := CreateOleObject('SCAPS.ScSamlightClientCtrl');
> or
>   intf := CreateComObject(CLASS_ScSamlightClientCtrl) as 
> _DSamlight_client_ctrl_ocx;
What is the type of your V or intf  variable?
I am wild guessing maybe they are not proper referenced type so the 
object is created and then immediately freed.

I would try
   v : OLEVariant;
or V :  _DSamlight_client_ctrl_ocx;

Dennis


More information about the Lazarus mailing list