Hi, maybe you can try this:

1. Create a class in Delphi with all virtual methods. Use STDCALL for compatibility.

2. Create the same class in C++ with all virtual methods. Make sure the methods are in the same order. Again, use STDCALL.

3. Export a routine in the Delphi DLL to create/destroy instances of your classes. In my implementation I pass an integer ID to tell which class I want.

4. Pass the pointer of the C++ class in and it will return a fully qualified object that you can then use in C++ or any language that supports standard COM.

5. When your done, pass the object pointer to the destroy routine to free the class instance. (needed because of memory management and DLL boundary issues)

6. This works because Delphi supports COM which means the VMT (virtual method table) is binary compatible (laid out in memory the same) with the VMT of the C++ class.

7. What I've also done too was to export these interfaces out of the DLL and on the host side wrap them up (in this case Delphi classes) in classes so that I can extend them just like a normal class.

This gives you a lightweight (and much easier) COM across different languages. There are a number of articles on the NET about this concept for more information.

Hope this helps.