Solved

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

Posted on 2010-11-18
6
1,697 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

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!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month4 days, 23 hours left to enroll

635 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