[Lazarus] RE : Forms in DLL

Michael Schnell mschnell at lumino.de
Fri Aug 19 15:49:18 CEST 2011


On 08/19/2011 01:45 PM, Juan Sánchez wrote:
> Yes, they've got different hex values both in main an dll.
IMHO this proves that the complete static memory of the LCL is 
duplicated. So in fact it should be possible to overcome the  fact that 
"the LCL is not reentrant" and have the Shared Object create it's own 
independent GUI.

OK. My impression that each TApplication instance needs it's own thread 
to work decently. Only this way the two Event queues that are created 
(even if in Windows the Event queues are implemented using the Message 
Queue for the main Window), can work decently and independent. I suppose 
this can be done just by doing Application.Run in the Execute procedure 
of a TThread instance.
> I think as you. And making new tests I see as you that communication 
> between these in fact "programs" might be an interesting task.
My suggestion is first to find out if/how a completely independent GUI 
for the main application and the Shared Object can be made decently 
working on all OSes.

After that try to do a mutual notification. This needs to be done via 
the appropriate event queue, and thus best by 
Application.QueueAsyncCall, using the other sites Application object. Of 
course a DLL call needs to be implemented to provide the pointer to the 
Application Object to the other site.

have fun,
-Michael




More information about the Lazarus mailing list