   Obtaining the callstack.
  Hi!I'm trying to get access to the callstack of another process from my process.does anyone know of a way to do this in C# ?thanks :)   
  What is the other process written in?   ;  Isn't the stack supposed to be somewhat "protected" thingy that you are not supposed to tamper with. Especially from other processes.If you are desperate enough, you could use a shared memory location or textfile to pass the StackPtr register contents from the second app. Then again, you would have to make sure the stack does not push larger or pop smaller from that situation or the address becomes rather... pointless.And you would have to be able to run your code in priviledged mode to avoid access violation exception from being thrown, should you decide to address the memory location you found out.Appart from that, I have no idea.Anyone else? :P   ;  C++   ;Quote:Original post by rmed002Isn't the stack supposed to be somewhat "protected" thingy that you are not supposed to tamper with. Especially from other processes.If you are desperate enough, you could use a shared memory location or textfile to pass the StackPtr register contents in the second app. Then again, you would have to make sure the stack does not push larger or pop smaller from that situation or the address becomes rather... pointless.And you would have to be able to run your code in priviledged mode to avoid access violation exception from being thrown, should you decide to address the memorylocation you found out.Appart from that, I have no idea.Anyone else? :PI need just a "read-only" access. :)   ;  I don't now if it work from a managed to a native process, but in C++ I use StackWalk64. I hope it helps...Edit:Here is a example in C++: http://www.gamedev.net/reference/programming/features/vcppexceptmodel/page4.asp;  I'll try that. thanks :)   