Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6379319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:07:21+00:00 2026-05-25T02:07:21+00:00

If Delphi applications use DLLs (also created with Delphi), will there be multiple versions

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:07:21+00:00Added an answer on May 25, 2026 at 2:07 am

    Unless you link your DLL against the RTL.bpl or a user defined “master” BPL that contains the System unit, your DLL will have its own set of global System variables. They are initialized when the DLL is loaded. CPUCount doesn’t need the EXE to fill it. The DLL fills it by asking Windows about its value. The DLL has also its own IsMultiThread variable (unless you link your DLL against the RTL.bpl …). So your EXE can have multiple threads and the DLLs IsMultiThread variable still says False.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Under Windows Vista and Win7 there is a problem with applications created by Delphi
I use Ant to build Delphi applications (called from CruiseControl). I want ant to
Is it possible to use LINQ in win32 DELPHI applications
I have developed a few Delphi Win32 (currently using D2007) applications, which revolve around
I have four small single-form utility applications that I have written in Delphi (Win32),
Does anyone have a sample of how to use MSMQ in delphi 2010 to
A number of delphi applications that I work with use an activex chartfx control.
i have use delphi xe recently but exe size is very big because of
Which component is best to use for receiving HTTP requests in Delphi application?
In Delphi 2009 I'm finding that any time I use TThread.CurrentThread in an application,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.