[Lazarus] Mutlithreaded Dll Callback crashes my Application

Maik Wojcieszak maikwo at googlemail.com
Wed Aug 25 11:57:46 CEST 2010


Marco,

Marco van de Voort schrieb:
> On Wed, Aug 25, 2010 at 09:28:14AM +0200, Maik Wojcieszak wrote:
>   
>>> Is something exported, but not explicitely declared __cdecl really cdecl?
>>>   
>>>       
>> I am using cdecl in Delphi and it works very well. So, I guess it is ok.
>> I've tested stdcall and it show's the same problem.
>>     
>
> Then I don't know. The only thing I can recommend is to be very careful with
> "works in Delphi" like statements, since that can be coincidence due to
> memory layout.
>   

Yes, it can be coincidence and that is another reason, why I really like 
to know what I am doing wrong here.
There is at least nothing special in using a flat dll interface in 
another language. Also using callbacks
is nothing special. The only thing is the multithreaded callback which 
is a more special, but should be
standard when using a high level language on a multithreaded OS.

I am porting the components to linux now and try if I have the same 
problem there. I am using
gcc on linux to build the shared libs. Let's see if this leads us to a 
solution.

Maik






More information about the Lazarus mailing list