Jump to content
Registration disabled at the moment Read more... ×
alank2

Using a C++ Class in Delphi

Recommended Posts

Is there a way to do this?  What I have done successfully is create functions that access the class, put them in a DLL, and then call that DLL from Delphi which does work, but if there is another way it is probably an easier way.

Share this post


Link to post

You can't avoid implementing the C++ class in a DLL or BPL, unfortunately.  However, Delphi can use the C++ object directly if it is derived from a Delphi class (ie, TObject or descendant), or is accessible using an abstract interface that is also defined on the Delphi side, or is accessible via/as a COM object.  Otherwise, you are stuck using plain C-style wrapper functions, as you already have.

  • Like 1

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×