Delphi DLL's and Interfaces
Original Reporter info from Mantis: JayBinks
-
Reporter name: Jay Binks
Original Reporter info from Mantis: JayBinks
- Reporter name: Jay Binks
Description:
this seems to be similar (or same as) bug number
#2482 (closed) but since I could find no way to update that bug, I have re-filed it.
Im using CURRENT windows binaries of lazarus, which is 2.0.2 compiler (I think).
the issue seems to be with using a function call and returning an interface (inside a DLL).
I have found a temp work arround and that is to use procedures like :
Procedure Test( var myInterface : IInterface );
this will work, but I have lots of code using functions like this (from delphi) that I cant change.
this also extends to any function in a DLL (even in a class in the DLL, that is already exposed with another interface) that returns an interface.
I know this is probably as clear as mud, but please contact me if you need more information.
here is a little bit of code that MAY help
This does not work (and dies on the highlited line)
http://pastebin.com/574133
This DOES work fine, but I cant use this because of all my existing code.
http://pastebin.com/574190
Additional information:
Reporter: Jay Binks
EMail: jaybinks at gmail dot com
Mantis conversion info:
- Mantis ID: 6717
- OS: Win32