Global inside Dll

Just starting out? Need help? Post your questions and find answers here.
wayne-c
Enthusiast
Enthusiast
Posts: 335
Joined: Tue Jun 08, 2004 10:29 am
Location: Zurich, Switzerland

Global inside Dll

Post by wayne-c »

Will a Global Var$ inside a DLL be different for all the Applications using the DLL simultaneously or shared between the Instances of the DLL? What about a Threaded Var$?

Another question: will a Global Var$ inside the Dll be available for multiple serial procedure calls? What about a Static Var$ inside the ProcedureDll? Will the Static Var$ inside the ProcedureDll be static for all Applications using the DLL?

And another: does a Threaded Var$ in a non-threaded environment fallback to Global Var$?

Thank you!
As you walk on by, Will you call my name? Or will you walk away?
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Global inside Dll

Post by mk-soft »

Each instance hate its own memory.
Thus Global, Threaded, etc. functions like in the main program.

PB-IDs like Windows, Images, Network have their own environment.
So it is not easy to create it from a DLL window and dialogs.
These must ALWAYS be created in the mainscope.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
marroh
User
User
Posts: 72
Joined: Wed Aug 06, 2008 8:21 am

Re: Global inside Dll

Post by marroh »

mk-soft wrote:Each instance hate its own memory.
No hate please!
Just kidding, I know you mean "Each instance has its own memory." ;)
PureBASIC v5.41 LTS , Windows v8.1 x64
Forget UNICODE - Keep it BASIC !
Post Reply