Using Delphi DLL in C ++

How can I use a DLL written in Delphi in my C ++ project (console application)?

I already read about wrappers. Is there an easier way? Or how does this method work (wrapper)?

+2
source share
1 answer

This is trivial if you compile your project in C ++ using C ++ Builder. Just include the C ++ shell headers generated by the Delphi compiler in your code and link your code to the Delphi library stubs.

However, I'm not sure if you can do this if you do not have access to shells, the Delphi source code, or the Delphi compiler. In this case, or if you are not using C ++ Builder, you should use the typical use of DLLs and follow standard calling rules and COM rules if Delphi code exports OO functions as COM objects.

+1
source

Source: https://habr.com/ru/post/1437341/


All Articles