I enumerate all threads in a process through the CreateToolhelp32Snapshot function. I would like to get some basic stack information for each thread. More specifically I would like to get stack bottom address and if possible I would like to get current stack top address. Basically this is the information displayed with the ~*k command in WinDbg. So how can I obtain the stack information from the thread’s ID or HANDLE?
I enumerate all threads in a process through the CreateToolhelp32Snapshot function. I would like
Share
(Definitions can be found here.)
To get stack boundaries:
To get the value of
esp, simply useGetThreadContext.