Author: ion
Date: Mon Feb 20 06:45:02 2012
New Revision: 55736
URL:
http://svn.reactos.org/svn/reactos?rev=55736&view=rev
Log:
[NDK]: Fix completely messed up SYSTEM_PROCESS_INFORMATION and SYSTEM_THREAD_INFORMATION
classes, which were causing the kernel to return totally wrong data for
NtQuerySystemInformation(SystemProcessInformation). Fixes Winetests, I assume Taskmgr, and
other similar system tools.
Modified:
trunk/reactos/include/ndk/extypes.h
Modified: trunk/reactos/include/ndk/extypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/extypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/extypes.h [iso-8859-1] Mon Feb 20 06:45:02 2012
@@ -843,7 +843,9 @@
ULONG ContextSwitches;
ULONG ThreadState;
ULONG WaitReason;
+ ULONG PadPadAlignment;
} SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
+C_ASSERT(sizeof(SYSTEM_THREAD_INFORMATION) == 0x40); // Must be 8-byte aligned
typedef struct _SYSTEM_PROCESS_INFORMATION
{
@@ -890,10 +892,11 @@
LARGE_INTEGER ReadTransferCount;
LARGE_INTEGER WriteTransferCount;
LARGE_INTEGER OtherTransferCount;
-
- SYSTEM_THREAD_INFORMATION TH[1];
+// SYSTEM_THREAD_INFORMATION TH[1];
} SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
-
+C_ASSERT(sizeof(SYSTEM_PROCESS_INFORMATION) == 0xB8); // Must be 8-byte aligned
+
+//
// Class 6
typedef struct _SYSTEM_CALL_COUNT_INFORMATION
{