Solved

Get methodname at runtime

Posted on 2002-06-01
3
285 Views
Last Modified: 2010-04-04
Hi Guys,

Does anyone know how to retrieve the name of a calling method? For example:

A -> Z
B -> Z
C -> Z

Different methods can call method Z, and Z likes to know the methodnames of the caller.

This is for a logging component i'm creating.
0
Comment
Question by:bassch
3 Comments
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 100 total points
ID: 7048627
Without extra information it should only possible for published elements of a class. published means that the name is added to the RTTI.
Have a look at the Jedi Code Library http://delphi-jedi.org/CODELIBJCL it contains a nice debuugging extension which adds the MAP file to the exe which then allows to unwind the stack with names.
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9010407
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from robert_marquardt

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now