Solved

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

Posted on 2010-11-18
6
1,592 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now