Solved

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

Posted on 2010-11-18
6
1,670 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: 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!

 
LVL 32

Expert Comment

by:Ephraim Wangoya
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

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!

Question has a verified solution.

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

Suggested Solutions

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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