If Delphi applications use DLLs (also created using Delphi), will there be multiple versions of variables declared in System.pas?
I just read How to determine if I am running as a console application? (Delphi on Win32) , and the commentary explains that there can be several versions, for example System.IsConsole, which have different values ββ- True in EXE and False in DLL (if they were compiled using $ APPTYPE CONSOLE).
But other variables are apparently intended for application scale values, like
MainInstance: LongWord; { Handle of the main(.EXE) HInstance } CPUCount: Integer; { Number of CPU Cores detected }
How can developers see which values ββwill be assigned at the application level and which variables are modular (and therefore may have different values ββin DLLs and EXEs)?
Or am I misunderstanding these global variables? For example, the documentation for System.BeginThread says that it sets the global variable System.IsMultiThread - but how can it be a global variable and System.IsConsole?
source share