[fpc-devel] bug ID #4855

Michael Van Canneyt michael at freepascal.org
Mon Apr 10 09:08:12 CEST 2006



On Mon, 10 Apr 2006, Peter Vreman wrote:

>> Buys Regarding this bug #4855 I need to get it fixed..
>>
>>
>>
>> The issue like this...  I have 2 parts to my system...
>>
>>
>>
>> The EXE ... and a DLL
>>
>>
>>
>> In the DLL I have an exported function that returns an Interface...
>>
>>
>>
>> Function dosomething( const aObjectInt : ISomeInt ) : ISomeOtherInt
>>
>>
>>
>> This fails and causes the application to die..
>>
>> However if I put the same function inside the EXE it works fine.
>
> The DLL has it's own memory manager. The EXE can't access the memory
> allocated in the DLL.

Of course it can, when it gets a pointer ?
It can't free it, of course, but that can be solved.

Is the function called from a FPC application or a Delphi application ?
If from delphi, try setting the 'stdcall' calling convention.

I think some more explanation is in order so we can reproduce and solve
the problem.

Michael.



More information about the fpc-devel mailing list