Sets the minimum size of the stack associated with the calling thread or fiber that will be available during any stack overflow exceptions. This is useful for handling stack overflow exceptions; the application can safely use the specified number of bytes during exception handling.
If the function succeeds, the return value is True. If the function fails, the return value is False. To get extended error information, call GetLastError.
You can specify the reserved stack space by setting the _ThreadStackGuarantee global variable. The function will do nothing if _ThreadStackGuarantee is zero or less than the current size.
If the function is successful, the application can handle possible EStackOverflow exceptions using structured exception handling. To resume execution after handling a stack overflow, you must perform certain recovery steps. Call the _resetstkoflwtstkoflw function.
To set the stack guarantee for a fiber, you must first call the SwitchToFiber function to execute the fiber. After you set the guarantee for this fiber, it is used by the fiber no matter which thread executes the fiber.