2012-04-01 22:19:32 +00:00
|
|
|
/* Version definitions */
|
|
|
|
#undef NTDDI_VERSION
|
|
|
|
#define NTDDI_VERSION NTDDI_VISTA
|
|
|
|
#undef _WIN32_WINNT
|
|
|
|
#define _WIN32_WINNT _WIN32_WINNT_VISTA
|
|
|
|
|
|
|
|
#include <ntifs.h>
|
|
|
|
#include <ndk/ntndk.h>
|
|
|
|
|
2017-08-16 06:41:41 +00:00
|
|
|
#define C_ASSERT_FIELD(Type, Offset, MemberType, MemberName) \
|
|
|
|
C_ASSERT(FIELD_OFFSET(Type, MemberName) == Offset); \
|
|
|
|
C_ASSERT(FIELD_SIZE(Type, MemberName) == sizeof(MemberType));
|
2012-04-01 22:19:32 +00:00
|
|
|
|
|
|
|
/* KTHREAD */
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x000, DISPATCHER_HEADER, Header)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x010, ULONG64, CycleTime)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x018, ULONG, HighCycleTime)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x020, ULONG64, QuantumTarget)
|
2012-04-01 22:19:32 +00:00
|
|
|
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)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x038, UCHAR[23], ApcStateFill)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x04F, CHAR, Priority)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x050, USHORT, NextProcessor)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x052, USHORT, DeferredProcessor)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x054, ULONG, ApcQueueLock)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x058, ULONG, ContextSwitches)
|
|
|
|
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)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x060, LONG, WaitStatus)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x064, PKWAIT_BLOCK, WaitBlockList)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x064, PKGATE, GateObject)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x068, LONG, MiscFlags)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x06C, UCHAR, WaitReason)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x06D, UCHAR, SwapBusy)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x06E, UCHAR[2], Alerted)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x070, LIST_ENTRY, WaitListEntry)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x070, SINGLE_LIST_ENTRY, SwapListEntry)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x078, PKQUEUE, Queue)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x07C, ULONG, WaitTime)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x080, SHORT, KernelApcDisable)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x082, SHORT, SpecialApcDisable)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x080, ULONG, CombinedApcDisable)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x084, PVOID, Teb)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x088, KTIMER, Timer)
|
2017-08-16 06:41:41 +00:00
|
|
|
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)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x0CF, UCHAR, IdealProcessor)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[47], WaitBlockFill1)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x0E7, CHAR, PreviousMode)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[71], WaitBlockFill2)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x0FF, UCHAR, ResourceIndex)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x0B8, UCHAR[95], WaitBlockFill3)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x117, UCHAR, LargeStack)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x118, LIST_ENTRY, QueueListEntry)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x120, PKTRAP_FRAME, TrapFrame)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x124, PVOID, FirstArgument)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x128, PVOID, CallbackStack)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x128, ULONG, CallbackDepth)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x12C, PVOID, ServiceTable)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x130, UCHAR, ApcStateIndex)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x131, CHAR, BasePriority)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x132, CHAR, PriorityDecrement)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x133, UCHAR, Preempted)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x134, UCHAR, AdjustReason)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x135, CHAR, AdjustIncrement)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x136, UCHAR, Spare01)
|
|
|
|
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)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x144, PKPROCESS, Process)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x148, ULONG, Affinity)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x14C, PKAPC_STATE[2], ApcStatePointer)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x154, KAPC_STATE, SavedApcState)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x154, UCHAR[23], SavedApcStateFill)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x16B, CHAR, FreezeCount)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x16C, CHAR, SuspendCount)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x16D, UCHAR, UserIdealProcessor)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x16E, UCHAR, Spare03)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x16F, UCHAR, OtherPlatformFill)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x170, PVOID, Win32Thread)
|
|
|
|
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)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[3], SuspendApcFill1)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x17B, UCHAR, QuantumReset)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[4], SuspendApcFill2)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x17C, ULONG, KernelTime)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[36], SuspendApcFill3)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x19C, PKPRCB, WaitPrcb)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[40], SuspendApcFill4)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x1A0, PVOID, LegoData)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x178, UCHAR[47], SuspendApcFill5)
|
2012-04-01 22:19:32 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x1A7, UCHAR, PowerState)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x1A8, ULONG, UserTime)
|
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x1AC, KSEMAPHORE, SuspendSemaphore)
|
2017-08-16 06:41:41 +00:00
|
|
|
C_ASSERT_FIELD(KTHREAD, 0x1AC, UCHAR[20], SuspendSemaphorefill)
|
2012-04-01 22:19:32 +00:00
|
|
|
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)
|