Hi baerten, I agree with Luc. However you may be able to use a pre-defined macro[^] something like below:VOID FunctionB(int iVal,char *caller,int line) { char szBuf[MAX_PATH]; sprintf(szBuf,"I was called by %s on line %d",caller,line); MessageBoxA(NULL,szBuf,0,0); } VOID FunctionA() { FunctionB(1,__FUNCTION__,__LINE__); }
baerten wrote:
i can't write over 100 Debug-Lines into the code
A stack trace is several times more expensive at runtime. Best Wishes, -David Delaune