Post · 2 min read· pp. 2184–2185

Same-TEB Flags

Windows Vista introduced two sets of bit fields to the TEB. Each is overlaid by a USHORT for simultaneous access to the bits. The set that is named CrossTebFlags has been provided for but no bits are yet defined: all are spare. The original bits in the SameTebFlags had names whose Dbg and Rtl prefixes were removed in Windows 7. Since then, the SameTebFlags have changed only by addition:

MaskDefinitionVersionsRemarks
0x0001USHORT DbgSafeThunkCall : 1;6.0 only
USHORT SafeThunkCall : 1;6.1 and higher
0x0002USHORT DbgInDebugPrint : 1;6.0 onlypreviously BOOLEAN as InDbgPrint at 0x0F74 and 0x1744
USHORT InDebugPrint : 1;6.1 and higher
0x0004USHORT DbgHasFiberData : 1;6.0 onlypreviously BOOLEAN as HasFiberData at 0x0F76 and 0x1746
USHORT HasFiberData : 1;6.1 and higher
0x0008USHORT DbgSkipThreadAttach : 1;6.0 only
USHORT SkipThreadAttach : 1;6.1 and higher
0x0010USHORT DbgWerInShipAssertCode : 1;6.0 only
USHORT WerInShipAssertCode : 1;6.1 and higher
0x0020USHORT DbgRanProcessInit : 1;6.0 only
USHORT RanProcessInit : 1;6.1 and higher
0x0040USHORT DbgClonedThread : 1;6.0 only
USHORT ClonedThread : 1;6.1 and higher
0x0080USHORT DbgSuppressDebugMsg : 1;6.0 only
USHORT SuppressDebugMsg : 1;6.1 and higher
0x0100USHORT RtlDisableUserStackWalk : 1;late 6.0 only
USHORT DisableUserStackWalk : 1;6.1 and higher
0x0200USHORT RtlExceptionAttached : 1;late 6.0 and higher
0x0400USHORT InitialThread : 1;6.1 and higher
0x0800USHORT SessionAware : 1;6.2 and higher
0x1000USHORT LoadOwner : 1;10.0 and higher
0x2000USHORT LoaderWorker : 1;10.0 and higher
0x0400USHORT SkipLoaderInit : 1;1703 and higher
USHORT SpareSameTebBits : 8;early 6.0 only
USHORT SpareSameTebBits : 6;late 6.0 and higher
USHORT SpareSameTebBits : 5;6.1 only
USHORT SpareSameTebBits : 4;6.2 to 6.3
USHORT SpareSameTebBits : 2;10.0 to 1607
USHORT SpareSameTebBits : 1;1703 and higher