Re: Using ActiveX Components

Posted by Bob p12604 on February 18, 2008

In Reply to Re: Using ActiveX Components posted by Bob p12604 on February 17, 2008

: The links seem to be regarding importing a control or OCX. I have an ActiveX EXE file that I am trying to import. I need the process to run in it's own process space. I am using Delphi for some DB work and there is an analysis routine I am using that required using a DLL, unfortunately the DLL causes FPU exceptions which I disabled but in order to run in Windows Vista I have to run as administrator, which not all users of the software can. The solution was to wrap the analysis in an ActiveX EXE and exchange info that way. I can do this in VB but I haven't quite got it in Delphi (2005 by the way). Sorry for the long winded description.

I have been using Turbo Delphi while away from my Delphi 2005 machine. I wrote a simple ActiveX EXE in VB6 that does a simple string manipulation. I created a simple form in Delphi that with 2 text controls (input and output) and a button that triggers the command.

I used Component -> Import Component... -> Import ActiveX Control.
I did an Add and found the Active X EXE file. It creates a _TLB.pas file which has the class definition and has the procedures (methods) I would expect to find.

I am fairly new to Delphi so I am not sure that I am referencing this correctly. In my form pas file I had the TLB name to the uses area. I then create a type of the class and a variable. When I try to do a create using (self) I get an access violation. Any clue as to what I am doing wrong.

Thanks

Related articles

       

Follow Ups