Forgive me If this is a dumb question. Can one programmatically "observe" the contents of stack and heap while an application (say a console app) is running? Are there any APIs which would do this?
Well, you could try using the CLR Debugger API - although I'm not sure whether you can use that within the same process. However, I think it's likely that there's a better solution... what are you actually trying to do? What's the bigger picture here?