On 08/09/2011 01:14 PM, Juan Sánchez wrote:
Thans Michael.
I have not developed with threads. I've tried the following. I do not know if it is right. The window is created from the main application, but you can not close it.
I did a lot of work with threads, but I did not use Lazarus in Windows and did not do dlls (or so's) with same. :(

On the first look the code looks good.

I don't know what DllMessage is.

If this is the code that is executed when the dll is initialized, creating the thread there might be OK, even if I think it would be more appropriate to have the main program call a dedicated function in the DLL to initialize the GUI.

In any case I think it is not a good idea to have the var GUI2Thread in a local context. I would do it outside of a function to allow for accessing it when necessary.

Does your code sample somehow work ?

-Michael

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to