If Delphi applications use DLLs (also created with Delphi), will there be multiple versions of the variables declared in System.pas?
I have just read How to determine if I'm running as a console app? (Delphi on Win32) and the comment explains that there can be multiple versions of, for example, System.IsConsole which have different values - True in the EXE and False in the DLL (if it was compiled using $APPTYPE CONSOLE).
But other variables seem to be designed for application-wide values, for example
MainInstance: LongWord; { Handle of the main(.EXE) HInstance }
CPUCount: Integer; { Number of CPU Cores detected }
How can developers see which values will be assigned on application level, and which variables are module-specific (and so can have different values in DLLs and EXE)?
Or do I misunderstand 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 not?