Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-14 Thread Mazola Winstrol
2016-04-13 16:48 GMT-03:00 Sven Barth : > > Yes and mostly yes. The finalization sections might not be called in the > context of the same thread as the initialization sections, because if > the thread that does the last unload of the library (if it is > dynamically

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Sven Barth
On 13.04.2016 21:30, Mazola Winstrol wrote: > 2016-04-13 15:56 GMT-03:00 Jonas Maebe >: > > > And hence you can just initialise those variables in the > initialization section of the library and finalize them (if >

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Mazola Winstrol
2016-04-13 15:56 GMT-03:00 Jonas Maebe : > > And hence you can just initialise those variables in the initialization > section of the library and finalize them (if necessary) in the finalization > section of the library. > > Thanks! Can i use class constructors in

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Jonas Maebe
Michael Van Canneyt wrote: On Wed, 13 Apr 2016, Mazola Winstrol wrote: I writting a cross-platform shared library (.dll, .so). I need to initialize some global variables. As the free pascal doesn't support library events (PROCESS_ATTACH, PROCESS_DETACH), what is the correct to way to do

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Mazola Winstrol
2016-04-13 15:52 GMT-03:00 Michael Van Canneyt : > > > On Wed, 13 Apr 2016, Mazola Winstrol wrote: > > Hello list, >> >> I writting a cross-platform shared library (.dll, .so). I need to >> initialize some global variables. >> >> As the free pascal doesn't support library

Re: [fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Michael Van Canneyt
On Wed, 13 Apr 2016, Mazola Winstrol wrote: Hello list, I writting a cross-platform shared library (.dll, .so). I need to initialize some global variables. As the free pascal doesn't support library events (PROCESS_ATTACH, PROCESS_DETACH), what is the correct to way to do this? It does,

[fpc-pascal] Initialization in Shared Libraries

2016-04-13 Thread Mazola Winstrol
Hello list, I writting a cross-platform shared library (.dll, .so). I need to initialize some global variables. As the free pascal doesn't support library events (PROCESS_ATTACH, PROCESS_DETACH), what is the correct to way to do this? best ragrds ___