Post · 5 min read· pp. 2479–2482

NTEXAPI_X.H

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

d:\th.public.fre\internal\sdk\inc

and draws from it the type definitions that are tabulated below. The header NTEXAPI_X.H is not known in any Device Driver Kit (DDK) or Windows Driver Kit (WDK).

Line NumberType
251enum _PROCESSOR_CACHE_TYPE
260struct _CACHE_DESCRIPTOR
462enum _ALTERNATIVE_ARCHITECTURE_TYPE
567struct _XSTATE_FEATURE
572struct _XSTATE_CONFIGURATION
698struct _KUSER_SHARED_DATA

Though only six of the types that are defined in NTEXAPI_X.H show in the public symbol files for the kernel, many more show in symbol files for other modules. Some of these others are kernel-mode drivers, especially for processor power management. Some are user-mode DLLs. Among these are some that are very far removed from system programming, e.g., URLMON.DLL from Internet Explorer. Though the symbol files in question are private symbol files, Microsoft has published them freely in downloadable packages of all the public symbol files for all of Windows, starting with Windows 8. If inclusion of these unusually detailed symbol files in these packages was at first an oversight, it has been left to stand for nearly a decade, though not for all modules. For instance, it ceased for URLMON.DLL after the 1709 edition of Windows 10.

Anti-Trust Settlement Forensics

For the record, here are the types that Microsoft’s freely published URLMON.PDB reveals were accessible to the source code for URLMON.DLL from including NTEXAPI_X.H when building for the original release of 32-bit Windows 10:

Line NumberType
43struct _VARIABLE_NAME
49struct _VARIABLE_NAME_AND_VALUE
79enum _SYSTEM_FIRMWARE_TABLE_ACTION
84struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
98struct _SYSTEM_FIRMWARE_TABLE_HANDLER
174enum _TIMER_SET_INFORMATION_CLASS
181struct _TIMER_SET_COALESCABLE_TIMER_INFO
211struct _DRIVER_VERIFIER_THUNK_PAIRS
462enum _ALTERNATIVE_ARCHITECTURE_TYPE
567struct _XSTATE_FEATURE
572struct _XSTATE_CONFIGURATION
698struct _KUSER_SHARED_DATA
1276enum _SYSTEM_NET_RATE_CONTROL_TYPE
1281struct _SYSTEM_NET_RATE_CONTROL_CONTEXT_HEADER
1291struct _SYSTEM_NET_RATE_CONTROL_SET_CONTEXT
1314struct _SYSTEM_NET_RATE_CONTROL_QUOTA_CONTEXT
1346struct _SYSTEM_NET_RATE_CONTROL_CALLBACK_TABLE

Reconstruction

Most, though certainly not all, of the types that the URLMON symbols attribute to the unpublished NTEXAPI_X.H are defined in other headers that Microsoft does publish: several in the WDK but also WINNT.H in the Software Development Kit (SDK). All are in some sense the standard headers for their level of Windows programming.

It may be that content is extracted from NTEXAPI_X.H to these standard headers. It may be that all are extracted from yet some other input. However it’s done, the effect looks to be that successive lines of NTEXAPI_X.H are appended to zero or more of the published headers, and each of the latter then has one contiguous region of lines that are each in NTEXAPI_X.H. Matching line numbers for type definitions as seen in the standard headers and deduced for NTEXAPI_X.H then supports a reasonable attempt at reconstructing much of what NTEXAPI_X.H must have between its type definitions. The table below is a skeleton for reconstructing the NTEXAPI_X.H from the original Windows 10.

Types and line numbers in this table are as close to complete as seems possible. They are collected from all known type information not just in symbol files as noted above but also in the statically linked library CLFSMGMT.LIB from the SDK for Windows 10.

NTEXAPI_X.HTypeNTDDK.HMINIPORT.HWDM.HWINNT.H
43struct _VARIABLE_NAME
49struct _VARIABLE_NAME_AND_VALUE
62enum _FIRMWARE_TYPE11643
79enum _SYSTEM_FIRMWARE_TABLE_ACTION6888
84struct _SYSTEM_FIRMWARE_TABLE_INFORMATION6893
98struct _SYSTEM_FIRMWARE_TABLE_HANDLER6907
174enum _TIMER_SET_INFORMATION_CLASS6932
181struct _TIMER_SET_COALESCABLE_TIMER_INFO6939
211struct _DRIVER_VERIFIER_THUNK_PAIRS6967
240enum _LOGICAL_PROCESSOR_RELATIONSHIP56371915111682
251enum _PROCESSOR_CACHE_TYPE56481916211693
260struct _CACHE_DESCRIPTOR56571917111702
268struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION56651917911710
271anonymous union in struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION56681918211713
272unnamed struct ProcessorCore in anonymous union in struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION56691918311714
275unnamed struct NumaNode in anonymous union in struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION56721918611717
283struct _PROCESSOR_RELATIONSHIP56801919411725
291struct _NUMA_NODE_RELATIONSHIP56881920211733
297struct _CACHE_RELATIONSHIP56941920811739
307struct _PROCESSOR_GROUP_INFO57041921811749
314struct _GROUP_RELATIONSHIP57111922511756
321struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX57181923211763
324anonymous union in struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX57211923511766
334enum _CPU_SET_INFORMATION_TYPE57311924511776
338struct _SYSTEM_CPU_SET_INFORMATION57351924911780
341anonymous union in struct _SYSTEM_CPU_SET_INFORMATION57381925211783
342unnamed struct CpuSet in anonymous union in struct _SYSTEM_CPU_SET_INFORMATION57391925311784
350anonymous union in unnamed struct CpuSet in anonymous union in struct _SYSTEM_CPU_SET_INFORMATION57471926111792
358anonymous struct in anonymous union in unnamed struct CpuSet in anonymous union in struct _SYSTEM_CPU_SET_INFORMATION57551926911800
376struct _SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION11818
462enum _ALTERNATIVE_ARCHITECTURE_TYPE19325
567struct _XSTATE_FEATURE705711968
572struct _XSTATE_CONFIGURATION706211973
698struct _KUSER_SHARED_DATA7186
872anonymous union in struct _KUSER_SHARED_DATA7360
875anonymous struct in anonymous union in struct _KUSER_SHARED_DATA7363
944anonymous union in struct _KUSER_SHARED_DATA7432
946anonymous struct in anonymous union in struct _KUSER_SHARED_DATA7434
988anonymous union in struct _KUSER_SHARED_DATA7476
991anonymous struct in anonymous union in struct _KUSER_SHARED_DATA7479
1125anonymous union in struct _KUSER_SHARED_DATA7613
1127anonymous struct in anonymous union in struct _KUSER_SHARED_DATA7615
1276enum _SYSTEM_NET_RATE_CONTROL_TYPE
1281struct _SYSTEM_NET_RATE_CONTROL_CONTEXT_HEADER
1291struct _SYSTEM_NET_RATE_CONTROL_SET_CONTEXT
1295anonymous union in struct _SYSTEM_NET_RATE_CONTROL_SET_CONTEXT
1297anonymous struct in anonymous union in struct _SYSTEM_NET_RATE_CONTROL_SET_CONTEXT
1314struct _SYSTEM_NET_RATE_CONTROL_QUOTA_CONTEXT
1346struct _SYSTEM_NET_RATE_CONTROL_CALLBACK_TABLE

To be clear: two small structures at the start of NTEXAPI_X.H and the several types at the end are known only from type information, not from any published C-language definition, let alone from documentation.