Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1790
  • Last Modified:

Is it possible to integrate Delphi ActiveX with free pascal Lazarus?

I'm using Delphi 7.  For now the cost of upgrading to a newer version is not possible.  It is expensive.  So I thought I would try Lazarus. I'm using the ImageMan OCX control from data-tech.com.  Is there a way to this  ActiveX component into the Lararus IDE?

1.  Is there a procedure to do it just like in Delphi 7?
2.  If not, can I put a wrapper around the control and turn it into a dll or automation server.  Essentially, it a wrapper that is mainly interfaces.  If so, is there a preferred method?

Thanks
0
IT79637
Asked:
IT79637
1 Solution
 
epasquierCommented:
It certainly is possible.

side note : I have not used it more than 30 minutes just to have a feel of it. So take the comments below as probable, not taken for granted

a) There is probably (I hope) something like Delphi ActiveX import tool. Since Delphi have it since v5 (maybe 4), the guys developing Lazarus certainly thought about it, and probably did something simple for that.

b) even if that is not the case, you can always use Delphi 7 import tool to generate the MyActiveX_TLB.Pas unit, that declares all types, const exported by the ActiveX, and create wrapper objects around the COM interfaces.

All you have to do is to compile those file with Lazarus, it should work like a charm.

Since it's free, your best shot of being sure is to try it with one of your current project using such imported ActiveX
0
 
jimyXCommented:
> can I put a wrapper around the control and turn it into a dll

The dll suite is already offered by the Data-tech.com:

http://data-tech.com/media/1792/imtrial.exe
0
 
epasquierCommented:
hum. an activeX is already a .dll , sometimes renamed as .ocx, but most often leaved as .dll
What you probably mean is making a dll wrapper with C plain non-object interface.

If you really nead so, you can do that, but Delphi wrappers using classes can wrap those activeX with native Delphi objects much better than C interface. That's a lot easier to use too, besides the obviously easier object architecture you don't have to mess around with PChars (and other pointers) issues at every corner.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Ephraim WangoyaCommented:

You can not import OCX controls into Lazarus. It is not supported.

From delphi , you can create a dll around the OCX and call it from your lazarus project.

But do take a look at this resource, should be useful for you
http://dsplayer.de/dspweb/

0
 
systanCommented:
you can ask in there forum, be a member first, just like me.
http://forum.lazarus.freepascal.org/index.php?action=forum
0
 
IT79637Author Commented:
Lazarus has a delphi package converter.  I tried to convert ImageMan , but failed.  Getting some help on the Lazarus forum.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now