Board index » cppbuilder » How do I create an OCX dll?

How do I create an OCX dll?


2007-09-17 07:05:09 AM
cppbuilder63
I have c++ source code that I want to compile to an OCX, using C++ Builder
5. I want to use the OCX in Delphi 4. The c++ source code was originally
converted from Fortran 77 code. The code contains no class items; but does
use record structures. It's possible though to restructure the c++ code into
a class, but with no ancestor type class. I can make a simple DLL but the
exported functions are all mangled; would prefer non-mangled exported
functions. However, I think an OCX would provide the better interface to
Delphi 4. So, how can I make an OCX or activex dll without a lot of
irreverent stuff that an OCX or activex might gratuitously add in?
Any help greatly appreciated.
 
 

Re:How do I create an OCX dll?

Hi,
Quote
functions. However, I think an OCX would provide the better interface to
Delphi 4. So, how can I make an OCX or activex dll without a lot of
I can't remember exactly, how D4 consumed type libraries.
Do you have a menu item, "Project | Import Type Library"?
And, if so, does the "Import Type Library" wizard have
a "Generate Component Wrappers" checkbox? If so, I think
you should create an ActiveX Library on the C++ side
with a COM Object to keep it is as simple as possible
(seeing as it is a non-visual functionality in the
component you are creating).
--Craig