I'm trying to create a program to get the thread stack, just like the image, does anyone have any way to get it?
Take a look at the hacker process code that is in github: link
There's the file called thread.c with a very complex content because it interacts with the Windows Kernel in order to do exactly what you want, get the Thread stack. But the code is well commented, so I hope it helps. Remember that you may need to read other project files to better understand how the program works.