Post · 6 min read· pp. 2434–2440

KE.H

The public symbol file NTKRPAMP.PDB for the original release of Windows 10 tells that the kernel is built with the KE.H header at

d:\th\minkernel\ntos\inc

and draws from it the following type definitions:

Line NumberType
214enum _KOBJECTS
311struct _KTHREAD_COUNTERS
283enum _KPROCESS_STATE
298enum _KTHREAD_STATE
641struct _KSCB
692struct _KSCHEDULING_GROUP_POLICY
713struct _KSCHEDULING_GROUP
751struct _KHETERO_PROCESSOR_SET
764struct _KNODE
814struct _flags
852union _KEXECUTE_OPTIONS
871union _KSTACK_COUNT
884struct _KPROCESS
1134enum _KWAIT_BLOCK_STATE
1145enum _KWAIT_STATE
1160union _KWAIT_STATUS_REGISTER
1270struct _KLOCK_ENTRY_LOCK_STATE
1295struct _KLOCK_ENTRY
1630struct _KTHREAD
3432enum _KERNEL_STACK_LIMITS

The _flags structure is the type of the _KNODE member named Flags. That _KNODE is defined first implies that _flags is defined within _KNODE. That _flags is not scoped to _KNODE is indirect evidence of compilation as C, not C++, in versions (such as 6.1) for which the public symbol files do not give the direct evidence of recording compilation with the -TC option. Either way, of course, the evidence is only of whatever source file was compiled to produce the public symbol files. The source files that contribute to the kernel’s code can have been compiled differently: study without source code does have limits to its definiteness.

The header KE.H is not known in any Device Driver Kit (DDK) or Windows Driver Kit (WDK).

Reconstruction

More types are known from CLFSMGMT.LIB. Indeed, there is good expectation that the type information in this library is a complete reckoning of types defined in KE.H. This is because type information is in the library from the latter’s archiving of an object file that’s a by-product of creating a pre-compiled header. What’s recorded then is not the types that are used but the types that might be used. Moreover, the record of nested types is more detailed due to compilation as C++.

