06.04.2012 16:31, Leonardo M. Ramé пишет:
I have a similar problem to this:

http://www.lazarus.freepascal.org/index.php?topic=10571.0

My main program launches a thread, that loads a shared library, then
execute a function who receives as a parameter a pointer to a callback
function and an instance of the caller, as this:

procedure TMythread.execute;
begin
   ...
   // external function
   runcode(@MyCallBack, @Self);
   ...
end;

You should pass 'Self' here, not '@Self'. The latter would be correct for TP-style objects, but TThread descendant is a class.

Regards,
Sergei

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to