[Lazarus] Mutlithreaded Dll Callback crashes my Application

Sven Barth pascaldragon at googlemail.com
Wed Aug 25 22:16:59 CEST 2010


On 25.08.2010 21:24, Alexander Grau wrote:
> I have added this and it does not make any difference -
>
> I have updated the test program here:
>
> http://grauonline.de/alexwww/tmp/extthread.zip

If you extend ExternalThread as in the following it works at least on Wine:

function ExternalThread(param: Pointer): LongInt; stdcall;
var
   tm: TThreadManager;
begin
   GetThreadManager(tm);
   tm.AllocateThreadVars;
   InitThread(100000000);
   someFunc(param);
   Result:=0;
end;

With this extension the thread behaves similar to a FPC created one.

Regards,
Sven




More information about the Lazarus mailing list