[Lazarus] Threads and Libraries (dll and so)

Sven Barth pascaldragon at googlemail.com
Fri Jan 17 14:50:53 CET 2014

Am 17.01.2014 14:23, schrieb Michael Schnell:
> On 01/17/2014 01:25 PM, Marcos Douglas wrote:
>> is better not use global variables in the DLL.
> Of course I agree.
> A reason for using global variables in a DLL might be to access that 
> value as well in the DLL as in the main program.
> Is this even possible ?
Yes, this is possible.
> (To allow for this loading the DLL would need to modify the variable's 
> address anywhere within the DLL code. Up til now I only know about the 
> the "jump table interface" that allows the main code to call DLL 
> functions. )
On *nix systems this is easy, as they don't have these indirect 
references. On Windows it needs support on the side which uses the 
variable and at least in theory FPC should support this (though it might 
be buggy).


More information about the Lazarus mailing list