Get call stack from callback function

c++ / delphi package - dll injection and api hooking
Post Reply
Davita
Posts: 163
Joined: Tue Sep 13, 2005 7:31 pm

Get call stack from callback function

Post by Davita »

Hi guys.
For debugging purpose, I want to get call stack information (which function called the callback) from my hook dll. Does madCodeHook provides this functionality? I'm using madCodeHook v3 on 32 bit machine.
Thanks
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: Get call stack from callback function

Post by madshi »

No. If you're using Delphi, you can use madExcept for this purpose, but the way madExcept creates callstacks is rather time consuming, so it wouldn't perform fast (as in fast).
Davita
Posts: 163
Joined: Tue Sep 13, 2005 7:31 pm

Re: Get call stack from callback function

Post by Davita »

Hi madshi, thanks for your answer.
I'm using Visual C++ 2010. I don't care about performance, because I want this feature for debugging purpose only, it is not needed in production environment.
So is there any other way to get caller function?
Thanks again :)
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: Get call stack from callback function

Post by madshi »

IIRC, this one contains some stack tracing capability:

http://www.codeproject.com/Articles/844 ... -Detection
Post Reply