How can I find current thread\'s maximum stack size?
I am getting a stack overflow exception while executing a function from MMC UI but not from Powershell (command-
Getting this information is a real PITA actually:
ThreadBasicInformation as THREADINFOCLASS to get a THREAD_BASIC_INFORMATION structure. You now have the TebBaseAddress parameter that is the address of the Thread Environment Block.TebBaseAddress address.StackLimit property which is the value you're looking for.From step 3, it's undocumented. That's why I do not recommend retrieving this information.