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

Michael Schnell mschnell at lumino.de
Thu Aug 8 13:23:01 CEST 2013


On 08/08/2013 01:07 PM, Lukasz Sokol wrote:
> in fact I DO want to be able to call gui-interfacing functions of the 
> form.

As Henry states, doing GUI calls  from a thread is easy by 
Application.QueueAsyncCall().

But, AFAIK, the dll does not know the main Form instance and does not 
know the Application instance of the application that loads the dll.

Moreover the memory management of the dll is independent of that of the 
Application it is called by. That is why you can't easily pass objects 
and strings between an application and the dll.

AFAIK, there are means to unify the memory management and to make the 
Form and/or the Application known to the dll.

But these issues need to be soled independently from the fact that the 
dll calls another dll.

-Michael



More information about the fpc-pascal mailing list