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 9275639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:38:08+00:00 2026-06-18T16:38:08+00:00

Where and when is the Application instance created? (Same goes for the Screen instance)

  • 0

Where and when is the Application instance created?
(Same goes for the Screen instance) .

I don’t see anything in the Forms or System initialization section.
In the CPU windows before Application.Initialize, I see a call to @_InitExe (SysInit) – which leads to _StartExe (System) and a whole lot of asm code – Which does not create the Application instance as far as I can tell.

What am I missing here?

  • 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-06-18T16:38:09+00:00Added an answer on June 18, 2026 at 4:38 pm

    It’s easy enough to work this out from the code. You just do a text search for TApplication.Create. For example using the IDE’s Find in Files feature.

    But you can always be lazy and get the debugger to do it.

    1. Enable Debug DCUs.
    2. Set a breakpoint in TApplication.Create.
    3. Run.

    When the program breaks, look at the call stack. You will see that the TApplication object is instantiated from InitControls in the Controls unit. And InitControls is called from the initialization section of the Controls unit.

    The full call stack for a plain vanilla VCL app looks like this:

    Vcl.Forms.TApplication.Create(nil)
    Vcl.Controls.InitControls
    Vcl.Controls.Vcl.Controls
    System.InitUnits
    System._StartExe(???,???)
    SysInit._InitExe($5A81BC)
    Project1.Project1
    :749933aa kernel32.BaseThreadInitThunk + 0x12
    :76f09ef2 ntdll.RtlInitializeExceptionChain + 0x63
    :76f09ec5 ntdll.RtlInitializeExceptionChain + 0x36
    

    Doing the same thing with TScreen.Create, you will see that the TScreen object is also instantiated in InitControls().

    I won’t try and explain all of this. I think there’s enough information and advice here for you to work it all out from here. Although this is the call stack from an XE3 application, it will look just the same for your Delphi 5 application.

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

Sidebar

Related Questions

I want my WinForms application to create an instance of itself for each screen
Introduction I've recently created an few application within the same solution using the NServiceBus
I've created a Windows/C++/WTL application that spawns a child process. The two processes communicate
Is a Dalvik virtual machine instance created for each application, or all Android applications
As I know Application.Restart() restarts an application and creates new Instance of an Application.
Suppose I create a Windows Azure application that consists of multiple instances talking to
What is the biggest integer the model field that this application instance can handle?
Possible Duplicate: How to implement a single instance Java application? is there a way
For instance, you have an application which processes files that are sent by different
I have a NamedPipeClientStream instance in my application that is setup for duplex communication

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.