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

  • Home
  • SEARCH
  • 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 6670177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:14:15+00:00 2026-05-26T03:14:15+00:00

I want to load all classes from a current project in a TList. If

  • 0

I want to load all classes from a current project in a TList. If I read the dpr file like a normal file it will return me only strings. I want to get all the classes defined in the dpr file and their names. Does someone know how to do that?

  • 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-26T03:14:16+00:00Added an answer on May 26, 2026 at 3:14 am

    In the Delphi IDE, all classes are available in the .dcu files, corresponding to each .pas files. Those .dcu files have a proprietary binary evolving format, so can not be used outside the IDE.

    At program execution, and within the exe file, there is no list of all existing classes. You can retrieve information about a known class using the RTTI functions (see TypInfo.pas and relatives as stated by the Embarcadero documentation). So at runtime, you just can retrieve information from a given class: you can use e.g. anObject.ClassName or anObject.ClassType methods.

    But I suspect you want to retrieve all classes defined in a project, from its source code. For this, you will need a source code parser, which will extract the logic from the .pas files. In short, the parser will read the .dpr then all necessary .pas files source code, interpret the object pascal type definitions, and create a list of units, classes, methods and properties. There are several parsers around: see for instance PasDoc or the version we embedded in SynProject.

    Additional note – for an exhaustive list: If you generate a .map file during the compilation, this text file will contain all symbol names of the executable, including the classes. You’ll have to parse it, but won’t have much information to deal with, since there is no easy way of guessing if each symbol is a class or a record, for instance, or about classes inheritances or properties… This .map is intended about execution debugging, not RTTI.

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

Sidebar

Related Questions

For my current project I want to be able to load some classes from
I want to load some images into my application from the file system. There's
Basically i want to load JS file like this into the page dynamically globalVar
I have a file I use called fileCabinet.php to load in all my classes
So all I want to do is simply find a user control I load
I want to load 52 images (deck of cards) in gif format from my
I want to load some data from mysql into my cocoa application view before
I want to load defined folders into my website from same system, now I
I want to load key/values configuration pairs stored in XML file. To bind a
I'm trying to load a whole set of classes from a namespace. These are

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.