Here's a couple of fixes to fix building the tree with GCC4 and later:
1. Apply the attached NDK_NTDLL.patch.patch on NDK_NTDLL.patch (before
applying it) to fix compiling the tree with GCC4
2. ws.patch needs to be applied on the tree to fix redefinition errors
of OBJ_NAME_PATH_SEPARATOR.
3. Apply the attached NDK_Headers.patch.patch on NDK_Headers.patch
(before applying it) to re-apply the fixes previously committed to
ReactOS trunk. They are essential for GCC 4.1 and fix dllimport issues.
4. Apply kdbg.patch on the tree to fix compiling with KDBG enabled
- Thomas
--- NDK_NTDLL.patch Mon May 01 10:16:46 2006
+++ NDK_NTDLL.patch Mon May 01 11:57:56 2006
@@ -78,6 +78,15 @@
&DllName,
&BaseAddress);
if (NT_SUCCESS(Status))
+@@ -1289,7 +1290,7 @@
+ ProtectPage2 = NULL;
+ }
+
+- RelocationDir = LdrProcessRelocationBlock(Page,
++ RelocationDir = LdrProcessRelocationBlock((ULONG_PTR)Page,
+ Count,
+ TypeOffset,
+ Delta);
@@ -2269,7 +2270,7 @@
Entry = ModuleListHead->Flink;
while (Entry != ModuleListHead)
@@ -196,6 +205,20 @@
}
UsedSize += sizeof(RTL_PROCESS_MODULE_INFORMATION);
+@@ -3154,10 +3157,10 @@
+
+
+ PIMAGE_BASE_RELOCATION NTAPI
+-LdrProcessRelocationBlock(IN PVOID Address,
+- IN USHORT Count,
++LdrProcessRelocationBlock(IN ULONG_PTR Address,
++ IN ULONG Count,
+ IN PUSHORT TypeOffset,
+- IN ULONG_PTR Delta)
++ IN LONG_PTR Delta)
+ {
+ SHORT Offset;
+ USHORT Type;
Index: dll/ntdll/ldr/startup.c
===================================================================
--- dll/ntdll/ldr/startup.c (revision 21759)
Index: dll/win32/ws2help/ws2help.h
===================================================================
--- dll/win32/ws2help/ws2help.h (revision 21759)
+++ dll/win32/ws2help/ws2help.h (working copy)
@@ -16,9 +16,6 @@
#define EXPORT STDCALL
-#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\')
-
-
#endif /* __WS2HELP_H */
/* EOF */
Index: dll/win32/wshirda/wshirda.h
===================================================================
--- dll/win32/wshirda/wshirda.h (revision 21759)
+++ dll/win32/wshirda/wshirda.h (working copy)
@@ -16,9 +16,6 @@
#define EXPORT STDCALL
-#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\')
-
-
#endif /* __WSHIRDA_H */
/* EOF */
Index: drivers/network/wshtcpip/wshtcpip.h
===================================================================
--- drivers/network/wshtcpip/wshtcpip.h (revision 21759)
+++ drivers/network/wshtcpip/wshtcpip.h (working copy)
@@ -13,8 +13,6 @@
#define EXPORT STDCALL
-#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\')
-
#define DD_TCP_DEVICE_NAME L"\\Device\\Tcp"
#define DD_UDP_DEVICE_NAME L"\\Device\\Udp"
#define DD_RAW_IP_DEVICE_NAME L"\\Device\\RawIp"
--- NDK_Headers.patch Mon May 01 10:16:46 2006
+++ NDK_Headers.patch Mon May 01 13:31:38 2006
@@ -311,6 +311,12 @@
+} W32_CALLOUT_DATA, *PW32_CALLOUT_DATA;
+
+#endif
+
+Property changes on: include\reactos\win32k\callout.h
+___________________________________________________________________
+Name: svn:eol-style
+ + native
+
Index: include/reactos/drivers/diskdump/diskdump.h
===================================================================
--- include/reactos/drivers/diskdump/diskdump.h (revision 21759)
@@ -1054,20 +1060,7 @@
#endif
//
-@@ -132,7 +78,7 @@
- ULONG Level
- );
-
--NTSYSCALLAPI
-+NTSYSAPI
- NTSTATUS
- NTAPI
- NtSetDebugFilterState(
-@@ -141,11 +87,10 @@
- BOOLEAN State
- );
-
--NTSYSCALLAPI
+@@ -145,7 +91,7 @@
NTSTATUS
NTAPI
NtSystemDebugControl(
@@ -1076,20 +1069,7 @@
PVOID InputBuffer,
ULONG InputBufferLength,
PVOID OutputBuffer,
-@@ -153,7 +98,7 @@
- PULONG ReturnLength
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwQueryDebugFilterState(
-@@ -170,11 +115,10 @@
- BOOLEAN State
- );
-
--NTSYSAPI
+@@ -174,7 +120,7 @@
NTSTATUS
NTAPI
ZwSystemDebugControl(
@@ -1390,263 +1370,6 @@
--*/
-@@ -29,7 +29,6 @@
- //
- // Object Functions
- //
--NTKERNELAPI
- NTSTATUS
- NTAPI
- ObCreateObject(
-@@ -44,14 +43,12 @@
- OUT PVOID *Object
- );
-
--NTKERNELAPI
- ULONG
- NTAPI
- ObGetObjectPointerCount(
- IN PVOID Object
- );
-
--NTKERNELAPI
- NTSTATUS
- NTAPI
- ObReferenceObjectByName(
-@@ -65,7 +62,6 @@
- OUT PVOID *Object
- );
-
--NTKERNELAPI
- NTSTATUS
- NTAPI
- ObFindHandleForObject(
-@@ -97,7 +93,6 @@
- IN BOOLEAN GenerateOnClose
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateDirectoryObject(
-@@ -106,7 +101,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateSymbolicLinkObject(
-@@ -116,7 +110,7 @@
- IN PUNICODE_STRING Name
- );
-
--NTSYSCALLAPI
-+NTSYSAPI
- NTSTATUS
- NTAPI
- NtDeleteObjectAuditAlarm(
-@@ -125,7 +119,6 @@
- IN BOOLEAN GenerateOnClose
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtDuplicateObject(
-@@ -138,21 +131,18 @@
- IN ULONG Options
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtMakePermanentObject(
- IN HANDLE Object
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtMakeTemporaryObject(
- IN HANDLE Handle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtOpenDirectoryObject(
-@@ -161,7 +151,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtOpenJobObject(
-@@ -170,7 +159,6 @@
- POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtOpenSymbolicLinkObject(
-@@ -179,7 +167,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryDirectoryObject(
-@@ -192,7 +179,6 @@
- OUT PULONG ReturnLength OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryObject(
-@@ -214,7 +200,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQuerySymbolicLinkObject(
-@@ -223,7 +208,6 @@
- OUT PULONG DataWritten OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetInformationObject(
-@@ -242,7 +226,6 @@
- IN PSECURITY_DESCRIPTOR SecurityDescriptor
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSignalAndWaitForSingleObject(
-@@ -252,7 +235,6 @@
- IN PLARGE_INTEGER Time
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtWaitForMultipleObjects(
-@@ -263,7 +245,6 @@
- IN PLARGE_INTEGER Time
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtWaitForSingleObject(
-@@ -272,14 +253,14 @@
- IN PLARGE_INTEGER Time
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwClose(
- IN HANDLE Handle
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwCloseObjectAuditAlarm(
-@@ -297,7 +278,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateSymbolicLinkObject(
-@@ -329,7 +309,6 @@
- IN ULONG Options
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwMakePermanentObject(
-@@ -352,7 +331,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwOpenJobObject(
-@@ -370,7 +348,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryDirectoryObject(
-@@ -383,7 +360,6 @@
- OUT PULONG ReturnLength OPTIONAL
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryObject(
-@@ -394,7 +370,7 @@
- OUT PULONG ResultLength OPTIONAL
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwQuerySecurityObject(
-@@ -414,7 +390,6 @@
- OUT PULONG DataWritten OPTIONAL
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetInformationObject(
-@@ -424,7 +399,7 @@
- IN ULONG Length
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwSetSecurityObject(
-@@ -433,7 +408,6 @@
- IN PSECURITY_DESCRIPTOR SecurityDescriptor
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSignalAndWaitForSingleObject(
-@@ -443,7 +417,6 @@
- IN PLARGE_INTEGER Time
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwWaitForMultipleObjects(
Index: include/ndk/rtlfuncs.h
===================================================================
--- include/ndk/rtlfuncs.h (revision 21759)
@@ -1844,93 +1567,8 @@
RtlCompactHeap(
HANDLE heap,
ULONG flags
-@@ -374,7 +455,6 @@
- IN PVOID P
- );
-
--NTSYSAPI
- ULONG
- NTAPI
- RtlGetProcessHeaps(
-@@ -382,7 +462,6 @@
- HANDLE *HeapArray
- );
-
--NTSYSAPI
- PVOID
- NTAPI
- RtlReAllocateHeap(
-@@ -392,17 +471,14 @@
- ULONG Size
- );
-
--NTSYSAPI
- BOOLEAN
- NTAPI
- RtlLockHeap(IN HANDLE Heap);
-
--NTSYSAPI
- BOOLEAN
- NTAPI
- RtlUnlockHeap(IN HANDLE Heap);
-
--NTSYSAPI
- ULONG
- NTAPI
- RtlSizeHeap(
-@@ -411,7 +487,6 @@
- IN PVOID MemoryPointer
- );
-
--NTSYSAPI
- BOOLEAN
- NTAPI
- RtlValidateHeap(
-@@ -444,7 +519,6 @@
- PSID Sid
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- RtlAddAccessAllowedAceEx(
-@@ -455,7 +529,6 @@
- IN PSID pSid
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- RtlAddAccessDeniedAce(
-@@ -465,7 +538,6 @@
- PSID Sid
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- RtlAddAccessDeniedAceEx(
-@@ -476,7 +548,6 @@
- IN PSID Sid
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- RtlAddAuditAccessAceEx(
-@@ -500,7 +571,6 @@
- ULONG AceListLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- RtlAddAuditAccessAce(
-@@ -512,9 +582,17 @@
- BOOLEAN Failure
- );
-
--NTSYSAPI
+@@ -515,6 +596,16 @@
+ NTSYSAPI
NTSTATUS
NTAPI
+RtlAcquirePrivilege(
@@ -1940,81 +1578,45 @@
+ OUT PVOID *ReturnedState
+);
+
++NTSYSAPI
+NTSTATUS
+NTAPI
RtlAdjustPrivilege(
IN ULONG Privilege,
IN BOOLEAN NewValue,
-@@ -539,7 +617,6 @@
- OUT PSID *Sid
+@@ -787,6 +878,13 @@
);
--NTSYSAPI
- BOOLEAN
+ NTSYSAPI
++VOID
++NTAPI
++RtlReleasePrivilege(
++ IN PVOID ReturnedState
++);
++
++NTSYSAPI
+ NTSTATUS
NTAPI
- RtlAreAllAccessesGranted(
-@@ -547,7 +624,6 @@
- ACCESS_MASK DesiredAccess
- );
+ RtlSelfRelativeToAbsoluteSD(
+@@ -1050,14 +1148,17 @@
--NTSYSAPI
- BOOLEAN
- NTAPI
- RtlAreAnyAccessesGranted(
-@@ -563,7 +639,6 @@
- IN PLUID LuidSrc
- );
+ #else
--NTSYSAPI
- VOID
- NTAPI
- RtlCopyLuidAndAttributesArray(
-@@ -572,7 +647,6 @@
- PLUID_AND_ATTRIBUTES Dest
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- RtlCopySidAndAttributesArray(
-@@ -585,7 +659,6 @@
- PULONG RemainingSidAreaSize
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- RtlConvertSidToUnicodeString(
-@@ -652,7 +725,6 @@
- IN PSID Sid2
- );
-
--NTSYSAPI
- BOOLEAN
- NTAPI
- RtlFirstFreeAce(
-@@ -676,7 +748,6 @@
- PVOID *Ace
- );
++NTSYSAPI
+ USHORT
+ FASTCALL
+ RtlUshortByteSwap(IN USHORT Source);
--NTSYSAPI
- NTSTATUS
- NTAPI
- RtlGetControlSecurityDescriptor(
-@@ -786,6 +857,12 @@
- ACL_INFORMATION_CLASS InformationClass
- );
++NTSYSAPI
+ ULONG
+ FASTCALL
+ RtlUlongByteSwap(IN ULONG Source);
-+VOID
-+NTAPI
-+RtlReleasePrivilege(
-+ IN PVOID ReturnedState
-+);
-+
- NTSYSAPI
- NTSTATUS
- NTAPI
-@@ -1351,6 +1428,16 @@
++NTSYSAPI
+ ULONGLONG
+ FASTCALL
+ RtlUlonglongByteSwap(IN ULONGLONG Source);
+@@ -1351,6 +1452,16 @@
);
NTSYSAPI
@@ -2031,7 +1633,7 @@
VOID
NTAPI
RtlFreeUnicodeString(IN PUNICODE_STRING UnicodeString);
-@@ -1369,10 +1456,19 @@
+@@ -1369,10 +1480,19 @@
VOID
NTAPI
RtlInitUnicodeString(
@@ -2053,7 +1655,7 @@
ULONG
NTAPI
RtlIsTextUnicode(
-@@ -1417,6 +1513,14 @@
+@@ -1417,6 +1537,14 @@
PULONG Value
);
@@ -2068,7 +1670,7 @@
//
// Ansi String Functions
//
-@@ -1653,30 +1757,60 @@
+@@ -1653,30 +1781,60 @@
);
NTSYSAPI
@@ -2138,7 +1740,7 @@
);
NTSYSAPI
-@@ -1711,13 +1845,40 @@
+@@ -1711,13 +1869,40 @@
ULONG
NTAPI
RtlGetFullPathName_U(
@@ -2183,7 +1785,7 @@
BOOLEAN
NTAPI
RtlIsNameLegalDOS8Dot3(
-@@ -1738,7 +1899,9 @@
+@@ -1738,7 +1923,9 @@
NTSYSAPI
NTSTATUS
NTAPI
@@ -2194,7 +1796,7 @@
NTSYSAPI
NTSTATUS
-@@ -1789,6 +1952,13 @@
+@@ -1789,6 +1976,13 @@
);
NTSYSAPI
@@ -2208,7 +1810,7 @@
VOID
NTAPI
RtlpUnWaitCriticalSection(
-@@ -1902,7 +2072,7 @@
+@@ -1902,7 +2096,7 @@
// Debug Info Functions
//
NTSYSAPI
@@ -2217,7 +1819,7 @@
NTAPI
RtlCreateQueryDebugBuffer(
IN ULONG Size,
-@@ -1912,7 +2082,7 @@
+@@ -1912,7 +2106,7 @@
NTSYSAPI
NTSTATUS
NTAPI
@@ -2226,7 +1828,7 @@
NTSYSAPI
NTSTATUS
-@@ -1920,7 +2090,7 @@
+@@ -1920,7 +2114,7 @@
RtlQueryProcessDebugInformation(
IN ULONG ProcessId,
IN ULONG DebugInfoClassMask,
@@ -2235,7 +1837,7 @@
);
//
-@@ -1983,7 +2153,15 @@
+@@ -1983,7 +2177,15 @@
NTSYSAPI
VOID
NTAPI
@@ -2252,7 +1854,7 @@
IN PRTL_BITMAP BitMapHeader,
IN ULONG StartingIndex,
IN ULONG NumberToSet
-@@ -2043,6 +2221,26 @@
+@@ -2043,6 +2245,26 @@
RtlDeleteTimerQueue(HANDLE TimerQueue);
//
@@ -2279,12 +1881,12 @@
// Debug Functions
//
ULONG
-@@ -2052,6 +2250,24 @@
+@@ -2052,6 +2274,24 @@
IN ...
);
-+ULONG
+NTSYSAPI
++ULONG
+__cdecl
+DbgPrintEx(
+ IN ULONG ComponentId,
@@ -2304,7 +1906,7 @@
VOID
NTAPI
DbgBreakPoint(VOID);
-@@ -2129,9 +2345,9 @@
+@@ -2129,9 +2369,9 @@
PVOID
NTAPI
RtlImageDirectoryEntryToData(
@@ -2317,7 +1919,7 @@
PULONG Size
);
-@@ -2151,6 +2367,16 @@
+@@ -2151,6 +2391,16 @@
RtlImageNtHeader(IN PVOID BaseAddress);
NTSYSAPI
@@ -2334,7 +1936,7 @@
PIMAGE_SECTION_HEADER
NTAPI
RtlImageRvaToSection(
-@@ -2160,6 +2386,73 @@
+@@ -2160,6 +2410,73 @@
);
//
@@ -2408,7 +2010,7 @@
// Registry Functions
//
NTSYSAPI
-@@ -2311,8 +2604,19 @@
+@@ -2311,8 +2628,19 @@
NTSYSAPI
ULONG
NTAPI
@@ -2429,7 +2031,7 @@
//
// Network Functions
//
-@@ -2320,36 +2624,36 @@
+@@ -2320,36 +2648,36 @@
NTSTATUS
NTAPI
RtlIpv4StringToAddressW(
@@ -2478,7 +2080,7 @@
IN PULONG ScopeId,
IN PUSHORT Port
);
-@@ -2358,8 +2662,8 @@
+@@ -2358,8 +2686,8 @@
NTSTATUS
NTAPI
RtlIpv6StringToAddressExW(
@@ -2489,7 +2091,7 @@
IN PULONG ScopeId,
IN PUSHORT Port
);
-@@ -2368,6 +2672,7 @@
+@@ -2368,6 +2696,7 @@
//
// Time Functions
//
@@ -2497,7 +2099,7 @@
NTSYSAPI
NTSTATUS
NTAPI
-@@ -2402,6 +2707,14 @@
+@@ -2402,6 +2731,14 @@
PTIME_FIELDS TimeFields
);
@@ -2512,7 +2114,7 @@
//
// Version Functions
//
-@@ -2424,4 +2737,8 @@
+@@ -2424,4 +2761,8 @@
NTAPI
RtlGetNtProductType(OUT PNT_PRODUCT_TYPE ProductType);
@@ -4019,760 +3621,1138 @@
--*/
-@@ -98,7 +98,6 @@
- //
- // Native Calls
- //
--NTSYSCALLAPI
+@@ -208,6 +208,15 @@
+ NTSYSCALLAPI
NTSTATUS
NTAPI
- NtAddAtom(
-@@ -107,7 +106,6 @@
- IN OUT PRTL_ATOM Atom
- );
-
--NTSYSCALLAPI
++NtOpenKeyedEvent(
++ OUT PHANDLE EventHandle,
++ IN ACCESS_MASK DesiredAccess,
++ IN POBJECT_ATTRIBUTES ObjectAttributes
++);
++
++NTSYSCALLAPI
++NTSTATUS
++NTAPI
+ NtOpenEventPair(
+ OUT PHANDLE EventPairHandle,
+ IN ACCESS_MASK DesiredAccess,
+@@ -369,6 +378,16 @@
+ NTSYSCALLAPI
NTSTATUS
NTAPI
- NtCancelTimer(
-@@ -115,14 +113,12 @@
- OUT PBOOLEAN CurrentState OPTIONAL
- );
-
--NTSYSCALLAPI
++NtReleaseKeyedEvent(
++ IN HANDLE EventHandle,
++ IN PVOID Key,
++ IN BOOLEAN Alertable,
++ IN PLARGE_INTEGER Timeout OPTIONAL
++);
++
++NTSYSCALLAPI
++NTSTATUS
++NTAPI
+ NtReleaseSemaphore(
+ IN HANDLE SemaphoreHandle,
+ IN LONG ReleaseCount,
+@@ -416,6 +435,13 @@
+ NTSYSCALLAPI
NTSTATUS
NTAPI
- NtClearEvent(
- IN HANDLE EventHandle
++NtSetEventBoostPriority(
++ IN HANDLE EventHandle
++);
++
++NTSYSCALLAPI
++NTSTATUS
++NTAPI
+ NtSetHighEventPair(
+ IN HANDLE EventPairHandle
);
-
--NTSYSCALLAPI
+@@ -488,6 +514,16 @@
+ NTSYSCALLAPI
NTSTATUS
NTAPI
- NtCreateEvent(
-@@ -133,7 +129,6 @@
- IN BOOLEAN InitialState
++NtWaitForKeyedEvent(
++ IN HANDLE EventHandle,
++ IN PVOID Key,
++ IN BOOLEAN Alertable,
++ IN PLARGE_INTEGER Timeout OPTIONAL
++);
++
++NTSYSCALLAPI
++NTSTATUS
++NTAPI
+ NtWaitHighEventPair(
+ IN HANDLE EventPairHandle
);
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateEventPair(
-@@ -142,7 +137,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
+@@ -536,7 +572,6 @@
);
--NTSYSCALLAPI
+ NTSYSAPI
+-NTSYSAPI
NTSTATUS
NTAPI
- NtCreateMutant(
-@@ -152,7 +146,6 @@
- IN BOOLEAN InitialOwner
+ ZwCreateEvent(
+@@ -824,6 +859,7 @@
);
--NTSYSCALLAPI
+ NTSYSAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtCreateSemaphore(
-@@ -163,7 +156,6 @@
- IN LONG MaximumCount
- );
+ ZwSetEvent(
+Index: include/ndk/lpcfuncs.h
+===================================================================
+--- include/ndk/lpcfuncs.h (revision 21759)
++++ include/ndk/lpcfuncs.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateTimer(
-@@ -173,21 +165,18 @@
- IN TIMER_TYPE TimerType
- );
+ Copyright (c) Alex Ionescu. All rights reserved.
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtDeleteAtom(
- IN RTL_ATOM Atom
- );
+@@ -12,7 +12,7 @@
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtDisplayString(
- IN PUNICODE_STRING DisplayString
- );
+ Author:
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtFindAtom(
-@@ -196,7 +185,6 @@
- OUT PRTL_ATOM Atom OPTIONAL
- );
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
--NTSYSCALLAPI
+ --*/
+
+@@ -27,6 +27,7 @@
+ //
+ // Native calls
+ //
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtOpenEvent(
-@@ -205,16 +193,22 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
+ NtAcceptConnectPort(
+@@ -38,6 +39,7 @@
+ PREMOTE_PORT_VIEW ClientView OPTIONAL
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
-+NtOpenKeyedEvent(
-+ OUT PHANDLE EventHandle,
-+ IN ACCESS_MASK DesiredAccess,
-+ IN POBJECT_ATTRIBUTES ObjectAttributes
-+);
-+
-+NTSTATUS
-+NTAPI
- NtOpenEventPair(
- OUT PHANDLE EventPairHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
+ NtCompleteConnectPort(
+@@ -58,6 +60,7 @@
+ PULONG ConnectionInformationLength OPTIONAL
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtOpenMutant(
-@@ -223,7 +217,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
+ NtCreatePort(
+@@ -68,6 +71,7 @@
+ ULONG MaxPoolUsage
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtOpenSemaphore(
-@@ -232,7 +225,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
+ NtCreateWaitablePort(
+@@ -78,6 +82,7 @@
+ ULONG NPMessageQueueSize OPTIONAL
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtOpenTimer(
-@@ -241,7 +233,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
+ NtImpersonateClientOfPort(
+@@ -85,6 +90,7 @@
+ PPORT_MESSAGE ClientMessage
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtPulseEvent(
-@@ -249,7 +240,6 @@
- IN PLONG PulseCount OPTIONAL
+ NtListenPort(
+@@ -92,6 +98,7 @@
+ PPORT_MESSAGE ConnectionRequest
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtQueryDefaultLocale(
-@@ -257,14 +247,12 @@
- OUT PLCID DefaultLocaleId
+ NtQueryInformationPort(
+@@ -102,6 +109,7 @@
+ PULONG ReturnLength
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtQueryDefaultUILanguage(
- PLANGID LanguageId
+ NtReadRequestData(
+@@ -113,6 +121,7 @@
+ PULONG ReturnLength
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtQueryEvent(
-@@ -275,7 +263,6 @@
- OUT PULONG ReturnLength
+ NtReplyPort(
+@@ -120,6 +129,7 @@
+ IN PPORT_MESSAGE LpcReply
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtQueryInformationAtom(
-@@ -286,14 +273,12 @@
- OUT PULONG ReturnLength OPTIONAL
+ NtReplyWaitReceivePort(
+@@ -129,6 +139,7 @@
+ OUT PPORT_MESSAGE ReceiveMessage
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtQueryInstallUILanguage(
- PLANGID LanguageId
+ NtReplyWaitReceivePortEx(
+@@ -139,6 +150,7 @@
+ IN PLARGE_INTEGER Timeout OPTIONAL
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtQueryMutant(
-@@ -304,7 +289,6 @@
- OUT PULONG ResultLength
+ NtReplyWaitReplyPort(
+@@ -146,6 +158,7 @@
+ OUT PPORT_MESSAGE ReplyMessage
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtQuerySemaphore(
-@@ -315,7 +299,6 @@
- OUT PULONG ReturnLength
+ NtRequestPort(
+@@ -177,6 +190,7 @@
+ PULONG ConnectionInformationLength OPTIONAL
);
--NTSYSCALLAPI
++NTSYSCALLAPI
NTSTATUS
NTAPI
- NtQuerySystemEnvironmentValue(
-@@ -325,7 +308,6 @@
+ NtWriteRequestData(
+@@ -188,6 +202,7 @@
PULONG ReturnLength
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtQuerySystemInformation(
-@@ -335,7 +317,6 @@
- OUT PULONG ResultLength
+ ZwAcceptConnectPort(
+@@ -199,13 +214,14 @@
+ PREMOTE_PORT_VIEW ClientView OPTIONAL
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtQueryTimer(
-@@ -346,7 +327,6 @@
- OUT PULONG ResultLength
+ ZwCompleteConnectPort(
+ HANDLE PortHandle
);
-NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtRaiseHardError(
-@@ -358,7 +338,6 @@
- OUT PULONG Response
+ ZwConnectPort(
+@@ -219,6 +235,7 @@
+ PULONG ConnectionInformationLength OPTIONAL
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtReleaseMutant(
-@@ -366,16 +345,23 @@
- IN PLONG ReleaseCount OPTIONAL
+ ZwCreatePort(
+@@ -229,6 +246,7 @@
+ ULONG MaxPoolUsage
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
-+NtReleaseKeyedEvent(
-+ IN HANDLE EventHandle,
-+ IN PVOID Key,
-+ IN BOOLEAN Alertable,
-+ IN PLARGE_INTEGER Timeout OPTIONAL
-+);
-+
-+NTSTATUS
-+NTAPI
- NtReleaseSemaphore(
- IN HANDLE SemaphoreHandle,
- IN LONG ReleaseCount,
- OUT PLONG PreviousCount
+ ZwCreateWaitablePort(
+@@ -239,6 +257,7 @@
+ ULONG NPMessageQueueSize OPTIONAL
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtResetEvent(
-@@ -383,7 +369,6 @@
- OUT PLONG NumberOfWaitingThreads OPTIONAL
+ ZwImpersonateClientOfPort(
+@@ -246,6 +265,7 @@
+ PPORT_MESSAGE ClientMessage
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetDefaultLocale(
-@@ -391,21 +376,18 @@
- IN LCID DefaultLocaleId
+ ZwListenPort(
+@@ -253,6 +273,7 @@
+ PPORT_MESSAGE ConnectionRequest
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetDefaultUILanguage(
- LANGID LanguageId
+ ZwQueryInformationPort(
+@@ -263,6 +284,7 @@
+ PULONG ReturnLength
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetDefaultHardErrorPort(
- IN HANDLE PortHandle
+ ZwReadRequestData(
+@@ -274,6 +296,7 @@
+ PULONG ReturnLength
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetEvent(
-@@ -413,35 +395,36 @@
- OUT PLONG PreviousState OPTIONAL
+ ZwReplyPort(
+@@ -281,6 +304,7 @@
+ IN PPORT_MESSAGE LpcReply
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
-+NtSetEventBoostPriority(
-+ IN HANDLE EventHandle
-+);
-+
-+NTSTATUS
-+NTAPI
- NtSetHighEventPair(
- IN HANDLE EventPairHandle
+ ZwReplyWaitReceivePort(
+@@ -290,6 +314,7 @@
+ OUT PPORT_MESSAGE ReceiveMessage
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetHighWaitLowEventPair(
- IN HANDLE EventPairHandle
+ ZwReplyWaitReceivePortEx(
+@@ -300,6 +325,7 @@
+ IN PLARGE_INTEGER Timeout OPTIONAL
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetLowEventPair(
- HANDLE EventPair
+ ZwReplyWaitReplyPort(
+@@ -307,6 +333,7 @@
+ OUT PPORT_MESSAGE ReplyMessage
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetLowWaitHighEventPair(
- HANDLE EventPair
+ ZwRequestPort(
+@@ -314,7 +341,7 @@
+ IN PPORT_MESSAGE LpcMessage
);
-NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetSystemEnvironmentValue(
-@@ -449,7 +432,6 @@
- IN PUNICODE_STRING Value
+ ZwRequestWaitReplyPort(
+@@ -323,7 +350,7 @@
+ IN PPORT_MESSAGE LpcRequest
);
-NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetSystemInformation(
-@@ -458,7 +440,6 @@
- IN ULONG SystemInformationLength
+ ZwSecureConnectPort(
+@@ -338,6 +365,7 @@
+ PULONG ConnectionInformationLength OPTIONAL
);
--NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtSetTimer(
-@@ -471,35 +452,39 @@
- OUT PBOOLEAN PreviousState OPTIONAL
- );
+ ZwWriteRequestData(
+Index: include/ndk/kdtypes.h
+===================================================================
+--- include/ndk/kdtypes.h (revision 21759)
++++ include/ndk/kdtypes.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetUuidSeed(
- IN PUCHAR UuidSeed
- );
+ Copyright (c) Alex Ionescu. All rights reserved.
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtShutdownSystem(
- IN SHUTDOWN_ACTION Action
- );
+@@ -12,7 +12,7 @@
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
-+NtWaitForKeyedEvent(
-+ IN HANDLE EventHandle,
-+ IN PVOID Key,
-+ IN BOOLEAN Alertable,
-+ IN PLARGE_INTEGER Timeout OPTIONAL
-+);
-+
-+NTSTATUS
-+NTAPI
- NtWaitHighEventPair(
- IN HANDLE EventPairHandle
- );
+ Author:
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtWaitLowEventPair(
- IN HANDLE EventPairHandle
- );
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtTraceEvent(
-@@ -509,7 +494,6 @@
- IN PEVENT_TRACE_HEADER TraceHeader
- );
+ --*/
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwAddAtom(
-@@ -519,7 +503,6 @@
- );
+@@ -47,6 +47,7 @@
+ //
+ // DebugService Control Types
+ //
++#define BREAKPOINT_BREAK 0
+ #define BREAKPOINT_PRINT 1
+ #define BREAKPOINT_PROMPT 2
+ #define BREAKPOINT_LOAD_SYMBOLS 3
+@@ -55,25 +56,109 @@
+ //
+ // Debug Control Codes for NtSystemDebugcontrol
+ //
+-typedef enum _DEBUG_CONTROL_CODE
++typedef enum _SYSDBG_COMMAND
+ {
+- DebugGetTraceInformation = 1,
+- DebugSetInternalBreakpoint,
+- DebugSetSpecialCall,
+- DebugClearSpecialCalls,
+- DebugQuerySpecialCalls,
+- DebugDbgBreakPoint,
+- DebugDbgLoadSymbols
+-} DEBUG_CONTROL_CODE;
++ SysDbgQueryModuleInformation = 0,
++ SysDbgQueryTraceInformation = 1,
++ SysDbgSetTracepoint = 2,
++ SysDbgSetSpecialCall = 3,
++ SysDbgClearSpecialCalls = 4,
++ SysDbgQuerySpecialCalls = 5,
++ SysDbgBreakPoint = 6,
++ SysDbgQueryVersion = 7,
++ SysDbgReadVirtual = 8,
++ SysDbgWriteVirtual = 9,
++ SysDbgReadPhysical = 10,
++ SysDbgWritePhysical = 11,
++ SysDbgReadControlSpace = 12,
++ SysDbgWriteControlSpace = 13,
++ SysDbgReadIoSpace = 14,
++ SysDbgWriteIoSpace = 15,
++ SysDbgReadMsr = 16,
++ SysDbgWriteMsr = 17,
++ SysDbgReadBusData = 18,
++ SysDbgWriteBusData = 19,
++ SysDbgCheckLowMemory = 20,
++ SysDbgEnableKernelDebugger = 21,
++ SysDbgDisableKernelDebugger = 22,
++ SysDbgGetAutoKdEnable = 23,
++ SysDbgSetAutoKdEnable = 24,
++ SysDbgGetPrintBufferSize = 25,
++ SysDbgSetPrintBufferSize = 26,
++ SysDbgGetKdUmExceptionEnable = 27,
++ SysDbgSetKdUmExceptionEnable = 28,
++ SysDbgGetTriageDump = 29,
++ SysDbgGetKdBlockEnable = 30,
++ SysDbgSetKdBlockEnable = 31,
++ SysDbgRegisterForUmBreakInfo = 32,
++ SysDbgGetUmBreakPid = 33,
++ SysDbgClearUmBreakPid = 34,
++ SysDbgGetUmAttachPid = 35,
++ SysDbgClearUmAttachPid = 36,
++} SYSDBG_COMMAND;
- #ifdef NTOS_MODE_USER
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCancelTimer(
-@@ -528,7 +511,6 @@
- );
- #endif
+ //
+-// Kernel Debugger Port Definition
++// System Debugger Types
+ //
+-typedef struct _KD_PORT_INFORMATION
++typedef struct _SYSDBG_PHYSICAL
+ {
+- ULONG ComPort;
+- ULONG BaudRate;
+- ULONG BaseAddress;
+-} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
++ PHYSICAL_ADDRESS Address;
++ PVOID Buffer;
++ ULONG Request;
++} SYSDBG_PHYSICAL, *PSYSDBG_PHYSICAL;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwClearEvent(
-@@ -536,7 +518,6 @@
- );
++typedef struct _SYSDBG_VIRTUAL
++{
++ PVOID Address;
++ PVOID Buffer;
++ ULONG Request;
++} SYSDBG_VIRTUAL, *PSYSDBG_VIRTUAL;
++
++typedef struct _SYSDBG_CONTROL_SPACE
++{
++ ULONGLONG Address;
++ PVOID Buffer;
++ ULONG Request;
++ ULONG Processor;
++} SYSDBG_CONTROL_SPACE, *PSYSDBG_CONTROL_SPACE;
++
++typedef struct _SYSDBG_IO_SPACE
++{
++ ULONGLONG Address;
++ PVOID Buffer;
++ ULONG Request;
++ INTERFACE_TYPE InterfaceType;
++ ULONG BusNumber;
++ ULONG AddressSpace;
++} SYSDBG_IO_SPACE, *PSYSDBG_IO_SPACE;
++
++typedef struct _SYSDBG_BUS_DATA
++{
++ ULONG Address;
++ PVOID Buffer;
++ ULONG Request;
++ BUS_DATA_TYPE BusDataType;
++ ULONG BusNumber;
++ ULONG SlotNumber;
++} SYSDBG_BUS_DATA, *PSYSDBG_BUS_DATA;
++
++typedef struct _SYSDBG_MSR
++{
++ ULONG Address;
++ ULONGLONG Data;
++} SYSDBG_MSR, *PSYSDBG_MSR;
++
++typedef struct _SYSDBG_TRIAGE_DUMP
++{
++ ULONG Flags;
++ ULONG BugCheckCode;
++ ULONG_PTR BugCheckParam1;
++ ULONG_PTR BugCheckParam2;
++ ULONG_PTR BugCheckParam3;
++ ULONG_PTR BugCheckParam4;
++ ULONG ProcessHandles;
++ ULONG ThreadHandles;
++ PHANDLE Handles;
++} SYSDBG_TRIAGE_DUMP, *PSYSDBG_TRIAGE_DUMP;
++
+ #endif // _KDTYPES_H
+Index: include/ndk/obtypes.h
+===================================================================
+--- include/ndk/obtypes.h (revision 21759)
++++ include/ndk/obtypes.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
- NTSYSAPI
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateEvent(
-@@ -547,7 +528,6 @@
- IN BOOLEAN InitialState
- );
+ Copyright (c) Alex Ionescu. All rights reserved.
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateEventPair(
-@@ -556,7 +536,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
+@@ -12,7 +12,7 @@
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateMutant(
-@@ -566,7 +545,6 @@
- IN BOOLEAN InitialOwner
- );
+ Author:
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateSemaphore(
-@@ -578,7 +556,6 @@
- );
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
- #ifdef NTOS_MODE_USER
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateTimer(
-@@ -589,21 +566,18 @@
- );
- #endif
+ --*/
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwDeleteAtom(
- IN RTL_ATOM Atom
- );
+@@ -49,6 +49,11 @@
+ }
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwDisplayString(
- IN PUNICODE_STRING DisplayString
- );
+ //
++// Number of custom-defined bits that can be attached to a handle
++//
++#define OBJ_HANDLE_TAGBITS 0x3
++
++//
+ // Directory Object Access Rights
+ //
+ #define DIRECTORY_QUERY 0x0001
+@@ -57,6 +62,11 @@
+ #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
+ #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwFindAtom(
-@@ -612,7 +586,6 @@
- OUT PRTL_ATOM Atom OPTIONAL
- );
++//
++// Slash separator used in the OB Namespace (and Registry)
++//
++#define OBJ_NAME_PATH_SEPARATOR L'\\'
++
+ #else
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwOpenEvent(
-@@ -621,7 +594,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
+ //
+@@ -127,7 +137,6 @@
+ } OB_DUMP_CONTROL, *POB_DUMP_CONTROL;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwOpenEventPair(
-@@ -630,7 +602,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwOpenMutant(
-@@ -639,7 +610,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwOpenSemaphore(
-@@ -649,7 +619,6 @@
- );
-
- #ifdef NTOS_MODE_USER
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwOpenTimer(
-@@ -659,7 +628,6 @@
- );
- #endif
+ #ifndef NTOS_MODE_USER
+-#ifndef _REACTOS_
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwPulseEvent(
-@@ -667,7 +635,6 @@
- IN PLONG PulseCount OPTIONAL
- );
+ //
+ // Object Type Callbacks
+@@ -204,87 +213,6 @@
+ #else
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryDefaultLocale(
-@@ -675,14 +642,12 @@
- OUT PLCID DefaultLocaleId
- );
+ //
+-// FIXME: ReactOS ONLY Object Callbacks
+-//
+-typedef NTSTATUS
+-(NTAPI *OB_OPEN_METHOD)(
+- OB_OPEN_REASON Reason,
+- PVOID ObjectBody,
+- PEPROCESS Process,
+- ULONG HandleCount,
+- ACCESS_MASK GrantedAccess
+-);
+-
+-typedef NTSTATUS
+-(NTAPI *OB_PARSE_METHOD)(
+- PVOID Object,
+- PVOID *NextObject,
+- PUNICODE_STRING FullPath,
+- PWSTR *Path,
+- ULONG Attributes
+-);
+-
+-typedef VOID
+-(NTAPI *OB_DELETE_METHOD)(
+- PVOID DeletedObject
+-);
+-
+-typedef VOID
+-(NTAPI *OB_CLOSE_METHOD)(
+- PVOID ClosedObject,
+- ULONG HandleCount
+-);
+-
+-typedef VOID
+-(NTAPI *OB_DUMP_METHOD)(
+- VOID
+-);
+-
+-typedef NTSTATUS
+-(NTAPI *OB_OKAYTOCLOSE_METHOD)(
+- VOID
+-);
+-
+-typedef NTSTATUS
+-(NTAPI *OB_QUERYNAME_METHOD)(
+- PVOID ObjectBody,
+- POBJECT_NAME_INFORMATION ObjectNameInfo,
+- ULONG Length,
+- PULONG ReturnLength
+-);
+-
+-typedef PVOID
+-(NTAPI *OB_FIND_METHOD)(
+- PVOID WinStaObject,
+- PWSTR Name,
+- ULONG Attributes
+-);
+-
+-typedef NTSTATUS
+-(NTAPI *OB_SECURITY_METHOD)(
+- PVOID Object,
+- SECURITY_OPERATION_CODE OperationType,
+- SECURITY_INFORMATION SecurityInformation,
+- PSECURITY_DESCRIPTOR NewSecurityDescriptor,
+- PULONG ReturnLength,
+- PSECURITY_DESCRIPTOR *OldSecurityDescriptor,
+- POOL_TYPE PoolType,
+- PGENERIC_MAPPING GenericMapping
+-);
+-
+-typedef NTSTATUS
+-(NTAPI *OB_CREATE_METHOD)(
+- PVOID ObjectBody,
+- PVOID Parent,
+- PWSTR RemainingPath,
+- struct _OBJECT_ATTRIBUTES* ObjectAttributes
+-);
+-
+-#endif
+-
+-#else
+-
+-//
+ // Object Information Types for NtQueryInformationObject
+ //
+ typedef struct _OBJECT_NAME_INFORMATION
+@@ -429,9 +357,6 @@
+ //
+ typedef struct _OBJECT_HEADER
+ {
+-#ifdef _REACTOS_
+- LIST_ENTRY Entry; // FIXME: REACTOS ONLY
+-#endif
+ LONG PointerCount;
+ union
+ {
+Index: include/ndk/rtltypes.h
+===================================================================
+--- include/ndk/rtltypes.h (revision 21759)
++++ include/ndk/rtltypes.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryDefaultUILanguage(
- PLANGID LanguageId
- );
+ Copyright (c) Alex Ionescu. All rights reserved.
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryEvent(
-@@ -693,7 +658,6 @@
- OUT PULONG ReturnLength
- );
+@@ -12,7 +12,7 @@
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryInformationAtom(
-@@ -704,14 +668,12 @@
- OUT PULONG ReturnLength OPTIONAL
- );
+ Author:
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryInstallUILanguage(
- PLANGID LanguageId
- );
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryMutant(
-@@ -722,7 +684,6 @@
- OUT PULONG ResultLength
- );
+ --*/
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQuerySemaphore(
-@@ -733,7 +694,6 @@
- OUT PULONG ReturnLength
- );
+@@ -42,6 +42,9 @@
+ #define RTL_USER_PROCESS_PARAMETERS_DISABLE_HEAP_CHECKS 0x100
+ #define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_1 0x200
+ #define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_2 0x400
++#define RTL_USER_PROCESS_PARAMETERS_PRIVATE_DLL_PATH 0x1000
++#define RTL_USER_PROCESS_PARAMETERS_LOCAL_DLL_PATH 0x2000
++#define RTL_USER_PROCESS_PARAMETERS_NX 0x20000
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQuerySystemEnvironmentValue(
-@@ -743,7 +703,6 @@
- PULONG ReturnLength
- );
+ //
+ // Exception Flags
+@@ -50,6 +53,7 @@
+ #define EXCEPTION_UNWINDING 0x02
+ #define EXCEPTION_EXIT_UNWIND 0x04
+ #define EXCEPTION_STACK_INVALID 0x08
++#define EXCEPTION_UNWIND (EXCEPTION_UNWINDING +
EXCEPTION_EXIT_UNWIND)
+ #define EXCEPTION_NESTED_CALL 0x10
+ #define EXCEPTION_TARGET_UNWIND 0x20
+ #define EXCEPTION_COLLIDED_UNWIND 0x20
+@@ -64,6 +68,26 @@
+ #define RTL_RANGE_CONFLICT 0x02
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQuerySystemInformation(
-@@ -753,7 +712,6 @@
- OUT PULONG ResultLength
- );
+ //
++// Activation Context Frame Flags
++//
++#define RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_FORMAT_WHISTLER \
++ 0x1
++
++//
++// Heap Flags
++//
++#define HEAP_CLASS_0 0x00000000
++#define HEAP_CLASS_1 0x00001000
++#define HEAP_CLASS_2 0x00002000
++#define HEAP_CLASS_3 0x00003000
++#define HEAP_CLASS_4 0x00004000
++#define HEAP_CLASS_5 0x00005000
++#define HEAP_CLASS_6 0x00006000
++#define HEAP_CLASS_7 0x00007000
++#define HEAP_CLASS_8 0x00008000
++#define HEAP_CLASS_MASK 0x0000F000
++
++//
+ // Registry Keys
+ //
+ #define RTL_REGISTRY_ABSOLUTE 0
+@@ -120,6 +144,12 @@
+ #define RTL_CRITSECT_TYPE 0
+ #define RTL_RESOURCE_TYPE 1
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryTimer(
-@@ -764,7 +722,6 @@
- OUT PULONG ResultLength
- );
++//
++// RtlAcquirePrivileges Flags
++//
++#define RTL_ACQUIRE_PRIVILEGE_IMPERSONATE 1
++#define RTL_ACQUIRE_PRIVILEGE_PROCESS 2
++
+ #ifdef NTOS_MODE_USER
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwRaiseHardError(
-@@ -776,7 +733,6 @@
- OUT PULONG Response
- );
+ //
+@@ -141,6 +171,12 @@
+ #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
+ #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
+ #define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
++#else
++//
++// Message Resource Flag
++//
++#define MESSAGE_RESOURCE_UNICODE 0x0001
++
+ #endif
+ #define MAXIMUM_LEADBYTES 12
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwReleaseMutant(
-@@ -784,7 +740,6 @@
- IN PLONG ReleaseCount OPTIONAL
- );
+@@ -165,6 +201,14 @@
+ #define RTL_ATOM_IS_PINNED 0x1
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwReleaseSemaphore(
-@@ -793,7 +748,6 @@
- OUT PLONG PreviousCount
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwResetEvent(
-@@ -801,7 +755,6 @@
- OUT PLONG NumberOfWaitingThreads OPTIONAL
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetDefaultLocale(
-@@ -809,14 +762,12 @@
- IN LCID DefaultLocaleId
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetDefaultUILanguage(
- LANGID LanguageId
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetDefaultHardErrorPort(
-@@ -831,35 +782,30 @@
- OUT PLONG PreviousState OPTIONAL
- );
+ //
++// Critical section lock bits
++//
++#define CS_LOCK_BIT 0x1
++#define CS_LOCK_BIT_V 0x0
++#define CS_LOCK_WAITER_WOKEN 0x2
++#define CS_LOCK_WAITER_INC 0x4
++
++//
+ // Codepage Tags
+ //
+ #ifdef NTOS_MODE_USER
+@@ -221,14 +265,14 @@
+ //
+ typedef enum _RTL_PATH_TYPE
+ {
+- INVALID_PATH = 0,
+- UNC_PATH, // "//foo"
+- ABSOLUTE_DRIVE_PATH, // "c:/foo"
+- RELATIVE_DRIVE_PATH, // "c:foo"
+- ABSOLUTE_PATH, // "/foo"
+- RELATIVE_PATH, // "foo"
+- DEVICE_PATH, // "//./foo"
+- UNC_DOT_PATH // "//."
++ RtlPathTypeUnknown,
++ RtlPathTypeUncAbsolute,
++ RtlPathTypeDriveAbsolute,
++ RtlPathTypeDriveRelative,
++ RtlPathTypeRooted,
++ RtlPathTypeRelative,
++ RtlPathTypeLocalDevice,
++ RtlPathTypeRootLocalDevice,
+ } RTL_PATH_TYPE;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetHighEventPair(
- IN HANDLE EventPairHandle
+ #ifndef NTOS_MODE_USER
+@@ -263,6 +307,30 @@
+ IN OUT PVOID DispatcherContext
);
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetHighWaitLowEventPair(
- IN HANDLE EventPairHandle
- );
++//
++// RTL Library Allocation/Free Routines
++//
++typedef PVOID
++(NTAPI *PRTL_ALLOCATE_STRING_ROUTINE)(
++ SIZE_T NumberOfBytes
++);
++
++typedef PVOID
++(NTAPI *PRTL_REALLOCATE_STRING_ROUTINE)(
++ SIZE_T NumberOfBytes,
++ PVOID Buffer
++);
++
++typedef
++VOID
++(NTAPI *PRTL_FREE_STRING_ROUTINE)(
++ PVOID Buffer
++);
++
++extern const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
++extern const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
++extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
++
+ #endif
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetLowEventPair(
- HANDLE EventPair
- );
+ //
+@@ -538,7 +606,39 @@
+ CSHORT Weekday;
+ } TIME_FIELDS, *PTIME_FIELDS;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetLowWaitHighEventPair(
- HANDLE EventPair
- );
++//
++// Activation Context
++//
++typedef PVOID PACTIVATION_CONTEXT;
++
++//
++// Activation Context Frame
++//
++typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME
++{
++ struct __RTL_ACTIVATION_CONTEXT_STACK_FRAME *Previous;
++ PACTIVATION_CONTEXT ActivationContext;
++ ULONG Flags;
++} RTL_ACTIVATION_CONTEXT_STACK_FRAME,
++ *PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
++
++typedef struct _RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED
++{
++ ULONG Size;
++ ULONG Format;
++ RTL_ACTIVATION_CONTEXT_STACK_FRAME Frame;
++ PVOID Extra1;
++ PVOID Extra2;
++ PVOID Extra3;
++ PVOID Extra4;
++} RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED,
++ *PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED;
++
+ #endif
++
++//
++// ACE Structure
++//
+ typedef struct _ACE
+ {
+ ACE_HEADER Header;
+@@ -550,42 +650,54 @@
+ //
+ typedef struct _RTL_PROCESS_MODULE_INFORMATION
+ {
+- ULONG Reserved[2];
+- PVOID Base;
+- ULONG Size;
++ ULONG Section;
++ PVOID MappedBase;
++ PVOID ImageBase;
++ ULONG ImageSize;
+ ULONG Flags;
+- USHORT Index;
+- USHORT Unknown;
++ USHORT LoadOrderIndex;
++ USHORT InitOrderIndex;
+ USHORT LoadCount;
+- USHORT ModuleNameOffset;
+- CHAR ImageName[256];
++ USHORT OffsetToFileName;
++ CHAR FullPathName[256];
+ } RTL_PROCESS_MODULE_INFORMATION, *PRTL_PROCESS_MODULE_INFORMATION;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetSystemEnvironmentValue(
-@@ -867,7 +813,6 @@
- IN PUNICODE_STRING Value
- );
+ typedef struct _RTL_PROCESS_MODULES
+ {
+- ULONG ModuleCount;
+- RTL_PROCESS_MODULE_INFORMATION ModuleEntry[1];
++ ULONG NumberOfModules;
++ RTL_PROCESS_MODULE_INFORMATION Modules[1];
+ } RTL_PROCESS_MODULES, *PRTL_PROCESS_MODULES;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetSystemInformation(
-@@ -877,7 +822,6 @@
- );
+-typedef struct _RTL_PROCESS_HEAP_INFORMATION
++typedef struct _RTL_PROCESS_MODULE_INFORMATION_EX
+ {
+- PVOID Base;
++ ULONG NextOffset;
++ RTL_PROCESS_MODULE_INFORMATION BaseInfo;
++ ULONG ImageCheckSum;
++ ULONG TimeDateStamp;
++ PVOID DefaultBase;
++} RTL_PROCESS_MODULE_INFORMATION_EX, *PRTL_PROCESS_MODULE_INFORMATION_EX;
++
++typedef struct _RTL_HEAP_INFORMATION
++{
++ PVOID BaseAddress;
+ ULONG Flags;
+- USHORT Granularity;
+- USHORT Unknown;
+- ULONG Allocated;
+- ULONG Committed;
+- ULONG TagCount;
+- ULONG BlockCount;
+- ULONG Reserved[7];
++ USHORT EntryOverhead;
++ USHORT CreatorBackTraceIndex;
++ ULONG BytesAllocated;
++ ULONG BytesCommitted;
++ ULONG NumberOfTags;
++ ULONG NumberOfEntries;
++ ULONG NumberOfPseudoTags;
++ ULONG PseudoTagGranularity;
++ ULONG Reserved[4];
+ PVOID Tags;
+- PVOID Blocks;
+-} RTL_PROCESS_HEAP_INFORMATION, *PRTL_PROCESS_HEAP_INFORMATION;
++ PVOID Entries;
++} RTL_HEAP_INFORMATION, *PRTL_HEAP_INFORMATION;
- #ifdef NTOS_MODE_USER
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetTimer(
-@@ -891,35 +835,30 @@
- );
- #endif
+ typedef struct _RTL_PROCESS_HEAPS
+ {
+- ULONG HeapCount;
+- RTL_PROCESS_HEAP_INFORMATION HeapEntry[1];
++ ULONG NumberOfHeaps;
++ RTL_HEAP_INFORMATION Heaps[1];
+ } RTL_PROCESS_HEAPS, *PRTL_PROCESS_HEAPS;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetUuidSeed(
- IN PUCHAR UuidSeed
- );
+ typedef struct _RTL_PROCESS_LOCK_INFORMATION
+@@ -604,8 +716,8 @@
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwShutdownSystem(
- IN SHUTDOWN_ACTION Action
- );
+ typedef struct _RTL_PROCESS_LOCKS
+ {
+- ULONG LockCount;
+- RTL_PROCESS_LOCK_INFORMATION LockEntry[1];
++ ULONG NumberOfLocks;
++ RTL_PROCESS_LOCK_INFORMATION Locks[1];
+ } RTL_PROCESS_LOCKS, *PRTL_PROCESS_LOCKS;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwWaitHighEventPair(
- IN HANDLE EventPairHandle
- );
+ typedef struct _RTL_PROCESS_BACKTRACE_INFORMATION
+@@ -626,27 +738,61 @@
+ RTL_PROCESS_BACKTRACE_INFORMATION BackTraces[1];
+ } RTL_PROCESS_BACKTRACES, *PRTL_PROCESS_BACKTRACES;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwWaitLowEventPair(
- IN HANDLE EventPairHandle
- );
+-typedef struct _RTL_DEBUG_BUFFER
++typedef struct _RTL_PROCESS_VERIFIER_OPTIONS
+ {
+- HANDLE SectionHandle;
+- PVOID SectionBase;
+- PVOID RemoteSectionBase;
+- ULONG SectionBaseDelta;
+- HANDLE EventPairHandle;
+- ULONG Unknown[2];
+- HANDLE RemoteThreadHandle;
+- ULONG InfoClassMask;
+- ULONG SizeOfInfo;
+- ULONG AllocatedSize;
+- ULONG SectionSize;
+- PRTL_PROCESS_MODULES ModuleInformation;
+- PRTL_PROCESS_BACKTRACES BackTraceInformation;
+- PRTL_PROCESS_HEAPS HeapInformation;
+- PRTL_PROCESS_LOCKS LockInformation;
+- PVOID Reserved[8];
+-} RTL_DEBUG_BUFFER, *PRTL_DEBUG_BUFFER;
++ ULONG SizeStruct;
++ ULONG Option;
++ UCHAR OptionData[1];
++ //
++ // Option array continues below
++ //
++} RTL_PROCESS_VERIFIER_OPTIONS, *PRTL_PROCESS_VERIFIER_OPTIONS;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwTraceEvent(
-Index: include/ndk/lpcfuncs.h
++typedef struct _RTL_DEBUG_INFORMATION
++{
++ HANDLE SectionHandleClient;
++ PVOID ViewBaseClient;
++ PVOID ViewBaseTarget;
++ ULONG ViewBaseDelta;
++ HANDLE EventPairClient;
++ PVOID EventPairTarget;
++ HANDLE TargetProcessId;
++ HANDLE TargetThreadHandle;
++ ULONG Flags;
++ ULONG OffsetFree;
++ ULONG CommitSize;
++ ULONG ViewSize;
++ union
++ {
++ PRTL_PROCESS_MODULES Modules;
++ PRTL_PROCESS_MODULE_INFORMATION_EX ModulesEx;
++ };
++ PRTL_PROCESS_BACKTRACES BackTraces;
++ PRTL_PROCESS_HEAPS Heaps;
++ PRTL_PROCESS_LOCKS Locks;
++ HANDLE SpecificHeap;
++ HANDLE TargetProcessHandle;
++ RTL_PROCESS_VERIFIER_OPTIONS VerifierOptions;
++ HANDLE ProcessHeap;
++ HANDLE CriticalSectionHandle;
++ HANDLE CriticalSectionOwnerThread;
++ PVOID Reserved[4];
++} RTL_DEBUG_INFORMATION, *PRTL_DEBUG_INFORMATION;
++
+ //
++// Unload Event Trace Structure for RtlGetUnloadEventTrace
++//
++typedef struct _RTL_UNLOAD_EVENT_TRACE
++{
++ PVOID BaseAddress;
++ ULONG SizeOfImage;
++ ULONG Sequence;
++ ULONG TimeDateStamp;
++ ULONG CheckSum;
++ WCHAR ImageName[32];
++} RTL_UNLOAD_EVENT_TRACE, *PRTL_UNLOAD_EVENT_TRACE;
++
++//
+ // RTL Handle Structures
+ //
+ typedef struct _RTL_HANDLE_TABLE_ENTRY
+@@ -692,6 +838,19 @@
+ UNICODE_STRING DosPath;
+ } RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
+
++//
++// Private State structure for RtlAcquirePrivilege/RtlReleasePrivilege
++//
++typedef struct _RTL_ACQUIRE_STATE
++{
++ HANDLE Token;
++ HANDLE OldImpersonationToken;
++ PTOKEN_PRIVILEGES OldPrivileges;
++ PTOKEN_PRIVILEGES NewPrivileges;
++ ULONG Flags;
++ UCHAR OldPrivBuffer[1024];
++} RTL_ACQUIRE_STATE, *PRTL_ACQUIRE_STATE;
++
+ #ifndef NTOS_MODE_USER
+
+ //
+@@ -718,7 +877,7 @@
+ ULONG_PTR SpinCount;
+ } RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
+
+-#else
++#endif
+
+ //
+ // RTL Range List Structures
+@@ -749,8 +908,6 @@
+ ULONG Stamp;
+ } RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
+
+-#endif
+-
+ //
+ // RTL Resource
+ //
+@@ -902,6 +1059,24 @@
+ #endif
+
+ //
++// Hotpatch Header
++//
++typedef struct _RTL_PATCH_HEADER
++{
++ LIST_ENTRY PatchList;
++ PVOID PatchImageBase;
++ struct _RTL_PATCH_HEADER *NextPath;
++ ULONG PatchFlags;
++ LONG PatchRefCount;
++ struct _HOTPATCH_HEADER *HotpatchHeader;
++ UNICODE_STRING TargetDllName;
++ PVOID TargetDllBase;
++ PLDR_DATA_TABLE_ENTRY TargetLdrDataTableEntry;
++ PLDR_DATA_TABLE_ENTRY PatchLdrDataTableEntry;
++ struct _SYSTEM_HOTPATCH_CODE_INFORMATION *CodeInfo;
++} RTL_PATCH_HEADER, *PRTL_PATCH_HEADER;
++
++//
+ // Header for NLS Files
+ //
+ typedef struct _NLS_FILE_HEADER
+@@ -917,4 +1092,47 @@
+ UCHAR LeadByte[MAXIMUM_LEADBYTES];
+ } NLS_FILE_HEADER, *PNLS_FILE_HEADER;
+
++//
++// Stack Traces
++//
++typedef struct _RTL_STACK_TRACE_ENTRY
++{
++ struct _RTL_STACK_TRACE_ENTRY *HashChain;
++ ULONG TraceCount;
++ USHORT Index;
++ USHORT Depth;
++ PVOID BackTrace[32];
++} RTL_STACK_TRACE_ENTRY, *PRTL_STACK_TRACE_ENTRY;
++
++typedef struct _STACK_TRACE_DATABASE
++{
++ RTL_CRITICAL_SECTION CriticalSection;
++} STACK_TRACE_DATABASE, *PSTACK_TRACE_DATABASE;
++
++#ifndef NTOS_MODE_USER
++
++//
++// Message Resource Entry, Block and Data
++//
++typedef struct _MESSAGE_RESOURCE_ENTRY
++{
++ USHORT Length;
++ USHORT Flags;
++ UCHAR Text[ANYSIZE_ARRAY];
++} MESSAGE_RESOURCE_ENTRY, *PMESSAGE_RESOURCE_ENTRY;
++
++typedef struct _MESSAGE_RESOURCE_BLOCK
++{
++ ULONG LowId;
++ ULONG HighId;
++ ULONG OffsetToEntries;
++} MESSAGE_RESOURCE_BLOCK, *PMESSAGE_RESOURCE_BLOCK;
++
++typedef struct _MESSAGE_RESOURCE_DATA
++{
++ ULONG NumberOfBlocks;
++ MESSAGE_RESOURCE_BLOCK Blocks[ANYSIZE_ARRAY];
++} MESSAGE_RESOURCE_DATA, *PMESSAGE_RESOURCE_DATA;
++
+ #endif
++#endif
+Index: include/ndk/inbvfuncs.h
===================================================================
---- include/ndk/lpcfuncs.h (revision 21759)
-+++ include/ndk/lpcfuncs.h (working copy)
+--- include/ndk/inbvfuncs.h (revision 21759)
++++ include/ndk/inbvfuncs.h (working copy)
@@ -1,4 +1,4 @@
-/*++ NDK Version: 0095
+/*++ NDK Version: 0098
@@ -4788,10 +4768,19 @@
--*/
-Index: include/ndk/kdtypes.h
+@@ -54,7 +54,7 @@
+ VOID
+ NTAPI
+ InbvInstallDisplayStringFilter(
+- IN PVOID Unknown
++ IN PVOID DisplayFilter
+ );
+
+ BOOLEAN
+Index: include/ndk/kefuncs.h
===================================================================
---- include/ndk/kdtypes.h (revision 21759)
-+++ include/ndk/kdtypes.h (working copy)
+--- include/ndk/kefuncs.h (revision 21759)
++++ include/ndk/kefuncs.h (working copy)
@@ -1,4 +1,4 @@
-/*++ NDK Version: 0095
+/*++ NDK Version: 0098
@@ -4807,143 +4796,112 @@
--*/
-@@ -47,6 +47,7 @@
+@@ -111,6 +111,20 @@
+ PKSPIN_LOCK SpinLock
+ );
+
++KIRQL
++FASTCALL
++KeAcquireQueuedSpinLockRaiseToSynch(
++ IN KSPIN_LOCK_QUEUE_NUMBER LockNumber
++);
++
++KIRQL
++FASTCALL
++KeAcquireInStackQueuedSpinLockRaiseToSynch(
++ IN PKSPIN_LOCK SpinLock,
++ IN PKLOCK_QUEUE_HANDLE LockHandle
++);
++
++
//
- // DebugService Control Types
+ // Interrupt Functions
//
-+#define BREAKPOINT_BREAK 0
- #define BREAKPOINT_PRINT 1
- #define BREAKPOINT_PROMPT 2
- #define BREAKPOINT_LOAD_SYMBOLS 3
-@@ -55,25 +56,109 @@
+@@ -172,9 +186,17 @@
+ VOID
+ );
+
++BOOLEAN
++NTAPI
++KiIpiServiceRoutine(
++ IN PKTRAP_FRAME TrapFrame,
++ IN PVOID ExceptionFrame
++);
++
//
- // Debug Control Codes for NtSystemDebugcontrol
+-// ARC Configuration Functions
++// ARC Configuration Functions. Only enabled if you have ARC Support
//
--typedef enum _DEBUG_CONTROL_CODE
-+typedef enum _SYSDBG_COMMAND
- {
-- DebugGetTraceInformation = 1,
-- DebugSetInternalBreakpoint,
-- DebugSetSpecialCall,
-- DebugClearSpecialCalls,
-- DebugQuerySpecialCalls,
-- DebugDbgBreakPoint,
-- DebugDbgLoadSymbols
--} DEBUG_CONTROL_CODE;
-+ SysDbgQueryModuleInformation = 0,
-+ SysDbgQueryTraceInformation = 1,
-+ SysDbgSetTracepoint = 2,
-+ SysDbgSetSpecialCall = 3,
-+ SysDbgClearSpecialCalls = 4,
-+ SysDbgQuerySpecialCalls = 5,
-+ SysDbgBreakPoint = 6,
-+ SysDbgQueryVersion = 7,
-+ SysDbgReadVirtual = 8,
-+ SysDbgWriteVirtual = 9,
-+ SysDbgReadPhysical = 10,
-+ SysDbgWritePhysical = 11,
-+ SysDbgReadControlSpace = 12,
-+ SysDbgWriteControlSpace = 13,
-+ SysDbgReadIoSpace = 14,
-+ SysDbgWriteIoSpace = 15,
-+ SysDbgReadMsr = 16,
-+ SysDbgWriteMsr = 17,
-+ SysDbgReadBusData = 18,
-+ SysDbgWriteBusData = 19,
-+ SysDbgCheckLowMemory = 20,
-+ SysDbgEnableKernelDebugger = 21,
-+ SysDbgDisableKernelDebugger = 22,
-+ SysDbgGetAutoKdEnable = 23,
-+ SysDbgSetAutoKdEnable = 24,
-+ SysDbgGetPrintBufferSize = 25,
-+ SysDbgSetPrintBufferSize = 26,
-+ SysDbgGetKdUmExceptionEnable = 27,
-+ SysDbgSetKdUmExceptionEnable = 28,
-+ SysDbgGetTriageDump = 29,
-+ SysDbgGetKdBlockEnable = 30,
-+ SysDbgSetKdBlockEnable = 31,
-+ SysDbgRegisterForUmBreakInfo = 32,
-+ SysDbgGetUmBreakPid = 33,
-+ SysDbgClearUmBreakPid = 34,
-+ SysDbgGetUmAttachPid = 35,
-+ SysDbgClearUmAttachPid = 36,
-+} SYSDBG_COMMAND;
++#ifdef _ARC_
+ PCONFIGURATION_COMPONENT_DATA
+ NTAPI
+ KeFindConfigurationNextEntry(
+@@ -193,6 +215,7 @@
+ IN CONFIGURATION_TYPE Type,
+ IN PULONG ComponentKey OPTIONAL
+ );
++#endif
//
--// Kernel Debugger Port Definition
-+// System Debugger Types
- //
--typedef struct _KD_PORT_INFORMATION
-+typedef struct _SYSDBG_PHYSICAL
- {
-- ULONG ComPort;
-- ULONG BaudRate;
-- ULONG BaseAddress;
--} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
-+ PHYSICAL_ADDRESS Address;
-+ PVOID Buffer;
-+ ULONG Request;
-+} SYSDBG_PHYSICAL, *PSYSDBG_PHYSICAL;
+ // Low-level Hardware/CPU Control Functions
+@@ -200,12 +223,26 @@
+ VOID
+ NTAPI
+ KeFlushEntireTb(
+- IN BOOLEAN Unknown,
+- IN BOOLEAN CurrentCpuOnly
++ IN BOOLEAN Invalid,
++ IN BOOLEAN AllProcessors
+ );
-+typedef struct _SYSDBG_VIRTUAL
-+{
-+ PVOID Address;
-+ PVOID Buffer;
-+ ULONG Request;
-+} SYSDBG_VIRTUAL, *PSYSDBG_VIRTUAL;
-+
-+typedef struct _SYSDBG_CONTROL_SPACE
-+{
-+ ULONGLONG Address;
-+ PVOID Buffer;
-+ ULONG Request;
-+ ULONG Processor;
-+} SYSDBG_CONTROL_SPACE, *PSYSDBG_CONTROL_SPACE;
-+
-+typedef struct _SYSDBG_IO_SPACE
-+{
-+ ULONGLONG Address;
-+ PVOID Buffer;
-+ ULONG Request;
-+ INTERFACE_TYPE InterfaceType;
-+ ULONG BusNumber;
-+ ULONG AddressSpace;
-+} SYSDBG_IO_SPACE, *PSYSDBG_IO_SPACE;
-+
-+typedef struct _SYSDBG_BUS_DATA
-+{
-+ ULONG Address;
-+ PVOID Buffer;
-+ ULONG Request;
-+ BUS_DATA_TYPE BusDataType;
-+ ULONG BusNumber;
-+ ULONG SlotNumber;
-+} SYSDBG_BUS_DATA, *PSYSDBG_BUS_DATA;
+ VOID
+ NTAPI
++KeUpdateSystemTime(
++ PKTRAP_FRAME TrapFrame,
++ KIRQL Irql
++);
+
-+typedef struct _SYSDBG_MSR
-+{
-+ ULONG Address;
-+ ULONGLONG Data;
-+} SYSDBG_MSR, *PSYSDBG_MSR;
++VOID
++NTAPI
++KeUpdateRunTime(
++ PKTRAP_FRAME TrapFrame,
++ KIRQL Irql
++);
+
-+typedef struct _SYSDBG_TRIAGE_DUMP
-+{
-+ ULONG Flags;
-+ ULONG BugCheckCode;
-+ ULONG_PTR BugCheckParam1;
-+ ULONG_PTR BugCheckParam2;
-+ ULONG_PTR BugCheckParam3;
-+ ULONG_PTR BugCheckParam4;
-+ ULONG ProcessHandles;
-+ ULONG ThreadHandles;
-+ PHANDLE Handles;
-+} SYSDBG_TRIAGE_DUMP, *PSYSDBG_TRIAGE_DUMP;
++VOID
++NTAPI
+ KeSetDmaIoCoherency(
+ IN ULONG Coherency
+ );
+@@ -230,6 +267,13 @@
+ IN ULONG MinIncrement
+ );
+
++NTSTATUS
++NTAPI
++Ke386CallBios(
++ IN ULONG BiosCommand,
++ IN OUT PCONTEXT BiosArguments
++);
+
- #endif // _KDTYPES_H
-Index: include/ndk/obtypes.h
+ //
+ // Misc. Functions
+ //
+@@ -449,8 +493,8 @@
+ IN ULONG RoutineIndex,
+ IN PVOID Argument,
+ IN ULONG ArgumentLength,
+- OUT PVOID* Result,
+- OUT PULONG ResultLength
++ OUT PVOID* Result OPTIONAL,
++ OUT PULONG ResultLength OPTIONAL
+ );
+
+ NTSYSCALLAPI
+Index: include/ndk/cmfuncs.h
===================================================================
---- include/ndk/obtypes.h (revision 21759)
-+++ include/ndk/obtypes.h (working copy)
+--- include/ndk/cmfuncs.h (revision 21759)
++++ include/ndk/cmfuncs.h (working copy)
@@ -1,4 +1,4 @@
-/*++ NDK Version: 0095
+/*++ NDK Version: 0098
@@ -4959,2439 +4917,942 @@
--*/
-@@ -49,6 +49,11 @@
- }
+@@ -254,7 +254,7 @@
+ );
- //
-+// Number of custom-defined bits that can be attached to a handle
-+//
-+#define OBJ_HANDLE_TAGBITS 0x3
-+
-+//
- // Directory Object Access Rights
- //
- #define DIRECTORY_QUERY 0x0001
-@@ -57,6 +62,11 @@
- #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
- #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
+ #ifdef NTOS_MODE_USER
+-NTSYSAPI
++NTSYSCALLAPI
+ NTSTATUS
+ NTAPI
+ ZwCreateKey(
+Index: include/ndk/extypes.h
+===================================================================
+--- include/ndk/extypes.h (revision 21759)
++++ include/ndk/extypes.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
-+//
-+// Slash separator used in the OB Namespace (and Registry)
-+//
-+#define OBJ_NAME_PATH_SEPARATOR L'\\'
-+
- #else
+ Copyright (c) Alex Ionescu. All rights reserved.
- //
-@@ -127,7 +137,6 @@
- } OB_DUMP_CONTROL, *POB_DUMP_CONTROL;
+@@ -12,7 +12,7 @@
- #ifndef NTOS_MODE_USER
--#ifndef _REACTOS_
+ Author:
- //
- // Object Type Callbacks
-@@ -204,87 +213,6 @@
- #else
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
+
+ --*/
+
+@@ -196,9 +196,9 @@
+ SystemUnloadGdiDriverInformation,
+ SystemTimeAdjustmentInformation,
+ SystemSummaryMemoryInformation,
+- SystemNextEventIdInformation,
+- SystemEventIdsInformation,
+- SystemCrashDumpInformation,
++ SystemMirrorMemoryInformation,
++ SystemPerformanceTraceInformation,
++ SystemObsolete0,
+ SystemExceptionInformation,
+ SystemCrashDumpStateInformation,
+ SystemKernelDebuggerInformation,
+@@ -220,7 +220,51 @@
+ SystemVerifierInformation,
+ SystemAddVerifier,
+ SystemSessionProcessesInformation,
+- SystemInformationClassMax
++ SystemLoadGdiDriverInSystemSpaceInformation,
++ SystemNumaProcessorMap,
++ SystemPrefetcherInformation,
++ SystemExtendedProcessInformation,
++ SystemRecommendedSharedDataAlignment,
++ SystemComPlusPackage,
++ SystemNumaAvailableMemory,
++ SystemProcessorPowerInformation,
++ SystemEmulationBasicInformation,
++ SystemEmulationProcessorInformation,
++ SystemExtendedHanfleInformation,
++ SystemLostDelayedWriteInformation,
++ SystemBigPoolInformation,
++ SystemSessionPoolTagInformation,
++ SystemSessionMappedViewInformation,
++ SystemHotpatchInformation,
++ SystemObjectSecurityMode,
++ SystemWatchDogTimerHandler,
++ SystemWatchDogTimerInformation,
++ SystemLogicalProcessorInformation,
++ SystemWo64SharedInformationObosolete,
++ SystemRegisterFirmwareTableInformationHandler,
++ SystemFirmwareTableInformation,
++ SystemModuleInformationEx,
++ SystemVerifierTriageInformation,
++ SystemSuperfetchInformation,
++ SystemMemoryListInformation,
++ SystemFileCacheInformationEx,
++ SystemThreadPriorityClientIdInformation,
++ SystemProcessorIdleCycleTimeInformation,
++ SystemVerifierCancellationInformation,
++ SystemProcessorPowerInformationEx,
++ SystemRefTraceInformation,
++ SystemSpecialPoolInformation,
++ SystemProcessIdInformation,
++ SystemErrorPortInformation,
++ SystemBootEnvironmentInformation,
++ SystemHypervisorInformation,
++ SystemVerifierInformationEx,
++ SystemTimeZoneInformation,
++ SystemImageFileExecutionOptionsInformation,
++ SystemCoverageInformation,
++ SystemPrefetchPathInformation,
++ SystemVerifierFaultsInformation,
++ MaxSystemInfoClass,
+ } SYSTEM_INFORMATION_CLASS;
//
--// FIXME: ReactOS ONLY Object Callbacks
--//
--typedef NTSTATUS
--(NTAPI *OB_OPEN_METHOD)(
-- OB_OPEN_REASON Reason,
-- PVOID ObjectBody,
-- PEPROCESS Process,
-- ULONG HandleCount,
-- ACCESS_MASK GrantedAccess
--);
--
--typedef NTSTATUS
--(NTAPI *OB_PARSE_METHOD)(
-- PVOID Object,
-- PVOID *NextObject,
-- PUNICODE_STRING FullPath,
-- PWSTR *Path,
-- ULONG Attributes
--);
--
--typedef VOID
--(NTAPI *OB_DELETE_METHOD)(
-- PVOID DeletedObject
--);
--
--typedef VOID
--(NTAPI *OB_CLOSE_METHOD)(
-- PVOID ClosedObject,
-- ULONG HandleCount
--);
--
--typedef VOID
--(NTAPI *OB_DUMP_METHOD)(
-- VOID
--);
--
--typedef NTSTATUS
--(NTAPI *OB_OKAYTOCLOSE_METHOD)(
-- VOID
--);
--
--typedef NTSTATUS
--(NTAPI *OB_QUERYNAME_METHOD)(
-- PVOID ObjectBody,
-- POBJECT_NAME_INFORMATION ObjectNameInfo,
-- ULONG Length,
-- PULONG ReturnLength
--);
--
--typedef PVOID
--(NTAPI *OB_FIND_METHOD)(
-- PVOID WinStaObject,
-- PWSTR Name,
-- ULONG Attributes
--);
--
--typedef NTSTATUS
--(NTAPI *OB_SECURITY_METHOD)(
-- PVOID Object,
-- SECURITY_OPERATION_CODE OperationType,
-- SECURITY_INFORMATION SecurityInformation,
-- PSECURITY_DESCRIPTOR NewSecurityDescriptor,
-- PULONG ReturnLength,
-- PSECURITY_DESCRIPTOR *OldSecurityDescriptor,
-- POOL_TYPE PoolType,
-- PGENERIC_MAPPING GenericMapping
--);
--
--typedef NTSTATUS
--(NTAPI *OB_CREATE_METHOD)(
-- PVOID ObjectBody,
-- PVOID Parent,
-- PWSTR RemainingPath,
-- struct _OBJECT_ATTRIBUTES* ObjectAttributes
--);
--
--#endif
--
--#else
--
--//
- // Object Information Types for NtQueryInformationObject
- //
- typedef struct _OBJECT_NAME_INFORMATION
-@@ -429,9 +357,6 @@
+@@ -228,7 +272,8 @@
//
- typedef struct _OBJECT_HEADER
+ typedef enum _MUTANT_INFORMATION_CLASS
{
--#ifdef _REACTOS_
-- LIST_ENTRY Entry; // FIXME: REACTOS ONLY
--#endif
- LONG PointerCount;
- union
- {
-Index: include/ndk/rtltypes.h
-===================================================================
---- include/ndk/rtltypes.h (revision 21759)
-+++ include/ndk/rtltypes.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
-
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-@@ -42,6 +42,9 @@
- #define RTL_USER_PROCESS_PARAMETERS_DISABLE_HEAP_CHECKS 0x100
- #define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_1 0x200
- #define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_2 0x400
-+#define RTL_USER_PROCESS_PARAMETERS_PRIVATE_DLL_PATH 0x1000
-+#define RTL_USER_PROCESS_PARAMETERS_LOCAL_DLL_PATH 0x2000
-+#define RTL_USER_PROCESS_PARAMETERS_NX 0x20000
+- MutantBasicInformation
++ MutantBasicInformation,
++ MutantOwnerInformation
+ } MUTANT_INFORMATION_CLASS;
//
- // Exception Flags
-@@ -50,6 +53,7 @@
- #define EXCEPTION_UNWINDING 0x02
- #define EXCEPTION_EXIT_UNWIND 0x04
- #define EXCEPTION_STACK_INVALID 0x08
-+#define EXCEPTION_UNWIND (EXCEPTION_UNWINDING +
EXCEPTION_EXIT_UNWIND)
- #define EXCEPTION_NESTED_CALL 0x10
- #define EXCEPTION_TARGET_UNWIND 0x20
- #define EXCEPTION_COLLIDED_UNWIND 0x20
-@@ -64,6 +68,26 @@
- #define RTL_RANGE_CONFLICT 0x02
+@@ -264,9 +309,30 @@
+ EventBasicInformation
+ } EVENT_INFORMATION_CLASS;
+
+-#ifndef NTOS_MODE_USER
++#ifdef NTOS_MODE_USER
//
-+// Activation Context Frame Flags
-+//
-+#define RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_FORMAT_WHISTLER \
-+ 0x1
-+
-+//
-+// Heap Flags
++// Firmware Table Actions for SystemFirmwareTableInformation
+//
-+#define HEAP_CLASS_0 0x00000000
-+#define HEAP_CLASS_1 0x00001000
-+#define HEAP_CLASS_2 0x00002000
-+#define HEAP_CLASS_3 0x00003000
-+#define HEAP_CLASS_4 0x00004000
-+#define HEAP_CLASS_5 0x00005000
-+#define HEAP_CLASS_6 0x00006000
-+#define HEAP_CLASS_7 0x00007000
-+#define HEAP_CLASS_8 0x00008000
-+#define HEAP_CLASS_MASK 0x0000F000
++typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
++{
++ SystemFirmwareTable_Enumerate = 0,
++ SystemFirmwareTable_Get = 1,
++} SYSTEM_FIRMWARE_TABLE_ACTION, *PSYSTEM_FIRMWARE_TABLE_ACTION;
+
+//
- // Registry Keys
- //
- #define RTL_REGISTRY_ABSOLUTE 0
-@@ -120,6 +144,12 @@
- #define RTL_CRITSECT_TYPE 0
- #define RTL_RESOURCE_TYPE 1
-
-+//
-+// RtlAcquirePrivileges Flags
++// Firmware Handler Callback
+//
-+#define RTL_ACQUIRE_PRIVILEGE_IMPERSONATE 1
-+#define RTL_ACQUIRE_PRIVILEGE_PROCESS 2
++struct _SYSTEM_FIRMWARE_TABLE_INFORMATION;
++typedef
++NTSTATUS
++(__cdecl *PFNFTH)(
++ IN struct _SYSTEM_FIRMWARE_TABLE_INFORMATION *FirmwareTableInformation
++);
+
- #ifdef NTOS_MODE_USER
-
- //
-@@ -141,6 +171,12 @@
- #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
- #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
- #define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
+#else
-+//
-+// Message Resource Flag
-+//
-+#define MESSAGE_RESOURCE_UNICODE 0x0001
-+
- #endif
- #define MAXIMUM_LEADBYTES 12
-
-@@ -165,6 +201,14 @@
- #define RTL_ATOM_IS_PINNED 0x1
-
- //
-+// Critical section lock bits
-+//
-+#define CS_LOCK_BIT 0x1
-+#define CS_LOCK_BIT_V 0x0
-+#define CS_LOCK_WAITER_WOKEN 0x2
-+#define CS_LOCK_WAITER_INC 0x4
+
+//
- // Codepage Tags
+ // Executive Work Queue Structures
//
- #ifdef NTOS_MODE_USER
-@@ -221,14 +265,14 @@
+ typedef struct _EX_QUEUE_WORKER_INFO
+@@ -305,12 +371,10 @@
//
- typedef enum _RTL_PATH_TYPE
+ typedef struct _EX_RUNDOWN_REF_CACHE_AWARE
{
-- INVALID_PATH = 0,
-- UNC_PATH, // "//foo"
-- ABSOLUTE_DRIVE_PATH, // "c:/foo"
-- RELATIVE_DRIVE_PATH, // "c:foo"
-- ABSOLUTE_PATH, // "/foo"
-- RELATIVE_PATH, // "foo"
-- DEVICE_PATH, // "//./foo"
-- UNC_DOT_PATH // "//."
-+ RtlPathTypeUnknown,
-+ RtlPathTypeUncAbsolute,
-+ RtlPathTypeDriveAbsolute,
-+ RtlPathTypeDriveRelative,
-+ RtlPathTypeRooted,
-+ RtlPathTypeRelative,
-+ RtlPathTypeLocalDevice,
-+ RtlPathTypeRootLocalDevice,
- } RTL_PATH_TYPE;
-
- #ifndef NTOS_MODE_USER
-@@ -263,6 +307,30 @@
- IN OUT PVOID DispatcherContext
- );
+- union
+- {
+- ULONG_PTR Count;
+- PVOID Ptr;
+- };
++ PEX_RUNDOWN_REF RunRefs;
+ PVOID PoolToFree;
++ ULONG RunRefSize;
++ ULONG Number;
+ } EX_RUNDOWN_REF_CACHE_AWARE, *PEX_RUNDOWN_REF_CACHE_AWARE;
-+//
-+// RTL Library Allocation/Free Routines
-+//
-+typedef PVOID
-+(NTAPI *PRTL_ALLOCATE_STRING_ROUTINE)(
-+ SIZE_T NumberOfBytes
-+);
-+
-+typedef PVOID
-+(NTAPI *PRTL_REALLOCATE_STRING_ROUTINE)(
-+ SIZE_T NumberOfBytes,
-+ PVOID Buffer
-+);
-+
-+typedef
-+VOID
-+(NTAPI *PRTL_FREE_STRING_ROUTINE)(
-+ PVOID Buffer
-+);
-+
-+extern const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
-+extern const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
-+extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
-+
- #endif
+ //
+@@ -319,7 +383,7 @@
+ typedef struct _EX_RUNDOWN_WAIT_BLOCK
+ {
+ ULONG_PTR Count;
+- KEVENT RundownEvent;
++ KEVENT WakeEvent;
+ } EX_RUNDOWN_WAIT_BLOCK, *PEX_RUNDOWN_WAIT_BLOCK;
//
-@@ -538,7 +606,39 @@
- CSHORT Weekday;
- } TIME_FIELDS, *PTIME_FIELDS;
+@@ -382,18 +446,18 @@
+ } CALLBACK_OBJECT , *PCALLBACK_OBJECT;
-+//
-+// Activation Context
-+//
-+typedef PVOID PACTIVATION_CONTEXT;
-+
-+//
-+// Activation Context Frame
-+//
-+typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME
+ //
+-// Profile OBject
++// Profile Object
+ //
+ typedef struct _EPROFILE
+ {
+ PEPROCESS Process;
+- PVOID ImageBase;
+- SIZE_T ImageSize;
++ PVOID RangeBase;
++ SIZE_T RangeSize;
+ PVOID Buffer;
+ ULONG BufferSize;
+ ULONG BucketSize;
+- PKPROFILE KeProfile;
+- PVOID LockedBuffer;
++ PKPROFILE ProfileObject;
++ PVOID LockedBufferAddress;
+ PMDL Mdl;
+ ULONG Segment;
+ KPROFILE_SOURCE ProfileSource;
+@@ -403,6 +467,24 @@
+ //
+ // Handle Table Structures
+ //
++typedef struct _HANDLE_TRACE_DB_ENTRY
+{
-+ struct __RTL_ACTIVATION_CONTEXT_STACK_FRAME *Previous;
-+ PACTIVATION_CONTEXT ActivationContext;
-+ ULONG Flags;
-+} RTL_ACTIVATION_CONTEXT_STACK_FRAME,
-+ *PRTL_ACTIVATION_CONTEXT_STACK_FRAME;
++ CLIENT_ID ClientId;
++ HANDLE Handle;
++ ULONG Type;
++ PVOID StackTrace[16];
++} HANDLE_TRACE_DB_ENTRY, *PHANDLE_TRACE_DB_ENTRY;
+
-+typedef struct _RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED
++typedef struct _HANDLE_TRACE_DEBUG_INFO
+{
-+ ULONG Size;
-+ ULONG Format;
-+ RTL_ACTIVATION_CONTEXT_STACK_FRAME Frame;
-+ PVOID Extra1;
-+ PVOID Extra2;
-+ PVOID Extra3;
-+ PVOID Extra4;
-+} RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED,
-+ *PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED;
-+
- #endif
++ LONG RefCount;
++ ULONG TableSize;
++ ULONG BitMaskFlags;
++ FAST_MUTEX CloseCompatcionLock;
++ ULONG CurrentStackIndex;
++ HANDLE_TRACE_DB_ENTRY TraceDb[1];
++} HANDLE_TRACE_DEBUG_INFO, *PHANDLE_TRACE_DEBUG_INFO;
+
-+//
-+// ACE Structure
-+//
- typedef struct _ACE
+ typedef struct _HANDLE_TABLE_ENTRY_INFO
{
- ACE_HEADER Header;
-@@ -550,42 +650,54 @@
- //
- typedef struct _RTL_PROCESS_MODULE_INFORMATION
+ ULONG AuditMask;
+@@ -416,17 +498,52 @@
+ ULONG_PTR ObAttributes;
+ PHANDLE_TABLE_ENTRY_INFO InfoTable;
+ ULONG_PTR Value;
+- } u1;
++ };
+ union
+ {
+ ULONG GrantedAccess;
+- USHORT GrantedAccessIndex;
++ struct
++ {
++ USHORT GrantedAccessIndex;
++ USHORT CreatorBackTraceIndex;
++ };
+ LONG NextFreeTableEntry;
+- } u2;
++ };
+ } HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
+
+ typedef struct _HANDLE_TABLE
{
-- ULONG Reserved[2];
-- PVOID Base;
-- ULONG Size;
-+ ULONG Section;
-+ PVOID MappedBase;
-+ PVOID ImageBase;
-+ ULONG ImageSize;
++#if 0
++ ULONG TableCode;
++ PEPROCESS QuotaProcess;
++ PVOID UniqueProcessId;
++ EX_PUSH_LOCK HandleLock;
++ LIST_ENTRY HandleTableList;
++ EX_PUSH_LOCK HandleContentionEvent;
++ PHANDLE_TRACE_DEBUG_INFO DebugInfo;
++ LONG ExtraInfoPages;
++#if (NTDDI_VERSION >= NTDDI_LONGHORN)
++ union
++ {
++ ULONG Flags;
++ UCHAR StrictFIFO:1;
++ };
++ LONG FirstFreeHandle;
++ PHANDLE_TABLE_ENTRY LastFreeHandleEntry;
++ LONG HandleCount;
++ ULONG NextHandleNeedingPool;
++#else
++ ULONG FirstFree;
++ ULONG LastFree;
++ ULONG NextHandleNeedingPool;
++ LONG HandleCount;
++ union
++ {
++ ULONG Flags;
++ UCHAR StrictFIFO:1;
++ };
++#endif
++#else
ULONG Flags;
-- USHORT Index;
-- USHORT Unknown;
-+ USHORT LoadOrderIndex;
-+ USHORT InitOrderIndex;
- USHORT LoadCount;
-- USHORT ModuleNameOffset;
-- CHAR ImageName[256];
-+ USHORT OffsetToFileName;
-+ CHAR FullPathName[256];
- } RTL_PROCESS_MODULE_INFORMATION, *PRTL_PROCESS_MODULE_INFORMATION;
+ LONG HandleCount;
+ PHANDLE_TABLE_ENTRY **Table;
+@@ -437,6 +554,7 @@
+ ERESOURCE HandleTableLock;
+ LIST_ENTRY HandleTableList;
+ KEVENT HandleContentionEvent;
++#endif
+ } HANDLE_TABLE, *PHANDLE_TABLE;
- typedef struct _RTL_PROCESS_MODULES
- {
-- ULONG ModuleCount;
-- RTL_PROCESS_MODULE_INFORMATION ModuleEntry[1];
-+ ULONG NumberOfModules;
-+ RTL_PROCESS_MODULE_INFORMATION Modules[1];
- } RTL_PROCESS_MODULES, *PRTL_PROCESS_MODULES;
+ #endif
+@@ -466,6 +584,11 @@
+ BOOLEAN AbandonedState;
+ } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
--typedef struct _RTL_PROCESS_HEAP_INFORMATION
-+typedef struct _RTL_PROCESS_MODULE_INFORMATION_EX
- {
-- PVOID Base;
-+ ULONG NextOffset;
-+ RTL_PROCESS_MODULE_INFORMATION BaseInfo;
-+ ULONG ImageCheckSum;
-+ ULONG TimeDateStamp;
-+ PVOID DefaultBase;
-+} RTL_PROCESS_MODULE_INFORMATION_EX, *PRTL_PROCESS_MODULE_INFORMATION_EX;
-+
-+typedef struct _RTL_HEAP_INFORMATION
++typedef struct _MUTANT_OWNER_INFORMATION
+{
-+ PVOID BaseAddress;
- ULONG Flags;
-- USHORT Granularity;
-- USHORT Unknown;
-- ULONG Allocated;
-- ULONG Committed;
-- ULONG TagCount;
-- ULONG BlockCount;
-- ULONG Reserved[7];
-+ USHORT EntryOverhead;
-+ USHORT CreatorBackTraceIndex;
-+ ULONG BytesAllocated;
-+ ULONG BytesCommitted;
-+ ULONG NumberOfTags;
-+ ULONG NumberOfEntries;
-+ ULONG NumberOfPseudoTags;
-+ ULONG PseudoTagGranularity;
-+ ULONG Reserved[4];
- PVOID Tags;
-- PVOID Blocks;
--} RTL_PROCESS_HEAP_INFORMATION, *PRTL_PROCESS_HEAP_INFORMATION;
-+ PVOID Entries;
-+} RTL_HEAP_INFORMATION, *PRTL_HEAP_INFORMATION;
++ CLIENT_ID ClientId;
++} MUTANT_OWNER_INFORMATION, *PMUTANT_OWNER_INFORMATION;
++
+ //
+ // Information Structures for NtQueryAtom
+ //
+@@ -662,7 +785,7 @@
+ HANDLE InheritedFromUniqueProcessId;
+ ULONG HandleCount;
+ ULONG SessionId;
+- ULONG PageDirectoryFrame;
++ ULONG UniqueProcessKey;
- typedef struct _RTL_PROCESS_HEAPS
- {
-- ULONG HeapCount;
-- RTL_PROCESS_HEAP_INFORMATION HeapEntry[1];
-+ ULONG NumberOfHeaps;
-+ RTL_HEAP_INFORMATION Heaps[1];
- } RTL_PROCESS_HEAPS, *PRTL_PROCESS_HEAPS;
+ //
+ // This part corresponds to VM_COUNTERS_EX.
+@@ -679,7 +802,7 @@
+ ULONG QuotaNonPagedPoolUsage;
+ ULONG PagefileUsage;
+ ULONG PeakPagefileUsage;
+- ULONG PrivateUsage;
++ ULONG PrivatePageCount;
- typedef struct _RTL_PROCESS_LOCK_INFORMATION
-@@ -604,8 +716,8 @@
+ //
+ // This part corresponds to IO_COUNTERS
+@@ -691,7 +814,7 @@
+ LARGE_INTEGER WriteTransferCount;
+ LARGE_INTEGER OtherTransferCount;
- typedef struct _RTL_PROCESS_LOCKS
- {
-- ULONG LockCount;
-- RTL_PROCESS_LOCK_INFORMATION LockEntry[1];
-+ ULONG NumberOfLocks;
-+ RTL_PROCESS_LOCK_INFORMATION Locks[1];
- } RTL_PROCESS_LOCKS, *PRTL_PROCESS_LOCKS;
+- SYSTEM_THREAD_INFORMATION TH[1];
++ //SYSTEM_THREAD_INFORMATION TH[1];
+ } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
- typedef struct _RTL_PROCESS_BACKTRACE_INFORMATION
-@@ -626,27 +738,61 @@
- RTL_PROCESS_BACKTRACE_INFORMATION BackTraces[1];
- } RTL_PROCESS_BACKTRACES, *PRTL_PROCESS_BACKTRACES;
+ // Class 6
+@@ -737,58 +860,12 @@
+ LARGE_INTEGER TimeOfCalls[1];
+ } SYSTEM_CALL_TIME_INFORMATION, *PSYSTEM_CALL_TIME_INFORMATION;
--typedef struct _RTL_DEBUG_BUFFER
-+typedef struct _RTL_PROCESS_VERIFIER_OPTIONS
+-// Class 11
+-typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY
+-{
+- ULONG Unknown1;
+- ULONG Unknown2;
+- PVOID Base;
+- ULONG Size;
+- ULONG Flags;
+- USHORT Index;
+- USHORT NameLength;
+- USHORT LoadCount;
+- USHORT PathLength;
+- CHAR ImageName[256];
+-} SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
+-typedef struct _SYSTEM_MODULE_INFORMATION
+-{
+- ULONG Count;
+- SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
+-} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
++// Class 11 - See RTL_PROCESS_MODULES
+
+-// Class 12
+-typedef struct _SYSTEM_RESOURCE_LOCK_ENTRY
+-{
+- ULONG ResourceAddress;
+- ULONG Always1;
+- ULONG Unknown;
+- ULONG ActiveCount;
+- ULONG ContentionCount;
+- ULONG Unused[2];
+- ULONG NumberOfSharedWaiters;
+- ULONG NumberOfExclusiveWaiters;
+-} SYSTEM_RESOURCE_LOCK_ENTRY, *PSYSTEM_RESOURCE_LOCK_ENTRY;
++// Class 12 - See RTL_PROCESS_LOCKS
+
+-typedef struct _SYSTEM_RESOURCE_LOCK_INFO
+-{
+- ULONG Count;
+- SYSTEM_RESOURCE_LOCK_ENTRY Lock[1];
+-} SYSTEM_RESOURCE_LOCK_INFO, *PSYSTEM_RESOURCE_LOCK_INFO;
++// Class 13 - See RTL_PROCESS_BACKTRACES
+
+-// FIXME: Class 13
+-typedef struct _SYSTEM_BACKTRACE_INFORMATION_ENTRY
+-{
+- ULONG Dummy;
+-} SYSTEM_BACKTRACE_INFORMATION_ENTRY, *PSYSTEM_BACKTRACE_INFORMATION_ENTRY;
+-
+-typedef struct _SYSTEM_BACKTRACE_INFORMATION
+-{
+- ULONG Unknown[4];
+- ULONG Count;
+- SYSTEM_BACKTRACE_INFORMATION_ENTRY Trace[1];
+-} SYSTEM_BACKTRACE_INFORMATION, *PSYSTEM_BACKTRACE_INFORMATION;
+-
+ // Class 14 - 15
+ typedef struct _SYSTEM_POOL_ENTRY
{
-- HANDLE SectionHandle;
-- PVOID SectionBase;
-- PVOID RemoteSectionBase;
-- ULONG SectionBaseDelta;
-- HANDLE EventPairHandle;
-- ULONG Unknown[2];
-- HANDLE RemoteThreadHandle;
-- ULONG InfoClassMask;
-- ULONG SizeOfInfo;
-- ULONG AllocatedSize;
-- ULONG SectionSize;
-- PRTL_PROCESS_MODULES ModuleInformation;
-- PRTL_PROCESS_BACKTRACES BackTraceInformation;
-- PRTL_PROCESS_HEAPS HeapInformation;
-- PRTL_PROCESS_LOCKS LockInformation;
-- PVOID Reserved[8];
--} RTL_DEBUG_BUFFER, *PRTL_DEBUG_BUFFER;
-+ ULONG SizeStruct;
-+ ULONG Option;
-+ UCHAR OptionData[1];
-+ //
-+ // Option array continues below
-+ //
-+} RTL_PROCESS_VERIFIER_OPTIONS, *PRTL_PROCESS_VERIFIER_OPTIONS;
+@@ -914,14 +991,10 @@
+ ULONG BopCount;
+ } SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
-+typedef struct _RTL_DEBUG_INFORMATION
-+{
-+ HANDLE SectionHandleClient;
-+ PVOID ViewBaseClient;
-+ PVOID ViewBaseTarget;
-+ ULONG ViewBaseDelta;
-+ HANDLE EventPairClient;
-+ PVOID EventPairTarget;
-+ HANDLE TargetProcessId;
-+ HANDLE TargetThreadHandle;
-+ ULONG Flags;
-+ ULONG OffsetFree;
-+ ULONG CommitSize;
-+ ULONG ViewSize;
-+ union
-+ {
-+ PRTL_PROCESS_MODULES Modules;
-+ PRTL_PROCESS_MODULE_INFORMATION_EX ModulesEx;
-+ };
-+ PRTL_PROCESS_BACKTRACES BackTraces;
-+ PRTL_PROCESS_HEAPS Heaps;
-+ PRTL_PROCESS_LOCKS Locks;
-+ HANDLE SpecificHeap;
-+ HANDLE TargetProcessHandle;
-+ RTL_PROCESS_VERIFIER_OPTIONS VerifierOptions;
-+ HANDLE ProcessHeap;
-+ HANDLE CriticalSectionHandle;
-+ HANDLE CriticalSectionOwnerThread;
-+ PVOID Reserved[4];
-+} RTL_DEBUG_INFORMATION, *PRTL_DEBUG_INFORMATION;
-+
- //
-+// Unload Event Trace Structure for RtlGetUnloadEventTrace
-+//
-+typedef struct _RTL_UNLOAD_EVENT_TRACE
-+{
-+ PVOID BaseAddress;
-+ ULONG SizeOfImage;
-+ ULONG Sequence;
-+ ULONG TimeDateStamp;
-+ ULONG CheckSum;
-+ WCHAR ImageName[32];
-+} RTL_UNLOAD_EVENT_TRACE, *PRTL_UNLOAD_EVENT_TRACE;
-+
-+//
- // RTL Handle Structures
- //
- typedef struct _RTL_HANDLE_TABLE_ENTRY
-@@ -692,6 +838,19 @@
- UNICODE_STRING DosPath;
- } RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
+-// FIXME: Class 20
+-typedef struct _SYSTEM_VDM_BOP_INFO
+-{
+- PVOID Dummy;
+-} SYSTEM_VDM_BOP_INFO, *PSYSTEM_VDM_BOP_INFO;
++// Class 20 - ULONG VDMBOPINFO
-+//
-+// Private State structure for RtlAcquirePrivilege/RtlReleasePrivilege
-+//
-+typedef struct _RTL_ACQUIRE_STATE
-+{
-+ HANDLE Token;
-+ HANDLE OldImpersonationToken;
-+ PTOKEN_PRIVILEGES OldPrivileges;
-+ PTOKEN_PRIVILEGES NewPrivileges;
+ // Class 21
+-typedef struct _SYSTEM_CACHE_INFORMATION
++typedef struct _SYSTEM_FILECACHE_INFORMATION
+ {
+ ULONG CurrentSize;
+ ULONG PeakSize;
+@@ -930,8 +1003,9 @@
+ ULONG MaximumWorkingSet;
+ ULONG CurrentSizeIncludingTransitionInPages;
+ ULONG PeakSizeIncludingTransitionInPages;
+- ULONG Unused[2];
+-} SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
++ ULONG TransitionRePurposeCount;
+ ULONG Flags;
-+ UCHAR OldPrivBuffer[1024];
-+} RTL_ACQUIRE_STATE, *PRTL_ACQUIRE_STATE;
++} SYSTEM_FILECACHE_INFORMATION, *PSYSTEM_FILECACHE_INFORMATION;
+
+ // Class 22
+ typedef struct _SYSTEM_POOLTAG
+@@ -984,6 +1058,7 @@
+ USHORT ModifiedCount;
+ USHORT PageTableCount;
+ } SYSTEM_MEMORY_INFO, *PSYSTEM_MEMORY_INFO;
+
- #ifndef NTOS_MODE_USER
+ typedef struct _SYSTEM_MEMORY_INFORMATION
+ {
+ ULONG InfoSize;
+@@ -999,6 +1074,7 @@
+ PVOID SectionPointer;
+ PVOID EntryPoint;
+ PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
++ ULONG ImageLength;
+ } SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
- //
-@@ -718,7 +877,7 @@
- ULONG_PTR SpinCount;
- } RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
+ // Class 27
+@@ -1020,14 +1096,19 @@
--#else
-+#endif
+ // Class 29 - Same as 25
- //
- // RTL Range List Structures
-@@ -749,8 +908,6 @@
- ULONG Stamp;
- } RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
+-// FIXME: Class 30 - 31
++// FIXME: Class 30
--#endif
--
- //
- // RTL Resource
- //
-@@ -902,6 +1059,24 @@
- #endif
+-// Class 32
+-typedef struct _SYSTEM_CRASH_DUMP_INFORMATION
++// Class 31
++typedef struct _SYSTEM_REF_TRACE_INFORMATION
+ {
+- HANDLE CrashDumpSection;
+-} SYSTEM_CRASH_DUMP_INFORMATION, *PSYSTEM_CRASH_DUMP_INFORMATION;
++ UCHAR TraceEnable;
++ UCHAR TracePermanent;
++ UNICODE_STRING TraceProcessName;
++ UNICODE_STRING TracePoolTags;
++} SYSTEM_REF_TRACE_INFORMATION, *PSYSTEM_REF_TRACE_INFORMATION;
- //
-+// Hotpatch Header
-+//
-+typedef struct _RTL_PATCH_HEADER
-+{
-+ LIST_ENTRY PatchList;
-+ PVOID PatchImageBase;
-+ struct _RTL_PATCH_HEADER *NextPath;
-+ ULONG PatchFlags;
-+ LONG PatchRefCount;
-+ struct _HOTPATCH_HEADER *HotpatchHeader;
-+ UNICODE_STRING TargetDllName;
-+ PVOID TargetDllBase;
-+ PLDR_DATA_TABLE_ENTRY TargetLdrDataTableEntry;
-+ PLDR_DATA_TABLE_ENTRY PatchLdrDataTableEntry;
-+ struct _SYSTEM_HOTPATCH_CODE_INFORMATION *CodeInfo;
-+} RTL_PATCH_HEADER, *PRTL_PATCH_HEADER;
++// Class 32 - OBSOLETE
+
-+//
- // Header for NLS Files
- //
- typedef struct _NLS_FILE_HEADER
-@@ -917,4 +1092,47 @@
- UCHAR LeadByte[MAXIMUM_LEADBYTES];
- } NLS_FILE_HEADER, *PNLS_FILE_HEADER;
+ // Class 33
+ typedef struct _SYSTEM_EXCEPTION_INFORMATION
+ {
+@@ -1151,16 +1232,135 @@
+ // Class 50
+ // Not a structure. Only a ULONG_PTR for the SystemRangeStart
+
+-// FIXME: Class 51 (Based on MM_DRIVER_VERIFIER_DATA)
++// Class 51
++typedef struct _SYSTEM_VERIFIER_INFORMATION
++{
++ ULONG NextEntryOffset;
++ ULONG Level;
++ UNICODE_STRING DriverName;
++ ULONG RaiseIrqls;
++ ULONG AcquireSpinLocks;
++ ULONG SynchronizeExecutions;
++ ULONG AllocationsAttempted;
++ ULONG AllocationsSucceeded;
++ ULONG AllocationsSucceededSpecialPool;
++ ULONG AllocationsWithNoTag;
++ ULONG TrimRequests;
++ ULONG Trims;
++ ULONG AllocationsFailed;
++ ULONG AllocationsFailedDeliberately;
++ ULONG Loads;
++ ULONG Unloads;
++ ULONG UnTrackedPool;
++ ULONG CurrentPagedPoolAllocations;
++ ULONG CurrentNonPagedPoolAllocations;
++ ULONG PeakPagedPoolAllocations;
++ ULONG PeakNonPagedPoolAllocations;
++ ULONG PagedPoolUsageInBytes;
++ ULONG NonPagedPoolUsageInBytes;
++ ULONG PeakPagedPoolUsageInBytes;
++ ULONG PeakNonPagedPoolUsageInBytes;
++} SYSTEM_VERIFIER_INFORMATION, *PSYSTEM_VERIFIER_INFORMATION;
+
+ // FIXME: Class 52
+
+ // Class 53
+-typedef struct _SYSTEM_SESSION_PROCESSES_INFORMATION
++typedef struct _SYSTEM_SESSION_PROCESS_INFORMATION
+ {
+ ULONG SessionId;
+- ULONG BufferSize;
++ ULONG SizeOfBuf;
+ PVOID Buffer; // Same format as in SystemProcessInformation
+-} SYSTEM_SESSION_PROCESSES_INFORMATION, *PSYSTEM_SESSION_PROCESSES_INFORMATION;
++} SYSTEM_SESSION_PROCESS_INFORMATION, *PSYSTEM_SESSION_PROCESS_INFORMATION;
++// FIXME: Class 54-97
++
+//
-+// Stack Traces
++// Hotpatch flags
+//
-+typedef struct _RTL_STACK_TRACE_ENTRY
-+{
-+ struct _RTL_STACK_TRACE_ENTRY *HashChain;
-+ ULONG TraceCount;
-+ USHORT Index;
-+ USHORT Depth;
-+ PVOID BackTrace[32];
-+} RTL_STACK_TRACE_ENTRY, *PRTL_STACK_TRACE_ENTRY;
++#define RTL_HOTPATCH_SUPPORTED_FLAG 0x01
++#define RTL_HOTPATCH_SWAP_OBJECT_NAMES 0x08 << 24
++#define RTL_HOTPATCH_SYNC_RENAME_FILES 0x10 << 24
++#define RTL_HOTPATCH_PATCH_USER_MODE 0x20 << 24
++#define RTL_HOTPATCH_REMAP_SYSTEM_DLL 0x40 << 24
++#define RTL_HOTPATCH_PATCH_KERNEL_MODE 0x80 << 24
+
-+typedef struct _STACK_TRACE_DATABASE
-+{
-+ RTL_CRITICAL_SECTION CriticalSection;
-+} STACK_TRACE_DATABASE, *PSTACK_TRACE_DATABASE;
+
-+#ifndef NTOS_MODE_USER
++// Class 69
++typedef struct _SYSTEM_HOTPATCH_CODE_INFORMATION
++{
++ ULONG Flags;
++ ULONG InfoSize;
++ union
++ {
++ struct
++ {
++ ULONG Foo;
++ } CodeInfo;
++ struct
++ {
++ USHORT NameOffset;
++ USHORT NameLength;
++ } KernelInfo;
++ struct
++ {
++ USHORT NameOffset;
++ USHORT NameLength;
++ USHORT TargetNameOffset;
++ USHORT TargetNameLength;
++ UCHAR PatchingFinished;
++ } UserModeInfo;
++ struct
++ {
++ USHORT NameOffset;
++ USHORT NameLength;
++ USHORT TargetNameOffset;
++ USHORT TargetNameLength;
++ UCHAR PatchingFinished;
++ NTSTATUS ReturnCode;
++ HANDLE TargetProcess;
++ } InjectionInfo;
++ struct
++ {
++ HANDLE FileHandle1;
++ PIO_STATUS_BLOCK IoStatusBlock1;
++ PVOID RenameInformation1;
++ PVOID RenameInformationLength1;
++ HANDLE FileHandle2;
++ PIO_STATUS_BLOCK IoStatusBlock2;
++ PVOID RenameInformation2;
++ PVOID RenameInformationLength2;
++ } RenameInfo;
++ struct
++ {
++ HANDLE ParentDirectory;
++ HANDLE ObjectHandle1;
++ HANDLE ObjectHandle2;
++ } AtomicSwap;
++ };
++} SYSTEM_HOTPATCH_CODE_INFORMATION, *PSYSTEM_HOTPATCH_CODE_INFORMATION;
+
+//
-+// Message Resource Entry, Block and Data
++// Class 75
+//
-+typedef struct _MESSAGE_RESOURCE_ENTRY
-+{
-+ USHORT Length;
-+ USHORT Flags;
-+ UCHAR Text[ANYSIZE_ARRAY];
-+} MESSAGE_RESOURCE_ENTRY, *PMESSAGE_RESOURCE_ENTRY;
-+
-+typedef struct _MESSAGE_RESOURCE_BLOCK
++#ifdef NTOS_MODE_USER
++typedef struct _SYSTEM_FIRMWARE_TABLE_HANDLER
+{
-+ ULONG LowId;
-+ ULONG HighId;
-+ ULONG OffsetToEntries;
-+} MESSAGE_RESOURCE_BLOCK, *PMESSAGE_RESOURCE_BLOCK;
++ ULONG ProviderSignature;
++ BOOLEAN Register;
++ PFNFTH FirmwareTableHandler;
++ PVOID DriverObject;
++} SYSTEM_FIRMWARE_TABLE_HANDLER, *PSYSTEM_FIRMWARE_TABLE_HANDLER;
+
-+typedef struct _MESSAGE_RESOURCE_DATA
++//
++// Class 76
++//
++typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
+{
-+ ULONG NumberOfBlocks;
-+ MESSAGE_RESOURCE_BLOCK Blocks[ANYSIZE_ARRAY];
-+} MESSAGE_RESOURCE_DATA, *PMESSAGE_RESOURCE_DATA;
-+
++ ULONG ProviderSignature;
++ SYSTEM_FIRMWARE_TABLE_ACTION Action;
++ ULONG TableID;
++ ULONG TableBufferLength;
++ UCHAR TableBuffer[1];
++} SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
#endif
+#endif
-Index: include/ndk/inbvfuncs.h
-===================================================================
---- include/ndk/inbvfuncs.h (revision 21759)
-+++ include/ndk/inbvfuncs.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
-
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-@@ -54,7 +54,7 @@
- VOID
- NTAPI
- InbvInstallDisplayStringFilter(
-- IN PVOID Unknown
-+ IN PVOID DisplayFilter
- );
-
- BOOLEAN
-Index: include/ndk/kefuncs.h
+Index: include/ndk/i386/mmtypes.h
===================================================================
---- include/ndk/kefuncs.h (revision 21759)
-+++ include/ndk/kefuncs.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
+--- include/ndk/i386/mmtypes.h (revision 21759)
++++ include/ndk/i386/mmtypes.h (working copy)
+@@ -29,4 +29,121 @@
+ #define PAGE_SIZE 0x1000
+ #define PAGE_SHIFT 12L
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-@@ -111,6 +111,20 @@
- PKSPIN_LOCK SpinLock
- );
-
-+KIRQL
-+FASTCALL
-+KeAcquireQueuedSpinLockRaiseToSynch(
-+ IN KSPIN_LOCK_QUEUE_NUMBER LockNumber
-+);
++//
++// Page Table Entry Definitions
++//
++typedef struct _HARDWARE_PTE_X86
++{
++ ULONG Valid:1;
++ ULONG Write:1;
++ ULONG Owner:1;
++ ULONG WriteThrough:1;
++ ULONG CacheDisable:1;
++ ULONG Accessed:1;
++ ULONG Dirty:1;
++ ULONG LargePage:1;
++ ULONG Global:1;
++ ULONG CopyOnWrite:1;
++ ULONG Prototype: 1;
++ ULONG reserved: 1;
++ ULONG PageFrameNumber:20;
++} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86;
+
-+KIRQL
-+FASTCALL
-+KeAcquireInStackQueuedSpinLockRaiseToSynch(
-+ IN PKSPIN_LOCK SpinLock,
-+ IN PKLOCK_QUEUE_HANDLE LockHandle
-+);
++typedef struct _MMPTE_SOFTWARE
++{
++ ULONG Valid:1;
++ ULONG PageFileLow:4;
++ ULONG Protection:5;
++ ULONG Prototype:1;
++ ULONG Transition:1;
++ ULONG PageFileHigh:20;
++} MMPTE_SOFTWARE;
+
++typedef struct _MMPTE_TRANSITION
++{
++ ULONG Valid:1;
++ ULONG Write:1;
++ ULONG Owner:1;
++ ULONG WriteThrough:1;
++ ULONG CacheDisable:1;
++ ULONG Protection:5;
++ ULONG Prototype:1;
++ ULONG Transition:1;
++ ULONG PageFrameNumber:20;
++} MMPTE_TRANSITION;
+
- //
- // Interrupt Functions
- //
-@@ -172,9 +186,17 @@
- VOID
- );
-
-+BOOLEAN
-+NTAPI
-+KiIpiServiceRoutine(
-+ IN PKTRAP_FRAME TrapFrame,
-+ IN PVOID ExceptionFrame
-+);
++typedef struct _MMPTE_PROTOTYPE
++{
++ ULONG Valid:1;
++ ULONG ProtoAddressLow:7;
++ ULONG ReadOnly:1;
++ ULONG WhichPool:1;
++ ULONG Prototype:1;
++ ULONG ProtoAddressHigh:21;
++} MMPTE_PROTOTYPE;
+
- //
--// ARC Configuration Functions
-+// ARC Configuration Functions. Only enabled if you have ARC Support
- //
-+#ifdef _ARC_
- PCONFIGURATION_COMPONENT_DATA
- NTAPI
- KeFindConfigurationNextEntry(
-@@ -193,6 +215,7 @@
- IN CONFIGURATION_TYPE Type,
- IN PULONG ComponentKey OPTIONAL
- );
-+#endif
-
- //
- // Low-level Hardware/CPU Control Functions
-@@ -200,12 +223,26 @@
- VOID
- NTAPI
- KeFlushEntireTb(
-- IN BOOLEAN Unknown,
-- IN BOOLEAN CurrentCpuOnly
-+ IN BOOLEAN Invalid,
-+ IN BOOLEAN AllProcessors
- );
-
- VOID
- NTAPI
-+KeUpdateSystemTime(
-+ PKTRAP_FRAME TrapFrame,
-+ KIRQL Irql
-+);
++typedef struct _MMPTE_SUBSECTION
++{
++ ULONG Valid:1;
++ ULONG SubsectionAddressLow:4;
++ ULONG Protection:5;
++ ULONG Prototype:1;
++ ULONG SubsectionAddressHigh:20;
++ ULONG WhichPool:1;
++} MMPTE_SUBSECTION;
+
-+VOID
-+NTAPI
-+KeUpdateRunTime(
-+ PKTRAP_FRAME TrapFrame,
-+ KIRQL Irql
-+);
++typedef struct _MMPTE_LIST
++{
++ ULONG Valid:1;
++ ULONG OneEntry:1;
++ ULONG filler10:10;
++ ULONG NextEntry:20;
++} MMPTE_LIST;
+
-+VOID
-+NTAPI
- KeSetDmaIoCoherency(
- IN ULONG Coherency
- );
-@@ -230,6 +267,13 @@
- IN ULONG MinIncrement
- );
-
-+NTSTATUS
-+NTAPI
-+Ke386CallBios(
-+ IN ULONG BiosCommand,
-+ IN OUT PCONTEXT BiosArguments
-+);
++#ifndef CONFIG_SMP
+
- //
- // Misc. Functions
- //
-@@ -254,7 +298,6 @@
- //
- // Native Calls
- //
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtContinue(
-@@ -262,7 +305,6 @@
- IN BOOLEAN TestAlert
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCallbackReturn(
-@@ -271,7 +313,6 @@
- NTSTATUS Status
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateProfile(
-@@ -286,7 +327,6 @@
- IN KAFFINITY ProcessorMask
- );
++typedef struct _MMPTE_HARDWARE
++{
++ ULONG Valid:1;
++ ULONG Write:1;
++ ULONG Owner:1;
++ ULONG WriteThrough:1;
++ ULONG CacheDisable:1;
++ ULONG Accessed:1;
++ ULONG Dirty:1;
++ ULONG LargePage:1;
++ ULONG Global:1;
++ ULONG CopyOnWrite:1;
++ ULONG Prototype:1;
++ ULONG reserved:1;
++ ULONG PageFrameNumber:20;
++} MMPTE_HARDWARE, *PMMPTE_HARDWARE;
++
++#else
++
++typedef struct _MMPTE_HARDWARE
++{
++ ULONG Valid:1;
++ ULONG Writable:1;
++ ULONG Owner:1;
++ ULONG WriteThrough:1;
++ ULONG CacheDisable:1;
++ ULONG Accessed:1;
++ ULONG Dirty:1;
++ ULONG LargePage:1;
++ ULONG Global:1;
++ ULONG CopyOnWrite:1;
++ ULONG Prototype:1;
++ ULONG Write:1;
++ ULONG PageFrameNumber:20;
++} MMPTE_HARDWARE, *PMMPTE_HARDWARE;
++
+ #endif
++
++//
++// Use the right PTE structure
++//
++#define HARDWARE_PTE HARDWARE_PTE_X86
++#define PHARDWARE_PTE PHARDWARE_PTE_X86
++
++#endif
+Index: include/ndk/i386/ketypes.h
+===================================================================
+--- include/ndk/i386/ketypes.h (revision 21759)
++++ include/ndk/i386/ketypes.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtDelayExecution(
-@@ -294,7 +334,6 @@
- IN LARGE_INTEGER *Interval
- );
+ Copyright (c) Alex Ionescu. All rights reserved.
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtFlushInstructionCache(
-@@ -303,7 +342,6 @@
- IN ULONG NumberOfBytesToFlush
- );
+@@ -12,7 +12,7 @@
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtGetContextThread(
-@@ -311,14 +349,12 @@
- OUT PCONTEXT Context
- );
+ Author:
--NTSYSCALLAPI
- ULONG
- NTAPI
- NtGetTickCount(
- VOID
- );
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryIntervalProfile(
-@@ -326,7 +362,6 @@
- OUT PULONG Interval
- );
+ --*/
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryPerformanceCounter(
-@@ -334,14 +369,12 @@
- IN PLARGE_INTEGER Frequency
- );
+@@ -34,13 +34,57 @@
+ #define I386_TRAP_GATE 0xF
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQuerySystemTime(
- OUT PLARGE_INTEGER CurrentTime
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryTimerResolution(
-@@ -350,7 +383,6 @@
- OUT PULONG ActualResolution
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueueApcThread(
-@@ -361,7 +393,6 @@
- PVOID SystemArgument2
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtRaiseException(
-@@ -370,7 +401,6 @@
- IN BOOLEAN SearchFrames
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetContextThread(
-@@ -378,7 +408,6 @@
- IN PCONTEXT Context
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetIntervalProfile(
-@@ -386,7 +415,6 @@
- KPROFILE_SOURCE ClockSource
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetLdtEntries(
-@@ -396,7 +424,6 @@
- LDT_ENTRY LdtEntry2
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetSystemTime(
-@@ -404,7 +431,6 @@
- IN PLARGE_INTEGER NewSystemTime OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetTimerResolution(
-@@ -413,28 +439,24 @@
- OUT PULONG ActualResolution
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtStartProfile(
- IN HANDLE ProfileHandle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtStopProfile(
- IN HANDLE ProfileHandle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtTestAlert(
- VOID
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtVdmControl(
-@@ -442,25 +464,22 @@
- PVOID ControlData
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtW32Call(
- IN ULONG RoutineIndex,
- IN PVOID Argument,
- IN ULONG ArgumentLength,
-- OUT PVOID* Result,
-- OUT PULONG ResultLength
-+ OUT PVOID* Result OPTIONAL,
-+ OUT PULONG ResultLength OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtYieldExecution(
- VOID
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwContinue(
-@@ -468,7 +487,6 @@
- IN BOOLEAN TestAlert
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCallbackReturn(
-@@ -477,7 +495,6 @@
- NTSTATUS Status
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateProfile(
-@@ -492,7 +509,6 @@
- IN KAFFINITY ProcessorMask
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwDelayExecution(
-@@ -500,7 +516,6 @@
- IN LARGE_INTEGER *Interval
- );
+ //
++// Selector Names
++//
++#define RPL_MASK 0x0003
++#define MODE_MASK 0x0001
++#define KGDT_R0_CODE (0x8)
++#define KGDT_R0_DATA (0x10)
++#define KGDT_R3_CODE (0x18)
++#define KGDT_R3_DATA (0x20)
++#define KGDT_TSS (0x28)
++#define KGDT_R0_PCR (0x30)
++#define KGDT_R3_TEB (0x38)
++#define KGDT_LDT (0x48)
++#define KGDT_DF_TSS (0x50)
++#define KGDT_NMI_TSS (0x58)
++
++//
++// CR4
++//
++#define CR4_VME 0x1
++#define CR4_PVI 0x2
++#define CR4_TSD 0x4
++#define CR4_DE 0x8
++#define CR4_PSE 0x10
++#define CR4_PAE 0x20
++#define CR4_MCE 0x40
++#define CR4_PGE 0x80
++#define CR4_FXSR 0x200
++#define CR4_XMMEXCPT 0x400
++
++//
++// EFlags
++//
++#define EFLAGS_TF 0x100
++#define EFLAGS_INTERRUPT_MASK 0x200
++#define EFLAGS_NESTED_TASK 0x4000
++#define EFLAGS_V86_MASK 0x20000
++#define EFLAGS_ALIGN_CHECK 0x40000
++#define EFLAGS_VIF 0x80000
++#define EFLAGS_VIP 0x100000
++#define EFLAG_SIGN 0x8000
++#define EFLAG_ZERO 0x4000
++
++#ifndef NTOS_MODE_USER
++//
+ // IPI Types
+ //
+ #define IPI_APC 1
+ #define IPI_DPC 2
+-#define IPI_FREEZE 3
+-#define IPI_PACKET_READY 4
+-#define IPI_SYNCH_REQUEST 10
++#define IPI_FREEZE 4
++#define IPI_PACKET_READY 8
++#define IPI_SYNCH_REQUEST 16
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwFlushInstructionCache(
-@@ -509,7 +524,6 @@
- IN ULONG NumberOfBytesToFlush
- );
+ //
+ // FN/FX (FPU) Save Area Structures
+@@ -146,16 +190,16 @@
+ } Bytes;
+ struct
+ {
+- ULONG BaseMid : 8;
+- ULONG Type : 5;
+- ULONG Dpl : 2;
+- ULONG Pres : 1;
+- ULONG LimitHi : 4;
+- ULONG Sys : 1;
+- ULONG Reserved_0 : 1;
+- ULONG Default_Big : 1;
+- ULONG Granularity : 1;
+- ULONG BaseHi : 8;
++ ULONG BaseMid:8;
++ ULONG Type:5;
++ ULONG Dpl:2;
++ ULONG Pres:1;
++ ULONG LimitHi:4;
++ ULONG Sys:1;
++ ULONG Reserved_0:1;
++ ULONG Default_Big:1;
++ ULONG Granularity:1;
++ ULONG BaseHi:8;
+ } Bits;
+ } HighWord;
+ } LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
+@@ -178,16 +222,16 @@
+ } Bytes;
+ struct
+ {
+- ULONG BaseMid : 8;
+- ULONG Type : 5;
+- ULONG Dpl : 2;
+- ULONG Pres : 1;
+- ULONG LimitHi : 4;
+- ULONG Sys : 1;
+- ULONG Reserved_0 : 1;
+- ULONG Default_Big : 1;
+- ULONG Granularity : 1;
+- ULONG BaseHi : 8;
++ ULONG BaseMid:8;
++ ULONG Type:5;
++ ULONG Dpl:2;
++ ULONG Pres:1;
++ ULONG LimitHi:4;
++ ULONG Sys:1;
++ ULONG Reserved_0:1;
++ ULONG Default_Big:1;
++ ULONG Granularity:1;
++ ULONG BaseHi:8;
+ } Bits;
+ } HighWord;
+ } KGDTENTRY, *PKGDTENTRY;
+@@ -222,26 +266,6 @@
+ USHORT ExtendedOffset;
+ } KIDTENTRY, *PKIDTENTRY;
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwGetContextThread(
-@@ -517,14 +531,12 @@
- OUT PCONTEXT Context
- );
+-//
+-// Page Table Entry Definition
+-//
+-typedef struct _HARDWARE_PTE_X86
+-{
+- ULONG Valid : 1;
+- ULONG Write : 1;
+- ULONG Owner : 1;
+- ULONG WriteThrough : 1;
+- ULONG CacheDisable : 1;
+- ULONG Accessed : 1;
+- ULONG Dirty : 1;
+- ULONG LargePage : 1;
+- ULONG Global : 1;
+- ULONG CopyOnWrite : 1;
+- ULONG Prototype : 1;
+- ULONG reserved : 1;
+- ULONG PageFrameNumber : 20;
+-} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86;
+-
+ typedef struct _DESCRIPTOR
+ {
+ USHORT Pad;
+@@ -277,9 +301,9 @@
+ #pragma pack(push,4)
+ typedef struct _KPROCESSOR_STATE
+ {
+- PCONTEXT ContextFrame;
++ CONTEXT ContextFrame;
+ KSPECIAL_REGISTERS SpecialRegisters;
+-} KPROCESSOR_STATE;
++} KPROCESSOR_STATE, *PKPROCESSOR_STATE;
--NTSYSAPI
- ULONG
- NTAPI
- ZwGetTickCount(
- VOID
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryIntervalProfile(
-@@ -532,7 +544,6 @@
- OUT PULONG Interval
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryPerformanceCounter(
-@@ -540,14 +551,12 @@
- IN PLARGE_INTEGER Frequency
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQuerySystemTime(
- OUT PLARGE_INTEGER CurrentTime
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryTimerResolution(
-@@ -556,7 +565,6 @@
- OUT PULONG ActualResolution
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueueApcThread(
-@@ -567,7 +575,6 @@
- PVOID SystemArgument2
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwRaiseException(
-@@ -576,7 +583,6 @@
- IN BOOLEAN SearchFrames
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetContextThread(
-@@ -584,7 +590,6 @@
- IN PCONTEXT Context
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetIntervalProfile(
-@@ -592,7 +597,6 @@
- KPROFILE_SOURCE ClockSource
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetLdtEntries(
-@@ -602,7 +606,6 @@
- LDT_ENTRY LdtEntry2
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetSystemTime(
-@@ -610,7 +613,6 @@
- IN PLARGE_INTEGER NewSystemTime OPTIONAL
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetTimerResolution(
-@@ -619,28 +621,24 @@
- OUT PULONG ActualResolution
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwStartProfile(
- IN HANDLE ProfileHandle
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwStopProfile(
- IN HANDLE ProfileHandle
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwTestAlert(
- VOID
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwVdmControl(
-@@ -648,7 +646,6 @@
- PVOID ControlData
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwW32Call(
-@@ -659,7 +656,6 @@
- OUT PULONG ResultLength OPTIONAL
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwYieldExecution(
-Index: include/ndk/cmfuncs.h
-===================================================================
---- include/ndk/cmfuncs.h (revision 21759)
-+++ include/ndk/cmfuncs.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
-
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-@@ -27,7 +27,6 @@
- //
- // Native calls
//
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateKey(
-@@ -40,14 +39,12 @@
- IN PULONG Disposition OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtDeleteKey(
- IN HANDLE KeyHandle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtDeleteValueKey(
-@@ -55,7 +52,6 @@
- IN PUNICODE_STRING ValueName
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtEnumerateKey(
-@@ -67,7 +63,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtEnumerateValueKey(
-@@ -79,14 +74,12 @@
- OUT PULONG ResultLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtFlushKey(
- IN HANDLE KeyHandle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtGetPlugPlayEvent(
-@@ -96,14 +89,12 @@
- IN ULONG BufferSize
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtInitializeRegistry(
- BOOLEAN SetUpBoot
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtLoadKey(
-@@ -111,7 +102,6 @@
- IN POBJECT_ATTRIBUTES FileObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtLoadKey2(
-@@ -120,7 +110,6 @@
- IN ULONG Flags
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtNotifyChangeKey(
-@@ -136,7 +125,6 @@
- IN BOOLEAN WatchSubtree
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtOpenKey(
-@@ -145,7 +133,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtPlugPlayControl(
-@@ -154,7 +141,6 @@
- IN ULONG BufferSize
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryKey(
-@@ -165,7 +151,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryMultipleValueKey(
-@@ -177,7 +162,6 @@
- OUT PULONG ReturnLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryValueKey(
-@@ -189,7 +173,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtReplaceKey(
-@@ -198,7 +181,6 @@
- IN POBJECT_ATTRIBUTES ReplacedObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtRestoreKey(
-@@ -207,7 +189,6 @@
- IN ULONG RestoreFlags
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSaveKey(
-@@ -215,7 +196,6 @@
- IN HANDLE FileHandle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSaveKeyEx(
-@@ -224,7 +204,6 @@
- IN ULONG Flags
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetInformationKey(
-@@ -234,7 +213,6 @@
- IN ULONG KeyInformationLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetValueKey(
-@@ -246,7 +224,6 @@
- IN ULONG DataSize
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtUnloadKey(
-@@ -254,7 +231,6 @@
- );
-
- #ifdef NTOS_MODE_USER
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateKey(
-@@ -267,14 +243,13 @@
- IN PULONG Disposition OPTIONAL
- );
-
--NTSYSAPI
-+
- NTSTATUS
- NTAPI
- ZwDeleteKey(
- IN HANDLE KeyHandle
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwDeleteValueKey(
-@@ -282,7 +257,6 @@
- IN PUNICODE_STRING ValueName
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwEnumerateKey(
-@@ -294,7 +268,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwEnumerateValueKey(
-@@ -306,14 +279,12 @@
- OUT PULONG ResultLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwFlushKey(
- IN HANDLE KeyHandle
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwGetPlugPlayEvent(
-@@ -323,14 +294,12 @@
- IN ULONG BufferSize
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwInitializeRegistry(
- BOOLEAN SetUpBoot
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwLoadKey(
-@@ -338,7 +307,6 @@
- IN POBJECT_ATTRIBUTES FileObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwLoadKey2(
-@@ -347,7 +315,6 @@
- IN ULONG Flags
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwNotifyChangeKey(
-@@ -363,7 +330,6 @@
- IN BOOLEAN WatchSubtree
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwOpenKey(
-@@ -372,7 +338,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwPlugPlayControl(
-@@ -381,7 +346,6 @@
- IN ULONG BufferSize
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryKey(
-@@ -392,7 +356,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryMultipleValueKey(
-@@ -404,7 +367,6 @@
- OUT PULONG ReturnLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryValueKey(
-@@ -416,7 +378,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwReplaceKey(
-@@ -425,7 +386,6 @@
- IN POBJECT_ATTRIBUTES ReplacedObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwRestoreKey(
-@@ -434,7 +394,6 @@
- IN ULONG RestoreFlags
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSaveKey(
-@@ -442,7 +401,6 @@
- IN HANDLE FileHandle
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSaveKeyEx(
-@@ -451,7 +409,6 @@
- IN ULONG Flags
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetInformationKey(
-@@ -461,7 +418,6 @@
- IN ULONG KeyInformationLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetValueKey(
-@@ -474,7 +430,6 @@
- );
- #endif
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwUnloadKey(
-Index: include/ndk/extypes.h
-===================================================================
---- include/ndk/extypes.h (revision 21759)
-+++ include/ndk/extypes.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
-
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-@@ -196,9 +196,9 @@
- SystemUnloadGdiDriverInformation,
- SystemTimeAdjustmentInformation,
- SystemSummaryMemoryInformation,
-- SystemNextEventIdInformation,
-- SystemEventIdsInformation,
-- SystemCrashDumpInformation,
-+ SystemMirrorMemoryInformation,
-+ SystemPerformanceTraceInformation,
-+ SystemObsolete0,
- SystemExceptionInformation,
- SystemCrashDumpStateInformation,
- SystemKernelDebuggerInformation,
-@@ -220,7 +220,51 @@
- SystemVerifierInformation,
- SystemAddVerifier,
- SystemSessionProcessesInformation,
-- SystemInformationClassMax
-+ SystemLoadGdiDriverInSystemSpaceInformation,
-+ SystemNumaProcessorMap,
-+ SystemPrefetcherInformation,
-+ SystemExtendedProcessInformation,
-+ SystemRecommendedSharedDataAlignment,
-+ SystemComPlusPackage,
-+ SystemNumaAvailableMemory,
-+ SystemProcessorPowerInformation,
-+ SystemEmulationBasicInformation,
-+ SystemEmulationProcessorInformation,
-+ SystemExtendedHanfleInformation,
-+ SystemLostDelayedWriteInformation,
-+ SystemBigPoolInformation,
-+ SystemSessionPoolTagInformation,
-+ SystemSessionMappedViewInformation,
-+ SystemHotpatchInformation,
-+ SystemObjectSecurityMode,
-+ SystemWatchDogTimerHandler,
-+ SystemWatchDogTimerInformation,
-+ SystemLogicalProcessorInformation,
-+ SystemWo64SharedInformationObosolete,
-+ SystemRegisterFirmwareTableInformationHandler,
-+ SystemFirmwareTableInformation,
-+ SystemModuleInformationEx,
-+ SystemVerifierTriageInformation,
-+ SystemSuperfetchInformation,
-+ SystemMemoryListInformation,
-+ SystemFileCacheInformationEx,
-+ SystemThreadPriorityClientIdInformation,
-+ SystemProcessorIdleCycleTimeInformation,
-+ SystemVerifierCancellationInformation,
-+ SystemProcessorPowerInformationEx,
-+ SystemRefTraceInformation,
-+ SystemSpecialPoolInformation,
-+ SystemProcessIdInformation,
-+ SystemErrorPortInformation,
-+ SystemBootEnvironmentInformation,
-+ SystemHypervisorInformation,
-+ SystemVerifierInformationEx,
-+ SystemTimeZoneInformation,
-+ SystemImageFileExecutionOptionsInformation,
-+ SystemCoverageInformation,
-+ SystemPrefetchPathInformation,
-+ SystemVerifierFaultsInformation,
-+ MaxSystemInfoClass,
- } SYSTEM_INFORMATION_CLASS;
-
- //
-@@ -228,7 +272,8 @@
- //
- typedef enum _MUTANT_INFORMATION_CLASS
- {
-- MutantBasicInformation
-+ MutantBasicInformation,
-+ MutantOwnerInformation
- } MUTANT_INFORMATION_CLASS;
-
- //
-@@ -264,9 +309,30 @@
- EventBasicInformation
- } EVENT_INFORMATION_CLASS;
-
--#ifndef NTOS_MODE_USER
-+#ifdef NTOS_MODE_USER
-
- //
-+// Firmware Table Actions for SystemFirmwareTableInformation
-+//
-+typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
-+{
-+ SystemFirmwareTable_Enumerate = 0,
-+ SystemFirmwareTable_Get = 1,
-+} SYSTEM_FIRMWARE_TABLE_ACTION, *PSYSTEM_FIRMWARE_TABLE_ACTION;
-+
-+//
-+// Firmware Handler Callback
-+//
-+struct _SYSTEM_FIRMWARE_TABLE_INFORMATION;
-+typedef
-+NTSTATUS
-+(__cdecl *PFNFTH)(
-+ IN struct _SYSTEM_FIRMWARE_TABLE_INFORMATION *FirmwareTableInformation
-+);
-+
+ // Processor Region Control Block
+@@ -301,8 +325,14 @@
+ KPROCESSOR_STATE ProcessorState;
+ ULONG KernelReserved[16];
+ ULONG HalReserved[16];
++#if (NTDDI_VERSION >= NTDDI_LONGHORN)
++ ULONG CFlushSize;
++ UCHAR PrcbPad0[88];
+#else
-+
-+//
- // Executive Work Queue Structures
- //
- typedef struct _EX_QUEUE_WORKER_INFO
-@@ -305,12 +371,10 @@
- //
- typedef struct _EX_RUNDOWN_REF_CACHE_AWARE
- {
-- union
-- {
-- ULONG_PTR Count;
-- PVOID Ptr;
-- };
-+ PEX_RUNDOWN_REF RunRefs;
- PVOID PoolToFree;
-+ ULONG RunRefSize;
-+ ULONG Number;
- } EX_RUNDOWN_REF_CACHE_AWARE, *PEX_RUNDOWN_REF_CACHE_AWARE;
-
- //
-@@ -319,7 +383,7 @@
- typedef struct _EX_RUNDOWN_WAIT_BLOCK
- {
- ULONG_PTR Count;
-- KEVENT RundownEvent;
-+ KEVENT WakeEvent;
- } EX_RUNDOWN_WAIT_BLOCK, *PEX_RUNDOWN_WAIT_BLOCK;
-
- //
-@@ -382,18 +446,18 @@
- } CALLBACK_OBJECT , *PCALLBACK_OBJECT;
-
- //
--// Profile OBject
-+// Profile Object
- //
- typedef struct _EPROFILE
- {
- PEPROCESS Process;
-- PVOID ImageBase;
-- SIZE_T ImageSize;
-+ PVOID RangeBase;
-+ SIZE_T RangeSize;
- PVOID Buffer;
- ULONG BufferSize;
- ULONG BucketSize;
-- PKPROFILE KeProfile;
-- PVOID LockedBuffer;
-+ PKPROFILE ProfileObject;
-+ PVOID LockedBufferAddress;
- PMDL Mdl;
- ULONG Segment;
- KPROFILE_SOURCE ProfileSource;
-@@ -403,6 +467,24 @@
- //
- // Handle Table Structures
- //
-+typedef struct _HANDLE_TRACE_DB_ENTRY
-+{
-+ CLIENT_ID ClientId;
-+ HANDLE Handle;
-+ ULONG Type;
-+ PVOID StackTrace[16];
-+} HANDLE_TRACE_DB_ENTRY, *PHANDLE_TRACE_DB_ENTRY;
-+
-+typedef struct _HANDLE_TRACE_DEBUG_INFO
-+{
-+ LONG RefCount;
-+ ULONG TableSize;
-+ ULONG BitMaskFlags;
-+ FAST_MUTEX CloseCompatcionLock;
-+ ULONG CurrentStackIndex;
-+ HANDLE_TRACE_DB_ENTRY TraceDb[1];
-+} HANDLE_TRACE_DEBUG_INFO, *PHANDLE_TRACE_DEBUG_INFO;
-+
- typedef struct _HANDLE_TABLE_ENTRY_INFO
- {
- ULONG AuditMask;
-@@ -416,17 +498,52 @@
- ULONG_PTR ObAttributes;
- PHANDLE_TABLE_ENTRY_INFO InfoTable;
- ULONG_PTR Value;
-- } u1;
-+ };
- union
- {
- ULONG GrantedAccess;
-- USHORT GrantedAccessIndex;
-+ struct
-+ {
-+ USHORT GrantedAccessIndex;
-+ USHORT CreatorBackTraceIndex;
-+ };
- LONG NextFreeTableEntry;
-- } u2;
-+ };
- } HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
-
- typedef struct _HANDLE_TABLE
- {
-+#if 0
-+ ULONG TableCode;
-+ PEPROCESS QuotaProcess;
-+ PVOID UniqueProcessId;
-+ EX_PUSH_LOCK HandleLock;
-+ LIST_ENTRY HandleTableList;
-+ EX_PUSH_LOCK HandleContentionEvent;
-+ PHANDLE_TRACE_DEBUG_INFO DebugInfo;
-+ LONG ExtraInfoPages;
++ ULONG CFlushSize;
+ UCHAR PrcbPad0[92];
+- PVOID LockQueue[33]; // Used for Queued Spinlocks
++#endif
++ KSPIN_LOCK_QUEUE LockQueue[LockQueueMaximumLock];
+ struct _KTHREAD *NpxThread;
+ ULONG InterruptCount;
+ ULONG KernelTime;
+@@ -314,18 +344,41 @@
+ ULONG PageColor;
+ UCHAR SkipTick;
+ UCHAR DebuggerSavedIRQL;
++#if (NTDDI_VERSION >= NTDDI_WS03)
++ UCHAR NodeColor;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-+ union
-+ {
-+ ULONG Flags;
-+ UCHAR StrictFIFO:1;
-+ };
-+ LONG FirstFreeHandle;
-+ PHANDLE_TABLE_ENTRY LastFreeHandleEntry;
-+ LONG HandleCount;
-+ ULONG NextHandleNeedingPool;
++ UCHAR PollSlot;
+#else
-+ ULONG FirstFree;
-+ ULONG LastFree;
-+ ULONG NextHandleNeedingPool;
-+ LONG HandleCount;
-+ union
-+ {
-+ ULONG Flags;
-+ UCHAR StrictFIFO:1;
-+ };
++ UCHAR Spare1;
+#endif
++ ULONG NodeShiftedColor;
+#else
- ULONG Flags;
- LONG HandleCount;
- PHANDLE_TABLE_ENTRY **Table;
-@@ -437,6 +554,7 @@
- ERESOURCE HandleTableLock;
- LIST_ENTRY HandleTableList;
- KEVENT HandleContentionEvent;
+ UCHAR Spare1[6];
+#endif
- } HANDLE_TABLE, *PHANDLE_TABLE;
-
- #endif
-@@ -466,6 +584,11 @@
- BOOLEAN AbandonedState;
- } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
-
-+typedef struct _MUTANT_OWNER_INFORMATION
-+{
-+ CLIENT_ID ClientId;
-+} MUTANT_OWNER_INFORMATION, *PMUTANT_OWNER_INFORMATION;
-+
- //
- // Information Structures for NtQueryAtom
- //
-@@ -662,7 +785,7 @@
- HANDLE InheritedFromUniqueProcessId;
- ULONG HandleCount;
- ULONG SessionId;
-- ULONG PageDirectoryFrame;
-+ ULONG UniqueProcessKey;
-
- //
- // This part corresponds to VM_COUNTERS_EX.
-@@ -679,7 +802,7 @@
- ULONG QuotaNonPagedPoolUsage;
- ULONG PagefileUsage;
- ULONG PeakPagefileUsage;
-- ULONG PrivateUsage;
-+ ULONG PrivatePageCount;
-
- //
- // This part corresponds to IO_COUNTERS
-@@ -691,7 +814,7 @@
- LARGE_INTEGER WriteTransferCount;
- LARGE_INTEGER OtherTransferCount;
-
-- SYSTEM_THREAD_INFORMATION TH[1];
-+ //SYSTEM_THREAD_INFORMATION TH[1];
- } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
-
- // Class 6
-@@ -737,58 +860,12 @@
- LARGE_INTEGER TimeOfCalls[1];
- } SYSTEM_CALL_TIME_INFORMATION, *PSYSTEM_CALL_TIME_INFORMATION;
-
--// Class 11
--typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY
--{
-- ULONG Unknown1;
-- ULONG Unknown2;
-- PVOID Base;
-- ULONG Size;
-- ULONG Flags;
-- USHORT Index;
-- USHORT NameLength;
-- USHORT LoadCount;
-- USHORT PathLength;
-- CHAR ImageName[256];
--} SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
--typedef struct _SYSTEM_MODULE_INFORMATION
--{
-- ULONG Count;
-- SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
--} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
-+// Class 11 - See RTL_PROCESS_MODULES
-
--// Class 12
--typedef struct _SYSTEM_RESOURCE_LOCK_ENTRY
--{
-- ULONG ResourceAddress;
-- ULONG Always1;
-- ULONG Unknown;
-- ULONG ActiveCount;
-- ULONG ContentionCount;
-- ULONG Unused[2];
-- ULONG NumberOfSharedWaiters;
-- ULONG NumberOfExclusiveWaiters;
--} SYSTEM_RESOURCE_LOCK_ENTRY, *PSYSTEM_RESOURCE_LOCK_ENTRY;
-+// Class 12 - See RTL_PROCESS_LOCKS
-
--typedef struct _SYSTEM_RESOURCE_LOCK_INFO
--{
-- ULONG Count;
-- SYSTEM_RESOURCE_LOCK_ENTRY Lock[1];
--} SYSTEM_RESOURCE_LOCK_INFO, *PSYSTEM_RESOURCE_LOCK_INFO;
-+// Class 13 - See RTL_PROCESS_BACKTRACES
-
--// FIXME: Class 13
--typedef struct _SYSTEM_BACKTRACE_INFORMATION_ENTRY
--{
-- ULONG Dummy;
--} SYSTEM_BACKTRACE_INFORMATION_ENTRY, *PSYSTEM_BACKTRACE_INFORMATION_ENTRY;
--
--typedef struct _SYSTEM_BACKTRACE_INFORMATION
--{
-- ULONG Unknown[4];
-- ULONG Count;
-- SYSTEM_BACKTRACE_INFORMATION_ENTRY Trace[1];
--} SYSTEM_BACKTRACE_INFORMATION, *PSYSTEM_BACKTRACE_INFORMATION;
--
- // Class 14 - 15
- typedef struct _SYSTEM_POOL_ENTRY
- {
-@@ -914,14 +991,10 @@
- ULONG BopCount;
- } SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
-
--// FIXME: Class 20
--typedef struct _SYSTEM_VDM_BOP_INFO
--{
-- PVOID Dummy;
--} SYSTEM_VDM_BOP_INFO, *PSYSTEM_VDM_BOP_INFO;
-+// Class 20 - ULONG VDMBOPINFO
-
- // Class 21
--typedef struct _SYSTEM_CACHE_INFORMATION
-+typedef struct _SYSTEM_FILECACHE_INFORMATION
- {
- ULONG CurrentSize;
- ULONG PeakSize;
-@@ -930,8 +1003,9 @@
- ULONG MaximumWorkingSet;
- ULONG CurrentSizeIncludingTransitionInPages;
- ULONG PeakSizeIncludingTransitionInPages;
-- ULONG Unused[2];
--} SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
-+ ULONG TransitionRePurposeCount;
-+ ULONG Flags;
-+} SYSTEM_FILECACHE_INFORMATION, *PSYSTEM_FILECACHE_INFORMATION;
-
- // Class 22
- typedef struct _SYSTEM_POOLTAG
-@@ -984,6 +1058,7 @@
- USHORT ModifiedCount;
- USHORT PageTableCount;
- } SYSTEM_MEMORY_INFO, *PSYSTEM_MEMORY_INFO;
-+
- typedef struct _SYSTEM_MEMORY_INFORMATION
- {
- ULONG InfoSize;
-@@ -999,6 +1074,7 @@
- PVOID SectionPointer;
- PVOID EntryPoint;
- PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
-+ ULONG ImageLength;
- } SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
-
- // Class 27
-@@ -1020,14 +1096,19 @@
-
- // Class 29 - Same as 25
-
--// FIXME: Class 30 - 31
-+// FIXME: Class 30
-
--// Class 32
--typedef struct _SYSTEM_CRASH_DUMP_INFORMATION
-+// Class 31
-+typedef struct _SYSTEM_REF_TRACE_INFORMATION
- {
-- HANDLE CrashDumpSection;
--} SYSTEM_CRASH_DUMP_INFORMATION, *PSYSTEM_CRASH_DUMP_INFORMATION;
-+ UCHAR TraceEnable;
-+ UCHAR TracePermanent;
-+ UNICODE_STRING TraceProcessName;
-+ UNICODE_STRING TracePoolTags;
-+} SYSTEM_REF_TRACE_INFORMATION, *PSYSTEM_REF_TRACE_INFORMATION;
-
-+// Class 32 - OBSOLETE
-+
- // Class 33
- typedef struct _SYSTEM_EXCEPTION_INFORMATION
- {
-@@ -1151,16 +1232,135 @@
- // Class 50
- // Not a structure. Only a ULONG_PTR for the SystemRangeStart
-
--// FIXME: Class 51 (Based on MM_DRIVER_VERIFIER_DATA)
-+// Class 51
-+typedef struct _SYSTEM_VERIFIER_INFORMATION
-+{
-+ ULONG NextEntryOffset;
-+ ULONG Level;
-+ UNICODE_STRING DriverName;
-+ ULONG RaiseIrqls;
-+ ULONG AcquireSpinLocks;
-+ ULONG SynchronizeExecutions;
-+ ULONG AllocationsAttempted;
-+ ULONG AllocationsSucceeded;
-+ ULONG AllocationsSucceededSpecialPool;
-+ ULONG AllocationsWithNoTag;
-+ ULONG TrimRequests;
-+ ULONG Trims;
-+ ULONG AllocationsFailed;
-+ ULONG AllocationsFailedDeliberately;
-+ ULONG Loads;
-+ ULONG Unloads;
-+ ULONG UnTrackedPool;
-+ ULONG CurrentPagedPoolAllocations;
-+ ULONG CurrentNonPagedPoolAllocations;
-+ ULONG PeakPagedPoolAllocations;
-+ ULONG PeakNonPagedPoolAllocations;
-+ ULONG PagedPoolUsageInBytes;
-+ ULONG NonPagedPoolUsageInBytes;
-+ ULONG PeakPagedPoolUsageInBytes;
-+ ULONG PeakNonPagedPoolUsageInBytes;
-+} SYSTEM_VERIFIER_INFORMATION, *PSYSTEM_VERIFIER_INFORMATION;
-
- // FIXME: Class 52
-
- // Class 53
--typedef struct _SYSTEM_SESSION_PROCESSES_INFORMATION
-+typedef struct _SYSTEM_SESSION_PROCESS_INFORMATION
- {
- ULONG SessionId;
-- ULONG BufferSize;
-+ ULONG SizeOfBuf;
- PVOID Buffer; // Same format as in SystemProcessInformation
--} SYSTEM_SESSION_PROCESSES_INFORMATION, *PSYSTEM_SESSION_PROCESSES_INFORMATION;
-+} SYSTEM_SESSION_PROCESS_INFORMATION, *PSYSTEM_SESSION_PROCESS_INFORMATION;
-
-+// FIXME: Class 54-97
-+
-+//
-+// Hotpatch flags
-+//
-+#define RTL_HOTPATCH_SUPPORTED_FLAG 0x01
-+#define RTL_HOTPATCH_SWAP_OBJECT_NAMES 0x08 << 24
-+#define RTL_HOTPATCH_SYNC_RENAME_FILES 0x10 << 24
-+#define RTL_HOTPATCH_PATCH_USER_MODE 0x20 << 24
-+#define RTL_HOTPATCH_REMAP_SYSTEM_DLL 0x40 << 24
-+#define RTL_HOTPATCH_PATCH_KERNEL_MODE 0x80 << 24
-+
-+
-+// Class 69
-+typedef struct _SYSTEM_HOTPATCH_CODE_INFORMATION
-+{
-+ ULONG Flags;
-+ ULONG InfoSize;
-+ union
-+ {
-+ struct
-+ {
-+ ULONG Foo;
-+ } CodeInfo;
-+ struct
-+ {
-+ USHORT NameOffset;
-+ USHORT NameLength;
-+ } KernelInfo;
-+ struct
-+ {
-+ USHORT NameOffset;
-+ USHORT NameLength;
-+ USHORT TargetNameOffset;
-+ USHORT TargetNameLength;
-+ UCHAR PatchingFinished;
-+ } UserModeInfo;
-+ struct
-+ {
-+ USHORT NameOffset;
-+ USHORT NameLength;
-+ USHORT TargetNameOffset;
-+ USHORT TargetNameLength;
-+ UCHAR PatchingFinished;
-+ NTSTATUS ReturnCode;
-+ HANDLE TargetProcess;
-+ } InjectionInfo;
-+ struct
-+ {
-+ HANDLE FileHandle1;
-+ PIO_STATUS_BLOCK IoStatusBlock1;
-+ PVOID RenameInformation1;
-+ PVOID RenameInformationLength1;
-+ HANDLE FileHandle2;
-+ PIO_STATUS_BLOCK IoStatusBlock2;
-+ PVOID RenameInformation2;
-+ PVOID RenameInformationLength2;
-+ } RenameInfo;
-+ struct
-+ {
-+ HANDLE ParentDirectory;
-+ HANDLE ObjectHandle1;
-+ HANDLE ObjectHandle2;
-+ } AtomicSwap;
-+ };
-+} SYSTEM_HOTPATCH_CODE_INFORMATION, *PSYSTEM_HOTPATCH_CODE_INFORMATION;
-+
-+//
-+// Class 75
-+//
-+#ifdef NTOS_MODE_USER
-+typedef struct _SYSTEM_FIRMWARE_TABLE_HANDLER
-+{
-+ ULONG ProviderSignature;
-+ BOOLEAN Register;
-+ PFNFTH FirmwareTableHandler;
-+ PVOID DriverObject;
-+} SYSTEM_FIRMWARE_TABLE_HANDLER, *PSYSTEM_FIRMWARE_TABLE_HANDLER;
-+
-+//
-+// Class 76
-+//
-+typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
-+{
-+ ULONG ProviderSignature;
-+ SYSTEM_FIRMWARE_TABLE_ACTION Action;
-+ ULONG TableID;
-+ ULONG TableBufferLength;
-+ UCHAR TableBuffer[1];
-+} SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
- #endif
+ struct _KNODE *ParentNode;
+ ULONG MultiThreadProcessorSet;
+ struct _KPRCB *MultiThreadSetMaster;
++#if (NTDDI_VERSION >= NTDDI_WS03)
++ ULONG SecondaryColorMask;
++#if (NTDDI_VERSION >= NTDDI_LONGHORN)
++ ULONG DpcTimeLimit;
++#else
++ LONG Sleeping;
+#endif
-Index: include/ndk/i386/mmtypes.h
-===================================================================
---- include/ndk/i386/mmtypes.h (revision 21759)
-+++ include/ndk/i386/mmtypes.h (working copy)
-@@ -29,4 +29,121 @@
- #define PAGE_SIZE 0x1000
- #define PAGE_SHIFT 12L
-
-+//
-+// Page Table Entry Definitions
-+//
-+typedef struct _HARDWARE_PTE_X86
-+{
-+ ULONG Valid:1;
-+ ULONG Write:1;
-+ ULONG Owner:1;
-+ ULONG WriteThrough:1;
-+ ULONG CacheDisable:1;
-+ ULONG Accessed:1;
-+ ULONG Dirty:1;
-+ ULONG LargePage:1;
-+ ULONG Global:1;
-+ ULONG CopyOnWrite:1;
-+ ULONG Prototype: 1;
-+ ULONG reserved: 1;
-+ ULONG PageFrameNumber:20;
-+} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86;
-+
-+typedef struct _MMPTE_SOFTWARE
-+{
-+ ULONG Valid:1;
-+ ULONG PageFileLow:4;
-+ ULONG Protection:5;
-+ ULONG Prototype:1;
-+ ULONG Transition:1;
-+ ULONG PageFileHigh:20;
-+} MMPTE_SOFTWARE;
-+
-+typedef struct _MMPTE_TRANSITION
-+{
-+ ULONG Valid:1;
-+ ULONG Write:1;
-+ ULONG Owner:1;
-+ ULONG WriteThrough:1;
-+ ULONG CacheDisable:1;
-+ ULONG Protection:5;
-+ ULONG Prototype:1;
-+ ULONG Transition:1;
-+ ULONG PageFrameNumber:20;
-+} MMPTE_TRANSITION;
-+
-+typedef struct _MMPTE_PROTOTYPE
-+{
-+ ULONG Valid:1;
-+ ULONG ProtoAddressLow:7;
-+ ULONG ReadOnly:1;
-+ ULONG WhichPool:1;
-+ ULONG Prototype:1;
-+ ULONG ProtoAddressHigh:21;
-+} MMPTE_PROTOTYPE;
-+
-+typedef struct _MMPTE_SUBSECTION
-+{
-+ ULONG Valid:1;
-+ ULONG SubsectionAddressLow:4;
-+ ULONG Protection:5;
-+ ULONG Prototype:1;
-+ ULONG SubsectionAddressHigh:20;
-+ ULONG WhichPool:1;
-+} MMPTE_SUBSECTION;
-+
-+typedef struct _MMPTE_LIST
-+{
-+ ULONG Valid:1;
-+ ULONG OneEntry:1;
-+ ULONG filler10:10;
-+ ULONG NextEntry:20;
-+} MMPTE_LIST;
-+
-+#ifndef CONFIG_SMP
-+
-+typedef struct _MMPTE_HARDWARE
-+{
-+ ULONG Valid:1;
-+ ULONG Write:1;
-+ ULONG Owner:1;
-+ ULONG WriteThrough:1;
-+ ULONG CacheDisable:1;
-+ ULONG Accessed:1;
-+ ULONG Dirty:1;
-+ ULONG LargePage:1;
-+ ULONG Global:1;
-+ ULONG CopyOnWrite:1;
-+ ULONG Prototype:1;
-+ ULONG reserved:1;
-+ ULONG PageFrameNumber:20;
-+} MMPTE_HARDWARE, *PMMPTE_HARDWARE;
-+
+#else
-+
-+typedef struct _MMPTE_HARDWARE
-+{
-+ ULONG Valid:1;
-+ ULONG Writable:1;
-+ ULONG Owner:1;
-+ ULONG WriteThrough:1;
-+ ULONG CacheDisable:1;
-+ ULONG Accessed:1;
-+ ULONG Dirty:1;
-+ ULONG LargePage:1;
-+ ULONG Global:1;
-+ ULONG CopyOnWrite:1;
-+ ULONG Prototype:1;
-+ ULONG Write:1;
-+ ULONG PageFrameNumber:20;
-+} MMPTE_HARDWARE, *PMMPTE_HARDWARE;
-+
- #endif
-+
-+//
-+// Use the right PTE structure
-+//
-+#define HARDWARE_PTE HARDWARE_PTE_X86
-+#define PHARDWARE_PTE PHARDWARE_PTE_X86
-+
+ ULONG ThreadStartCount[2];
+#endif
-Index: include/ndk/i386/ketypes.h
-===================================================================
---- include/ndk/i386/ketypes.h (revision 21759)
-+++ include/ndk/i386/ketypes.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
-
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-@@ -34,13 +34,57 @@
- #define I386_TRAP_GATE 0xF
-
- //
-+// Selector Names
-+//
-+#define RPL_MASK 0x0003
-+#define MODE_MASK 0x0001
-+#define KGDT_R0_CODE (0x8)
-+#define KGDT_R0_DATA (0x10)
-+#define KGDT_R3_CODE (0x18)
-+#define KGDT_R3_DATA (0x20)
-+#define KGDT_TSS (0x28)
-+#define KGDT_R0_PCR (0x30)
-+#define KGDT_R3_TEB (0x38)
-+#define KGDT_LDT (0x48)
-+#define KGDT_DF_TSS (0x50)
-+#define KGDT_NMI_TSS (0x58)
-+
-+//
-+// CR4
-+//
-+#define CR4_VME 0x1
-+#define CR4_PVI 0x2
-+#define CR4_TSD 0x4
-+#define CR4_DE 0x8
-+#define CR4_PSE 0x10
-+#define CR4_PAE 0x20
-+#define CR4_MCE 0x40
-+#define CR4_PGE 0x80
-+#define CR4_FXSR 0x200
-+#define CR4_XMMEXCPT 0x400
-+
-+//
-+// EFlags
-+//
-+#define EFLAGS_TF 0x100
-+#define EFLAGS_INTERRUPT_MASK 0x200
-+#define EFLAGS_NESTED_TASK 0x4000
-+#define EFLAGS_V86_MASK 0x20000
-+#define EFLAGS_ALIGN_CHECK 0x40000
-+#define EFLAGS_VIF 0x80000
-+#define EFLAGS_VIP 0x100000
-+#define EFLAG_SIGN 0x8000
-+#define EFLAG_ZERO 0x4000
-+
-+#ifndef NTOS_MODE_USER
-+//
- // IPI Types
- //
- #define IPI_APC 1
- #define IPI_DPC 2
--#define IPI_FREEZE 3
--#define IPI_PACKET_READY 4
--#define IPI_SYNCH_REQUEST 10
-+#define IPI_FREEZE 4
-+#define IPI_PACKET_READY 8
-+#define IPI_SYNCH_REQUEST 16
-
- //
- // FN/FX (FPU) Save Area Structures
-@@ -146,16 +190,16 @@
- } Bytes;
- struct
- {
-- ULONG BaseMid : 8;
-- ULONG Type : 5;
-- ULONG Dpl : 2;
-- ULONG Pres : 1;
-- ULONG LimitHi : 4;
-- ULONG Sys : 1;
-- ULONG Reserved_0 : 1;
-- ULONG Default_Big : 1;
-- ULONG Granularity : 1;
-- ULONG BaseHi : 8;
-+ ULONG BaseMid:8;
-+ ULONG Type:5;
-+ ULONG Dpl:2;
-+ ULONG Pres:1;
-+ ULONG LimitHi:4;
-+ ULONG Sys:1;
-+ ULONG Reserved_0:1;
-+ ULONG Default_Big:1;
-+ ULONG Granularity:1;
-+ ULONG BaseHi:8;
- } Bits;
- } HighWord;
- } LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
-@@ -178,16 +222,16 @@
- } Bytes;
- struct
- {
-- ULONG BaseMid : 8;
-- ULONG Type : 5;
-- ULONG Dpl : 2;
-- ULONG Pres : 1;
-- ULONG LimitHi : 4;
-- ULONG Sys : 1;
-- ULONG Reserved_0 : 1;
-- ULONG Default_Big : 1;
-- ULONG Granularity : 1;
-- ULONG BaseHi : 8;
-+ ULONG BaseMid:8;
-+ ULONG Type:5;
-+ ULONG Dpl:2;
-+ ULONG Pres:1;
-+ ULONG LimitHi:4;
-+ ULONG Sys:1;
-+ ULONG Reserved_0:1;
-+ ULONG Default_Big:1;
-+ ULONG Granularity:1;
-+ ULONG BaseHi:8;
- } Bits;
- } HighWord;
- } KGDTENTRY, *PKGDTENTRY;
-@@ -222,26 +266,6 @@
- USHORT ExtendedOffset;
- } KIDTENTRY, *PKIDTENTRY;
-
--//
--// Page Table Entry Definition
--//
--typedef struct _HARDWARE_PTE_X86
--{
-- ULONG Valid : 1;
-- ULONG Write : 1;
-- ULONG Owner : 1;
-- ULONG WriteThrough : 1;
-- ULONG CacheDisable : 1;
-- ULONG Accessed : 1;
-- ULONG Dirty : 1;
-- ULONG LargePage : 1;
-- ULONG Global : 1;
-- ULONG CopyOnWrite : 1;
-- ULONG Prototype : 1;
-- ULONG reserved : 1;
-- ULONG PageFrameNumber : 20;
--} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86;
--
- typedef struct _DESCRIPTOR
- {
- USHORT Pad;
-@@ -277,9 +301,9 @@
- #pragma pack(push,4)
- typedef struct _KPROCESSOR_STATE
- {
-- PCONTEXT ContextFrame;
-+ CONTEXT ContextFrame;
- KSPECIAL_REGISTERS SpecialRegisters;
--} KPROCESSOR_STATE;
-+} KPROCESSOR_STATE, *PKPROCESSOR_STATE;
-
- //
- // Processor Region Control Block
-@@ -301,8 +325,14 @@
- KPROCESSOR_STATE ProcessorState;
- ULONG KernelReserved[16];
- ULONG HalReserved[16];
-+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-+ ULONG CFlushSize;
-+ UCHAR PrcbPad0[88];
-+#else
-+ ULONG CFlushSize;
- UCHAR PrcbPad0[92];
-- PVOID LockQueue[33]; // Used for Queued Spinlocks
-+#endif
-+ KSPIN_LOCK_QUEUE LockQueue[LockQueueMaximumLock];
- struct _KTHREAD *NpxThread;
- ULONG InterruptCount;
- ULONG KernelTime;
-@@ -314,18 +344,41 @@
- ULONG PageColor;
- UCHAR SkipTick;
- UCHAR DebuggerSavedIRQL;
-+#if (NTDDI_VERSION >= NTDDI_WS03)
-+ UCHAR NodeColor;
-+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-+ UCHAR PollSlot;
-+#else
-+ UCHAR Spare1;
-+#endif
-+ ULONG NodeShiftedColor;
-+#else
- UCHAR Spare1[6];
-+#endif
- struct _KNODE *ParentNode;
- ULONG MultiThreadProcessorSet;
- struct _KPRCB *MultiThreadSetMaster;
-+#if (NTDDI_VERSION >= NTDDI_WS03)
-+ ULONG SecondaryColorMask;
-+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-+ ULONG DpcTimeLimit;
-+#else
-+ LONG Sleeping;
-+#endif
-+#else
- ULONG ThreadStartCount[2];
-+#endif
- ULONG CcFastReadNoWait;
- ULONG CcFastReadWait;
- ULONG CcFastReadNotPossible;
- ULONG CcCopyReadNoWait;
- ULONG CcCopyReadWait;
- ULONG CcCopyReadNoWaitMiss;
-+#if (NTDDI_VERSION < NTDDI_LONGHORN)
- ULONG KeAlignmentFixupCount;
+ ULONG CcFastReadNoWait;
+ ULONG CcFastReadWait;
+ ULONG CcFastReadNotPossible;
+ ULONG CcCopyReadNoWait;
+ ULONG CcCopyReadWait;
+ ULONG CcCopyReadNoWaitMiss;
++#if (NTDDI_VERSION < NTDDI_LONGHORN)
+ ULONG KeAlignmentFixupCount;
+#endif
+ ULONG SpareCounter0;
+#if (NTDDI_VERSION < NTDDI_LONGHORN)
@@ -7497,924 +5958,295 @@
+ ULONG QueueIndex;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ SINGLE_LIST_ENTRY DeferredReadyListHead;
-+ ULONGLONG StartCycles;
-+ ULONGLONG CycleTime;
-+ ULONGLONG PrcbPad71[3];
- LIST_ENTRY DispatcherReadyListHead[32];
-+#else
-+ LIST_ENTRY DispatcherReadyListHead[32];
- SINGLE_LIST_ENTRY DeferredReadyListHead;
- ULONG PrcbPad72[11];
-+#endif
- PVOID ChainedInterruptList;
- LONG LookasideIrpFloat;
- LONG MmPageFaultCount;
-@@ -401,7 +515,15 @@
- LONG MmDirtyWriteIoCount;
- LONG MmMappedPagesWriteCount;
- LONG MmMappedWriteIoCount;
-+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-+ ULONG CachedCommit;
-+ ULONG CachedResidentAvailable;
-+ PVOID HyperPte;
-+ UCHAR CpuVendor;
-+ UCHAR PrcbPad9[3];
-+#else
- ULONG SpareFields0[1];
-+#endif
- CHAR VendorString[13];
- UCHAR InitialApicId;
- UCHAR LogicalProcessorsPerPhysicalProcessor;
-@@ -412,6 +534,23 @@
- LARGE_INTEGER SpareField1;
- FX_SAVE_AREA NpxSaveArea;
- PROCESSOR_POWER_STATE PowerState;
-+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-+ KDPC DpcWatchdogDoc;
-+ KTIMER DpcWatchdogTimer;
-+ PVOID WheaInfo;
-+ PVOID EtwSupport;
-+ SLIST_HEADER InterruptObjectPool;
-+ LARGE_INTEGER HyperCallPagePhysical;
-+ LARGE_INTEGER HyperCallPageVirtual;
-+ PVOID RateControl;
-+ CACHE_DESCRIPTOR Cache[5];
-+ ULONG CacheCount;
-+ ULONG CacheProcessorMask[5];
-+ UCHAR LogicalProcessorsPerCore;
-+ UCHAR PrcbPad8[3];
-+ ULONG PackageProcessorSet;
-+ ULONG CoreProcessorSet;
-+#endif
- } KPRCB, *PKPRCB;
-
- //
-@@ -433,35 +572,36 @@
- PVOID Used_Self;
- };
- };
-- struct _KPCR *Self; /* 1C */
-- struct _KPRCB *Prcb; /* 20 */
-- KIRQL Irql; /* 24 */
-- ULONG IRR; /* 28 */
-- ULONG IrrActive; /* 2C */
-- ULONG IDR; /* 30 */
-- PVOID KdVersionBlock; /* 34 */
-- PKIDTENTRY IDT; /* 38 */
-+ struct _KPCR *Self;
-+ struct _KPRCB *Prcb;
-+ KIRQL Irql;
-+ ULONG IRR;
-+ ULONG IrrActive;
-+ ULONG IDR;
-+ PVOID KdVersionBlock;
-+ PKIDTENTRY IDT;
- #ifdef _REACTOS_
-- PUSHORT GDT; /* 3C */
-+ PUSHORT GDT;
- #else
-- PKGDTENTRY GDT; /* 3C */
-+ PKGDTENTRY GDT;
- #endif
-- struct _KTSS *TSS; /* 40 */
-- USHORT MajorVersion; /* 44 */
-- USHORT MinorVersion; /* 46 */
-- KAFFINITY SetMember; /* 48 */
-- ULONG StallScaleFactor; /* 4C */
-- UCHAR SparedUnused; /* 50 */
-- UCHAR Number; /* 51 */
-- UCHAR Reserved; /* 52 */
-- UCHAR L2CacheAssociativity; /* 53 */
-- ULONG VdmAlert; /* 54 */
-- ULONG KernelReserved[14]; /* 58 */
-- ULONG L2CacheSize; /* 90 */
-- ULONG HalReserved[16]; /* 94 */
-- ULONG InterruptMode; /* D4 */
-- UCHAR KernelReserved2[0x48]; /* D8 */
-- KPRCB PrcbData; /* 120 */
-+ struct _KTSS *TSS;
-+ USHORT MajorVersion;
-+ USHORT MinorVersion;
-+ KAFFINITY SetMember;
-+ ULONG StallScaleFactor;
-+ UCHAR SparedUnused;
-+ UCHAR Number;
-+ UCHAR Reserved;
-+ UCHAR L2CacheAssociativity;
-+ ULONG VdmAlert;
-+ ULONG KernelReserved[14];
-+ ULONG SecondLevelCacheSize;
-+ ULONG HalReserved[16];
-+ ULONG InterruptMode;
-+ UCHAR Spare1;
-+ ULONG KernelReserved2[17];
-+ KPRCB PrcbData;
- } KIPCR, *PKIPCR;
- #pragma pack(pop)
-
-@@ -511,5 +651,5 @@
- // i386 CPUs don't have exception frames
- //
- typedef struct _KEXCEPTION_FRAME KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
--
- #endif
-+#endif
-Index: include/ndk/lpctypes.h
-===================================================================
---- include/ndk/lpctypes.h (revision 21759)
-+++ include/ndk/lpctypes.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
-
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-@@ -228,7 +228,7 @@
- #endif
-
- //
--// Client Died LPC Message (FIXME: should go in pstypes.h?)
-+// Client Died LPC Message
- //
- typedef struct _CLIENT_DIED_MSG
- {
-Index: include/ndk/halfuncs.h
-===================================================================
---- include/ndk/halfuncs.h (revision 21759)
-+++ include/ndk/halfuncs.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
-
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-@@ -30,14 +30,6 @@
- //
- // The DDK steals these away from you.
- //
--VOID
--_enable(
-- VOID
--);
--VOID
--_disable(
-- VOID
--);
- #ifdef _MSC_VER
- #pragma intrinsic(_enable)
- #pragma intrinsic(_disable)
-@@ -47,33 +39,12 @@
- // Display Functions
- //
- NTHALAPI
--BOOLEAN
--NTAPI
--HalQueryDisplayOwnership(
-- VOID
--);
--
--NTHALAPI
- VOID
- NTAPI
- HalDisplayString(
- IN PCHAR String
- );
-
--NTHALAPI
--BOOLEAN
--NTAPI
--HalQueryDisplayOwnership(
-- VOID
--);
--
--NTHALAPI
--VOID
--NTAPI
--HalReleaseDisplayOwnership(
-- VOID
--);
--
- //
- // Initialization Functions
- //
-@@ -84,12 +55,13 @@
- VOID
- );
-
-+#ifdef _ARC_
- NTHALAPI
- VOID
- NTAPI
- HalInitializeProcessor(
- ULONG ProcessorNumber,
-- PLOADER_PARAMETER_BLOCK LoaderBlock
-+ struct _LOADER_PARAMETER_BLOCK *LoaderBlock
- );
-
- NTHALAPI
-@@ -97,8 +69,9 @@
- NTAPI
- HalInitSystem(
- ULONG BootPhase,
-- PLOADER_PARAMETER_BLOCK LoaderBlock
-+ struct _LOADER_PARAMETER_BLOCK *LoaderBlock
- );
-+#endif
-
- NTHALAPI
- VOID
-@@ -179,7 +152,7 @@
- VOID
- NTAPI
- HalRequestIpi(
-- ULONG Unknown
-+ KAFFINITY TargetSet
- );
-
- NTHALAPI
-@@ -192,6 +165,7 @@
- //
- // I/O Functions
- //
-+#ifdef _ARC_
- NTHALAPI
- VOID
- NTAPI
-@@ -201,6 +175,7 @@
- PUCHAR NtSystemPath,
- PSTRING NtSystemPathString
- );
-+#endif
-
- //
- // Environment Functions
-@@ -213,5 +188,15 @@
- IN PCH Value
- );
-
-+//
-+// Time Functions
-+//
-+NTHALAPI
-+VOID
-+NTAPI
-+HalQueryRealTimeClock(
-+ IN PTIME_FIELDS RtcTime
-+);
-+
- #endif
- #endif
-Index: include/ndk/dbgkfuncs.h
-===================================================================
---- include/ndk/dbgkfuncs.h (revision 21759)
-+++ include/ndk/dbgkfuncs.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
-
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-Index: include/ndk/iofuncs.h
-===================================================================
---- include/ndk/iofuncs.h (revision 21759)
-+++ include/ndk/iofuncs.h (working copy)
-@@ -1,4 +1,4 @@
--/*++ NDK Version: 0095
-+/*++ NDK Version: 0098
-
- Copyright (c) Alex Ionescu. All rights reserved.
-
-@@ -12,7 +12,7 @@
-
- Author:
-
-- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
-+ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
-
- --*/
-
-@@ -28,7 +28,6 @@
- //
- // Native calls
- //
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtAddBootEntry(
-@@ -36,7 +35,6 @@
- IN PUNICODE_STRING EntryValue
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCancelIoFile(
-@@ -61,7 +59,6 @@
- IN ULONG EaLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateIoCompletion(
-@@ -71,7 +68,6 @@
- IN ULONG NumberOfConcurrentThreads
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateMailslotFile(
-@@ -85,7 +81,6 @@
- IN PLARGE_INTEGER TimeOut
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateNamedPipeFile(
-@@ -105,7 +100,6 @@
- IN PLARGE_INTEGER DefaultTimeOut
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtDeleteBootEntry(
-@@ -113,7 +107,6 @@
- IN PUNICODE_STRING EntryValue
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtDeleteFile(
-@@ -136,15 +129,13 @@
- IN ULONG OutputBufferSize
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtEnumerateBootEntries(
-- IN ULONG Unknown1,
-- IN ULONG Unknown2
-+ IN PVOID Buffer,
-+ IN PULONG BufferLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtFlushBuffersFile(
-@@ -152,7 +143,6 @@
- OUT PIO_STATUS_BLOCK IoStatusBlock
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtFlushWriteBuffer(VOID);
-@@ -173,7 +163,6 @@
- IN ULONG OutputBufferSize
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtLoadDriver(
-@@ -196,7 +185,6 @@
- IN BOOLEAN ExclusiveLock
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtNotifyChangeDirectoryFile(
-@@ -223,7 +211,6 @@
- IN ULONG OpenOptions
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtOpenIoCompletion(
-@@ -232,7 +219,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryAttributesFile(
-@@ -240,20 +226,18 @@
- OUT PFILE_BASIC_INFORMATION FileInformation
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryBootEntryOrder(
-- IN ULONG Unknown1,
-- IN ULONG Unknown2
-+ IN PULONG Ids,
-+ IN PULONG Count
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryBootOptions(
-- IN ULONG Unknown1,
-- IN ULONG Unknown2
-+ IN PBOOT_OPTIONS BootOptions,
-+ IN PULONG BootOptionsLength
- );
-
- NTSYSCALLAPI
-@@ -273,7 +257,6 @@
- IN BOOLEAN RestartScan
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryEaFile(
-@@ -288,7 +271,6 @@
- IN BOOLEAN RestartScan
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryFullAttributesFile(
-@@ -307,7 +289,6 @@
- IN FILE_INFORMATION_CLASS FileInformationClass
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryIoCompletion(
-@@ -359,7 +340,6 @@
- IN PULONG Key OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtReadFileScatter(
-@@ -374,7 +354,6 @@
- IN PULONG Key OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtRemoveIoCompletion(
-@@ -385,23 +364,20 @@
- IN PLARGE_INTEGER Timeout OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetBootEntryOrder(
-- IN ULONG Unknown1,
-- IN ULONG Unknown2
-+ IN PULONG Ids,
-+ IN PULONG Count
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetBootOptions(
-- ULONG Unknown1,
-- ULONG Unknown2
-+ IN PBOOT_OPTIONS BootOptions,
-+ IN ULONG FieldsToChange
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetEaFile(
-@@ -422,7 +398,6 @@
- IN FILE_INFORMATION_CLASS FileInformationClass
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetIoCompletion(
-@@ -454,16 +429,15 @@
- IN FS_INFORMATION_CLASS FsInformationClass
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtTranslateFilePath(
-- ULONG Unknown1,
-- ULONG Unknown2,
-- ULONG Unknown3
-+ PFILE_PATH InputFilePath,
-+ ULONG OutputType,
-+ PFILE_PATH OutputFilePath,
-+ ULONG OutputFilePathLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtUnloadDriver(
-@@ -496,7 +470,6 @@
- IN PULONG Key OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtWriteFileGather(
-@@ -511,7 +484,6 @@
- IN PULONG Key OPTIONAL
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwAddBootEntry(
-@@ -519,7 +491,6 @@
- IN PUNICODE_STRING EntryValue
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCancelIoFile(
-@@ -527,7 +498,7 @@
- OUT PIO_STATUS_BLOCK IoStatusBlock
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwCreateFile(
-@@ -544,7 +515,6 @@
- IN ULONG EaLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateIoCompletion(
-@@ -554,7 +524,6 @@
- IN ULONG NumberOfConcurrentThreads
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateMailslotFile(
-@@ -568,7 +537,6 @@
- IN PLARGE_INTEGER TimeOut
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateNamedPipeFile(
-@@ -588,7 +556,6 @@
- IN PLARGE_INTEGER DefaultTimeOut
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwDeleteBootEntry(
-@@ -603,7 +570,7 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwDeviceIoControlFile(
-@@ -619,14 +586,6 @@
- IN ULONG OutputBufferSize
- );
++ ULONGLONG StartCycles;
++ ULONGLONG CycleTime;
++ ULONGLONG PrcbPad71[3];
+ LIST_ENTRY DispatcherReadyListHead[32];
++#else
++ LIST_ENTRY DispatcherReadyListHead[32];
+ SINGLE_LIST_ENTRY DeferredReadyListHead;
+ ULONG PrcbPad72[11];
++#endif
+ PVOID ChainedInterruptList;
+ LONG LookasideIrpFloat;
+ LONG MmPageFaultCount;
+@@ -401,7 +515,15 @@
+ LONG MmDirtyWriteIoCount;
+ LONG MmMappedPagesWriteCount;
+ LONG MmMappedWriteIoCount;
++#if (NTDDI_VERSION >= NTDDI_LONGHORN)
++ ULONG CachedCommit;
++ ULONG CachedResidentAvailable;
++ PVOID HyperPte;
++ UCHAR CpuVendor;
++ UCHAR PrcbPad9[3];
++#else
+ ULONG SpareFields0[1];
++#endif
+ CHAR VendorString[13];
+ UCHAR InitialApicId;
+ UCHAR LogicalProcessorsPerPhysicalProcessor;
+@@ -412,6 +534,23 @@
+ LARGE_INTEGER SpareField1;
+ FX_SAVE_AREA NpxSaveArea;
+ PROCESSOR_POWER_STATE PowerState;
++#if (NTDDI_VERSION >= NTDDI_LONGHORN)
++ KDPC DpcWatchdogDoc;
++ KTIMER DpcWatchdogTimer;
++ PVOID WheaInfo;
++ PVOID EtwSupport;
++ SLIST_HEADER InterruptObjectPool;
++ LARGE_INTEGER HyperCallPagePhysical;
++ LARGE_INTEGER HyperCallPageVirtual;
++ PVOID RateControl;
++ CACHE_DESCRIPTOR Cache[5];
++ ULONG CacheCount;
++ ULONG CacheProcessorMask[5];
++ UCHAR LogicalProcessorsPerCore;
++ UCHAR PrcbPad8[3];
++ ULONG PackageProcessorSet;
++ ULONG CoreProcessorSet;
++#endif
+ } KPRCB, *PKPRCB;
--NTSYSAPI
--NTSTATUS
--NTAPI
--ZwEnumerateBootEntries(
-- IN ULONG Unknown1,
-- IN ULONG Unknown2
--);
--
- #ifdef NTOS_MODE_USER
- NTSYSAPI
- NTSTATUS
-@@ -637,12 +596,11 @@
- );
+ //
+@@ -433,35 +572,36 @@
+ PVOID Used_Self;
+ };
+ };
+- struct _KPCR *Self; /* 1C */
+- struct _KPRCB *Prcb; /* 20 */
+- KIRQL Irql; /* 24 */
+- ULONG IRR; /* 28 */
+- ULONG IrrActive; /* 2C */
+- ULONG IDR; /* 30 */
+- PVOID KdVersionBlock; /* 34 */
+- PKIDTENTRY IDT; /* 38 */
++ struct _KPCR *Self;
++ struct _KPRCB *Prcb;
++ KIRQL Irql;
++ ULONG IRR;
++ ULONG IrrActive;
++ ULONG IDR;
++ PVOID KdVersionBlock;
++ PKIDTENTRY IDT;
+ #ifdef _REACTOS_
+- PUSHORT GDT; /* 3C */
++ PUSHORT GDT;
+ #else
+- PKGDTENTRY GDT; /* 3C */
++ PKGDTENTRY GDT;
#endif
+- struct _KTSS *TSS; /* 40 */
+- USHORT MajorVersion; /* 44 */
+- USHORT MinorVersion; /* 46 */
+- KAFFINITY SetMember; /* 48 */
+- ULONG StallScaleFactor; /* 4C */
+- UCHAR SparedUnused; /* 50 */
+- UCHAR Number; /* 51 */
+- UCHAR Reserved; /* 52 */
+- UCHAR L2CacheAssociativity; /* 53 */
+- ULONG VdmAlert; /* 54 */
+- ULONG KernelReserved[14]; /* 58 */
+- ULONG L2CacheSize; /* 90 */
+- ULONG HalReserved[16]; /* 94 */
+- ULONG InterruptMode; /* D4 */
+- UCHAR KernelReserved2[0x48]; /* D8 */
+- KPRCB PrcbData; /* 120 */
++ struct _KTSS *TSS;
++ USHORT MajorVersion;
++ USHORT MinorVersion;
++ KAFFINITY SetMember;
++ ULONG StallScaleFactor;
++ UCHAR SparedUnused;
++ UCHAR Number;
++ UCHAR Reserved;
++ UCHAR L2CacheAssociativity;
++ ULONG VdmAlert;
++ ULONG KernelReserved[14];
++ ULONG SecondLevelCacheSize;
++ ULONG HalReserved[16];
++ ULONG InterruptMode;
++ UCHAR Spare1;
++ ULONG KernelReserved2[17];
++ KPRCB PrcbData;
+ } KIPCR, *PKIPCR;
+ #pragma pack(pop)
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwFlushWriteBuffer(VOID);
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwFsControlFile(
-@@ -659,7 +617,6 @@
- );
-
- #ifdef NTOS_MODE_USER
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwLoadDriver(
-@@ -667,7 +624,7 @@
- );
+@@ -511,5 +651,5 @@
+ // i386 CPUs don't have exception frames
+ //
+ typedef struct _KEXCEPTION_FRAME KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
+-
#endif
++#endif
+Index: include/ndk/lpctypes.h
+===================================================================
+--- include/ndk/lpctypes.h (revision 21759)
++++ include/ndk/lpctypes.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwLockFile(
-@@ -683,7 +640,6 @@
- IN BOOLEAN ExclusiveLock
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwNotifyChangeDirectoryFile(
-@@ -698,7 +654,7 @@
- IN BOOLEAN WatchTree
- );
+ Copyright (c) Alex Ionescu. All rights reserved.
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwOpenFile(
-@@ -710,7 +666,6 @@
- IN ULONG OpenOptions
- );
+@@ -12,7 +12,7 @@
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwOpenIoCompletion(
-@@ -719,7 +674,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
+ Author:
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryAttributesFile(
-@@ -727,25 +681,9 @@
- OUT PFILE_BASIC_INFORMATION FileInformation
- );
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
--ZwQueryBootEntryOrder(
-- IN ULONG Unknown1,
-- IN ULONG Unknown2
--);
--
--NTSYSAPI
--NTSTATUS
--NTAPI
--ZwQueryBootOptions(
-- IN ULONG Unknown1,
-- IN ULONG Unknown2
--);
--
--NTSYSAPI
--NTSTATUS
--NTAPI
- ZwQueryDirectoryFile(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
-@@ -761,7 +699,6 @@
- );
+ --*/
- #ifdef NTOS_MODE_USER
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryEaFile(
-@@ -777,7 +714,6 @@
- );
+@@ -228,7 +228,7 @@
#endif
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryFullAttributesFile(
-@@ -785,7 +721,7 @@
- OUT PFILE_NETWORK_OPEN_INFORMATION FileInformation
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwQueryInformationFile(
-@@ -796,7 +732,6 @@
- IN FILE_INFORMATION_CLASS FileInformationClass
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryIoCompletion(
-@@ -807,7 +742,7 @@
- OUT PULONG ResultLength OPTIONAL
- );
+ //
+-// Client Died LPC Message (FIXME: should go in pstypes.h?)
++// Client Died LPC Message
+ //
+ typedef struct _CLIENT_DIED_MSG
+ {
+Index: include/ndk/halfuncs.h
+===================================================================
+--- include/ndk/halfuncs.h (revision 21759)
++++ include/ndk/halfuncs.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwQueryQuotaInformationFile(
-@@ -822,7 +757,7 @@
- IN BOOLEAN RestartScan
- );
+ Copyright (c) Alex Ionescu. All rights reserved.
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwQueryVolumeInformationFile(
-@@ -833,7 +768,7 @@
- IN FS_INFORMATION_CLASS FsInformationClass
- );
+@@ -12,7 +12,7 @@
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwReadFile(
-@@ -848,7 +783,6 @@
- IN PULONG Key OPTIONAL
- );
+ Author:
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwReadFileScatter(
-@@ -863,7 +797,6 @@
- IN PULONG Key OPTIONAL
- );
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
--NTSYSAPI
- NTSTATUS
+ --*/
+
+@@ -30,14 +30,6 @@
+ //
+ // The DDK steals these away from you.
+ //
+-VOID
+-_enable(
+- VOID
+-);
+-VOID
+-_disable(
+- VOID
+-);
+ #ifdef _MSC_VER
+ #pragma intrinsic(_enable)
+ #pragma intrinsic(_disable)
+@@ -47,33 +39,12 @@
+ // Display Functions
+ //
+ NTHALAPI
+-BOOLEAN
+-NTAPI
+-HalQueryDisplayOwnership(
+- VOID
+-);
+-
+-NTHALAPI
+ VOID
NTAPI
- ZwRemoveIoCompletion(
-@@ -874,24 +807,7 @@
- IN PLARGE_INTEGER Timeout OPTIONAL
+ HalDisplayString(
+ IN PCHAR String
);
--NTSYSAPI
--NTSTATUS
+-NTHALAPI
+-BOOLEAN
-NTAPI
--ZwSetBootEntryOrder(
-- IN ULONG Unknown1,
-- IN ULONG Unknown2
+-HalQueryDisplayOwnership(
+- VOID
-);
-
--NTSYSAPI
--NTSTATUS
+-NTHALAPI
+-VOID
-NTAPI
--ZwSetBootOptions(
-- ULONG Unknown1,
-- ULONG Unknown2
+-HalReleaseDisplayOwnership(
+- VOID
-);
-
- #ifdef NTOS_MODE_USER
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetEaFile(
-@@ -902,7 +818,7 @@
- );
- #endif
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwSetInformationFile(
-@@ -913,7 +829,6 @@
- IN FILE_INFORMATION_CLASS FileInformationClass
+ //
+ // Initialization Functions
+ //
+@@ -84,12 +55,13 @@
+ VOID
);
--NTSYSAPI
- NTSTATUS
++#ifdef _ARC_
+ NTHALAPI
+ VOID
NTAPI
- ZwSetIoCompletion(
-@@ -924,7 +839,7 @@
- IN ULONG CompletionInformation
+ HalInitializeProcessor(
+ ULONG ProcessorNumber,
+- PLOADER_PARAMETER_BLOCK LoaderBlock
++ struct _LOADER_PARAMETER_BLOCK *LoaderBlock
);
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
+ NTHALAPI
+@@ -97,8 +69,9 @@
NTAPI
- ZwSetQuotaInformationFile(
-@@ -934,7 +849,7 @@
- ULONG BufferLength
+ HalInitSystem(
+ ULONG BootPhase,
+- PLOADER_PARAMETER_BLOCK LoaderBlock
++ struct _LOADER_PARAMETER_BLOCK *LoaderBlock
);
++#endif
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwSetVolumeInformationFile(
-@@ -948,20 +863,11 @@
- NTSYSAPI
- NTSTATUS
+ NTHALAPI
+ VOID
+@@ -179,7 +152,7 @@
+ VOID
NTAPI
--ZwTranslateFilePath(
-- ULONG Unknown1,
-- ULONG Unknown2,
-- ULONG Unknown3
--);
--
--NTSYSAPI
--NTSTATUS
--NTAPI
- ZwUnloadDriver(
- IN PUNICODE_STRING DriverServiceName
+ HalRequestIpi(
+- ULONG Unknown
++ KAFFINITY TargetSet
);
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
+ NTHALAPI
+@@ -192,6 +165,7 @@
+ //
+ // I/O Functions
+ //
++#ifdef _ARC_
+ NTHALAPI
+ VOID
NTAPI
- ZwUnlockFile(
-@@ -972,7 +878,7 @@
- OUT ULONG Key OPTIONAL
+@@ -201,6 +175,7 @@
+ PUCHAR NtSystemPath,
+ PSTRING NtSystemPathString
);
++#endif
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwWriteFile(
-@@ -987,7 +893,6 @@
- IN PULONG Key OPTIONAL
+ //
+ // Environment Functions
+@@ -213,5 +188,15 @@
+ IN PCH Value
);
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwWriteFileGather(
-Index: include/ndk/sefuncs.h
++//
++// Time Functions
++//
++NTHALAPI
++VOID
++NTAPI
++HalQueryRealTimeClock(
++ IN PTIME_FIELDS RtcTime
++);
++
+ #endif
+ #endif
+Index: include/ndk/dbgkfuncs.h
===================================================================
---- include/ndk/sefuncs.h (revision 21759)
-+++ include/ndk/sefuncs.h (working copy)
+--- include/ndk/dbgkfuncs.h (revision 21759)
++++ include/ndk/dbgkfuncs.h (working copy)
@@ -1,4 +1,4 @@
-/*++ NDK Version: 0095
+/*++ NDK Version: 0098
@@ -8430,216 +6262,216 @@
--*/
-@@ -29,7 +29,6 @@
- //
- // Security Descriptors
- //
--NTKERNELAPI
- NTSTATUS
- NTAPI
- SeCaptureSecurityDescriptor(
-@@ -40,7 +39,6 @@
- OUT PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor
- );
-
--NTKERNELAPI
- NTSTATUS
- NTAPI
- SeReleaseSecurityDescriptor(
-@@ -52,7 +50,6 @@
- //
- // Access States
- //
--NTKERNELAPI
- NTSTATUS
- NTAPI
- SeCreateAccessState(
-@@ -62,7 +59,6 @@
- PGENERIC_MAPPING GenericMapping
- );
-
--NTKERNELAPI
- VOID
- NTAPI
- SeDeleteAccessState(
-@@ -72,7 +68,6 @@
- //
- // Impersonation
- //
--NTKERNELAPI
- SECURITY_IMPERSONATION_LEVEL
- NTAPI
- SeTokenImpersonationLevel(
-@@ -84,7 +79,6 @@
- //
- // Native Calls
- //
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtAccessCheck(
-@@ -139,14 +133,12 @@
- OUT PULONG ReturnLength
+@@ -56,7 +56,7 @@
+ OUT PDBGUI_WAIT_STATE_CHANGE StateChange
);
-NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtAllocateLocallyUniqueId(
- OUT LUID *LocallyUniqueId
+ ZwCreateDebugObject(
+@@ -66,7 +66,7 @@
+ IN BOOLEAN KillProcessOnExit
);
-NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtAllocateUuids(
-@@ -156,7 +148,6 @@
- PUCHAR Seed
+ ZwDebugContinue(
+@@ -75,7 +75,7 @@
+ IN NTSTATUS ContinueStatus
);
-NTSYSCALLAPI
++NTSYSAPI
NTSTATUS
NTAPI
- NtCreateToken(
-@@ -274,7 +265,7 @@
- OUT PULONG ReturnLength
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetInformationToken(
-@@ -284,7 +275,6 @@
- IN ULONG TokenInformationLength
- );
+ ZwWaitForDebugEvent(
+Index: include/ndk/iofuncs.h
+===================================================================
+--- include/ndk/iofuncs.h (revision 21759)
++++ include/ndk/iofuncs.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwAccessCheck(
-@@ -298,7 +288,7 @@
- OUT PNTSTATUS AccessStatus
- );
+ Copyright (c) Alex Ionescu. All rights reserved.
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwAdjustGroupsToken(
-@@ -310,7 +300,7 @@
- OUT PULONG ReturnLength
- );
+@@ -12,7 +12,7 @@
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwAdjustPrivilegesToken(
-@@ -322,14 +312,12 @@
- OUT PULONG ReturnLength
- );
+ Author:
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwAllocateLocallyUniqueId(
- OUT LUID *LocallyUniqueId
- );
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwAllocateUuids(
-@@ -339,7 +327,6 @@
- PUCHAR Seed
- );
+ --*/
--NTSYSAPI
+@@ -140,8 +140,8 @@
NTSTATUS
NTAPI
- ZwCreateToken(
-@@ -358,7 +345,7 @@
- IN PTOKEN_SOURCE TokenSource
+ NtEnumerateBootEntries(
+- IN ULONG Unknown1,
+- IN ULONG Unknown2
++ IN PVOID Buffer,
++ IN PULONG BufferLength
);
--NTSYSAPI
-+NTSYSCALLAPI
+ NTSYSCALLAPI
+@@ -244,16 +244,16 @@
NTSTATUS
NTAPI
- ZwDuplicateToken(
-@@ -370,14 +357,14 @@
- OUT PHANDLE NewTokenHandle
+ NtQueryBootEntryOrder(
+- IN ULONG Unknown1,
+- IN ULONG Unknown2
++ IN PULONG Ids,
++ IN PULONG Count
);
--NTSYSAPI
-+NTSYSCALLAPI
+ NTSYSCALLAPI
NTSTATUS
NTAPI
- ZwImpersonateAnonymousToken(
- IN HANDLE Thread
+ NtQueryBootOptions(
+- IN ULONG Unknown1,
+- IN ULONG Unknown2
++ IN PBOOT_OPTIONS BootOptions,
++ IN PULONG BootOptionsLength
);
--NTSYSAPI
-+NTSYSCALLAPI
+ NTSYSCALLAPI
+@@ -389,16 +389,16 @@
NTSTATUS
NTAPI
- ZwOpenObjectAuditAlarm(
-@@ -395,7 +382,7 @@
- OUT PBOOLEAN GenerateOnClose
+ NtSetBootEntryOrder(
+- IN ULONG Unknown1,
+- IN ULONG Unknown2
++ IN PULONG Ids,
++ IN PULONG Count
);
--NTSYSAPI
-+NTSYSCALLAPI
+ NTSYSCALLAPI
NTSTATUS
NTAPI
- ZwOpenProcessToken(
-@@ -404,7 +391,7 @@
- OUT PHANDLE TokenHandle
+ NtSetBootOptions(
+- ULONG Unknown1,
+- ULONG Unknown2
++ IN PBOOT_OPTIONS BootOptions,
++ IN ULONG FieldsToChange
);
--NTSYSAPI
-+NTSYSCALLAPI
+ NTSYSCALLAPI
+@@ -458,9 +458,10 @@
NTSTATUS
NTAPI
- ZwOpenProcessTokenEx(
-@@ -414,7 +401,7 @@
- OUT PHANDLE TokenHandle
+ NtTranslateFilePath(
+- ULONG Unknown1,
+- ULONG Unknown2,
+- ULONG Unknown3
++ PFILE_PATH InputFilePath,
++ ULONG OutputType,
++ PFILE_PATH OutputFilePath,
++ ULONG OutputFilePathLength
);
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwPrivilegeCheck(
-@@ -423,7 +410,7 @@
- IN PBOOLEAN Result
+ NTSYSCALLAPI
+@@ -619,14 +620,6 @@
+ IN ULONG OutputBufferSize
);
-NTSYSAPI
-+NTSYSCALLAPI
+-NTSTATUS
+-NTAPI
+-ZwEnumerateBootEntries(
+- IN ULONG Unknown1,
+- IN ULONG Unknown2
+-);
+-
+ #ifdef NTOS_MODE_USER
+ NTSYSAPI
+ NTSTATUS
+@@ -730,22 +723,6 @@
+ NTSYSAPI
NTSTATUS
NTAPI
- ZwPrivilegedServiceAuditAlarm(
-@@ -434,7 +421,7 @@
- IN BOOLEAN AccessGranted
+-ZwQueryBootEntryOrder(
+- IN ULONG Unknown1,
+- IN ULONG Unknown2
+-);
+-
+-NTSYSAPI
+-NTSTATUS
+-NTAPI
+-ZwQueryBootOptions(
+- IN ULONG Unknown1,
+- IN ULONG Unknown2
+-);
+-
+-NTSYSAPI
+-NTSTATUS
+-NTAPI
+ ZwQueryDirectoryFile(
+ IN HANDLE FileHandle,
+ IN HANDLE Event OPTIONAL,
+@@ -874,22 +851,6 @@
+ IN PLARGE_INTEGER Timeout OPTIONAL
);
-NTSYSAPI
-+NTSYSCALLAPI
+-NTSTATUS
+-NTAPI
+-ZwSetBootEntryOrder(
+- IN ULONG Unknown1,
+- IN ULONG Unknown2
+-);
+-
+-NTSYSAPI
+-NTSTATUS
+-NTAPI
+-ZwSetBootOptions(
+- ULONG Unknown1,
+- ULONG Unknown2
+-);
+-
+ #ifdef NTOS_MODE_USER
+ NTSYSAPI
+ NTSTATUS
+@@ -948,15 +909,6 @@
+ NTSYSAPI
NTSTATUS
NTAPI
- ZwPrivilegeObjectAuditAlarm(
-@@ -446,7 +433,7 @@
- IN BOOLEAN AccessGranted
+-ZwTranslateFilePath(
+- ULONG Unknown1,
+- ULONG Unknown2,
+- ULONG Unknown3
+-);
+-
+-NTSYSAPI
+-NTSTATUS
+-NTAPI
+ ZwUnloadDriver(
+ IN PUNICODE_STRING DriverServiceName
);
+Index: include/ndk/sefuncs.h
+===================================================================
+--- include/ndk/sefuncs.h (revision 21759)
++++ include/ndk/sefuncs.h (working copy)
+@@ -1,4 +1,4 @@
+-/*++ NDK Version: 0095
++/*++ NDK Version: 0098
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwQueryInformationToken(
-@@ -457,7 +444,7 @@
+ Copyright (c) Alex Ionescu. All rights reserved.
+
+@@ -12,7 +12,7 @@
+
+ Author:
+
+- Alex Ionescu (alex.ionescu(a)reactos.com) 06-Oct-2004
++ Alex Ionescu (alexi(a)tinykrnl.org) - Updated - 27-Feb-2006
+
+ --*/
+
+@@ -274,7 +274,7 @@
OUT PULONG ReturnLength
);
@@ -8647,7 +6479,7 @@
+NTSYSCALLAPI
NTSTATUS
NTAPI
- ZwSetInformationToken(
+ NtSetInformationToken(
Index: include/ndk/mmfuncs.h
===================================================================
--- include/ndk/mmfuncs.h (revision 21759)
@@ -8704,219 +6536,21 @@
NtAllocateVirtualMemory(
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
-@@ -53,7 +76,6 @@
- IN ULONG Protect
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreatePagingFile(
-@@ -76,7 +98,6 @@
- IN HANDLE FileHandle OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtExtendSection(
-@@ -84,7 +105,6 @@
- IN PLARGE_INTEGER NewMaximumSize
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtFlushVirtualMemory(
-@@ -104,7 +124,6 @@
- IN ULONG FreeType
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtLockVirtualMemory(
-@@ -114,7 +133,6 @@
- PULONG NumberOfBytesLocked
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtMapViewOfSection(
-@@ -130,7 +148,6 @@
- IN ULONG AccessProtection
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtOpenSection(
-@@ -139,7 +156,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtProtectVirtualMemory(
-@@ -150,7 +166,6 @@
- OUT PULONG OldAccessProtection
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQuerySection(
-@@ -161,7 +176,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryVirtualMemory(
-@@ -173,7 +187,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtReadVirtualMemory(
-@@ -184,7 +197,6 @@
- OUT PULONG NumberOfBytesRead
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtUnlockVirtualMemory(
-@@ -194,7 +206,6 @@
- OUT PULONG NumberOfBytesUnlocked OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtUnmapViewOfSection(
-@@ -202,7 +213,6 @@
- IN PVOID BaseAddress
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtWriteVirtualMemory(
-@@ -213,9 +223,17 @@
- OUT PULONG NumberOfBytesWritten
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
+@@ -216,6 +239,14 @@
+ NTSYSAPI
NTSTATUS
NTAPI
+ZwAreMappedFilesTheSame(
+ IN PVOID File1MappedAsAnImage,
+ IN PVOID File2MappedAsFile
-+);
-+
-+NTSYSCALLAPI
-+NTSTATUS
-+NTAPI
- ZwAllocateVirtualMemory(
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
-@@ -225,7 +243,6 @@
- IN ULONG Protect
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreatePagingFile(
-@@ -235,7 +252,7 @@
- IN ULONG Reserved
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwCreateSection(
-@@ -248,7 +265,6 @@
- IN HANDLE FileHandle OPTIONAL
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwExtendSection(
-@@ -256,7 +272,7 @@
- IN PLARGE_INTEGER NewMaximumSize
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwFreeVirtualMemory(
-@@ -266,7 +282,6 @@
- IN ULONG FreeType
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwLockVirtualMemory(
-@@ -301,7 +316,6 @@
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwProtectVirtualMemory(
-@@ -312,7 +326,6 @@
- OUT PULONG OldAccessProtection
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQuerySection(
-@@ -323,7 +336,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryVirtualMemory(
-@@ -335,7 +347,6 @@
- OUT PULONG ResultLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwReadVirtualMemory(
-@@ -346,7 +357,6 @@
- OUT PULONG NumberOfBytesRead
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwUnlockVirtualMemory(
-@@ -364,7 +374,6 @@
- IN PVOID BaseAddress
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwWriteVirtualMemory(
++);
++
++NTSYSAPI
++NTSTATUS
++NTAPI
+ ZwAllocateVirtualMemory(
+ IN HANDLE ProcessHandle,
+ IN OUT PVOID *BaseAddress,
Index: include/ndk/cctypes.h
===================================================================
--- include/ndk/cctypes.h (revision 21759)
@@ -8964,24 +6598,6 @@
NTSTATUS
NTAPI
ZwInitiatePowerAction(
-@@ -67,7 +67,7 @@
- BOOLEAN Asynchronous
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwPowerInformation(
-@@ -78,7 +78,7 @@
- ULONG OutputBufferLength
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwSetSystemPowerState(
Index: include/ndk/ntndk.h
===================================================================
--- include/ndk/ntndk.h (revision 21759)
@@ -9256,379 +6872,22 @@
);
VOID
-@@ -102,7 +102,6 @@
- //
- // Native Calls
- //
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtAlertResumeThread(
-@@ -110,14 +109,12 @@
- OUT PULONG SuspendCount
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtAlertThread(
- IN HANDLE ThreadHandle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtAssignProcessToJobObject(
-@@ -125,7 +122,6 @@
- HANDLE ProcessHandle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateJobObject(
-@@ -134,7 +130,6 @@
- POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateProcess(
-@@ -148,7 +143,6 @@
- IN HANDLE ExceptionPort OPTIONAL
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtCreateThread(
-@@ -162,7 +156,6 @@
- IN BOOLEAN CreateSuspended
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtImpersonateThread(
-@@ -171,7 +164,6 @@
- IN PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtIsProcessInJob(
-@@ -189,7 +181,6 @@
- IN PCLIENT_ID ClientId
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtOpenThread(
-@@ -220,7 +211,6 @@
- OUT PHANDLE TokenHandle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryInformationJobObject(
-@@ -232,7 +222,6 @@
- );
-
- #ifndef _NTDDK_
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryInformationProcess(
-@@ -244,7 +233,6 @@
- );
- #endif
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtQueryInformationThread(
-@@ -255,14 +243,12 @@
- OUT PULONG ReturnLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtRegisterThreadTerminatePort(
- HANDLE TerminationPort
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtResumeThread(
-@@ -270,14 +256,12 @@
- OUT PULONG SuspendCount
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtResumeProcess(
- IN HANDLE ProcessHandle
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetInformationJobObject(
-@@ -287,7 +271,6 @@
- ULONG JobInformationLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSetInformationProcess(
-@@ -307,7 +290,6 @@
- IN ULONG ThreadInformationLength
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtSuspendProcess(
-@@ -321,7 +303,6 @@
- IN PULONG PreviousSuspendCount
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtTerminateProcess(
-@@ -329,7 +310,6 @@
- IN NTSTATUS ExitStatus
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtTerminateThread(
-@@ -337,7 +317,6 @@
- IN NTSTATUS ExitStatus
- );
-
--NTSYSCALLAPI
- NTSTATUS
- NTAPI
- NtTerminateJobObject(
-@@ -345,7 +324,6 @@
- NTSTATUS ExitStatus
+@@ -298,6 +298,7 @@
);
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwAlertResumeThread(
-@@ -353,14 +331,12 @@
- OUT PULONG SuspendCount
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwAlertThread(
- IN HANDLE ThreadHandle
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwAssignProcessToJobObject(
-@@ -368,7 +344,6 @@
- HANDLE ProcessHandle
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateJobObject(
-@@ -377,7 +352,6 @@
- POBJECT_ATTRIBUTES ObjectAttributes
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateProcess(
-@@ -391,7 +365,6 @@
- IN HANDLE ExceptionPort OPTIONAL
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwCreateThread(
-@@ -405,7 +378,6 @@
- IN BOOLEAN CreateSuspended
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwImpersonateThread(
-@@ -414,7 +386,6 @@
- IN PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwIsProcessInJob(
-@@ -422,7 +393,7 @@
- IN HANDLE JobHandle OPTIONAL
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwOpenProcess(
-@@ -432,7 +403,6 @@
- IN PCLIENT_ID ClientId
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwOpenThread(
-@@ -442,7 +412,7 @@
- IN PCLIENT_ID ClientId
- );
-
--NTSYSAPI
-+NTSYSCALLAPI
- NTSTATUS
- NTAPI
- ZwOpenThreadToken(
-@@ -452,7 +422,7 @@
- OUT PHANDLE TokenHandle
- );
-
--NTSYSAPI
+ NTSYSCALLAPI
+NTSYSCALLAPI
NTSTATUS
NTAPI
- ZwOpenThreadTokenEx(
-@@ -463,7 +433,6 @@
- OUT PHANDLE TokenHandle
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryInformationJobObject(
-@@ -475,7 +444,6 @@
- );
-
- #ifndef _NTDDK_
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryInformationProcess(
-@@ -487,7 +455,6 @@
- );
- #endif
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwQueryInformationThread(
-@@ -498,14 +465,12 @@
- OUT PULONG ReturnLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwRegisterThreadTerminatePort(
- HANDLE TerminationPort
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwResumeThread(
-@@ -513,14 +478,12 @@
- OUT PULONG SuspendCount
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwResumeProcess(
+ NtSetInformationThread(
+@@ -314,6 +315,7 @@
IN HANDLE ProcessHandle
);
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetInformationJobObject(
-@@ -530,7 +493,6 @@
- ULONG JobInformationLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSetInformationProcess(
-@@ -540,7 +502,7 @@
- IN ULONG ProcessInformationLength
- );
-
--NTSYSAPI
+NTSYSCALLAPI
NTSTATUS
NTAPI
- ZwSetInformationThread(
-@@ -550,14 +512,12 @@
- IN ULONG ThreadInformationLength
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSuspendProcess(
- IN HANDLE ProcessHandle
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwSuspendThread(
-@@ -565,7 +525,6 @@
- IN PULONG PreviousSuspendCount
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwTerminateProcess(
-@@ -573,7 +532,6 @@
- IN NTSTATUS ExitStatus
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwTerminateThread(
-@@ -581,7 +539,6 @@
- IN NTSTATUS ExitStatus
- );
-
--NTSYSAPI
- NTSTATUS
- NTAPI
- ZwTerminateJobObject(
+ NtSuspendThread(
Index: include/ndk/fixmes.txt
===================================================================
--- include/ndk/fixmes.txt (revision 21759)
Index: kdbg/kdb.c
===================================================================
--- kdbg/kdb.c (revision 21759)
+++ kdbg/kdb.c (working copy)
@@ -122,6 +122,14 @@
KiEspToTrapFrame(IN PKTRAP_FRAME TrapFrame,
IN ULONG Esp);
+/* ROS Internal. Please deprecate */
+NTHALAPI
+VOID
+NTAPI
+HalReleaseDisplayOwnership(
+ VOID
+);
+
/* FUNCTIONS *****************************************************************/
STATIC VOID
@@ -183,7 +191,7 @@
KAPC_STATE ApcState;
/* Get the protection for the address. */
- Protect = MmGetPageProtect(Process, (PVOID)PAGE_ROUND_DOWN(Address));
+ Protect = MmGetPageProtect((PROS_EPROCESS)Process, (PVOID)PAGE_ROUND_DOWN(Address));
/* Return if that page isn't present. */
if (Protect & PAGE_NOACCESS)
@@ -200,7 +208,7 @@
/* Make the page writeable if it is read only. */
if (Protect & (PAGE_READONLY|PAGE_EXECUTE|PAGE_EXECUTE_READ))
{
- MmSetPageProtect(Process, (PVOID)PAGE_ROUND_DOWN(Address),
+ MmSetPageProtect((PROS_EPROCESS)Process, (PVOID)PAGE_ROUND_DOWN(Address),
(Protect & ~(PAGE_READONLY|PAGE_EXECUTE|PAGE_EXECUTE_READ)) |
PAGE_READWRITE);
}
@@ -212,7 +220,7 @@
{
if (Protect & (PAGE_READONLY|PAGE_EXECUTE|PAGE_EXECUTE_READ))
{
- MmSetPageProtect(Process, (PVOID)PAGE_ROUND_DOWN(Address), Protect);
+ MmSetPageProtect((PROS_EPROCESS)Process, (PVOID)PAGE_ROUND_DOWN(Address),
Protect);
}
/* Detach from process */
if (CurrentProcess != Process)
@@ -229,7 +237,7 @@
/* Restore the page protection. */
if (Protect & (PAGE_READONLY|PAGE_EXECUTE|PAGE_EXECUTE_READ))
{
- MmSetPageProtect(Process, (PVOID)PAGE_ROUND_DOWN(Address), Protect);
+ MmSetPageProtect((PROS_EPROCESS)Process, (PVOID)PAGE_ROUND_DOWN(Address),
Protect);
}
/* Detach from process */
Index: kdbg/kdb_cli.c
===================================================================
--- kdbg/kdb_cli.c (revision 21759)
+++ kdbg/kdb_cli.c (working copy)
@@ -1453,7 +1453,7 @@
Pcr->IDR, Pcr->KdVersionBlock, Pcr->IDT, Pcr->GDT, Pcr->TSS,
Pcr->MajorVersion, Pcr->MinorVersion, Pcr->SetMember,
Pcr->StallScaleFactor,
Pcr->Number, Pcr->L2CacheAssociativity,
- Pcr->VdmAlert, Pcr->L2CacheSize, Pcr->InterruptMode);
+ Pcr->VdmAlert, Pcr->SecondLevelCacheSize, Pcr->InterruptMode);
return TRUE;
}