GetCurrentThread (kernel32)
Last changed: -92.42.13.220

.
Summary
Retrieves the boundaries of the stack that was allocated by the system for the current thread.

C# Signature:

[DllImport("kernel32.dll", SetLastError=true)]
static extern void GetCurrentThreadStackLimits(out uint lowLimit, out uint highLimit);

VB Signature:

Declare Function GetCurrentThreadStackLimits Lib "kernel32.dll" (ByRef lowLimit As UInteger, ByRef highLimit As UInteger)

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

uint low;
uint high;
GetCurrentThreadStackLimits(out low, out high);
var size = (high - low) / 1024;

Documentation