• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 628
  • Last Modified:

Use an ActiveX COM DLL within Delphi without .ocx?

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?
  • 3
  • 2
1 Solution
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
shallimusAuthor Commented:
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?
shallimusAuthor Commented:
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?
Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

You can use TLIBIMP utility

TLIBIMP yourLibrary.TLB

2 files will be created:


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

Mohammed NasmanSoftware DeveloperCommented:

  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

shallimusAuthor Commented:
Thanks vadim. This was great and exactly what I needed. The component is now working in my IDE :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now