Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Use an ActiveX COM DLL within Delphi without .ocx?

Posted on 2004-11-01
6
Medium Priority
?
577 Views
Last Modified: 2010-04-05
I have a component which is described as an ActiveX COM DLL. I would like to use the component with Delphi 7 to develop applications.
When I have used ActiveX components in the past, there has been a .ocx ActiveX control file which I have used with Component > Import ActiveX > Add to be able to see the component in a palette and add it to my application.
There is no mention of a .ocx file with this release anywhere in the documentation, nor can I find on the www a .ocx file or any guidance which would enable me to get to work. Can someone please fill in the knowledge gap and let me know either how to use this .dll or why it isn't possible?
0
Comment
Question by:shallimus
[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
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:vadim_ti
ID: 12466405
if this DLL includes type library, you can select
components -> import activex control -> add -> select your DLL

after your TLB will be added to TLB list, you will click "create unit" button,
as a result interface uniit will be created

if you will click "install" button, your activex will be installed in component palette
0
 

Author Comment

by:shallimus
ID: 12468955
Thanks for your reply vadim_ti.
I tried adding the DLL, and received no error, but do not see the component in the list. I have looked through several times; it really isn't there. There is a .tlb file in the directory with the DLL.
Is there something I'm doing wrong, or not doing?
0
 

Author Comment

by:shallimus
ID: 12469606
Or, another thought occurs: is there some way to manually add the TLB to Delphi's list, since it doesn't seem to add in the way it is supposed to?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Accepted Solution

by:
vadim_ti earned 2000 total points
ID: 12470841
You can use TLIBIMP utility

TLIBIMP yourLibrary.TLB

2 files will be created:

yourLibrary_TLB.PAS
yourLibrary_TLB.DCR

it will be delphi component and you can install it in regular way

0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 12471527
Hello

  ActiveX COM Dll is just Com Dll, don't use Import ActiveX menu to add reference to it, instead use Import Type Library from project menu

0
 

Author Comment

by:shallimus
ID: 12471649
Thanks vadim. This was great and exactly what I needed. The component is now working in my IDE :)
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

598 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