- Update KTHREAD and KUSER_SHARED_DATA to latest versions. This should
make 2K3 drivers (eg: npfs.sys) work with their inlined
KeEnterCriticalRegion/KeLeaveCriticalRegion and ASSERTS.
- Update KAPC and DISPATCHER_HEADER to latest DDK definitions.
Modified: trunk/reactos/include/ndk/arch/ketypes.h
Modified: trunk/reactos/include/ndk/asm.h
Modified: trunk/reactos/include/ndk/ketypes.h
Modified: trunk/reactos/ntoskrnl/ex/init.c
Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c
Modified: trunk/reactos/ntoskrnl/ke/i386/fpu.c
Modified: trunk/reactos/ntoskrnl/ke/kthread.c
Modified: trunk/reactos/subsys/win32k/ntuser/desktop.c
Modified: trunk/reactos/subsys/win32k/ntuser/hook.c
Modified: trunk/reactos/subsys/win32k/ntuser/input.c
Modified: trunk/reactos/subsys/win32k/ntuser/message.c
Modified: trunk/reactos/subsys/win32k/ntuser/misc.c
Modified: trunk/reactos/subsys/win32k/ntuser/painting.c
Modified: trunk/reactos/subsys/win32k/ntuser/window.c
Modified: trunk/reactos/w32api/include/ddk/winddk.h
_____
Modified: trunk/reactos/include/ndk/arch/ketypes.h
--- trunk/reactos/include/ndk/arch/ketypes.h 2005-11-08 00:21:29 UTC
(rev 19052)
+++ trunk/reactos/include/ndk/arch/ketypes.h 2005-11-08 08:56:41 UTC
(rev 19053)
@@ -12,10 +12,10 @@
/* Shared structures needed by Arch-specific headers */
typedef struct _KDPC_DATA
{
- LIST_ENTRY DpcListHead;
- ULONG DpcLock;
- ULONG DpcQueueDepth;
- ULONG DpcCount;
+ LIST_ENTRY DpcListHead;
+ ULONG DpcLock;
+ ULONG DpcQueueDepth;
+ ULONG DpcCount;
} KDPC_DATA, *PKDPC_DATA;
typedef struct _PP_LOOKASIDE_LIST
_____
Modified: trunk/reactos/include/ndk/asm.h
--- trunk/reactos/include/ndk/asm.h 2005-11-08 00:21:29 UTC (rev
19052)
+++ trunk/reactos/include/ndk/asm.h 2005-11-08 08:56:41 UTC (rev
19053)
@@ -51,20 +51,20 @@
#define KTHREAD_DEBUG_ACTIVE 0x03
#define KTHREAD_INITIAL_STACK 0x18
#define KTHREAD_STACK_LIMIT 0x1C
-#define KTHREAD_TEB 0x20
-#define KTHREAD_KERNEL_STACK 0x28
-#define KTHREAD_NPX_STATE 0x31
-#define KTHREAD_STATE 0x2D
-#define KTHREAD_ALERTED 0x2E
-#define KTHREAD_APCSTATE_PROCESS 0x34 + 0x10
-#define KTHREAD_PENDING_USER_APC 0x34 + 0x16
-#define KTHREAD_PENDING_KERNEL_APC 0x34 + 0x15
-#define KTHREAD_CONTEXT_SWITCHES 0x4C
-#define KTHREAD_WAIT_IRQL 0x54
-#define KTHREAD_SERVICE_TABLE 0xDC
-#define KTHREAD_PREVIOUS_MODE 0x137
-#define KTHREAD_TRAP_FRAME 0x128
-#define KTHREAD_CALLBACK_STACK 0x120
+#define KTHREAD_TEB 0x74
+#define KTHREAD_KERNEL_STACK 0x20
+#define KTHREAD_NPX_STATE 0x4D
+#define KTHREAD_STATE 0x4C
+#define KTHREAD_ALERTED 0x5E
+#define KTHREAD_APCSTATE_PROCESS 0x28 + 0x10
+#define KTHREAD_PENDING_USER_APC 0x28 + 0x16
+#define KTHREAD_PENDING_KERNEL_APC 0x28 + 0x15
+#define KTHREAD_CONTEXT_SWITCHES 0x48
+#define KTHREAD_WAIT_IRQL 0x4E
+#define KTHREAD_SERVICE_TABLE 0x118
+#define KTHREAD_PREVIOUS_MODE 0xD7
+#define KTHREAD_TRAP_FRAME 0x110
+#define KTHREAD_CALLBACK_STACK 0x114
#define KPROCESS_DIRECTORY_TABLE_BASE 0x18
#define KPROCESS_LDT_DESCRIPTOR0 0x20
_____
Modified: trunk/reactos/include/ndk/ketypes.h
--- trunk/reactos/include/ndk/ketypes.h 2005-11-08 00:21:29 UTC (rev
19052)
+++ trunk/reactos/include/ndk/ketypes.h 2005-11-08 08:56:41 UTC (rev
19053)
@@ -17,11 +17,12 @@
/* CONSTANTS
*****************************************************************/
#define SSDT_MAX_ENTRIES 4
-#define PROCESSOR_FEATURE_MAX 64
#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
#ifdef NTOS_MODE_USER
#define SharedUserData ((KUSER_SHARED_DATA * CONST) USER_SHARED_DATA)
+#define MAX_WOW64_SHARED_ENTRIES 16
+#define PROCESSOR_FEATURE_MAX 64
#endif
/* ENUMERATIONS
**************************************************************/
@@ -216,12 +217,19 @@
ULONG NumberOfPhysicalPages;
BOOLEAN SafeBootMode;
ULONG TraceLogging;
- ULONGLONG Fill0;
- ULONGLONG SystemCall[4];
+ ULONG Fill0;
+ ULONGLONG TestRetInstruction;
+ ULONG SystemCall;
+ ULONG SystemCallReturn;
+ ULONGLONG SystemCallPad[3];
union {
volatile KSYSTEM_TIME TickCount;
volatile ULONG64 TickCountQuad;
};
+ ULONG Cookie;
+ LONGLONG ConsoleSessionForegroundProcessId;
+ ULONG Wow64SharedInformation[MAX_WOW64_SHARED_ENTRIES];
+ ULONG UserModeGlobalLogging;
} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA;
#endif
@@ -347,89 +355,179 @@
typedef struct _KTHREAD
{
- DISPATCHER_HEADER DispatcherHeader; /* 00 */
- LIST_ENTRY MutantListHead; /* 10 */
- PVOID InitialStack; /* 18 */
- ULONG_PTR StackLimit; /* 1C */
- struct _TEB *Teb; /* 20 */
- PVOID TlsArray; /* 24 */
- PVOID KernelStack; /* 28 */
- UCHAR DebugActive; /* 2C */
- UCHAR State; /* 2D */
- BOOLEAN Alerted[2]; /* 2E */
- UCHAR Iopl; /* 30 */
- UCHAR NpxState; /* 31 */
- CHAR Saturation; /* 32 */
- CHAR Priority; /* 33 */
- KAPC_STATE ApcState; /* 34 */
- ULONG ContextSwitches; /* 4C */
- LONG WaitStatus; /* 50 */
- KIRQL WaitIrql; /* 54 */
- CHAR WaitMode; /* 55 */
- UCHAR WaitNext; /* 56 */
- UCHAR WaitReason; /* 57 */
- union /* 58 */
- {
- PKWAIT_BLOCK WaitBlockList; /* 58 */
- PKGATE GateObject; /* 58 */
- }; /* 58 */
- LIST_ENTRY WaitListEntry; /* 5C */
- ULONG WaitTime; /* 64 */
- CHAR BasePriority; /* 68 */
- UCHAR DecrementCount; /* 69 */
- UCHAR PriorityDecrement; /* 6A */
- CHAR Quantum; /* 6B */
- KWAIT_BLOCK WaitBlock[4]; /* 6C */
- PVOID LegoData; /* CC */
- union
- {
- struct
- {
- USHORT KernelApcDisable;
- USHORT SpecialApcDisable;
- };
- ULONG CombinedApcDisable; /* D0 */
- };
- KAFFINITY UserAffinity; /* D4 */
- UCHAR SystemAffinityActive;/* D8 */
- UCHAR PowerState; /* D9 */
- UCHAR NpxIrql; /* DA */
- UCHAR Pad[1]; /* DB */
- PVOID ServiceTable; /* DC */
- struct _KQUEUE *Queue; /* E0 */
- KSPIN_LOCK ApcQueueLock; /* E4 */
- KTIMER Timer; /* E8 */
- LIST_ENTRY QueueListEntry; /* 110 */
- KAFFINITY Affinity; /* 118 */
- UCHAR Preempted; /* 11C */
- UCHAR ProcessReadyQueue; /* 11D */
- UCHAR KernelStackResident; /* 11E */
- UCHAR NextProcessor; /* 11F */
- PVOID CallbackStack; /* 120 */
- struct _W32THREAD *Win32Thread; /* 124 */
- struct _KTRAP_FRAME *TrapFrame; /* 128 */
- PKAPC_STATE ApcStatePointer[2]; /* 12C */
- UCHAR EnableStackSwap; /* 134 */
- UCHAR LargeStack; /* 135 */
- UCHAR ResourceIndex; /* 136 */
- UCHAR PreviousMode; /* 137 */
- ULONG KernelTime; /* 138 */
- ULONG UserTime; /* 13C */
- KAPC_STATE SavedApcState; /* 140 */
- UCHAR Alertable; /* 158 */
- UCHAR ApcStateIndex; /* 159 */
- UCHAR ApcQueueable; /* 15A */
- UCHAR AutoAlignment; /* 15B */
- PVOID StackBase; /* 15C */
- KAPC SuspendApc; /* 160 */
- KSEMAPHORE SuspendSemaphore; /* 190 */
- LIST_ENTRY ThreadListEntry; /* 1A4 */
- CHAR FreezeCount; /* 1AC */
- UCHAR SuspendCount; /* 1AD */
- UCHAR IdealProcessor; /* 1AE */
- UCHAR DisableBoost; /* 1AF */
- UCHAR QuantumReset; /* 1B0 */
-} KTHREAD;
+ DISPATCHER_HEADER DispatcherHeader; /* 00 */
+ LIST_ENTRY MutantListHead; /* 10 */
+ PVOID InitialStack; /* 18 */
+ ULONG_PTR StackLimit; /* 1C */
+ PVOID KernelStack; /* 20 */
+ KSPIN_LOCK ThreadLock; /* 24 */
+ union /* 28 */
+ { /* 28 */
+ KAPC_STATE ApcState; /* 34 */
+ struct /* 28 */
+ { /* 28 */
+ UCHAR ApcStateFill[23]; /* 34 */
+ UCHAR ApcQueueable; /* 3F */
+ }; /* 3F */
+ }; /* 3F */
+ UCHAR NextProcessor; /* 40 */
+ UCHAR DeferredProcessor; /* 41 */
+ UCHAR AdjustReason; /* 42 */
+ UCHAR AdjustIncrement; /* 43 */
+ KSPIN_LOCK ApcQueueLock; /* 44 */
+ ULONG ContextSwitches; /* 48 */
+ UCHAR State; /* 4C */
+ UCHAR NpxState; /* 4D */
+ UCHAR WaitIrql; /* 4E */
+ UCHAR WaitMode; /* 4F */
+ LONG WaitStatus; /* 50 */
+ union /* 54 */
+ { /* 54 */
+ PKWAIT_BLOCK WaitBlockList; /* 54 */
+ PKGATE GateObject; /* 54 */
+ }; /* 54 */
+ UCHAR Alertable; /* 58 */
+ UCHAR WaitNext; /* 59 */
+ UCHAR WaitReason; /* 5A */
+ UCHAR Priority; /* 5B */
+ UCHAR EnableStackSwap; /* 5C */
+ UCHAR SwapBusy; /* 5D */
+ UCHAR Alerted[2]; /* 5E */
+ union /* 60 */
+ { /* 60 */
+ LIST_ENTRY WaitListEntry; /* 60 */
+ SINGLE_LIST_ENTRY SwapListEntry; /* 60 */
+ }; /* 68 */
+ PKQUEUE Queue; /* 68 */
+ ULONG WaitTime; /* 6C */
+ union /* 70 */
+ { /* 70 */
+ struct /* 70 */
+ { /* 70 */
+ USHORT KernelApcDisable; /* 70 */
+ USHORT SpecialApcDisable; /* 72 */
+ }; /* 70 */
+ ULONG CombinedApcDisable; /* 70 */
+ }; /* 74 */
+ struct _TEB *Teb; /* 74 */
+ union /* 78 */
+ { /* 78 */
+ KTIMER Timer; /* 78 */
+ UCHAR TimerFill[40]; /* 78 */
+ }; /* 78 */
+ union /* A0 */
+ { /* A0 */
+ struct /* A0 */
+ { /* A0 */
+ LONG AutoAlignment:1; /* A0 */
+ LONG DisableBoost:1; /* A0 */
+ LONG ReservedFlags:30; /* A0 */
+ }; /* A0 */
+ LONG ThreadFlags; /* A0 */
+ }; /* A0 */
+ PVOID Padding; /* A4 */
+ union /* A8 */
+ { /* A8 */
+ KWAIT_BLOCK WaitBlock[4]; /* A8 */
+ union /* A8 */
+ { /* A8 */
+ struct /* A8 */
+ { /* A8 */
+ UCHAR WaitBlockFill0[23]; /* A8 */
+ UCHAR SystemAffinityActive; /* BF */
+ }; /* A8 */
+ struct /* A8 */
+ { /* A8 */
+ UCHAR WaitBlockFill1[47]; /* A8 */
+ UCHAR PreviousMode; /* D7 */
+ }; /* A8 */
+ struct /* A8 */
+ { /* A8 */
+ UCHAR WaitBlockFill2[71]; /* A8 */
+ UCHAR ResourceIndex; /* EF */
+ }; /* A8 */
+ struct /* A8 */
+ { /* A8 */
+ UCHAR WaitBlockFill3[95]; /* A8 */
+ UCHAR LargeStack; /* 107 */
+ }; /* A8 */
+ }; /* A8 */
+ }; /* A8 */
+ LIST_ENTRY QueueListEntry; /* 108 */
+ PKTRAP_FRAME TrapFrame; /* 110 */
+ PVOID CallbackStack; /* 114 */
+ PVOID ServiceTable; /* 118 */
+ UCHAR ApcStateIndex; /* 11C */
+ UCHAR IdealProcessor; /* 11D */
+ UCHAR Preempted; /* 11E */
+ UCHAR ProcessReadyQueue; /* 11F */
+ UCHAR KernelStackResident; /* 120 */
+ CHAR BasePriority; /* 121 */
+ CHAR PriorityDecrement; /* 122 */
+ CHAR Saturation; /* 123 */
+ KAFFINITY UserAffinity; /* 124 */
+ struct _KPROCESS *Process; /* 128 */
+ KAFFINITY Affinity; /* 12C */
+ PKAPC_STATE ApcStatePointer[2]; /* 130 */
+ union /* 138 */
+ { /* 138 */
+ KAPC_STATE SavedApcState; /* 138 */
+ union /* 138 */
+ { /* 138 */
+ UCHAR SavedApcStateFill[23]; /* 138 */
+ CHAR FreezeCount; /* 14F */
+ }; /* 138 */
+ }; /* 138 */
+ CHAR SuspendCount; /* 150 */
+ UCHAR UserIdealProcessor; /* 151 */
+ UCHAR CalloutActive; /* 152 */
+ UCHAR Iopl; /* 153 */
+ PVOID Win32Thread; /* 154 */
+ PVOID StackBase; /* 158 */
+ union /* 15C */
+ { /* 15C */
+ KAPC SuspendApc; /* 15C */
+ union /* 15C */
+ { /* 15C */
+ UCHAR SuspendApcFill0[1]; /* 15C */
+ CHAR Quantum; /* 15D */
+ }; /* 15C */
+ union /* 15C */
+ { /* 15C */
+ UCHAR SuspendApcFill1[3]; /* 15C */
+ UCHAR QuantumReset; /* 15F */
+ }; /* 15C */
+ union /* 15C */
+ { /* 15C */
+ UCHAR SuspendApcFill2[4]; /* 15C */
+ ULONG KernelTime; /* 160 */
+ }; /* 15C */
+ union /* 15C */
+ { /* 15C */
+ UCHAR SuspendApcFill3[36]; /* 15C */
+ PVOID TlsArray; /* 180 */
+ }; /* 15C */
+ union /* 15C */
+ { /* 15C */
+ UCHAR SuspendApcFill4[40]; /* 15C */
+ PVOID LegoData; /* 184 */
+ }; /* 15C */
+ union /* 15C */
+ { /* 15C */
+ UCHAR SuspendApcFill5[47]; /* 15C */
+ UCHAR PowerState; /* 18B */
+ }; /* 15C */
+ }; /* 15C */
+ ULONG UserTime; /* 18C */
+ union /* 190 */
+ { /* 190 */
+ KSEMAPHORE SuspendSemaphore; /* 190 */
+ UCHAR SuspendSemaphorefill[20]; /* 190 */
+ }; /* 190 */
+ ULONG SListFaultCount; /* 1A4 */
+ LIST_ENTRY ThreadListEntry; /* 1A8 */
+ PVOID SListFaultAddress; /* 1B0 */
+} KTHREAD; /* sizeof: 1B4
*/
#include <poppack.h>
_____
Modified: trunk/reactos/ntoskrnl/ex/init.c
--- trunk/reactos/ntoskrnl/ex/init.c 2005-11-08 00:21:29 UTC (rev
19052)
+++ trunk/reactos/ntoskrnl/ex/init.c 2005-11-08 08:56:41 UTC (rev
19053)
@@ -229,6 +229,7 @@
* Fail at runtime if someone has changed various structures
without
* updating the offsets used for the assembler code.
*/
+ ASSERT(FIELD_OFFSET(KUSER_SHARED_DATA, SystemCall) == 0x300);
ASSERT(FIELD_OFFSET(KTHREAD, InitialStack) ==
KTHREAD_INITIAL_STACK);
ASSERT(FIELD_OFFSET(KTHREAD, Teb) == KTHREAD_TEB);
ASSERT(FIELD_OFFSET(KTHREAD, KernelStack) == KTHREAD_KERNEL_STACK);
_____
Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c
--- trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-11-08 00:21:29 UTC
(rev 19052)
+++ trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-11-08 08:56:41 UTC
(rev 19053)
@@ -806,7 +806,7 @@
if (PreviousMode != KernelMode)
{
/* Set the Debug Flag */
- KeGetCurrentThread()->DebugActive = (Context->Dr7 &
DR7_ACTIVE);
+ KeGetCurrentThread()->DispatcherHeader.DebugActive =
(Context->Dr7 & DR7_ACTIVE);
}
}
_____
Modified: trunk/reactos/ntoskrnl/ke/i386/fpu.c
--- trunk/reactos/ntoskrnl/ke/i386/fpu.c 2005-11-08 00:21:29 UTC
(rev 19052)
+++ trunk/reactos/ntoskrnl/ke/i386/fpu.c 2005-11-08 08:56:41 UTC
(rev 19053)
@@ -571,7 +571,7 @@
#error Unknown compiler for inline assembler
#endif
- KeGetCurrentThread()->NpxIrql = KeGetCurrentIrql();
+ KeGetCurrentThread()->DispatcherHeader.NpxIrql =
KeGetCurrentIrql();
return STATUS_SUCCESS;
}
@@ -582,7 +582,7 @@
{
PFNSAVE_FORMAT FpState = *((PVOID *) Save);
- if (KeGetCurrentThread()->NpxIrql != KeGetCurrentIrql())
+ if (KeGetCurrentThread()->DispatcherHeader.NpxIrql !=
KeGetCurrentIrql())
{
KEBUGCHECK(UNDEFINED_BUG_CODE);
}
_____
Modified: trunk/reactos/ntoskrnl/ke/kthread.c
--- trunk/reactos/ntoskrnl/ke/kthread.c 2005-11-08 00:21:29 UTC (rev
19052)
+++ trunk/reactos/ntoskrnl/ke/kthread.c 2005-11-08 08:56:41 UTC (rev
19053)
@@ -1259,7 +1259,6 @@
Thread->BasePriority = BasePriority;
/* Reset the decrements */
- Thread->DecrementCount = 0;
Thread->PriorityDecrement = 0;
/* If the priority will change, reset quantum and change it for
real */
@@ -1303,7 +1302,6 @@
/* Reset the Quantum and Decrements */
Thread->Quantum = Thread->QuantumReset;
- Thread->DecrementCount = 0;
Thread->PriorityDecrement = 0;
/* Set the new Priority */
_____
Modified: trunk/reactos/subsys/win32k/ntuser/desktop.c
--- trunk/reactos/subsys/win32k/ntuser/desktop.c 2005-11-08
00:21:29 UTC (rev 19052)
+++ trunk/reactos/subsys/win32k/ntuser/desktop.c 2005-11-08
08:56:41 UTC (rev 19053)
@@ -1432,14 +1432,14 @@
{
/* just return the handle, we queried the desktop handle of a
thread running
in the same context */
- Ret = Thread->Tcb.Win32Thread->hDesktop;
+ Ret = ((PW32THREAD)Thread->Tcb.Win32Thread)->hDesktop;
ObDereferenceObject(Thread);
RETURN(Ret);
}
/* get the desktop handle and the desktop of the thread */
- if(!(hThreadDesktop = Thread->Tcb.Win32Thread->hDesktop) ||
- !(DesktopObject = Thread->Tcb.Win32Thread->Desktop))
+ if(!(hThreadDesktop =
((PW32THREAD)Thread->Tcb.Win32Thread)->hDesktop) ||
+ !(DesktopObject =
((PW32THREAD)Thread->Tcb.Win32Thread)->Desktop))
{
ObDereferenceObject(Thread);
DPRINT1("Desktop information of thread 0x%x broken!?\n",
dwThreadId);
_____
Modified: trunk/reactos/subsys/win32k/ntuser/hook.c
--- trunk/reactos/subsys/win32k/ntuser/hook.c 2005-11-08 00:21:29 UTC
(rev 19052)
+++ trunk/reactos/subsys/win32k/ntuser/hook.c 2005-11-08 08:56:41 UTC
(rev 19053)
@@ -90,7 +90,7 @@
IntAddHook(PETHREAD Thread, int HookId, BOOLEAN Global,
PWINSTATION_OBJECT WinStaObj)
{
PHOOK Hook;
- PHOOKTABLE Table = Global ? GlobalHooks :
MsqGetHooks(Thread->Tcb.Win32Thread->MessageQueue);
+ PHOOKTABLE Table = Global ? GlobalHooks :
MsqGetHooks(((PW32THREAD)Thread->Tcb.Win32Thread)->MessageQueue);
HANDLE Handle;
if (NULL == Table)
@@ -106,7 +106,7 @@
}
else
{
- MsqSetHooks(Thread->Tcb.Win32Thread->MessageQueue, Table);
+
MsqSetHooks(((PW32THREAD)Thread->Tcb.Win32Thread)->MessageQueue, Table);
}
}
@@ -136,7 +136,7 @@
return GlobalHooks;
}
- return MsqGetHooks(Hook->Thread->Tcb.Win32Thread->MessageQueue);
+ return
MsqGetHooks(((PW32THREAD)Hook->Thread->Tcb.Win32Thread)->MessageQueue);
}
/* get the first hook in the chain */
@@ -272,7 +272,7 @@
/* FIXME should get timeout from
* HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
- Status =
co_MsqSendMessage(Hook->Thread->Tcb.Win32Thread->MessageQueue, (HWND)
Code, HookId,
+ Status =
co_MsqSendMessage(((PW32THREAD)Hook->Thread->Tcb.Win32Thread)->MessageQu
eue, (HWND) Code, HookId,
wParam, lParam, 5000, TRUE, TRUE,
&uResult);
return NT_SUCCESS(Status) ? uResult : 0;
_____
Modified: trunk/reactos/subsys/win32k/ntuser/input.c
--- trunk/reactos/subsys/win32k/ntuser/input.c 2005-11-08 00:21:29 UTC
(rev 19052)
+++ trunk/reactos/subsys/win32k/ntuser/input.c 2005-11-08 08:56:41 UTC
(rev 19053)
@@ -670,14 +670,14 @@
FocusThread = FocusQueue->Thread;
if (!(FocusThread && FocusThread->Tcb.Win32Thread &&
- FocusThread->Tcb.Win32Thread->KeyboardLayout))
+
((PW32THREAD)FocusThread->Tcb.Win32Thread)->KeyboardLayout))
continue;
/* This function uses lParam to fill wParam according to
the
* keyboard layout in use.
*/
W32kKeyProcessMessage(&msg,
-
FocusThread->Tcb.Win32Thread->KeyboardLayout,
+
((PW32THREAD)FocusThread->Tcb.Win32Thread)->KeyboardLayout,
KeyInput.Flags & KEY_E0 ? 0xE0 :
(KeyInput.Flags & KEY_E1 ? 0xE1 :
0));
_____
Modified: trunk/reactos/subsys/win32k/ntuser/message.c
--- trunk/reactos/subsys/win32k/ntuser/message.c 2005-11-08
00:21:29 UTC (rev 19052)
+++ trunk/reactos/subsys/win32k/ntuser/message.c 2005-11-08
08:56:41 UTC (rev 19053)
@@ -1283,7 +1283,7 @@
if( Status == STATUS_SUCCESS )
{
- pThread = peThread->Tcb.Win32Thread;
+ pThread = (PW32THREAD)peThread->Tcb.Win32Thread;
if( !pThread || !pThread->MessageQueue )
{
ObDereferenceObject( peThread );
@@ -1780,18 +1780,18 @@
BOOL STDCALL
IntInitMessagePumpHook()
{
- PsGetCurrentThread()->Tcb.Win32Thread->MessagePumpHookValue++;
+
((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->MessagePumpHookValu
e++;
return TRUE;
}
BOOL STDCALL
IntUninitMessagePumpHook()
{
- if (PsGetCurrentThread()->Tcb.Win32Thread->MessagePumpHookValue <=
0)
+ if
(((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->MessagePumpHookVal
ue <= 0)
{
return FALSE;
}
- PsGetCurrentThread()->Tcb.Win32Thread->MessagePumpHookValue--;
+
((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->MessagePumpHookValu
e--;
return TRUE;
}
_____
Modified: trunk/reactos/subsys/win32k/ntuser/misc.c
--- trunk/reactos/subsys/win32k/ntuser/misc.c 2005-11-08 00:21:29 UTC
(rev 19052)
+++ trunk/reactos/subsys/win32k/ntuser/misc.c 2005-11-08 08:56:41 UTC
(rev 19053)
@@ -459,7 +459,7 @@
case TWOPARAM_ROUTINE_SETGUITHRDHANDLE:
{
- PUSER_MESSAGE_QUEUE MsgQueue =
PsGetCurrentThread()->Tcb.Win32Thread->MessageQueue;
+ PUSER_MESSAGE_QUEUE MsgQueue =
((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->MessageQueue;
ASSERT(MsgQueue);
RETURN( (DWORD)MsqSetStateWindow(MsgQueue, (ULONG)Param1,
(HWND)Param2));
@@ -1333,12 +1333,12 @@
SetLastWin32Error(ERROR_ACCESS_DENIED);
RETURN( FALSE);
}
- Desktop = Thread->Tcb.Win32Thread->Desktop;
+ Desktop = ((PW32THREAD)Thread->Tcb.Win32Thread)->Desktop;
}
else
{
/* get the foreground thread */
- PW32THREAD W32Thread = PsGetCurrentThread()->Tcb.Win32Thread;
+ PW32THREAD W32Thread =
(PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread;
Desktop = W32Thread->Desktop;
if(Desktop)
{
_____
Modified: trunk/reactos/subsys/win32k/ntuser/painting.c
--- trunk/reactos/subsys/win32k/ntuser/painting.c 2005-11-08
00:21:29 UTC (rev 19052)
+++ trunk/reactos/subsys/win32k/ntuser/painting.c 2005-11-08
08:56:41 UTC (rev 19053)
@@ -671,7 +671,7 @@
ASSERT_REFS_CO(Window);
- Desktop = PsGetCurrentThread()->Tcb.Win32Thread->Desktop;
+ Desktop =
((PW32THREAD)PsGetCurrentThread()->Tcb.Win32Thread)->Desktop;
CaretInfo =
((PUSER_MESSAGE_QUEUE)Desktop->ActiveMessageQueue)->CaretInfo;
hWndCaret = CaretInfo->hWnd;
_____
Modified: trunk/reactos/subsys/win32k/ntuser/window.c
--- trunk/reactos/subsys/win32k/ntuser/window.c 2005-11-08 00:21:29 UTC
(rev 19052)
+++ trunk/reactos/subsys/win32k/ntuser/window.c 2005-11-08 08:56:41 UTC
(rev 19053)
@@ -571,7 +571,7 @@
PLIST_ENTRY Current;
PWINDOW_OBJECT Wnd;
USER_REFERENCE_ENTRY Ref;
- WThread = Thread->Tcb.Win32Thread;
+ WThread = (PW32THREAD)Thread->Tcb.Win32Thread;
while (!IsListEmpty(&WThread->WindowListHead))
{
@@ -1121,7 +1121,7 @@
SetLastWin32Error(ERROR_INVALID_PARAMETER);
return 0;
}
- if(!(W32Thread = Thread->Tcb.Win32Thread))
+ if(!(W32Thread = (PW32THREAD)Thread->Tcb.Win32Thread))
{
ObDereferenceObject(Thread);
DPRINT("Thread is not a GUI Thread!\n");
@@ -1622,7 +1622,7 @@
PRTL_USER_PROCESS_PARAMETERS ProcessParams;
BOOL CalculatedDefPosSize = FALSE;
-
IntGetDesktopWorkArea(Window->OwnerThread->Tcb.Win32Thread->Desktop,
&WorkArea);
+
IntGetDesktopWorkArea(((PW32THREAD)Window->OwnerThread->Tcb.Win32Thread)
->Desktop, &WorkArea);
rc = WorkArea;
ProcessParams = PsGetCurrentProcess()->Peb->ProcessParameters;
@@ -3363,7 +3363,7 @@
/*
* Remove extended window style bit WS_EX_TOPMOST for shell
windows.
*/
- WindowStation =
Window->OwnerThread->Tcb.Win32Thread->Desktop->WindowStation;
+ WindowStation =
((PW32THREAD)Window->OwnerThread->Tcb.Win32Thread)->Desktop->WindowStati
on;
if(WindowStation)
{
if (hWnd == WindowStation->ShellWindow || hWnd ==
WindowStation->ShellListView)
_____
Modified: trunk/reactos/w32api/include/ddk/winddk.h
--- trunk/reactos/w32api/include/ddk/winddk.h 2005-11-08 00:21:29 UTC
(rev 19052)
+++ trunk/reactos/w32api/include/ddk/winddk.h 2005-11-08 08:56:41 UTC
(rev 19053)
@@ -394,6 +394,7 @@
extern NTOSAPI CCHAR KeNumberProcessors;
#define PROCESSOR_FEATURE_MAX 64
+#define MAX_WOW64_SHARED_ENTRIES 16
typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE
{
@@ -418,12 +419,12 @@
volatile KSYSTEM_TIME TimeZoneBias;
USHORT ImageNumberLow;
USHORT ImageNumberHigh;
- WCHAR NtSystemRoot[ 260 ];
+ WCHAR NtSystemRoot[260];
ULONG MaxStackTraceDepth;
ULONG CryptoExponent;
ULONG TimeZoneId;
ULONG LargePageMinimum;
- ULONG Reserved2[ 7 ];
+ ULONG Reserved2[7];
NT_PRODUCT_TYPE NtProductType;
BOOLEAN ProductTypeIsValid;
ULONG NtMajorVersion;
@@ -443,12 +444,19 @@
ULONG NumberOfPhysicalPages;
BOOLEAN SafeBootMode;
ULONG TraceLogging;
- ULONGLONG Fill0;
- ULONGLONG SystemCall[4];
+ ULONG Fill0;
+ ULONGLONG TestRetInstruction;
+ ULONG SystemCall;
+ ULONG SystemCallReturn;
+ ULONGLONG SystemCallPad[3];
union {
volatile KSYSTEM_TIME TickCount;
volatile ULONG64 TickCountQuad;
};
+ ULONG Cookie;
+ LONGLONG ConsoleSessionForegroundProcessId;
+ ULONG Wow64SharedInformation[MAX_WOW64_SHARED_ENTRIES];
+ ULONG UserModeGlobalLogging;
} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA;
/*
@@ -929,21 +937,24 @@
(DDKAPI *PKTRANSFER_ROUTINE)(
VOID);
-typedef struct _KAPC {
- CSHORT Type;
- CSHORT Size;
- ULONG Spare0;
- struct _KTHREAD *Thread;
- LIST_ENTRY ApcListEntry;
- PKKERNEL_ROUTINE KernelRoutine;
- PKRUNDOWN_ROUTINE RundownRoutine;
- PKNORMAL_ROUTINE NormalRoutine;
- PVOID NormalContext;
- PVOID SystemArgument1;
- PVOID SystemArgument2;
- CCHAR ApcStateIndex;
- KPROCESSOR_MODE ApcMode;
- BOOLEAN Inserted;
+typedef struct _KAPC
+{
+ UCHAR Type;
+ UCHAR SpareByte0;
+ UCHAR Size;
+ UCHAR SpareByte1;
+ ULONG SpareLong0;
+ struct _KTHREAD *Thread;
+ LIST_ENTRY ApcListEntry;
+ PKKERNEL_ROUTINE KernelRoutine;
+ PKRUNDOWN_ROUTINE RundownRoutine;
+ PKNORMAL_ROUTINE NormalRoutine;
+ PVOID NormalContext;
+ PVOID SystemArgument1;
+ PVOID SystemArgument2;
+ CCHAR ApcStateIndex;
+ KPROCESSOR_MODE ApcMode;
+ BOOLEAN Inserted;
} KAPC, *PKAPC, *RESTRICTED_POINTER PRKAPC;
typedef struct _KDEVICE_QUEUE {
@@ -1015,13 +1026,33 @@
PKDPC BufferChainingDpc;
} WAIT_CONTEXT_BLOCK, *PWAIT_CONTEXT_BLOCK;
-typedef struct _DISPATCHER_HEADER {
- UCHAR Type;
- UCHAR Absolute;
- UCHAR Size;
- UCHAR Inserted;
- LONG SignalState;
- LIST_ENTRY WaitListHead;
+typedef struct _DISPATCHER_HEADER
+{
+ union
+ {
+ struct
+ {
+ UCHAR Type;
+ union
+ {
+ UCHAR Absolute;
+ UCHAR NpxIrql;
+ };
+ union
+ {
+ UCHAR Size;
+ UCHAR Hand;
+ };
+ union
+ {
+ UCHAR Inserted;
+ BOOLEAN DebugActive;
+ };
+ };
+ volatile LONG Lock;
+ };
+ LONG SignalState;
+ LIST_ENTRY WaitListHead;
} DISPATCHER_HEADER, *PDISPATCHER_HEADER;
typedef struct _KEVENT {