title: print callstack of a thread (c++), StackWalker or not?
body: <p>Needing to print callstacks of C++ application thread by thread handle, I turned to <a href="http://www.codeproject.com/KB/threads/StackWalker.asp" rel="nofollow">StackWalker</a> which is mentioned in previous stackoverflow answers.</p>
  
  <p>However, <a href="http://www.codeproject.com/KB/threads/StackWalker/StackWalker.zip" rel="nofollow">the StakWalker code</a> is dated 2005. I suspect something changed since then.</p>
  
  <p>When I compile and run it, I get error (below), and output seems to be incomplete, truncated at error. Test shall print more testcases.</p>
  
  <p>Does anybody have an updated or different working callstack-printing published code ?</p>
  
  <pre><code>e:\boris\stackwalker\stackwalker\main.cpp (31): Func5
  e:\boris\stackwalker\stackwalker\main.cpp (32): Func4
  e:\boris\stackwalker\stackwalker\main.cpp (33): Func3
  e:\boris\stackwalker\stackwalker\main.cpp (34): Func2
  e:\boris\stackwalker\stackwalker\main.cpp (35): TestCurrentThread
  e:\boris\stackwalker\stackwalker\main.cpp (139): main
  f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (582): __tmainCRTStartup
  f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (399): mainCRTStartup  
  VVVVV  
  ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 7C817077)  
  ^^^^^  
  7C817077 (kernel32): (filename not available): RegisterWaitForInputIdle
  </code></pre>