[fpc-pascal] Re: Library callback : how do I do that?

Sven Barth pascaldragon at googlemail.com
Fri Aug 9 11:02:06 CEST 2013


Am 08.08.2013 13:31, schrieb Michael Schnell:
> On 08/08/2013 01:15 PM, Lukasz Sokol wrote:
>> but I would then need to make the wrapper object aware of the 
>> Application or its forms then?
> This is provided by "Runtime Packages" with Delphi.
Michael, it seems that you understood Lukasz wrong, this has nothing to 
do with runtime packages. He has a Pascal/Lazarus application and has a 
C(++) library where he wants to provide a unit for. Now this library has 
a callback (for the application) which is called in a different thread. 
In this context it would be perfectly legal to use e.g. 
Application.QueueAsyncCall, but he wants to keep his interface unit 
independant of Lazarus. Thus in this situation he should - as Henry 
wrote - provide an event that is called by the callback and which can 
then be set by the calling application.

Regards,
Sven



More information about the fpc-pascal mailing list