Post · 2 min read· pp. 1844–1845

Cross-Thread Flags in the ETHREAD

Windows XP collected several single-byte booleans in the ETHREAD and made bit fields of them. Five went into a set that is overlaid by the CrossThreadFlags member, which is a ULONG for simultaneous access to all the bits described below:

MaskDefinitionVersionsHistory
0x00000001ULONG Terminated : 1;5.1 and higherpreviously as ULONG named HasTerminated
0x00000002ULONG DeadThread : 1;5.1 to 5.2previously as BOOLEAN
ULONG ThreadInserted : 1;6.0 and higher
0x00000004ULONG HideFromDebugger : 1;5.1 and higherpreviously as BOOLEAN
0x00000008ULONG ActiveImpersonationInfo : 1;5.1 and higherpreviously as BOOLEAN
0x00000010 (5.1 to 6.1)ULONG SystemThread : 1;5.1 to 6.1
0x00000020 (5.1 to 6.1); 0x00000010ULONG HardErrorsAreDisabled : 1;5.1 and higherpreviously as BOOLEAN
0x00000040 (5.1 to 6.1); 0x00000020ULONG BreakOnTermination : 1;5.1 and higher
0x00000080 (5.1 to 6.1); 0x00000040ULONG SkipCreationMsg : 1;5.1 and higher
0x00000100 (5.1 to 6.1); 0x00000080ULONG SkipTerminationMsg : 1;5.1 and higher
0x00000200 (5.1 to 6.1); 0x00000100ULONG CopyTokenOnOpen : 1;6.0 and higher
0x00001C00 (5.1 to 6.1); 0x00000E00ULONG ThreadIoPriority : 3;6.0 and higher
0x0000E000 (5.1 to 6.1); 0x00007000ULONG ThreadPagePriority : 3;6.0 and higher
0x00010000 (5.1 to 6.1); 0x00008000ULONG RundownFail : 1;6.0 and higher
0x00020000 (5.1 to 6.1); 0x00010000ULONG NeedsWorkingSetAging : 1;6.1 only
ULONG UmsForceQueueTermination : 1;6.2 and higher
0x00020000ULONG IndirectCpuSets : 1;10.0 and higher
0x00040000ULONG DisableDynamicCodeOptOut : 1;1607 and higher
0x00080000ULONG ExplicitCaseSensitivity;1607 and higher
0x00100000ULONG PicoNotifyExit : 1;1703 and higher
0x00200000ULONG DbgWerUserReportActive : 1;1703 and higher
0x00400000ULONG ForcedSelfTrimActive : 1;1709 and higher
0x00800000ULONG SamplingCoverage : 1;1803 and higher
ULONG ReservedCrossThreadFlags : 15;6.2 to 6.3
ULONG ReservedCrossThreadFlags : 14;10.0 to 1511
ULONG ReservedCrossThreadFlags : 12;1607 only
ULONG ReservedCrossThreadFlags : 10;1703 only
ULONG ReservedCrossThreadFlags : 9;1709 only
ULONG ReservedCrossThreadFlags : 8;1803 and higher