Solved

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

Posted on 2010-11-18
6
1,620 Views
Last Modified: 2012-05-10
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
Comment
Question by:IT79637
6 Comments
 
LVL 25

Accepted Solution

by:
epasquier earned 500 total points
ID: 34164009
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
 
LVL 24

Expert Comment

by:jimyX
ID: 34164066
> 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
 
LVL 25

Expert Comment

by:epasquier
ID: 34164452
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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 32

Expert Comment

by:ewangoya
ID: 34164761

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
 
LVL 14

Expert Comment

by:systan
ID: 34164775
you can ask in there forum, be a member first, just like me.
http://forum.lazarus.freepascal.org/index.php?action=forum
0
 
LVL 1

Author Closing Comment

by:IT79637
ID: 34184148
Lazarus has a delphi package converter.  I tried to convert ImageMan , but failed.  Getting some help on the Lazarus forum.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question