On Fri, Jan 17, 2014 at 10:23 AM, Michael Schnell <[email protected]> wrote: > 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, see the Sven Barth answer. > (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. ) But why do you need a global var in the DLL? IMHO (and for many programmers around the world), global var is not good, even in the application code. Regards, Marcos Douglas -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
