[Lazarus] LCL and DLLs, initializing the widget set safely?

Mattias Gärtner nc-gaertnma at netcologne.de
Wed Dec 9 14:54:04 CET 2009


Zitat von Marco Alvarado <cronodragon at gmail.com>:

> I converted a demo of a Netscape plug-in from Delphi to Lazarus. I
> just found two bugs, one was solved by placing
> Application.Initialize() right before dynamically creating the form
> (I'm not using lfm), and another related to CreateParented(). With
> those bugs solved, now I have a perfectly running Netscape plugin
> created with Lazarus and LCL 0.9.28. I tested the DLL on Firefox 3.5.
> The only files I kept from Delphi are the resource files, since those
> bring the MIME-type and other info the browser requires in the DLL,
> and Lazarus doesn't support custom version info fields at the moment
> (hope in the future). The DLL's size is 1483KB.

What about Application.Run?


> I think that LCL just misses the application initialization in DLL...
> at which moment it must be called is something I don't know. Maybe
> placing an initialization flag and calling it once before creating
> components might be a workaround.
>
> Lazarus rules!!

:)

Maybe this can be added to one of those pages:
http://wiki.lazarus.freepascal.org/packages
http://wiki.lazarus.freepascal.org/shared_library
http://wiki.lazarus.freepascal.org/Lazarus/FPC_Libraries


Mattias






More information about the Lazarus mailing list