https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c22817db06a46bcd2012f…
commit c22817db06a46bcd2012faeed35a14a236b27bd2
Author: Timo Kreuzer <timo(a)reactos.org>
AuthorDate: Wed Aug 16 08:41:41 2017 +0200
[NDK] Improve NDK tests for KTHREAD and add them to build
---
CMakeLists.txt | 1 +
sdk/include/ndk/tests/CMakeLists.txt | 2 +
sdk/include/ndk/tests/win10_x64.c | 137 +++++++++++++++++----------------
sdk/include/ndk/tests/win10_x86.c | 128 ++++++++++++++++---------------
sdk/include/ndk/tests/win2003_x64.c | 57 +++++++-------
sdk/include/ndk/tests/win2003_x86.c | 32 ++++----
sdk/include/ndk/tests/win7_x64.c | 43 ++++++-----
sdk/include/ndk/tests/win7_x86.c | 36 ++++-----
sdk/include/ndk/tests/win81_x64.c | 144 ++++++++++++++++++++---------------
sdk/include/ndk/tests/win81_x86.c | 129 +++++++++++++++++--------------
sdk/include/ndk/tests/win8_x64.c | 78 ++++++++++---------
sdk/include/ndk/tests/win8_x86.c | 18 +++--
sdk/include/ndk/tests/winvista_x64.c | 56 +++++++-------
sdk/include/ndk/tests/winvista_x86.c | 62 +++++++--------
14 files changed, 489 insertions(+), 434 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7e0d9bd2f..f4c38c85f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -250,6 +250,7 @@ else()
add_dependency_header()
+ add_subdirectory(sdk/include/ndk/tests)
add_subdirectory(sdk/include/xdk)
add_subdirectory(sdk/include/psdk)
add_subdirectory(sdk/include/dxsdk)
diff --git a/sdk/include/ndk/tests/CMakeLists.txt b/sdk/include/ndk/tests/CMakeLists.txt
index df01c65517..a72c95f037 100644
--- a/sdk/include/ndk/tests/CMakeLists.txt
+++ b/sdk/include/ndk/tests/CMakeLists.txt
@@ -16,3 +16,5 @@ add_library(ndk_tests
win81_x86.c
win10_x86.c)
endif()
+
+add_dependencies(ndk_tests xdk psdk bugcodes)
diff --git a/sdk/include/ndk/tests/win10_x64.c b/sdk/include/ndk/tests/win10_x64.c
index 5d326642ef..1ccde8ce99 100644
--- a/sdk/include/ndk/tests/win10_x64.c
+++ b/sdk/include/ndk/tests/win10_x64.c
@@ -7,113 +7,116 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, SListFaultAddress)
-C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget)
C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, StackBase)
-C_ASSERT_FIELD(KTHREAD, 0x040, UINT64, ThreadLock)
-C_ASSERT_FIELD(KTHREAD, 0x048, UINT64, CycleTime)
-C_ASSERT_FIELD(KTHREAD, 0x050, ULONG32, CurrentRunTime)
-C_ASSERT_FIELD(KTHREAD, 0x054, ULONG32, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, ULONG64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x050, ULONG, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x054, ULONG, ExpectedRunTime)
C_ASSERT_FIELD(KTHREAD, 0x058, PVOID, KernelStack)
-C_ASSERT_FIELD(KTHREAD, 0x060, XSAVE_FORMAT*, StateSaveArea)
-C_ASSERT_FIELD(KTHREAD, 0x068, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x060, PXSAVE_FORMAT, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x068, struct _KSCHEDULING_GROUP*, SchedulingGroup)
C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_STATUS_REGISTER, WaitRegister)
-C_ASSERT_FIELD(KTHREAD, 0x071, UINT8, Running)
+C_ASSERT_FIELD(KTHREAD, 0x071, UCHAR, Running)
C_ASSERT_FIELD(KTHREAD, 0x072, UINT8[2], Alerted)
-C_ASSERT_FIELD(KTHREAD, 0x074, LONG32, MiscFlags)
-C_ASSERT_FIELD(KTHREAD, 0x078, LONG32, ThreadFlags)
-C_ASSERT_FIELD(KTHREAD, 0x07C, UINT8, Tag)
-C_ASSERT_FIELD(KTHREAD, 0x07D, UINT8, SystemHeteroCpuPolicy)
-C_ASSERT_FIELD(KTHREAD, 0x080, ULONG32, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x074, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x078, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x07C, UCHAR, Tag)
+C_ASSERT_FIELD(KTHREAD, 0x07D, UCHAR, SystemHeteroCpuPolicy)
+C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x084, ULONG, Spare1)
C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, FirstArgument)
-C_ASSERT_FIELD(KTHREAD, 0x090, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x090, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x098, KAPC_STATE, ApcState)
C_ASSERT_FIELD(KTHREAD, 0x0C3, CHAR, Priority)
-C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG32, UserIdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x0C8, INT64, WaitStatus)
-C_ASSERT_FIELD(KTHREAD, 0x0D0, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x0C8, LONG64, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x0D0, PKWAIT_BLOCK, WaitBlockList)
C_ASSERT_FIELD(KTHREAD, 0x0D8, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x0D8, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x0E8, DISPATCHER_HEADER*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0E8, PDISPATCHER_HEADER, Queue)
C_ASSERT_FIELD(KTHREAD, 0x0F0, PVOID, Teb)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, ULONG64, RelativeTimerBias)
C_ASSERT_FIELD(KTHREAD, 0x100, KTIMER, Timer)
C_ASSERT_FIELD(KTHREAD, 0x140, KWAIT_BLOCK[4], WaitBlock)
-C_ASSERT_FIELD(KTHREAD, 0x154, ULONG32, ContextSwitches)
-C_ASSERT_FIELD(KTHREAD, 0x184, UINT8, State)
+C_ASSERT_FIELD(KTHREAD, 0x154, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x184, UCHAR, State)
C_ASSERT_FIELD(KTHREAD, 0x185, CHAR, Spare13)
-C_ASSERT_FIELD(KTHREAD, 0x186, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x186, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x187, CHAR, WaitMode)
-C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG32, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x1E4, INT16, KernelApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x1E6, INT16, SpecialApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG32, CombinedApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x168, KTHREAD_COUNTERS*, ThreadCounters)
-C_ASSERT_FIELD(KTHREAD, 0x198, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, SHORT, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x168, PKTHREAD_COUNTERS, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x198, PXSTATE_SAVE, XStateSave)
C_ASSERT_FIELD(KTHREAD, 0x1C8, PVOID, Win32Thread)
-C_ASSERT_FIELD(KTHREAD, 0x1F0, UMS_CONTROL_BLOCK*, Ucb)
-C_ASSERT_FIELD(KTHREAD, 0x1F8, KUMS_CONTEXT_HEADER*, Uch)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, struct _UMS_CONTROL_BLOCK*, Ucb)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, struct _KUMS_CONTEXT_HEADER*, Uch)
C_ASSERT_FIELD(KTHREAD, 0x200, PVOID, TebMappedLowVa)
C_ASSERT_FIELD(KTHREAD, 0x208, LIST_ENTRY, QueueListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x218, ULONG32, NextProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x21C, LONG32, QueuePriority)
-C_ASSERT_FIELD(KTHREAD, 0x220, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x218, ULONG, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x21C, LONG, QueuePriority)
+C_ASSERT_FIELD(KTHREAD, 0x220, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x228, GROUP_AFFINITY, UserAffinity)
C_ASSERT_FIELD(KTHREAD, 0x232, CHAR, PreviousMode)
C_ASSERT_FIELD(KTHREAD, 0x233, CHAR, BasePriority)
C_ASSERT_FIELD(KTHREAD, 0x234, CHAR, PriorityDecrement)
-C_ASSERT_FIELD(KTHREAD, 0x235, UINT8, Preempted)
-C_ASSERT_FIELD(KTHREAD, 0x236, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x235, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x236, UCHAR, AdjustReason)
C_ASSERT_FIELD(KTHREAD, 0x237, CHAR, AdjustIncrement)
-C_ASSERT_FIELD(KTHREAD, 0x238, UINT64, AffinityVersion)
+C_ASSERT_FIELD(KTHREAD, 0x238, ULONG64, AffinityVersion)
C_ASSERT_FIELD(KTHREAD, 0x240, GROUP_AFFINITY, Affinity)
-C_ASSERT_FIELD(KTHREAD, 0x24A, UINT8, ApcStateIndex)
-C_ASSERT_FIELD(KTHREAD, 0x24B, UINT8, WaitBlockCount)
-C_ASSERT_FIELD(KTHREAD, 0x24C, ULONG32, IdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x250, UINT64, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x24A, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x24B, UCHAR, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x24C, ULONG, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x250, ULONG64, NpxState)
C_ASSERT_FIELD(KTHREAD, 0x258, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x283, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x283, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x284, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x285, CHAR, Saturation)
-C_ASSERT_FIELD(KTHREAD, 0x286, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x286, USHORT, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x288, KAPC, SchedulerApc)
-C_ASSERT_FIELD(KTHREAD, 0x289, UINT8, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x28B, UINT8, QuantumReset)
-C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG32, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x2C8, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x289, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x28B, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x2C8, PKPRCB, WaitPrcb)
C_ASSERT_FIELD(KTHREAD, 0x2D0, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x2DB, UINT8, CallbackNestingLevel)
-C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x2DB, UCHAR, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x2E0, KEVENT, SuspendEvent)
C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead)
-C_ASSERT_FIELD(KTHREAD, 0x318, UINT8, AbEntrySummary)
-C_ASSERT_FIELD(KTHREAD, 0x319, UINT8, AbWaitEntryCount)
-C_ASSERT_FIELD(KTHREAD, 0x31A, UINT16, Spare20)
-C_ASSERT_FIELD(KTHREAD, 0x31C, ULONG32, SecureThreadCookie)
+C_ASSERT_FIELD(KTHREAD, 0x318, UCHAR, AbEntrySummary)
+C_ASSERT_FIELD(KTHREAD, 0x319, UCHAR, AbWaitEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x31A, USHORT, Spare20)
+C_ASSERT_FIELD(KTHREAD, 0x31C, ULONG, SecureThreadCookie)
C_ASSERT_FIELD(KTHREAD, 0x320, KLOCK_ENTRY[6], LockEntries)
C_ASSERT_FIELD(KTHREAD, 0x560, SINGLE_LIST_ENTRY, PropagateBoostsEntry)
C_ASSERT_FIELD(KTHREAD, 0x568, SINGLE_LIST_ENTRY, IoSelfBoostsEntry)
C_ASSERT_FIELD(KTHREAD, 0x570, UINT8[16], PriorityFloorCounts)
-C_ASSERT_FIELD(KTHREAD, 0x580, ULONG32, PriorityFloorSummary)
-C_ASSERT_FIELD(KTHREAD, 0x584, LONG32, AbCompletedIoBoostCount)
-C_ASSERT_FIELD(KTHREAD, 0x588, INT16, KeReferenceCount)
-C_ASSERT_FIELD(KTHREAD, 0x58A, UINT8, AbOrphanedEntrySummary)
-C_ASSERT_FIELD(KTHREAD, 0x58B, UINT8, AbOwnedEntryCount)
-C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG32, ForegroundLossTime)
+C_ASSERT_FIELD(KTHREAD, 0x580, ULONG, PriorityFloorSummary)
+C_ASSERT_FIELD(KTHREAD, 0x584, LONG, AbCompletedIoBoostCount)
+C_ASSERT_FIELD(KTHREAD, 0x588, SHORT, KeReferenceCount)
+C_ASSERT_FIELD(KTHREAD, 0x58A, UCHAR, AbOrphanedEntrySummary)
+C_ASSERT_FIELD(KTHREAD, 0x58B, UCHAR, AbOwnedEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG, ForegroundLossTime)
C_ASSERT_FIELD(KTHREAD, 0x590, LIST_ENTRY, GlobalForegroundListEntry)
C_ASSERT_FIELD(KTHREAD, 0x590, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x598, UINT64, InGlobalForegroundList)
-C_ASSERT_FIELD(KTHREAD, 0x5A0, INT64, ReadOperationCount)
-C_ASSERT_FIELD(KTHREAD, 0x5A8, INT64, WriteOperationCount)
-C_ASSERT_FIELD(KTHREAD, 0x5B0, INT64, OtherOperationCount)
-C_ASSERT_FIELD(KTHREAD, 0x5B8, INT64, ReadTransferCount)
-C_ASSERT_FIELD(KTHREAD, 0x5C0, INT64, WriteTransferCount)
-C_ASSERT_FIELD(KTHREAD, 0x5C8, INT64, OtherTransferCount)
-C_ASSERT_FIELD(KTHREAD, 0x5D0, KSCB*, QueuedScb)
+C_ASSERT_FIELD(KTHREAD, 0x598, ULONG64, InGlobalForegroundList)
+C_ASSERT_FIELD(KTHREAD, 0x5A0, LONG64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5A8, LONG64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5B0, LONG64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5B8, LONG64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5C0, LONG64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5C8, LONG64, OtherTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5D0, struct _KSCB*, QueuedScb)
diff --git a/sdk/include/ndk/tests/win10_x86.c b/sdk/include/ndk/tests/win10_x86.c
index 7a5276d7b7..9693ecfddf 100644
--- a/sdk/include/ndk/tests/win10_x86.c
+++ b/sdk/include/ndk/tests/win10_x86.c
@@ -7,105 +7,107 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
C_ASSERT_FIELD(KTHREAD, 0x010, PVOID, SListFaultAddress)
-C_ASSERT_FIELD(KTHREAD, 0x018, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x018, ULONG64, QuantumTarget)
C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, InitialStack)
C_ASSERT_FIELD(KTHREAD, 0x024, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, StackBase)
-C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG32, ThreadLock)
-C_ASSERT_FIELD(KTHREAD, 0x030, UINT64, CycleTime)
-C_ASSERT_FIELD(KTHREAD, 0x038, ULONG32, HighCycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x030, ULONG64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x038, ULONG, HighCycleTime)
C_ASSERT_FIELD(KTHREAD, 0x03C, PVOID, ServiceTable)
-C_ASSERT_FIELD(KTHREAD, 0x040, ULONG32, CurrentRunTime)
-C_ASSERT_FIELD(KTHREAD, 0x044, ULONG32, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x044, ULONG, ExpectedRunTime)
C_ASSERT_FIELD(KTHREAD, 0x048, PVOID, KernelStack)
-C_ASSERT_FIELD(KTHREAD, 0x04C, XSAVE_FORMAT*, StateSaveArea)
-C_ASSERT_FIELD(KTHREAD, 0x050, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x04C, PXSAVE_FORMAT, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x050, struct _KSCHEDULING_GROUP*, SchedulingGroup)
C_ASSERT_FIELD(KTHREAD, 0x054, KWAIT_STATUS_REGISTER, WaitRegister)
-C_ASSERT_FIELD(KTHREAD, 0x055, UINT8, Running)
-C_ASSERT_FIELD(KTHREAD, 0x056, UINT8[2], Alerted)
-C_ASSERT_FIELD(KTHREAD, 0x058, LONG32, MiscFlags)
-C_ASSERT_FIELD(KTHREAD, 0x05C, LONG32, ThreadFlags)
-C_ASSERT_FIELD(KTHREAD, 0x060, UINT8, Tag)
-C_ASSERT_FIELD(KTHREAD, 0x061, UINT8, SystemHeteroCpuPolicy)
-C_ASSERT_FIELD(KTHREAD, 0x063, UINT8, Spare0)
-C_ASSERT_FIELD(KTHREAD, 0x064, ULONG32, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x055, UCHAR, Running)
+C_ASSERT_FIELD(KTHREAD, 0x056, UCHAR[2], Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x058, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x05C, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x060, UCHAR, Tag)
+C_ASSERT_FIELD(KTHREAD, 0x061, UCHAR, SystemHeteroCpuPolicy)
+C_ASSERT_FIELD(KTHREAD, 0x063, UCHAR, Spare0)
+C_ASSERT_FIELD(KTHREAD, 0x064, ULONG, SystemCallNumber)
C_ASSERT_FIELD(KTHREAD, 0x068, PVOID, FirstArgument)
-C_ASSERT_FIELD(KTHREAD, 0x06C, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x06C, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x070, KAPC_STATE, ApcState)
-C_ASSERT_FIELD(KTHREAD, 0x088, ULONG32, UserIdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG32, ContextSwitches)
-C_ASSERT_FIELD(KTHREAD, 0x090, UINT8, State)
-C_ASSERT_FIELD(KTHREAD, 0x091, CHAR, Spare12)
-C_ASSERT_FIELD(KTHREAD, 0x092, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x088, ULONG, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x090, UCHAR, State)
+//C_ASSERT_FIELD(KTHREAD, 0x091, CHAR, Spare12)
+C_ASSERT_FIELD(KTHREAD, 0x092, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, WaitMode)
-C_ASSERT_FIELD(KTHREAD, 0x094, LONG32, WaitStatus)
-C_ASSERT_FIELD(KTHREAD, 0x098, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x094, LONG, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x098, PKWAIT_BLOCK, WaitBlockList)
C_ASSERT_FIELD(KTHREAD, 0x09C, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x09C, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x0A4, DISPATCHER_HEADER*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0A4, PDISPATCHER_HEADER, Queue)
C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb)
-C_ASSERT_FIELD(KTHREAD, 0x0B0, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, ULONG64, RelativeTimerBias)
C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
C_ASSERT_FIELD(KTHREAD, 0x0E0, KWAIT_BLOCK[4], WaitBlock)
-C_ASSERT_FIELD(KTHREAD, 0x0F4, KTHREAD_COUNTERS*, ThreadCounters)
-C_ASSERT_FIELD(KTHREAD, 0x10C, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x0F4, PKTHREAD_COUNTERS, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x10C, PXSTATE_SAVE, XStateSave)
C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, Win32Thread)
-C_ASSERT_FIELD(KTHREAD, 0x138, ULONG32, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x13C, INT16, KernelApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x13E, INT16, SpecialApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG32, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x138, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x13C, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13E, SHORT, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, CombinedApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x140, LIST_ENTRY, QueueListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x148, ULONG32, NextProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x14C, LONG32, QueuePriority)
-C_ASSERT_FIELD(KTHREAD, 0x150, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x148, ULONG, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x14C, LONG, QueuePriority)
+C_ASSERT_FIELD(KTHREAD, 0x150, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, UserAffinity)
C_ASSERT_FIELD(KTHREAD, 0x15A, CHAR, PreviousMode)
C_ASSERT_FIELD(KTHREAD, 0x15B, CHAR, BasePriority)
C_ASSERT_FIELD(KTHREAD, 0x15C, CHAR, PriorityDecrement)
-C_ASSERT_FIELD(KTHREAD, 0x15D, UINT8, Preempted)
-C_ASSERT_FIELD(KTHREAD, 0x15E, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x15D, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x15E, UCHAR, AdjustReason)
C_ASSERT_FIELD(KTHREAD, 0x15F, CHAR, AdjustIncrement)
-C_ASSERT_FIELD(KTHREAD, 0x160, ULONG32, AffinityVersion)
+C_ASSERT_FIELD(KTHREAD, 0x160, ULONG, AffinityVersion)
C_ASSERT_FIELD(KTHREAD, 0x164, GROUP_AFFINITY, Affinity)
-C_ASSERT_FIELD(KTHREAD, 0x16A, UINT8, ApcStateIndex)
-C_ASSERT_FIELD(KTHREAD, 0x16B, UINT8, WaitBlockCount)
-C_ASSERT_FIELD(KTHREAD, 0x16C, ULONG32, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x16A, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x16B, UCHAR, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x16C, ULONG, IdealProcessor)
C_ASSERT_FIELD(KTHREAD, 0x174, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x18B, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x18B, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x18C, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x18D, CHAR, Saturation)
-C_ASSERT_FIELD(KTHREAD, 0x18E, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x18E, USHORT, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x190, KAPC, SchedulerApc)
-C_ASSERT_FIELD(KTHREAD, 0x191, UINT8, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x193, UINT8, QuantumReset)
-C_ASSERT_FIELD(KTHREAD, 0x194, ULONG32, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x1B4, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x191, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x193, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, PKPRCB, WaitPrcb)
C_ASSERT_FIELD(KTHREAD, 0x1B8, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x1BF, UINT8, CallbackNestingLevel)
-C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x1BF, UCHAR, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x1C4, KEVENT, SuspendEvent)
C_ASSERT_FIELD(KTHREAD, 0x1D4, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x1DC, LIST_ENTRY, MutantListHead)
-C_ASSERT_FIELD(KTHREAD, 0x1E4, UINT8, AbEntrySummary)
-C_ASSERT_FIELD(KTHREAD, 0x1E5, UINT8, AbWaitEntryCount)
-C_ASSERT_FIELD(KTHREAD, 0x1E6, UINT16, Spare20)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, UCHAR, AbEntrySummary)
+C_ASSERT_FIELD(KTHREAD, 0x1E5, UCHAR, AbWaitEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, USHORT, Spare20)
C_ASSERT_FIELD(KTHREAD, 0x1E8, KLOCK_ENTRY[6], LockEntries)
C_ASSERT_FIELD(KTHREAD, 0x308, SINGLE_LIST_ENTRY, PropagateBoostsEntry)
C_ASSERT_FIELD(KTHREAD, 0x30C, SINGLE_LIST_ENTRY, IoSelfBoostsEntry)
-C_ASSERT_FIELD(KTHREAD, 0x310, UINT8[16], PriorityFloorCounts)
-C_ASSERT_FIELD(KTHREAD, 0x320, ULONG32, PriorityFloorSummary)
-C_ASSERT_FIELD(KTHREAD, 0x324, LONG32, AbCompletedIoBoostCount)
-C_ASSERT_FIELD(KTHREAD, 0x328, INT16, KeReferenceCount)
-C_ASSERT_FIELD(KTHREAD, 0x32A, UINT8, AbOrphanedEntrySummary)
-C_ASSERT_FIELD(KTHREAD, 0x32B, UINT8, AbOwnedEntryCount)
-C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG32, ForegroundLossTime)
+C_ASSERT_FIELD(KTHREAD, 0x310, UCHAR[16], PriorityFloorCounts)
+C_ASSERT_FIELD(KTHREAD, 0x320, ULONG, PriorityFloorSummary)
+C_ASSERT_FIELD(KTHREAD, 0x324, LONG, AbCompletedIoBoostCount)
+C_ASSERT_FIELD(KTHREAD, 0x328, SHORT, KeReferenceCount)
+C_ASSERT_FIELD(KTHREAD, 0x32A, UCHAR, AbOrphanedEntrySummary)
+C_ASSERT_FIELD(KTHREAD, 0x32B, UCHAR, AbOwnedEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG, ForegroundLossTime)
C_ASSERT_FIELD(KTHREAD, 0x330, LIST_ENTRY, GlobalForegroundListEntry)
C_ASSERT_FIELD(KTHREAD, 0x330, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x334, ULONG32, InGlobalForegroundList)
-C_ASSERT_FIELD(KTHREAD, 0x338, KSCB*, QueuedScb)
-C_ASSERT_FIELD(KTHREAD, 0x340, UINT64, NpxState)
+C_ASSERT_FIELD(KTHREAD, 0x334, ULONG, InGlobalForegroundList)
+C_ASSERT_FIELD(KTHREAD, 0x338, struct _KSCB*, QueuedScb)
+C_ASSERT_FIELD(KTHREAD, 0x340, ULONG64, NpxState)
diff --git a/sdk/include/ndk/tests/win2003_x64.c b/sdk/include/ndk/tests/win2003_x64.c
index dbd2d1d07d..be1f6a5f1c 100644
--- a/sdk/include/ndk/tests/win2003_x64.c
+++ b/sdk/include/ndk/tests/win2003_x64.c
@@ -7,7 +7,9 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
@@ -17,7 +19,7 @@ C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, KernelStack)
C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock)
C_ASSERT_FIELD(KTHREAD, 0x048, KAPC_STATE, ApcState)
-C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR[43], ApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x073, UCHAR, ApcQueueable)
C_ASSERT_FIELD(KTHREAD, 0x074, UCHAR, NextProcessor)
C_ASSERT_FIELD(KTHREAD, 0x075, UCHAR, DeferredProcessor)
@@ -25,46 +27,46 @@ C_ASSERT_FIELD(KTHREAD, 0x076, UCHAR, AdjustReason)
C_ASSERT_FIELD(KTHREAD, 0x077, CHAR, AdjustIncrement)
C_ASSERT_FIELD(KTHREAD, 0x078, ULONG64, ApcQueueLock)
C_ASSERT_FIELD(KTHREAD, 0x080, LONG64, WaitStatus)
-C_ASSERT_FIELD(KTHREAD, 0x088, KWAIT_BLOCK*, WaitBlockList)
-C_ASSERT_FIELD(KTHREAD, 0x088, KGATE*, GateObject)
+C_ASSERT_FIELD(KTHREAD, 0x088, PKWAIT_BLOCK, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x088, PKGATE, GateObject)
C_ASSERT_FIELD(KTHREAD, 0x090, UCHAR, Alertable)
C_ASSERT_FIELD(KTHREAD, 0x091, UCHAR, WaitNext)
C_ASSERT_FIELD(KTHREAD, 0x092, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, Priority)
C_ASSERT_FIELD(KTHREAD, 0x094, UCHAR, EnableStackSwap)
C_ASSERT_FIELD(KTHREAD, 0x095, UCHAR, SwapBusy)
-C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR[2], Alerted)
C_ASSERT_FIELD(KTHREAD, 0x098, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x098, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x0A8, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, PKQUEUE, Queue)
C_ASSERT_FIELD(KTHREAD, 0x0B0, PVOID, Teb)
C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
-C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, TimerFill)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[60], TimerFill)
C_ASSERT_FIELD(KTHREAD, 0x0F4, LONG, ThreadFlags)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK, WaitBlock)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill0)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[43], WaitBlockFill0)
C_ASSERT_FIELD(KTHREAD, 0x123, UCHAR, SystemAffinityActive)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill1)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[91], WaitBlockFill1)
C_ASSERT_FIELD(KTHREAD, 0x153, CHAR, PreviousMode)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill2)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[139], WaitBlockFill2)
C_ASSERT_FIELD(KTHREAD, 0x183, UCHAR, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill3)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[187], WaitBlockFill3)
C_ASSERT_FIELD(KTHREAD, 0x1B3, UCHAR, LargeStack)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill4)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[44], WaitBlockFill4)
C_ASSERT_FIELD(KTHREAD, 0x124, ULONG, ContextSwitches)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill5)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[92], WaitBlockFill5)
C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR, State)
C_ASSERT_FIELD(KTHREAD, 0x155, UCHAR, NpxState)
C_ASSERT_FIELD(KTHREAD, 0x156, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x157, CHAR, WaitMode)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill6)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[140], WaitBlockFill6)
C_ASSERT_FIELD(KTHREAD, 0x184, ULONG, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill7)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[188], WaitBlockFill7)
C_ASSERT_FIELD(KTHREAD, 0x1B4, SHORT, KernelApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1B6, SHORT, SpecialApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, CombinedApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1B8, LIST_ENTRY, QueueListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x1C8, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x1D0, PVOID, CallbackStack)
C_ASSERT_FIELD(KTHREAD, 0x1D8, PVOID, ServiceTable)
C_ASSERT_FIELD(KTHREAD, 0x1E0, ULONG, KernelLimit)
@@ -79,11 +81,11 @@ C_ASSERT_FIELD(KTHREAD, 0x1F5, CHAR, BasePriority)
C_ASSERT_FIELD(KTHREAD, 0x1F6, CHAR, PriorityDecrement)
C_ASSERT_FIELD(KTHREAD, 0x1F7, CHAR, Saturation)
C_ASSERT_FIELD(KTHREAD, 0x1F8, ULONG64, UserAffinity)
-C_ASSERT_FIELD(KTHREAD, 0x200, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x200, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x208, ULONG64, Affinity)
-C_ASSERT_FIELD(KTHREAD, 0x210, KAPC_STATE*, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x210, PKAPC_STATE[2], ApcStatePointer)
C_ASSERT_FIELD(KTHREAD, 0x220, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x220, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x220, UCHAR[43], SavedApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x24B, CHAR, FreezeCount)
C_ASSERT_FIELD(KTHREAD, 0x24C, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x24D, UCHAR, UserIdealProcessor)
@@ -94,19 +96,19 @@ C_ASSERT_FIELD(KTHREAD, 0x258, PVOID, StackBase)
C_ASSERT_FIELD(KTHREAD, 0x260, KAPC, SuspendApc)
C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill0)
C_ASSERT_FIELD(KTHREAD, 0x261, CHAR, Quantum)
-C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill1)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[3], SuspendApcFill1)
C_ASSERT_FIELD(KTHREAD, 0x263, UCHAR, QuantumReset)
-C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill2)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[4], SuspendApcFill2)
C_ASSERT_FIELD(KTHREAD, 0x264, ULONG, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill3)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[64], SuspendApcFill3)
C_ASSERT_FIELD(KTHREAD, 0x2A0, PVOID, TlsArray)
-C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill4)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[72], SuspendApcFill4)
C_ASSERT_FIELD(KTHREAD, 0x2A8, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR, SuspendApcFill5)
+C_ASSERT_FIELD(KTHREAD, 0x260, UCHAR[83], SuspendApcFill5)
C_ASSERT_FIELD(KTHREAD, 0x2B3, UCHAR, PowerState)
C_ASSERT_FIELD(KTHREAD, 0x2B4, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x2B8, KSEMAPHORE, SuspendSemaphore)
-C_ASSERT_FIELD(KTHREAD, 0x2B8, UCHAR, SuspendSemaphorefill)
+C_ASSERT_FIELD(KTHREAD, 0x2B8, UCHAR[28], SuspendSemaphorefill)
C_ASSERT_FIELD(KTHREAD, 0x2D4, ULONG, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x2D8, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x2E8, PVOID, SListFaultAddress)
@@ -116,6 +118,3 @@ C_ASSERT_FIELD(KTHREAD, 0x300, LONG64, OtherOperationCount)
C_ASSERT_FIELD(KTHREAD, 0x308, LONG64, ReadTransferCount)
C_ASSERT_FIELD(KTHREAD, 0x310, LONG64, WriteTransferCount)
C_ASSERT_FIELD(KTHREAD, 0x318, LONG64, OtherTransferCount)
-
-
-
diff --git a/sdk/include/ndk/tests/win2003_x86.c b/sdk/include/ndk/tests/win2003_x86.c
index 713701bb24..ee20522091 100644
--- a/sdk/include/ndk/tests/win2003_x86.c
+++ b/sdk/include/ndk/tests/win2003_x86.c
@@ -7,7 +7,9 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
@@ -17,7 +19,7 @@ C_ASSERT_FIELD(KTHREAD, 0x01C, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, KernelStack)
C_ASSERT_FIELD(KTHREAD, 0x024, ULONG, ThreadLock)
C_ASSERT_FIELD(KTHREAD, 0x028, KAPC_STATE, ApcState)
-C_ASSERT_FIELD(KTHREAD, 0x028, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x028, UCHAR[23], ApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x03F, UCHAR, ApcQueueable)
C_ASSERT_FIELD(KTHREAD, 0x040, UCHAR, NextProcessor)
C_ASSERT_FIELD(KTHREAD, 0x041, UCHAR, DeferredProcessor)
@@ -38,29 +40,26 @@ C_ASSERT_FIELD(KTHREAD, 0x05A, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x05B, CHAR, Priority)
C_ASSERT_FIELD(KTHREAD, 0x05C, UCHAR, EnableStackSwap)
C_ASSERT_FIELD(KTHREAD, 0x05D, UCHAR, SwapBusy)
-C_ASSERT_FIELD(KTHREAD, 0x05E, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x05E, UCHAR[2], Alerted)
C_ASSERT_FIELD(KTHREAD, 0x060, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x060, SINGLE_LIST_ENTRY, SwapListEntry)
C_ASSERT_FIELD(KTHREAD, 0x068, KQUEUE*, Queue)
C_ASSERT_FIELD(KTHREAD, 0x06C, ULONG, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x070, INT16, KernelApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x072, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x070, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x072, SHORT, SpecialApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x070, ULONG, CombinedApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x074, PVOID, Teb)
C_ASSERT_FIELD(KTHREAD, 0x078, KTIMER, Timer)
-C_ASSERT_FIELD(KTHREAD, 0x078, UCHAR, TimerFill)
-//C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, AutoAlignment)
-//C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, DisableBoost)
-//C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, ReservedFlags)
+C_ASSERT_FIELD(KTHREAD, 0x078, UCHAR[40], TimerFill)
C_ASSERT_FIELD(KTHREAD, 0x0A0, LONG, ThreadFlags)
-C_ASSERT_FIELD(KTHREAD, 0x0A8, KWAIT_BLOCK, WaitBlock)
-C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill0)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR[23], WaitBlockFill0)
C_ASSERT_FIELD(KTHREAD, 0x0BF, UCHAR, SystemAffinityActive)
-C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill1)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR[47], WaitBlockFill1)
C_ASSERT_FIELD(KTHREAD, 0x0D7, CHAR, PreviousMode)
-C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill2)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR[71], WaitBlockFill2)
C_ASSERT_FIELD(KTHREAD, 0x0EF, UCHAR, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR, WaitBlockFill3)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, UCHAR[95], WaitBlockFill3)
C_ASSERT_FIELD(KTHREAD, 0x107, UCHAR, LargeStack)
C_ASSERT_FIELD(KTHREAD, 0x108, LIST_ENTRY, QueueListEntry)
C_ASSERT_FIELD(KTHREAD, 0x110, PKTRAP_FRAME, TrapFrame)
@@ -77,12 +76,11 @@ C_ASSERT_FIELD(KTHREAD, 0x123, CHAR, Saturation)
C_ASSERT_FIELD(KTHREAD, 0x124, ULONG, UserAffinity)
C_ASSERT_FIELD(KTHREAD, 0x128, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x12C, ULONG, Affinity)
-C_ASSERT_FIELD(KTHREAD, 0x130, PKAPC_STATE, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x130, PKAPC_STATE[2], ApcStatePointer)
C_ASSERT_FIELD(KTHREAD, 0x138, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x138, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x138, UCHAR[23], SavedApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x14F, CHAR, FreezeCount)
C_ASSERT_FIELD(KTHREAD, 0x150, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x151, UCHAR, UserIdealProcessor)
C_ASSERT_FIELD(KTHREAD, 0x152, UCHAR, CalloutActive)
C_ASSERT_FIELD(KTHREAD, 0x153, UCHAR, Iopl)
-
diff --git a/sdk/include/ndk/tests/win7_x64.c b/sdk/include/ndk/tests/win7_x64.c
index aa173780c1..2615a5e61a 100644
--- a/sdk/include/ndk/tests/win7_x64.c
+++ b/sdk/include/ndk/tests/win7_x64.c
@@ -7,10 +7,11 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
-
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
C_ASSERT_FIELD(KTHREAD, 0x018, ULONG64, CycleTime)
C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget)
@@ -20,10 +21,10 @@ C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, KernelStack)
C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock)
C_ASSERT_FIELD(KTHREAD, 0x048, KWAIT_STATUS_REGISTER, WaitRegister)
C_ASSERT_FIELD(KTHREAD, 0x049, UCHAR, Running)
-C_ASSERT_FIELD(KTHREAD, 0x04A, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x04A, UCHAR[2], Alerted) // type is UCHAR[2]
C_ASSERT_FIELD(KTHREAD, 0x04C, LONG, MiscFlags)
C_ASSERT_FIELD(KTHREAD, 0x050, KAPC_STATE, ApcState)
-C_ASSERT_FIELD(KTHREAD, 0x050, UCHAR, ApcStateFill)
+//C_ASSERT_FIELD(KTHREAD, 0x050, UCHAR[23], ApcStateFill) // type is UCHAR[23]
C_ASSERT_FIELD(KTHREAD, 0x07B, CHAR, Priority)
C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, NextProcessor)
C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, DeferredProcessor)
@@ -32,30 +33,30 @@ C_ASSERT_FIELD(KTHREAD, 0x090, LONG64, WaitStatus)
C_ASSERT_FIELD(KTHREAD, 0x098, KWAIT_BLOCK*, WaitBlockList)
C_ASSERT_FIELD(KTHREAD, 0x0A0, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x0A0, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x0B0, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, PKQUEUE, Queue)
C_ASSERT_FIELD(KTHREAD, 0x0B8, PVOID, Teb)
C_ASSERT_FIELD(KTHREAD, 0x0C0, KTIMER, Timer)
C_ASSERT_FIELD(KTHREAD, 0x100, LONG, ThreadFlags)
C_ASSERT_FIELD(KTHREAD, 0x104, ULONG, Spare0)
-C_ASSERT_FIELD(KTHREAD, 0x108, KWAIT_BLOCK, WaitBlock)
-C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill4)
+//C_ASSERT_FIELD(KTHREAD, 0x108, KWAIT_BLOCK, WaitBlock) // type is KWAITBLOCK[4]
+//C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill4) // type is UCHAR[44]
C_ASSERT_FIELD(KTHREAD, 0x134, ULONG, ContextSwitches)
-C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill5)
+//(KTHREAD, 0x108, UCHAR, WaitBlockFill5) // type is UCHAR[92]
C_ASSERT_FIELD(KTHREAD, 0x164, UCHAR, State)
C_ASSERT_FIELD(KTHREAD, 0x165, CHAR, NpxState)
C_ASSERT_FIELD(KTHREAD, 0x166, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x167, CHAR, WaitMode)
-C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill6)
+//C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill6) // type is UCHAR[140]
C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill7)
+//C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill7)
C_ASSERT_FIELD(KTHREAD, 0x1B0, PVOID, TebMappedLowVa)
-C_ASSERT_FIELD(KTHREAD, 0x1B8, UMS_CONTROL_BLOCK*, Ucb)
-C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill8)
+C_ASSERT_FIELD(KTHREAD, 0x1B8, struct _UMS_CONTROL_BLOCK*, Ucb)
+//C_ASSERT_FIELD(KTHREAD, 0x108, UCHAR, WaitBlockFill8)
C_ASSERT_FIELD(KTHREAD, 0x1C4, SHORT, KernelApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1C6, SHORT, SpecialApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1C4, ULONG, CombinedApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1C8, LIST_ENTRY, QueueListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x1D8, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x1D8, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x1E0, PVOID, FirstArgument)
C_ASSERT_FIELD(KTHREAD, 0x1E8, PVOID, CallbackStack)
C_ASSERT_FIELD(KTHREAD, 0x1E8, ULONG64, CallbackDepth)
@@ -74,9 +75,9 @@ C_ASSERT_FIELD(KTHREAD, 0x210, KPROCESS*, Process)
C_ASSERT_FIELD(KTHREAD, 0x218, GROUP_AFFINITY, Affinity)
C_ASSERT_FIELD(KTHREAD, 0x228, ULONG, IdealProcessor)
C_ASSERT_FIELD(KTHREAD, 0x22C, ULONG, UserIdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x230, KAPC_STATE*, ApcStatePointer)
+//C_ASSERT_FIELD(KTHREAD, 0x230, KAPC_STATE*, ApcStatePointer) // type is PKAPC_STATE[2]
C_ASSERT_FIELD(KTHREAD, 0x240, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x240, UCHAR, SavedApcStateFill)
+//C_ASSERT_FIELD(KTHREAD, 0x240, UCHAR, SavedApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x26B, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x26C, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x26D, CHAR, Spare1)
@@ -86,19 +87,19 @@ C_ASSERT_FIELD(KTHREAD, 0x278, PVOID, StackBase)
C_ASSERT_FIELD(KTHREAD, 0x280, KAPC, SuspendApc)
C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill0)
C_ASSERT_FIELD(KTHREAD, 0x281, UCHAR, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill1)
+//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill1)
C_ASSERT_FIELD(KTHREAD, 0x283, UCHAR, QuantumReset)
-C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill2)
+//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill2)
C_ASSERT_FIELD(KTHREAD, 0x284, ULONG, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill3)
+//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill3)
C_ASSERT_FIELD(KTHREAD, 0x2C0, KPRCB*, WaitPrcb)
-C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill4)
+//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill4)
C_ASSERT_FIELD(KTHREAD, 0x2C8, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill5)
+//C_ASSERT_FIELD(KTHREAD, 0x280, UCHAR, SuspendApcFill5)
C_ASSERT_FIELD(KTHREAD, 0x2D3, UCHAR, LargeStack)
C_ASSERT_FIELD(KTHREAD, 0x2D4, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x2D8, KSEMAPHORE, SuspendSemaphore)
-C_ASSERT_FIELD(KTHREAD, 0x2D8, UCHAR, SuspendSemaphorefill)
+//C_ASSERT_FIELD(KTHREAD, 0x2D8, UCHAR, SuspendSemaphorefill)
C_ASSERT_FIELD(KTHREAD, 0x2F4, ULONG, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead)
diff --git a/sdk/include/ndk/tests/win7_x86.c b/sdk/include/ndk/tests/win7_x86.c
index 1c32a2872f..b35e412c46 100644
--- a/sdk/include/ndk/tests/win7_x86.c
+++ b/sdk/include/ndk/tests/win7_x86.c
@@ -7,7 +7,9 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
@@ -20,10 +22,10 @@ C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, KernelStack)
C_ASSERT_FIELD(KTHREAD, 0x034, ULONG, ThreadLock)
C_ASSERT_FIELD(KTHREAD, 0x038, KWAIT_STATUS_REGISTER, WaitRegister)
C_ASSERT_FIELD(KTHREAD, 0x039, UCHAR, Running)
-C_ASSERT_FIELD(KTHREAD, 0x03A, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x03A, UCHAR[2], Alerted)
C_ASSERT_FIELD(KTHREAD, 0x03C, LONG, MiscFlags)
C_ASSERT_FIELD(KTHREAD, 0x040, KAPC_STATE, ApcState)
-C_ASSERT_FIELD(KTHREAD, 0x040, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x040, UCHAR[23], ApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x057, CHAR, Priority)
C_ASSERT_FIELD(KTHREAD, 0x058, ULONG, NextProcessor)
C_ASSERT_FIELD(KTHREAD, 0x05C, ULONG, DeferredProcessor)
@@ -34,10 +36,10 @@ C_ASSERT_FIELD(KTHREAD, 0x069, CHAR, NpxState)
C_ASSERT_FIELD(KTHREAD, 0x06A, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x06B, CHAR, WaitMode)
C_ASSERT_FIELD(KTHREAD, 0x06C, LONG, WaitStatus)
-C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x070, PKWAIT_BLOCK, WaitBlockList)
C_ASSERT_FIELD(KTHREAD, 0x074, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x074, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x07C, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x07C, PKQUEUE, Queue)
C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, WaitTime)
C_ASSERT_FIELD(KTHREAD, 0x084, SHORT, KernelApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x086, SHORT, SpecialApcDisable)
@@ -46,9 +48,9 @@ C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, Teb)
C_ASSERT_FIELD(KTHREAD, 0x090, KTIMER, Timer)
C_ASSERT_FIELD(KTHREAD, 0x0B8, LONG, ThreadFlags)
C_ASSERT_FIELD(KTHREAD, 0x0BC, PVOID, ServiceTable)
-C_ASSERT_FIELD(KTHREAD, 0x0C0, KWAIT_BLOCK, WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0C0, KWAIT_BLOCK[4], WaitBlock)
C_ASSERT_FIELD(KTHREAD, 0x120, LIST_ENTRY, QueueListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x128, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x128, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x12C, PVOID, FirstArgument)
C_ASSERT_FIELD(KTHREAD, 0x130, PVOID, CallbackStack)
C_ASSERT_FIELD(KTHREAD, 0x130, ULONG, CallbackDepth)
@@ -63,13 +65,13 @@ C_ASSERT_FIELD(KTHREAD, 0x13B, CHAR, Saturation)
C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, SystemCallNumber)
C_ASSERT_FIELD(KTHREAD, 0x140, ULONG, FreezeCount)
C_ASSERT_FIELD(KTHREAD, 0x144, GROUP_AFFINITY, UserAffinity)
-C_ASSERT_FIELD(KTHREAD, 0x150, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x150, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, Affinity)
C_ASSERT_FIELD(KTHREAD, 0x160, ULONG, IdealProcessor)
C_ASSERT_FIELD(KTHREAD, 0x164, ULONG, UserIdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x168, KAPC_STATE*, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x168, PKAPC_STATE[2], ApcStatePointer)
C_ASSERT_FIELD(KTHREAD, 0x170, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x170, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x170, UCHAR[23], SavedApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x187, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x188, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x189, CHAR, Spare1)
@@ -79,19 +81,19 @@ C_ASSERT_FIELD(KTHREAD, 0x190, PVOID, StackBase)
C_ASSERT_FIELD(KTHREAD, 0x194, KAPC, SuspendApc)
C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill0)
C_ASSERT_FIELD(KTHREAD, 0x195, UCHAR, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill1)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[3], SuspendApcFill1)
C_ASSERT_FIELD(KTHREAD, 0x197, UCHAR, QuantumReset)
-C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill2)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[4], SuspendApcFill2)
C_ASSERT_FIELD(KTHREAD, 0x198, ULONG, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill3)
-C_ASSERT_FIELD(KTHREAD, 0x1B8, KPRCB*, WaitPrcb)
-C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill4)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[36], SuspendApcFill3)
+C_ASSERT_FIELD(KTHREAD, 0x1B8, PKPRCB, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[40], SuspendApcFill4)
C_ASSERT_FIELD(KTHREAD, 0x1BC, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR, SuspendApcFill5)
+C_ASSERT_FIELD(KTHREAD, 0x194, UCHAR[47], SuspendApcFill5)
C_ASSERT_FIELD(KTHREAD, 0x1C3, UCHAR, LargeStack)
C_ASSERT_FIELD(KTHREAD, 0x1C4, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x1C8, KSEMAPHORE, SuspendSemaphore)
-C_ASSERT_FIELD(KTHREAD, 0x1C8, UCHAR, SuspendSemaphorefill)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, UCHAR[20], SuspendSemaphorefill)
C_ASSERT_FIELD(KTHREAD, 0x1DC, ULONG, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x1E0, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x1E8, LIST_ENTRY, MutantListHead)
diff --git a/sdk/include/ndk/tests/win81_x64.c b/sdk/include/ndk/tests/win81_x64.c
index c75ec1e86d..569c788c60 100644
--- a/sdk/include/ndk/tests/win81_x64.c
+++ b/sdk/include/ndk/tests/win81_x64.c
@@ -7,108 +7,132 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, SListFaultAddress)
-C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget)
C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, StackBase)
-C_ASSERT_FIELD(KTHREAD, 0x040, UINT64, ThreadLock)
-C_ASSERT_FIELD(KTHREAD, 0x048, UINT64, CycleTime)
-C_ASSERT_FIELD(KTHREAD, 0x050, ULONG32, CurrentRunTime)
-C_ASSERT_FIELD(KTHREAD, 0x054, ULONG32, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, ULONG64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x050, ULONG, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x054, ULONG, ExpectedRunTime)
C_ASSERT_FIELD(KTHREAD, 0x058, PVOID, KernelStack)
-C_ASSERT_FIELD(KTHREAD, 0x060, XSAVE_FORMAT*, StateSaveArea)
-C_ASSERT_FIELD(KTHREAD, 0x068, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x060, PXSAVE_FORMAT, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x068, struct _KSCHEDULING_GROUP*, SchedulingGroup)
C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_STATUS_REGISTER, WaitRegister)
-C_ASSERT_FIELD(KTHREAD, 0x071, UINT8, Running)
+C_ASSERT_FIELD(KTHREAD, 0x071, CHAR, Running)
C_ASSERT_FIELD(KTHREAD, 0x072, UINT8[2], Alerted)
-C_ASSERT_FIELD(KTHREAD, 0x074, LONG32, MiscFlags)
-C_ASSERT_FIELD(KTHREAD, 0x078, LONG32, ThreadFlags)
-C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG32, Spare0)
-C_ASSERT_FIELD(KTHREAD, 0x080, ULONG32, SystemCallNumber)
-C_ASSERT_FIELD(KTHREAD, 0x084, ULONG32, Spare1)
+C_ASSERT_FIELD(KTHREAD, 0x074, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x078, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, Spare0)
+C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x084, ULONG, Spare1)
C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, FirstArgument)
-C_ASSERT_FIELD(KTHREAD, 0x090, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x090, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x098, KAPC_STATE, ApcState)
C_ASSERT_FIELD(KTHREAD, 0x0C3, CHAR, Priority)
-C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG32, UserIdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x0C8, INT64, WaitStatus)
-C_ASSERT_FIELD(KTHREAD, 0x0D0, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x0C8, LONG64, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x0D0, PKWAIT_BLOCK, WaitBlockList)
C_ASSERT_FIELD(KTHREAD, 0x0D8, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x0D8, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x0E8, DISPATCHER_HEADER*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0E8, PDISPATCHER_HEADER, Queue)
C_ASSERT_FIELD(KTHREAD, 0x0F0, PVOID, Teb)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, ULONG64, RelativeTimerBias)
C_ASSERT_FIELD(KTHREAD, 0x100, KTIMER, Timer)
C_ASSERT_FIELD(KTHREAD, 0x140, KWAIT_BLOCK[4], WaitBlock)
-C_ASSERT_FIELD(KTHREAD, 0x154, ULONG32, ContextSwitches)
-C_ASSERT_FIELD(KTHREAD, 0x184, UINT8, State)
+C_ASSERT_FIELD(KTHREAD, 0x154, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x184, UCHAR, State)
C_ASSERT_FIELD(KTHREAD, 0x185, CHAR, NpxState)
-C_ASSERT_FIELD(KTHREAD, 0x186, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x186, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x187, CHAR, WaitMode)
-C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG32, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x1E4, INT16, KernelApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x1E6, INT16, SpecialApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG32, CombinedApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x168, KTHREAD_COUNTERS*, ThreadCounters)
-C_ASSERT_FIELD(KTHREAD, 0x198, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, SHORT, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x168, PKTHREAD_COUNTERS, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x198, PXSTATE_SAVE, XStateSave)
C_ASSERT_FIELD(KTHREAD, 0x1C8, PVOID, Win32Thread)
-C_ASSERT_FIELD(KTHREAD, 0x1F0, UMS_CONTROL_BLOCK*, Ucb)
-C_ASSERT_FIELD(KTHREAD, 0x1F8, KUMS_CONTEXT_HEADER*, Uch)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, struct _UMS_CONTROL_BLOCK*, Ucb)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, struct _KUMS_CONTEXT_HEADER*, Uch)
C_ASSERT_FIELD(KTHREAD, 0x200, PVOID, TebMappedLowVa)
C_ASSERT_FIELD(KTHREAD, 0x208, LIST_ENTRY, QueueListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x218, ULONG32, NextProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x21C, LONG32, QueuePriority)
-C_ASSERT_FIELD(KTHREAD, 0x220, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x218, ULONG, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x21C, LONG, QueuePriority)
+C_ASSERT_FIELD(KTHREAD, 0x220, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x228, GROUP_AFFINITY, UserAffinity)
C_ASSERT_FIELD(KTHREAD, 0x232, CHAR, PreviousMode)
C_ASSERT_FIELD(KTHREAD, 0x233, CHAR, BasePriority)
C_ASSERT_FIELD(KTHREAD, 0x234, CHAR, PriorityDecrement)
-C_ASSERT_FIELD(KTHREAD, 0x235, UINT8, Preempted)
-C_ASSERT_FIELD(KTHREAD, 0x236, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x235, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x236, UCHAR, AdjustReason)
C_ASSERT_FIELD(KTHREAD, 0x237, CHAR, AdjustIncrement)
C_ASSERT_FIELD(KTHREAD, 0x238, GROUP_AFFINITY, Affinity)
-C_ASSERT_FIELD(KTHREAD, 0x242, UINT8, ApcStateIndex)
-C_ASSERT_FIELD(KTHREAD, 0x243, UINT8, WaitBlockCount)
-C_ASSERT_FIELD(KTHREAD, 0x244, ULONG32, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x242, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x243, UCHAR, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x244, ULONG, IdealProcessor)
C_ASSERT_FIELD(KTHREAD, 0x248, KAPC_STATE*[2], ApcStatePointer)
C_ASSERT_FIELD(KTHREAD, 0x258, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x283, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x283, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x284, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x285, CHAR, Saturation)
-C_ASSERT_FIELD(KTHREAD, 0x286, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x286, USHORT, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x288, KAPC, SchedulerApc)
-C_ASSERT_FIELD(KTHREAD, 0x289, UINT8, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x28B, UINT8, QuantumReset)
-C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG32, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x2C8, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x289, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x28B, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x2C8, PKPRCB, WaitPrcb)
C_ASSERT_FIELD(KTHREAD, 0x2D0, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x2DB, UINT8, CallbackNestingLevel)
-C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x2DB, UCHAR, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x2E0, KEVENT, SuspendEvent)
C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead)
C_ASSERT_FIELD(KTHREAD, 0x318, SINGLE_LIST_ENTRY, LockEntriesFreeList)
+#if (NTDDI_VERSION < 0x06032580)
+C_ASSERT_FIELD(KTHREAD, 0x320, KLOCK_ENTRY[5], LockEntries)
+C_ASSERT_FIELD(KTHREAD, 0x500, SINGLE_LIST_ENTRY, PropagateBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x508, SINGLE_LIST_ENTRY, IoSelfBoostsEntry)
+C_ASSERT_FIELD(KTHREAD, 0x510, UINT8[16], PriorityFloorCounts)
+C_ASSERT_FIELD(KTHREAD, 0x520, ULONG, PriorityFloorSummary)
+C_ASSERT_FIELD(KTHREAD, 0x524, LONG, AbCompletedIoBoostCount)
+C_ASSERT_FIELD(KTHREAD, 0x528, SHORT, AbReferenceCount)
+C_ASSERT_FIELD(KTHREAD, 0x52A, UCHAR, AbFreeEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x52B, UCHAR, AbWaitEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x52C, ULONG, ForegroundLossTime)
+C_ASSERT_FIELD(KTHREAD, 0x530, LIST_ENTRY, GlobalForegroundListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x530, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
+C_ASSERT_FIELD(KTHREAD, 0x538, ULONG64, InGlobalForegroundList)
+C_ASSERT_FIELD(KTHREAD, 0x540, LONG64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x548, LONG64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x550, LONG64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x558, LONG64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x560, LONG64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x568, LONG64, OtherTransferCount)
+#else
C_ASSERT_FIELD(KTHREAD, 0x320, KLOCK_ENTRY[6], LockEntries)
C_ASSERT_FIELD(KTHREAD, 0x560, SINGLE_LIST_ENTRY, PropagateBoostsEntry)
C_ASSERT_FIELD(KTHREAD, 0x568, SINGLE_LIST_ENTRY, IoSelfBoostsEntry)
C_ASSERT_FIELD(KTHREAD, 0x570, UINT8[16], PriorityFloorCounts)
-C_ASSERT_FIELD(KTHREAD, 0x580, ULONG32, PriorityFloorSummary)
-C_ASSERT_FIELD(KTHREAD, 0x584, LONG32, AbCompletedIoBoostCount)
-C_ASSERT_FIELD(KTHREAD, 0x588, INT16, AbReferenceCount)
-C_ASSERT_FIELD(KTHREAD, 0x58A, UINT8, AbFreeEntryCount)
-C_ASSERT_FIELD(KTHREAD, 0x58B, UINT8, AbWaitEntryCount)
-C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG32, ForegroundLossTime)
+C_ASSERT_FIELD(KTHREAD, 0x580, ULONG, PriorityFloorSummary)
+C_ASSERT_FIELD(KTHREAD, 0x584, LONG, AbCompletedIoBoostCount)
+C_ASSERT_FIELD(KTHREAD, 0x588, SHORT, AbReferenceCount)
+C_ASSERT_FIELD(KTHREAD, 0x58A, UCHAR, AbFreeEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x58B, UCHAR, AbWaitEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x58C, ULONG, ForegroundLossTime)
C_ASSERT_FIELD(KTHREAD, 0x590, LIST_ENTRY, GlobalForegroundListEntry)
C_ASSERT_FIELD(KTHREAD, 0x590, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x598, UINT64, InGlobalForegroundList)
-C_ASSERT_FIELD(KTHREAD, 0x5A0, INT64, ReadOperationCount)
-C_ASSERT_FIELD(KTHREAD, 0x5A8, INT64, WriteOperationCount)
-C_ASSERT_FIELD(KTHREAD, 0x5B0, INT64, OtherOperationCount)
-C_ASSERT_FIELD(KTHREAD, 0x5B8, INT64, ReadTransferCount)
-C_ASSERT_FIELD(KTHREAD, 0x5C0, INT64, WriteTransferCount)
-C_ASSERT_FIELD(KTHREAD, 0x5C8, INT64, OtherTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x598, ULONG64, InGlobalForegroundList)
+C_ASSERT_FIELD(KTHREAD, 0x5A0, LONG64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5A8, LONG64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5B0, LONG64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x5B8, LONG64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5C0, LONG64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x5C8, LONG64, OtherTransferCount)
+#endif
diff --git a/sdk/include/ndk/tests/win81_x86.c b/sdk/include/ndk/tests/win81_x86.c
index 114a96337b..b76ad8691f 100644
--- a/sdk/include/ndk/tests/win81_x86.c
+++ b/sdk/include/ndk/tests/win81_x86.c
@@ -7,87 +7,104 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
+
+C_ASSERT(sizeof(KLOCK_ENTRY_LOCK_STATE) == 0x008);
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x000, RTL_BALANCED_NODE, TreeNode)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x00C, PVOID, ThreadUnsafe)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x00D, UCHAR[2], Reserved1)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x00F, UCHAR, AcquiredByte)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x010, UCHAR, WaitingAndBusyByte)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x011, UCHAR[2], Reserved)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x013, UCHAR, InTreeByte)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x014, PVOID, SessionState)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x014, ULONG, SessionId)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x018, RTL_RB_TREE, OwnerTree)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x018, CHAR, CpuPriorityKey)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x020, RTL_RB_TREE, WaiterTree)
+C_ASSERT_FIELD(KLOCK_ENTRY, 0x028, ULONG, EntryLock)
+C_ASSERT(sizeof(KLOCK_ENTRY) == 0x030);
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
-
C_ASSERT_FIELD(KTHREAD, 0x010, PVOID, SListFaultAddress)
-C_ASSERT_FIELD(KTHREAD, 0x018, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x018, ULONG64, QuantumTarget)
C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, InitialStack)
C_ASSERT_FIELD(KTHREAD, 0x024, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, StackBase)
-C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG32, ThreadLock)
-C_ASSERT_FIELD(KTHREAD, 0x030, UINT64, CycleTime)
-C_ASSERT_FIELD(KTHREAD, 0x038, ULONG32, HighCycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x030, ULONG64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x038, ULONG, HighCycleTime)
C_ASSERT_FIELD(KTHREAD, 0x03C, PVOID, ServiceTable)
-C_ASSERT_FIELD(KTHREAD, 0x040, ULONG32, CurrentRunTime)
-C_ASSERT_FIELD(KTHREAD, 0x044, ULONG32, ExpectedRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG, CurrentRunTime)
+C_ASSERT_FIELD(KTHREAD, 0x044, ULONG, ExpectedRunTime)
C_ASSERT_FIELD(KTHREAD, 0x048, PVOID, KernelStack)
-C_ASSERT_FIELD(KTHREAD, 0x04C, XSAVE_FORMAT*, StateSaveArea)
-C_ASSERT_FIELD(KTHREAD, 0x050, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x04C, PXSAVE_FORMAT, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x050, struct _KSCHEDULING_GROUP*, SchedulingGroup)
C_ASSERT_FIELD(KTHREAD, 0x054, KWAIT_STATUS_REGISTER, WaitRegister)
-C_ASSERT_FIELD(KTHREAD, 0x055, UINT8, Running)
-C_ASSERT_FIELD(KTHREAD, 0x056, UINT8[2], Alerted)
-C_ASSERT_FIELD(KTHREAD, 0x058, LONG32, MiscFlags)
-C_ASSERT_FIELD(KTHREAD, 0x05C, LONG32, ThreadFlags)
-C_ASSERT_FIELD(KTHREAD, 0x060, ULONG32, Spare0)
-C_ASSERT_FIELD(KTHREAD, 0x064, ULONG32, SystemCallNumber)
+C_ASSERT_FIELD(KTHREAD, 0x055, UCHAR, Running)
+C_ASSERT_FIELD(KTHREAD, 0x056, UCHAR[2], Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x058, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x05C, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x060, ULONG, Spare0)
+C_ASSERT_FIELD(KTHREAD, 0x064, ULONG, SystemCallNumber)
C_ASSERT_FIELD(KTHREAD, 0x068, PVOID, FirstArgument)
-C_ASSERT_FIELD(KTHREAD, 0x06C, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x06C, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x070, KAPC_STATE, ApcState)
C_ASSERT_FIELD(KTHREAD, 0x087, CHAR, Priority)
-C_ASSERT_FIELD(KTHREAD, 0x088, ULONG32, UserIdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG32, ContextSwitches)
-C_ASSERT_FIELD(KTHREAD, 0x090, UINT8, State)
+C_ASSERT_FIELD(KTHREAD, 0x088, ULONG, UserIdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x08C, ULONG, ContextSwitches)
+C_ASSERT_FIELD(KTHREAD, 0x090, UCHAR, State)
C_ASSERT_FIELD(KTHREAD, 0x091, CHAR, NpxState)
-C_ASSERT_FIELD(KTHREAD, 0x092, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x092, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x093, CHAR, WaitMode)
-C_ASSERT_FIELD(KTHREAD, 0x094, LONG32, WaitStatus)
-C_ASSERT_FIELD(KTHREAD, 0x098, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x094, LONG, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x098, PKWAIT_BLOCK, WaitBlockList)
C_ASSERT_FIELD(KTHREAD, 0x09C, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x09C, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x0A4, DISPATCHER_HEADER*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0A4, PDISPATCHER_HEADER, Queue)
C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb)
-C_ASSERT_FIELD(KTHREAD, 0x0B0, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, ULONG64, RelativeTimerBias)
C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
C_ASSERT_FIELD(KTHREAD, 0x0E0, KWAIT_BLOCK[4], WaitBlock)
-C_ASSERT_FIELD(KTHREAD, 0x0F4, KTHREAD_COUNTERS*, ThreadCounters)
-C_ASSERT_FIELD(KTHREAD, 0x10C, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x0F4, PKTHREAD_COUNTERS, ThreadCounters)
+C_ASSERT_FIELD(KTHREAD, 0x10C, PXSTATE_SAVE, XStateSave)
C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, Win32Thread)
-C_ASSERT_FIELD(KTHREAD, 0x138, ULONG32, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x13C, INT16, KernelApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x13E, INT16, SpecialApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG32, CombinedApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x138, ULONG, WaitTime)
+C_ASSERT_FIELD(KTHREAD, 0x13C, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13E, SHORT, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, CombinedApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x140, LIST_ENTRY, QueueListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x148, ULONG32, NextProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x14C, LONG32, QueuePriority)
-C_ASSERT_FIELD(KTHREAD, 0x150, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x148, ULONG, NextProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x14C, LONG, QueuePriority)
+C_ASSERT_FIELD(KTHREAD, 0x150, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x154, GROUP_AFFINITY, UserAffinity)
C_ASSERT_FIELD(KTHREAD, 0x15A, CHAR, PreviousMode)
C_ASSERT_FIELD(KTHREAD, 0x15B, CHAR, BasePriority)
C_ASSERT_FIELD(KTHREAD, 0x15C, CHAR, PriorityDecrement)
-C_ASSERT_FIELD(KTHREAD, 0x15D, UINT8, Preempted)
-C_ASSERT_FIELD(KTHREAD, 0x15E, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x15D, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x15E, UCHAR, AdjustReason)
C_ASSERT_FIELD(KTHREAD, 0x15F, CHAR, AdjustIncrement)
C_ASSERT_FIELD(KTHREAD, 0x160, GROUP_AFFINITY, Affinity)
-C_ASSERT_FIELD(KTHREAD, 0x166, UINT8, ApcStateIndex)
-C_ASSERT_FIELD(KTHREAD, 0x167, UINT8, WaitBlockCount)
-C_ASSERT_FIELD(KTHREAD, 0x168, ULONG32, IdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x16C, KAPC_STATE*[2], ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x166, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x167, UCHAR, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x168, ULONG, IdealProcessor)
+C_ASSERT_FIELD(KTHREAD, 0x16C, PKAPC_STATE[2], ApcStatePointer)
C_ASSERT_FIELD(KTHREAD, 0x174, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x18B, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x18B, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x18C, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x18D, CHAR, Saturation)
-C_ASSERT_FIELD(KTHREAD, 0x18E, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x18E, USHORT, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x190, KAPC, SchedulerApc)
-C_ASSERT_FIELD(KTHREAD, 0x191, UINT8, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x193, UINT8, QuantumReset)
-C_ASSERT_FIELD(KTHREAD, 0x194, ULONG32, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x1B4, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x191, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x193, UCHAR, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, KernelTime)
+C_ASSERT_FIELD(KTHREAD, 0x1B4, PKPRCB, WaitPrcb)
C_ASSERT_FIELD(KTHREAD, 0x1B8, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x1BF, UINT8, CallbackNestingLevel)
-C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x1BF, UCHAR, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x1C4, KEVENT, SuspendEvent)
C_ASSERT_FIELD(KTHREAD, 0x1D4, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x1DC, LIST_ENTRY, MutantListHead)
@@ -95,13 +112,13 @@ C_ASSERT_FIELD(KTHREAD, 0x1E4, SINGLE_LIST_ENTRY,
LockEntriesFreeList)
C_ASSERT_FIELD(KTHREAD, 0x1E8, KLOCK_ENTRY[6], LockEntries)
C_ASSERT_FIELD(KTHREAD, 0x308, SINGLE_LIST_ENTRY, PropagateBoostsEntry)
C_ASSERT_FIELD(KTHREAD, 0x30C, SINGLE_LIST_ENTRY, IoSelfBoostsEntry)
-C_ASSERT_FIELD(KTHREAD, 0x310, UINT8[16], PriorityFloorCounts)
-C_ASSERT_FIELD(KTHREAD, 0x320, ULONG32, PriorityFloorSummary)
-C_ASSERT_FIELD(KTHREAD, 0x324, LONG32, AbCompletedIoBoostCount)
-C_ASSERT_FIELD(KTHREAD, 0x328, INT16, AbReferenceCount)
-C_ASSERT_FIELD(KTHREAD, 0x32A, UINT8, AbFreeEntryCount)
-C_ASSERT_FIELD(KTHREAD, 0x32B, UINT8, AbWaitEntryCount)
-C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG32, ForegroundLossTime)
+C_ASSERT_FIELD(KTHREAD, 0x310, UCHAR[16], PriorityFloorCounts)
+C_ASSERT_FIELD(KTHREAD, 0x320, ULONG, PriorityFloorSummary)
+C_ASSERT_FIELD(KTHREAD, 0x324, LONG, AbCompletedIoBoostCount)
+C_ASSERT_FIELD(KTHREAD, 0x328, SHORT, AbReferenceCount)
+C_ASSERT_FIELD(KTHREAD, 0x32A, UCHAR, AbFreeEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x32B, UCHAR, AbWaitEntryCount)
+C_ASSERT_FIELD(KTHREAD, 0x32C, ULONG, ForegroundLossTime)
C_ASSERT_FIELD(KTHREAD, 0x330, LIST_ENTRY, GlobalForegroundListEntry)
C_ASSERT_FIELD(KTHREAD, 0x330, SINGLE_LIST_ENTRY, ForegroundDpcStackListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x334, ULONG32, InGlobalForegroundList)
+C_ASSERT_FIELD(KTHREAD, 0x334, ULONG, InGlobalForegroundList)
diff --git a/sdk/include/ndk/tests/win8_x64.c b/sdk/include/ndk/tests/win8_x64.c
index 2f45bba390..67211263f1 100644
--- a/sdk/include/ndk/tests/win8_x64.c
+++ b/sdk/include/ndk/tests/win8_x64.c
@@ -7,94 +7,96 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
C_ASSERT_FIELD(KTHREAD, 0x018, PVOID, SListFaultAddress)
-C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget)
C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, StackBase)
-C_ASSERT_FIELD(KTHREAD, 0x040, UINT64, ThreadLock)
-C_ASSERT_FIELD(KTHREAD, 0x048, UINT64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x048, ULONG64, CycleTime)
C_ASSERT_FIELD(KTHREAD, 0x050, ULONG, CurrentRunTime)
C_ASSERT_FIELD(KTHREAD, 0x054, ULONG, ExpectedRunTime)
C_ASSERT_FIELD(KTHREAD, 0x058, PVOID, KernelStack)
-C_ASSERT_FIELD(KTHREAD, 0x060, XSAVE_FORMAT*, StateSaveArea)
-C_ASSERT_FIELD(KTHREAD, 0x068, KSCHEDULING_GROUP*, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x060, PXSAVE_FORMAT, StateSaveArea)
+C_ASSERT_FIELD(KTHREAD, 0x068, struct _KSCHEDULING_GROUP*, SchedulingGroup)
C_ASSERT_FIELD(KTHREAD, 0x070, KWAIT_STATUS_REGISTER, WaitRegister)
-C_ASSERT_FIELD(KTHREAD, 0x071, UINT8, Running)
+C_ASSERT_FIELD(KTHREAD, 0x071, BOOLEAN, Running)
C_ASSERT_FIELD(KTHREAD, 0x072, UINT8[2], Alerted)
-C_ASSERT_FIELD(KTHREAD, 0x074, LONG32, MiscFlags)
-C_ASSERT_FIELD(KTHREAD, 0x078, LONG32, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x074, LONG, MiscFlags)
+C_ASSERT_FIELD(KTHREAD, 0x078, LONG, ThreadFlags)
C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, Spare0)
C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, SystemCallNumber)
C_ASSERT_FIELD(KTHREAD, 0x084, ULONG, Spare1)
C_ASSERT_FIELD(KTHREAD, 0x088, PVOID, FirstArgument)
-C_ASSERT_FIELD(KTHREAD, 0x090, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x090, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x098, KAPC_STATE, ApcState)
C_ASSERT_FIELD(KTHREAD, 0x0C3, CHAR, Priority)
C_ASSERT_FIELD(KTHREAD, 0x0C4, ULONG, UserIdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x0C8, INT64, WaitStatus)
-C_ASSERT_FIELD(KTHREAD, 0x0D0, KWAIT_BLOCK*, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x0C8, LONG64, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x0D0, PKWAIT_BLOCK, WaitBlockList)
C_ASSERT_FIELD(KTHREAD, 0x0D8, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x0D8, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x0E8, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0E8, PKQUEUE, Queue)
C_ASSERT_FIELD(KTHREAD, 0x0F0, PVOID, Teb)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, ULONG64, RelativeTimerBias)
C_ASSERT_FIELD(KTHREAD, 0x100, KTIMER, Timer)
C_ASSERT_FIELD(KTHREAD, 0x140, KWAIT_BLOCK[4], WaitBlock)
C_ASSERT_FIELD(KTHREAD, 0x154, ULONG, ContextSwitches)
-C_ASSERT_FIELD(KTHREAD, 0x184, UINT8, State)
+C_ASSERT_FIELD(KTHREAD, 0x184, UCHAR, State)
C_ASSERT_FIELD(KTHREAD, 0x185, CHAR, NpxState)
-C_ASSERT_FIELD(KTHREAD, 0x186, UINT8, WaitIrql)
+C_ASSERT_FIELD(KTHREAD, 0x186, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x187, CHAR, WaitMode)
C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x1E4, INT16, KernelApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x1E6, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E4, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x1E6, SHORT, SpecialApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1E4, ULONG, CombinedApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x168, KTHREAD_COUNTERS*, ThreadCounters)
-C_ASSERT_FIELD(KTHREAD, 0x198, XSTATE_SAVE*, XStateSave)
+C_ASSERT_FIELD(KTHREAD, 0x198, PXSTATE_SAVE, XStateSave)
C_ASSERT_FIELD(KTHREAD, 0x1C8, PVOID, Win32Thread)
-C_ASSERT_FIELD(KTHREAD, 0x1F0, UMS_CONTROL_BLOCK*, Ucb)
-C_ASSERT_FIELD(KTHREAD, 0x1F8, KUMS_CONTEXT_HEADER*, Uch)
+C_ASSERT_FIELD(KTHREAD, 0x1F0, struct _UMS_CONTROL_BLOCK*, Ucb)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, struct _KUMS_CONTEXT_HEADER*, Uch)
C_ASSERT_FIELD(KTHREAD, 0x200, PVOID, TebMappedLowVa)
C_ASSERT_FIELD(KTHREAD, 0x208, LIST_ENTRY, QueueListEntry)
C_ASSERT_FIELD(KTHREAD, 0x218, ULONG, NextProcessor)
C_ASSERT_FIELD(KTHREAD, 0x21C, ULONG, DeferredProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x220, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x220, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x228, GROUP_AFFINITY, UserAffinity)
C_ASSERT_FIELD(KTHREAD, 0x232, CHAR, PreviousMode)
C_ASSERT_FIELD(KTHREAD, 0x233, CHAR, BasePriority)
C_ASSERT_FIELD(KTHREAD, 0x234, CHAR, PriorityDecrement)
-C_ASSERT_FIELD(KTHREAD, 0x235, UINT8, Preempted)
-C_ASSERT_FIELD(KTHREAD, 0x236, UINT8, AdjustReason)
+C_ASSERT_FIELD(KTHREAD, 0x235, UCHAR, Preempted)
+C_ASSERT_FIELD(KTHREAD, 0x236, UCHAR, AdjustReason)
C_ASSERT_FIELD(KTHREAD, 0x237, CHAR, AdjustIncrement)
C_ASSERT_FIELD(KTHREAD, 0x238, GROUP_AFFINITY, Affinity)
-C_ASSERT_FIELD(KTHREAD, 0x242, UINT8, ApcStateIndex)
-C_ASSERT_FIELD(KTHREAD, 0x243, UINT8, WaitBlockCount)
+C_ASSERT_FIELD(KTHREAD, 0x242, UCHAR, ApcStateIndex)
+C_ASSERT_FIELD(KTHREAD, 0x243, UCHAR, WaitBlockCount)
C_ASSERT_FIELD(KTHREAD, 0x244, ULONG, IdealProcessor)
C_ASSERT_FIELD(KTHREAD, 0x248, KAPC_STATE*[2], ApcStatePointer)
C_ASSERT_FIELD(KTHREAD, 0x258, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x283, UINT8, WaitReason)
+C_ASSERT_FIELD(KTHREAD, 0x283, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x284, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x285, CHAR, Saturation)
-C_ASSERT_FIELD(KTHREAD, 0x286, UINT16, SListFaultCount)
+C_ASSERT_FIELD(KTHREAD, 0x286, USHORT, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x288, KAPC, SchedulerApc)
-C_ASSERT_FIELD(KTHREAD, 0x289, UINT8, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x28B, UINT8, QuantumReset)
+C_ASSERT_FIELD(KTHREAD, 0x289, UCHAR, ResourceIndex)
+C_ASSERT_FIELD(KTHREAD, 0x28B, UCHAR, QuantumReset)
C_ASSERT_FIELD(KTHREAD, 0x28C, ULONG, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x2C8, KPRCB*, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x2C8, PKPRCB, WaitPrcb)
C_ASSERT_FIELD(KTHREAD, 0x2D0, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x2DB, UINT8, CallbackNestingLevel)
+C_ASSERT_FIELD(KTHREAD, 0x2DB, UCHAR, CallbackNestingLevel)
C_ASSERT_FIELD(KTHREAD, 0x2DC, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x2E0, KEVENT, SuspendEvent)
C_ASSERT_FIELD(KTHREAD, 0x2F8, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x308, LIST_ENTRY, MutantListHead)
-C_ASSERT_FIELD(KTHREAD, 0x318, INT64, ReadOperationCount)
-C_ASSERT_FIELD(KTHREAD, 0x320, INT64, WriteOperationCount)
-C_ASSERT_FIELD(KTHREAD, 0x328, INT64, OtherOperationCount)
-C_ASSERT_FIELD(KTHREAD, 0x330, INT64, ReadTransferCount)
-C_ASSERT_FIELD(KTHREAD, 0x338, INT64, WriteTransferCount)
-C_ASSERT_FIELD(KTHREAD, 0x340, INT64, OtherTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x318, LONG64, ReadOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x320, LONG64, WriteOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x328, LONG64, OtherOperationCount)
+C_ASSERT_FIELD(KTHREAD, 0x330, LONG64, ReadTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x338, LONG64, WriteTransferCount)
+C_ASSERT_FIELD(KTHREAD, 0x340, LONG64, OtherTransferCount)
diff --git a/sdk/include/ndk/tests/win8_x86.c b/sdk/include/ndk/tests/win8_x86.c
index c8efe705f8..8a8de9a447 100644
--- a/sdk/include/ndk/tests/win8_x86.c
+++ b/sdk/include/ndk/tests/win8_x86.c
@@ -7,24 +7,26 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
-C_ASSERT_FIELD(KTHREAD, 0x010, UINT64, SListFaultAddress)
-C_ASSERT_FIELD(KTHREAD, 0x018, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x010, PVOID, SListFaultAddress)
+C_ASSERT_FIELD(KTHREAD, 0x018, ULONG64, QuantumTarget)
C_ASSERT_FIELD(KTHREAD, 0x020, PVOID, InitialStack)
C_ASSERT_FIELD(KTHREAD, 0x024, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, StackBase)
-C_ASSERT_FIELD(KTHREAD, 0x02C, PVOID, ThreadLock)
-C_ASSERT_FIELD(KTHREAD, 0x030, UINT64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x02C, ULONG, ThreadLock)
+C_ASSERT_FIELD(KTHREAD, 0x030, ULONG64, CycleTime)
C_ASSERT_FIELD(KTHREAD, 0x038, ULONG, HighCycleTime)
C_ASSERT_FIELD(KTHREAD, 0x03C, PVOID, ServiceTable)
C_ASSERT_FIELD(KTHREAD, 0x040, ULONG, CurrentRunTime)
C_ASSERT_FIELD(KTHREAD, 0x044, ULONG, ExpectedRunTime)
C_ASSERT_FIELD(KTHREAD, 0x048, PVOID, KernelStack)
C_ASSERT_FIELD(KTHREAD, 0x04C, PXSAVE_FORMAT, StateSaveArea)
-C_ASSERT_FIELD(KTHREAD, 0x050, PKSCHEDULING_GROUP, SchedulingGroup)
+C_ASSERT_FIELD(KTHREAD, 0x050, struct _KSCHEDULING_GROUP*, SchedulingGroup)
C_ASSERT_FIELD(KTHREAD, 0x054, KWAIT_STATUS_REGISTER, WaitRegister)
C_ASSERT_FIELD(KTHREAD, 0x055, UCHAR, Running)
C_ASSERT_FIELD(KTHREAD, 0x056, UCHAR[2], Alerted)
@@ -48,7 +50,7 @@ C_ASSERT_FIELD(KTHREAD, 0x09C, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x09C, SINGLE_LIST_ENTRY, SwapListEntry)
C_ASSERT_FIELD(KTHREAD, 0x0A4, PKQUEUE, Queue)
C_ASSERT_FIELD(KTHREAD, 0x0A8, PVOID, Teb)
-C_ASSERT_FIELD(KTHREAD, 0x0B0, UINT64, RelativeTimerBias)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, ULONG64, RelativeTimerBias)
C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
C_ASSERT_FIELD(KTHREAD, 0x0E0, KWAIT_BLOCK[4], WaitBlock)
C_ASSERT_FIELD(KTHREAD, 0x0F4, PKTHREAD_COUNTERS, ThreadCounters)
@@ -85,7 +87,7 @@ C_ASSERT_FIELD(KTHREAD, 0x194, ULONG, KernelTime)
C_ASSERT_FIELD(KTHREAD, 0x1B4, PKPRCB, WaitPrcb)
C_ASSERT_FIELD(KTHREAD, 0x1B8, PVOID, LegoData)
C_ASSERT_FIELD(KTHREAD, 0x1BF, UCHAR, CallbackNestingLevel)
-C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG32, UserTime)
+C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x1C4, KEVENT, SuspendEvent)
C_ASSERT_FIELD(KTHREAD, 0x1D4, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x1DC, LIST_ENTRY, MutantListHead)
diff --git a/sdk/include/ndk/tests/winvista_x64.c b/sdk/include/ndk/tests/winvista_x64.c
index c369530927..cb1123d9a4 100644
--- a/sdk/include/ndk/tests/winvista_x64.c
+++ b/sdk/include/ndk/tests/winvista_x64.c
@@ -7,7 +7,9 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
@@ -18,49 +20,49 @@ C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x038, PVOID, KernelStack)
C_ASSERT_FIELD(KTHREAD, 0x040, ULONG64, ThreadLock)
C_ASSERT_FIELD(KTHREAD, 0x048, KAPC_STATE, ApcState)
-C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x048, UCHAR[43], ApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x073, CHAR, Priority)
C_ASSERT_FIELD(KTHREAD, 0x074, USHORT, NextProcessor)
C_ASSERT_FIELD(KTHREAD, 0x076, USHORT, DeferredProcessor)
C_ASSERT_FIELD(KTHREAD, 0x078, ULONG64, ApcQueueLock)
C_ASSERT_FIELD(KTHREAD, 0x080, LONG64, WaitStatus)
-C_ASSERT_FIELD(KTHREAD, 0x088, KWAIT_BLOCK*, WaitBlockList)
-C_ASSERT_FIELD(KTHREAD, 0x088, KGATE*, GateObject)
+C_ASSERT_FIELD(KTHREAD, 0x088, PKWAIT_BLOCK, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x088, PKGATE, GateObject)
C_ASSERT_FIELD(KTHREAD, 0x090, LONG, MiscFlags)
C_ASSERT_FIELD(KTHREAD, 0x094, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x095, UCHAR, SwapBusy)
-C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x096, UCHAR[2], Alerted)
C_ASSERT_FIELD(KTHREAD, 0x098, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x098, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x0A8, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x0A8, PKQUEUE, Queue)
C_ASSERT_FIELD(KTHREAD, 0x0B0, PVOID, Teb)
C_ASSERT_FIELD(KTHREAD, 0x0B8, KTIMER, Timer)
-C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, TimerFill)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[60], TimerFill)
C_ASSERT_FIELD(KTHREAD, 0x0F4, LONG, ThreadFlags)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK, WaitBlock)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill0)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[43], WaitBlockFill0)
C_ASSERT_FIELD(KTHREAD, 0x123, UCHAR, IdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill1)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[91], WaitBlockFill1)
C_ASSERT_FIELD(KTHREAD, 0x153, CHAR, PreviousMode)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill2)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[139], WaitBlockFill2)
C_ASSERT_FIELD(KTHREAD, 0x183, UCHAR, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill3)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[187], WaitBlockFill3)
C_ASSERT_FIELD(KTHREAD, 0x1B3, UCHAR, LargeStack)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill4)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[44], WaitBlockFill4)
C_ASSERT_FIELD(KTHREAD, 0x124, ULONG, ContextSwitches)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill5)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[92], WaitBlockFill5)
C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR, State)
C_ASSERT_FIELD(KTHREAD, 0x155, UCHAR, NpxState)
C_ASSERT_FIELD(KTHREAD, 0x156, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x157, CHAR, WaitMode)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill6)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[140], WaitBlockFill6)
C_ASSERT_FIELD(KTHREAD, 0x184, ULONG, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR, WaitBlockFill7)
+C_ASSERT_FIELD(KTHREAD, 0x0F8, UCHAR[188], WaitBlockFill7)
C_ASSERT_FIELD(KTHREAD, 0x1B4, SHORT, KernelApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1B6, SHORT, SpecialApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1B4, ULONG, CombinedApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x1B8, LIST_ENTRY, QueueListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x1C8, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x1C8, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x1D0, PVOID, FirstArgument)
C_ASSERT_FIELD(KTHREAD, 0x1D8, PVOID, CallbackStack)
C_ASSERT_FIELD(KTHREAD, 0x1D8, ULONG64, CallbackDepth)
@@ -75,11 +77,11 @@ C_ASSERT_FIELD(KTHREAD, 0x1E7, CHAR, Saturation)
C_ASSERT_FIELD(KTHREAD, 0x1E8, ULONG, SystemCallNumber)
C_ASSERT_FIELD(KTHREAD, 0x1EC, ULONG, Spare02)
C_ASSERT_FIELD(KTHREAD, 0x1F0, ULONG64, UserAffinity)
-C_ASSERT_FIELD(KTHREAD, 0x1F8, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x1F8, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x200, ULONG64, Affinity)
-C_ASSERT_FIELD(KTHREAD, 0x208, KAPC_STATE*, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x208, PKAPC_STATE[2], ApcStatePointer)
C_ASSERT_FIELD(KTHREAD, 0x218, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x218, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x218, UCHAR[43], SavedApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x243, CHAR, FreezeCount)
C_ASSERT_FIELD(KTHREAD, 0x244, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x245, UCHAR, UserIdealProcessor)
@@ -90,19 +92,19 @@ C_ASSERT_FIELD(KTHREAD, 0x250, PVOID, StackBase)
C_ASSERT_FIELD(KTHREAD, 0x258, KAPC, SuspendApc)
C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill0)
C_ASSERT_FIELD(KTHREAD, 0x259, CHAR, Spare04)
-C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill1)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[3], SuspendApcFill1)
C_ASSERT_FIELD(KTHREAD, 0x25B, UCHAR, QuantumReset)
-C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill2)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[4], SuspendApcFill2)
C_ASSERT_FIELD(KTHREAD, 0x25C, ULONG, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill3)
-C_ASSERT_FIELD(KTHREAD, 0x298, KPRCB*, WaitPrcb)
-C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill4)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[64], SuspendApcFill3)
+C_ASSERT_FIELD(KTHREAD, 0x298, PKPRCB, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[72], SuspendApcFill4)
C_ASSERT_FIELD(KTHREAD, 0x2A0, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR, SuspendApcFill5)
+C_ASSERT_FIELD(KTHREAD, 0x258, UCHAR[83], SuspendApcFill5)
C_ASSERT_FIELD(KTHREAD, 0x2AB, UCHAR, PowerState)
C_ASSERT_FIELD(KTHREAD, 0x2AC, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x2B0, KSEMAPHORE, SuspendSemaphore)
-C_ASSERT_FIELD(KTHREAD, 0x2B0, UCHAR, SuspendSemaphorefill)
+C_ASSERT_FIELD(KTHREAD, 0x2B0, UCHAR[28], SuspendSemaphorefill)
C_ASSERT_FIELD(KTHREAD, 0x2CC, ULONG, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x2D0, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x2E0, LIST_ENTRY, MutantListHead)
diff --git a/sdk/include/ndk/tests/winvista_x86.c b/sdk/include/ndk/tests/winvista_x86.c
index 40700e8a46..c3521dde66 100644
--- a/sdk/include/ndk/tests/winvista_x86.c
+++ b/sdk/include/ndk/tests/winvista_x86.c
@@ -7,19 +7,21 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
-#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) C_ASSERT(FIELD_OFFSET(Type,
MemberName) == Offset);
+#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
+ C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
+ C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
/* KTHREAD */
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
-C_ASSERT_FIELD(KTHREAD, 0x010, UINT64, CycleTime)
+C_ASSERT_FIELD(KTHREAD, 0x010, ULONG64, CycleTime)
C_ASSERT_FIELD(KTHREAD, 0x018, ULONG, HighCycleTime)
-C_ASSERT_FIELD(KTHREAD, 0x020, UINT64, QuantumTarget)
+C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget)
C_ASSERT_FIELD(KTHREAD, 0x028, PVOID, InitialStack)
C_ASSERT_FIELD(KTHREAD, 0x02C, PVOID, StackLimit)
C_ASSERT_FIELD(KTHREAD, 0x030, PVOID, KernelStack)
C_ASSERT_FIELD(KTHREAD, 0x034, ULONG, ThreadLock)
C_ASSERT_FIELD(KTHREAD, 0x038, KAPC_STATE, ApcState)
-C_ASSERT_FIELD(KTHREAD, 0x038, UCHAR, ApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x038, UCHAR[23], ApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x04F, CHAR, Priority)
C_ASSERT_FIELD(KTHREAD, 0x050, USHORT, NextProcessor)
C_ASSERT_FIELD(KTHREAD, 0x052, USHORT, DeferredProcessor)
@@ -29,35 +31,35 @@ C_ASSERT_FIELD(KTHREAD, 0x05C, UCHAR, State)
C_ASSERT_FIELD(KTHREAD, 0x05D, UCHAR, NpxState)
C_ASSERT_FIELD(KTHREAD, 0x05E, UCHAR, WaitIrql)
C_ASSERT_FIELD(KTHREAD, 0x05F, CHAR, WaitMode)
-C_ASSERT_FIELD(KTHREAD, 0x060, LONG32, WaitStatus)
-C_ASSERT_FIELD(KTHREAD, 0x064, KWAIT_BLOCK*, WaitBlockList)
-C_ASSERT_FIELD(KTHREAD, 0x064, KGATE*, GateObject)
+C_ASSERT_FIELD(KTHREAD, 0x060, LONG, WaitStatus)
+C_ASSERT_FIELD(KTHREAD, 0x064, PKWAIT_BLOCK, WaitBlockList)
+C_ASSERT_FIELD(KTHREAD, 0x064, PKGATE, GateObject)
C_ASSERT_FIELD(KTHREAD, 0x068, LONG, MiscFlags)
C_ASSERT_FIELD(KTHREAD, 0x06C, UCHAR, WaitReason)
C_ASSERT_FIELD(KTHREAD, 0x06D, UCHAR, SwapBusy)
-C_ASSERT_FIELD(KTHREAD, 0x06E, UCHAR, Alerted)
+C_ASSERT_FIELD(KTHREAD, 0x06E, UCHAR[2], Alerted)
C_ASSERT_FIELD(KTHREAD, 0x070, LIST_ENTRY, WaitListEntry)
C_ASSERT_FIELD(KTHREAD, 0x070, SINGLE_LIST_ENTRY, SwapListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x078, KQUEUE*, Queue)
+C_ASSERT_FIELD(KTHREAD, 0x078, PKQUEUE, Queue)
C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, WaitTime)
-C_ASSERT_FIELD(KTHREAD, 0x080, INT16, KernelApcDisable)
-C_ASSERT_FIELD(KTHREAD, 0x082, INT16, SpecialApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x080, SHORT, KernelApcDisable)
+C_ASSERT_FIELD(KTHREAD, 0x082, SHORT, SpecialApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, CombinedApcDisable)
C_ASSERT_FIELD(KTHREAD, 0x084, PVOID, Teb)
C_ASSERT_FIELD(KTHREAD, 0x088, KTIMER, Timer)
-C_ASSERT_FIELD(KTHREAD, 0x088, UCHAR, TimerFill)
-C_ASSERT_FIELD(KTHREAD, 0x0B0, LONG32, ThreadFlags)
-C_ASSERT_FIELD(KTHREAD, 0x0B8, KWAIT_BLOCK, WaitBlock)
-C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill0)
+C_ASSERT_FIELD(KTHREAD, 0x088, UCHAR[40], TimerFill)
+C_ASSERT_FIELD(KTHREAD, 0x0B0, LONG, ThreadFlags)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, KWAIT_BLOCK[4], WaitBlock)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[23], WaitBlockFill0)
C_ASSERT_FIELD(KTHREAD, 0x0CF, UCHAR, IdealProcessor)
-C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill1)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[47], WaitBlockFill1)
C_ASSERT_FIELD(KTHREAD, 0x0E7, CHAR, PreviousMode)
-C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill2)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[71], WaitBlockFill2)
C_ASSERT_FIELD(KTHREAD, 0x0FF, UCHAR, ResourceIndex)
-C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR, WaitBlockFill3)
+C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[95], WaitBlockFill3)
C_ASSERT_FIELD(KTHREAD, 0x117, UCHAR, LargeStack)
C_ASSERT_FIELD(KTHREAD, 0x118, LIST_ENTRY, QueueListEntry)
-C_ASSERT_FIELD(KTHREAD, 0x120, KTRAP_FRAME*, TrapFrame)
+C_ASSERT_FIELD(KTHREAD, 0x120, PKTRAP_FRAME, TrapFrame)
C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, FirstArgument)
C_ASSERT_FIELD(KTHREAD, 0x128, PVOID, CallbackStack)
C_ASSERT_FIELD(KTHREAD, 0x128, ULONG, CallbackDepth)
@@ -73,11 +75,11 @@ C_ASSERT_FIELD(KTHREAD, 0x137, CHAR, Saturation)
C_ASSERT_FIELD(KTHREAD, 0x138, ULONG, SystemCallNumber)
C_ASSERT_FIELD(KTHREAD, 0x13C, ULONG, Spare02)
C_ASSERT_FIELD(KTHREAD, 0x140, ULONG, UserAffinity)
-C_ASSERT_FIELD(KTHREAD, 0x144, KPROCESS*, Process)
+C_ASSERT_FIELD(KTHREAD, 0x144, PKPROCESS, Process)
C_ASSERT_FIELD(KTHREAD, 0x148, ULONG, Affinity)
-C_ASSERT_FIELD(KTHREAD, 0x14C, KAPC_STATE*, ApcStatePointer)
+C_ASSERT_FIELD(KTHREAD, 0x14C, PKAPC_STATE[2], ApcStatePointer)
C_ASSERT_FIELD(KTHREAD, 0x154, KAPC_STATE, SavedApcState)
-C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR, SavedApcStateFill)
+C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR[23], SavedApcStateFill)
C_ASSERT_FIELD(KTHREAD, 0x16B, CHAR, FreezeCount)
C_ASSERT_FIELD(KTHREAD, 0x16C, CHAR, SuspendCount)
C_ASSERT_FIELD(KTHREAD, 0x16D, UCHAR, UserIdealProcessor)
@@ -88,23 +90,21 @@ C_ASSERT_FIELD(KTHREAD, 0x174, PVOID, StackBase)
C_ASSERT_FIELD(KTHREAD, 0x178, KAPC, SuspendApc)
C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill0)
C_ASSERT_FIELD(KTHREAD, 0x179, CHAR, Spare04)
-C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill1)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[3], SuspendApcFill1)
C_ASSERT_FIELD(KTHREAD, 0x17B, UCHAR, QuantumReset)
-C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill2)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[4], SuspendApcFill2)
C_ASSERT_FIELD(KTHREAD, 0x17C, ULONG, KernelTime)
-C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill3)
-C_ASSERT_FIELD(KTHREAD, 0x19C, KPRCB*, WaitPrcb)
-C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill4)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[36], SuspendApcFill3)
+C_ASSERT_FIELD(KTHREAD, 0x19C, PKPRCB, WaitPrcb)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[40], SuspendApcFill4)
C_ASSERT_FIELD(KTHREAD, 0x1A0, PVOID, LegoData)
-C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR, SuspendApcFill5)
+C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[47], SuspendApcFill5)
C_ASSERT_FIELD(KTHREAD, 0x1A7, UCHAR, PowerState)
C_ASSERT_FIELD(KTHREAD, 0x1A8, ULONG, UserTime)
C_ASSERT_FIELD(KTHREAD, 0x1AC, KSEMAPHORE, SuspendSemaphore)
-C_ASSERT_FIELD(KTHREAD, 0x1AC, UCHAR, SuspendSemaphorefill)
+C_ASSERT_FIELD(KTHREAD, 0x1AC, UCHAR[20], SuspendSemaphorefill)
C_ASSERT_FIELD(KTHREAD, 0x1C0, ULONG, SListFaultCount)
C_ASSERT_FIELD(KTHREAD, 0x1C4, LIST_ENTRY, ThreadListEntry)
C_ASSERT_FIELD(KTHREAD, 0x1CC, LIST_ENTRY, MutantListHead)
C_ASSERT_FIELD(KTHREAD, 0x1D4, PVOID, SListFaultAddress)
C_ASSERT_FIELD(KTHREAD, 0x1D8, PVOID, MdlForLockedTeb)
-
-