[Lazarus] Form in DLL
mschnell at lumino.de
Thu May 3 09:56:19 CEST 2012
On 05/03/2012 07:36 AM, Michael Fuchs wrote:
> So, there are no interference betwenn the two Application objects?
While I do believe, that it is possible to have two TApplication
instances, one in the Main application and one in the DLL, I feel that
there are a lot or problems that need to be handled.
In fact I once suggested that it would be very nice to have, if Lazarus
would provide a "DLL/so Application" Widget Type", But I think it would
be a lot of work to create same in a decent way. So beware !
Besides the obvious benefit of "two main Forms", this additionally would
allow for the (then duplicated) LCL GUI functions to take advantage of
Some of the problems are:
- You need a dedicate "main"-thread for each TApplication instance, to
allow communication with the OS GUI.
- You need a common memory manager to allow for a decent communication
between the main application an the DLL.
- Communication between the two mainthreads needs to be done via a
mechanism based on "Synchronize" and/or "QueueAsyncCall".
Rather hard stuff :) .
More information about the Lazarus