TEB structure

[This structure may be altered in future versions of Windows. Applications should use the alternate functions listed in this topic.]

The Thread Environment Block (TEB structure) describes the state of a thread.


The definition of this structure may change from one version of Windows to the next. Do not assume a maximum size for this structure. To see the members of this structure, refer to winternal.h.

You should not directly access this structure. To access the values of the TlsSlots and TlsExpansionSlots members, call TlsGetValue. To access the value of the ReservedForOle member, call CoGetContextToken.

In the following versions of Windows, the offset of the 32-bit TEB address within the 64-bit TEB is 0. This can be used to directly access the 32-bit TEB of a WOW64 thread. This might change in later versions of Windows.

Windows VistaWindows Server 2008
Windows 7Windows Server 2008 R2
Windows 8Windows Server 2012
Windows 8.1Windows Server 2012 R2



Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]



See also