Print n levels of callstack?

前端 未结 4 1955
谎友^
谎友^ 2020-12-29 11:18

Using C++ with Visual Studio, I was wondering if there\'s an API that will print the callstack for me. Preferably, I\'d like to print a callstack 5 levels deep. Does windo

4条回答
  •  佛祖请我去吃肉
    2020-12-29 12:16

    It looks like Microsoft's DbgHelp library can do what you want. Consult the StackWalk64 function's documentation on MSDN for more information. Also, this CodeProject article may be useful.

提交回复
热议问题