Line NumberType
115struct _KTHREAD_SWITCH_COUNTERS
214enum _KOBJECTS
270enum _KAPC_ENVIRONMENT
298enum _KTHREAD_STATE
283enum _KPROCESS_STATE
298enum _KTHREAD_STATE
311struct _KTHREAD_COUNTERS
325enum _KDUE_TIME_TYPE
337enum _KEXPECTED_WAKE_REASON
435struct _KSERVICE_TABLE_DESCRIPTOR
493enum KCONTINUE_STATUS
641struct _KSCB
653anonymous struct in struct _KSCB
687enum _KSCHEDULING_GROUP_TYPE
692struct _KSCHEDULING_GROUP_POLICY
693anonymous union in struct _KSCHEDULING_GROUP_POLICY
696anonymous struct in anonymous union in struct _KSCHEDULING_GROUP_POLICY
702anonymous union in struct _KSCHEDULING_GROUP_POLICY
704anonymous struct in anonymous union in struct _KSCHEDULING_GROUP_POLICY
713struct _KSCHEDULING_GROUP
727anonymous union in struct _KSCHEDULING_GROUP
751struct _KHETERO_PROCESSOR_SET
764struct _KNODE
770anonymous struct in struct _KNODE
796anonymous union in anonymous struct in struct _KNODE
798anonymous struct in anonymous union in anonymous struct in struct _KNODE
800anonymous struct in struct _KNODE
814struct _flags in anonymous tag in struct _KNODE
852union _KEXECUTE_OPTIONS
853anonymous struct in union _KEXECUTE_OPTIONS
871union _KSTACK_COUNT
873anonymous struct in union _KSTACK_COUNT
884struct _KPROCESS
961anonymous union in struct _KPROCESS
962anonymous struct in anonymous union in struct _KPROCESS
1128enum _ADJUST_REASON
1134enum _KWAIT_BLOCK_STATE
1145enum _KWAIT_STATE
1160union _KWAIT_STATUS_REGISTER
1162anonymous struct in union _KWAIT_STATUS_REGISTER
1270struct _KLOCK_ENTRY_LOCK_STATE
1271anonymous union in struct _KLOCK_ENTRY_LOCK_STATE
1272anonymous struct in anonymous union in struct _KLOCK_ENTRY_LOCK_STATE
1281anonymous union in struct _KLOCK_ENTRY_LOCK_STATE
1295struct _KLOCK_ENTRY
1297anonymous union in struct _KLOCK_ENTRY
1387anonymous union in struct _KLOCK_ENTRY
1389anonymous struct in anonymous union in struct _KLOCK_ENTRY
1391anonymous union in anonymous struct in anonymous union in struct _KLOCK_ENTRY
1393anonymous struct in anonymous union in anonymous struct in anonymous union in struct _KLOCK_ENTRY
1398anonymous union in anonymous struct in anonymous union in struct _KLOCK_ENTRY
1400anonymous struct in anonymous union in anonymous struct in anonymous union in struct _KLOCK_ENTRY
1404anonymous union in anonymous struct in anonymous union in struct _KLOCK_ENTRY
1406anonymous struct in anonymous union in anonymous struct in anonymous union in struct _KLOCK_ENTRY
1413anonymous struct in anonymous union in struct _KLOCK_ENTRY
1495anonymous union in struct _KLOCK_ENTRY
1498anonymous struct in anonymous union in struct _KLOCK_ENTRY
1499anonymous union in anonymous struct in anonymous union in struct _KLOCK_ENTRY
1501anonymous struct in anonymous union in anonymous struct in anonymous union in struct _KLOCK_ENTRY
1508anonymous union in anonymous struct in anonymous union in struct _KLOCK_ENTRY
1522anonymous union in struct _KLOCK_ENTRY
1557anonymous struct in anonymous union in struct _KLOCK_ENTRY
1569anonymous struct in anonymous union in struct _KLOCK_ENTRY
1589anonymous union in struct _KLOCK_ENTRY
1591anonymous struct in anonymous union in struct _KLOCK_ENTRY
1630struct _KTHREAD
1712anonymous union in struct _KTHREAD
1713anonymous struct in anonymous union in struct _KTHREAD
1772anonymous union in struct _KTHREAD
1772anonymous struct in anonymous union in struct _KTHREAD
1805anonymous struct in struct _KTHREAD
1828anonymous union in struct _KTHREAD
1830anonymous struct in anonymous union in struct _KTHREAD
1859anonymous union in struct _KTHREAD
1868anonymous union in struct _KTHREAD
1905anonymous struct in anonymous union in struct _KTHREAD
1910anonymous struct in anonymous union in struct _KTHREAD
1915anonymous struct in anonymous union in struct _KTHREAD
1920anonymous struct in anonymous union in struct _KTHREAD
1932anonymous union in anonymous struct in anonymous union in struct _KTHREAD
1933anonymous struct in anonymous union in anonymous struct in anonymous union in struct _KTHREAD
1970anonymous union in struct _KTHREAD
1972anonymous struct in anonymous union in struct _KTHREAD
1980anonymous union in struct _KTHREAD
1982anonymous struct in anonymous union in struct _KTHREAD
1986anonymous union in anonymous struct in anonymous union in struct _KTHREAD
1988anonymous struct in anonymous union in anonymous struct in anonymous union in struct _KTHREAD
2001anonymous union in struct _KTHREAD
2003anonymous struct in anonymous union in struct _KTHREAD
2025anonymous union in struct _KTHREAD
2027anonymous struct in anonymous union in struct _KTHREAD
2036anonymous union in struct _KTHREAD
2038anonymous struct in anonymous union in struct _KTHREAD
2043anonymous struct in anonymous union in struct _KTHREAD
2048anonymous struct in anonymous union in struct _KTHREAD
2053anonymous struct in anonymous union in struct _KTHREAD
2058anonymous struct in anonymous union in struct _KTHREAD
2063anonymous struct in anonymous union in struct _KTHREAD
2203anonymous union in struct _KTHREAD
2205anonymous struct in anonymous union in struct _KTHREAD
2362struct _KPROFILE
2367anonymous union in struct _KPROFILE
2368anonymous struct in anonymous union in struct _KPROFILE
2375anonymous struct in anonymous union in struct _KPROFILE
3432enum _KERNEL_STACK_LIMITS
3711struct _KTHREAD_VALUES
4190struct _CLOCK_INTERVAL_REQUEST
4869enum _KTBFLUSH_TYPE
4876enum _KTBFLUSH_TARGET
5563struct _KE_PRIVILEGED_PAGE_IDENTITY
5576anonymous struct in struct _KE_PRIVILEGED_PAGE_IDENTITY
6696struct _KSHA256_PARALLEL
6699anonymous union in struct _KSHA256_PARALLEL
6731struct _KWAIT_CHAIN_ENTRY