   how to get call stack information programatically?
  I'm using C++ (VC7.1) and I want to be able to write the call stack to my log system when an exception gets thrown.Is there any way using VC7.1 to programatically obtain the call stack info?   
  You can use StackWalk64() from the DbgHelp API.If you want to have the symbol names (instead of addresses) then you'll have to store the symbol files into the same directory as the exe.HTH,   ;  StackWalk64 is the ticket, yes. But don't get his hopes up. Writing a simple dump-stack-addresses thing is easily done, but going whole-hog and dumping function names and their local variable values is quite a bit of work.Let's see: 2200 LOC for symbol engine, 1200 LOC for general debug code (catching exceptions, enabling debug token, etc.), 700 for pretty STL container dumps, and a further 1000 or so for misc. crap (caching of symbols, displaying the error dialog).Now don't get me wrong, this is really great to have; it's just so much work and hard to get right, you definitely want to reuse existing code. Mine is going to be released Real Soon Now under GPL; as an alternative, John Robbins (the Bugslayer) has in the meantime written a book that includes a symbol engine, but I've not seen it myself.BTW: putting symbol files (e.g. .PDB) in program's directory is reasonable, but not required: the absolute path to them is stored in the .EXE.   