Fix some NDK issues when attempting to use it from kmode, and fix some winddk/ntifs inconsistencies aswell (move PFILE_QUOTA_INFORMATION and remove all RtlRange functions from the DDK, plus add PPEB)
Modified: trunk/reactos/include/napi/core.h
Modified: trunk/reactos/include/ndk/extypes.h
Modified: trunk/reactos/include/ndk/rtlfuncs.h
Modified: trunk/reactos/include/ndk/rtltypes.h
Modified: trunk/reactos/include/ndk/umtypes.h
Modified: trunk/reactos/include/ndk/zwtypes.h
Modified: trunk/reactos/include/ntos/rtltypes.h
Modified: trunk/reactos/w32api/include/ddk/ntifs.h
Modified: trunk/reactos/w32api/include/ddk/winddk.h

Modified: trunk/reactos/include/napi/core.h
--- trunk/reactos/include/napi/core.h	2005-06-22 04:02:32 UTC (rev 16213)
+++ trunk/reactos/include/napi/core.h	2005-06-22 05:04:02 UTC (rev 16214)
@@ -1,12 +1,10 @@
 #ifndef __INCLUDE_NAPI_CORE_H
 #define __INCLUDE_NAPI_CORE_H
 
-#include "../ntoskrnl/include/internal/ke.h"
-#include <ddk/ntddscsi.h>
-
 #define MM_CORE_DUMP_HEADER_MAGIC         (0xdeafbead)
 #define MM_CORE_DUMP_HEADER_VERSION       (0x1)
 
+#include <ddk/ntddscsi.h>
 typedef struct _MM_CORE_DUMP_HEADER
 {
   ULONG Magic;

Modified: trunk/reactos/include/ndk/extypes.h
--- trunk/reactos/include/ndk/extypes.h	2005-06-22 04:02:32 UTC (rev 16213)
+++ trunk/reactos/include/ndk/extypes.h	2005-06-22 05:04:02 UTC (rev 16214)
@@ -11,6 +11,7 @@
 #define _EXTYPES_H
 
 /* DEPENDENCIES **************************************************************/
+#include "ketypes.h"
 
 /* EXPORTED DATA *************************************************************/
 extern POBJECT_TYPE NTOSAPI ExIoCompletionType;
@@ -24,6 +25,8 @@
 
 /* TYPES *********************************************************************/
 
+/* You'll need the IFS for these, so let's not force everyone to have it */
+#ifdef _NTIFS_
 typedef struct _EX_QUEUE_WORKER_INFO 
 {
     UCHAR QueueDisabled:1;
@@ -41,6 +44,7 @@
     ULONG QueueDepthLastPass;
     EX_QUEUE_WORKER_INFO Info;    
 } EX_WORK_QUEUE, *PEX_WORK_QUEUE;
+#endif
 
 typedef struct _HANDLE_TABLE_ENTRY_INFO 
 {

Modified: trunk/reactos/include/ndk/rtlfuncs.h
--- trunk/reactos/include/ndk/rtlfuncs.h	2005-06-22 04:02:32 UTC (rev 16213)
+++ trunk/reactos/include/ndk/rtlfuncs.h	2005-06-22 05:04:02 UTC (rev 16214)
@@ -10,200 +10,15 @@
 #define _RTLFUNCS_H
 
 /* DEPENDENCIES **************************************************************/
-#include <ndk/rtltypes.h>
-#include <ndk/pstypes.h>
+#include "rtltypes.h"
+#include "pstypes.h"
+#include <ddk/ntnls.h>
 
 /* PROTOTYPES ****************************************************************/
 
 /* FIXME: FILE NEEDS SOME ALPHABETIZING AND REGROUP */
 
-/* List Macros */
-static __inline 
-VOID
-InitializeListHead(
-    IN PLIST_ENTRY  ListHead)
-{
-    ListHead->Flink = ListHead->Blink = ListHead;
-}
-
-static __inline 
-VOID
-InsertHeadList(
-    IN PLIST_ENTRY  ListHead,
-    IN PLIST_ENTRY  Entry)
-{
-    PLIST_ENTRY OldFlink;
-    OldFlink = ListHead->Flink;
-    Entry->Flink = OldFlink;
-    Entry->Blink = ListHead;
-    OldFlink->Blink = Entry;
-    ListHead->Flink = Entry;
-}
-
-static __inline 
-VOID
-InsertTailList(
-    IN PLIST_ENTRY  ListHead,
-    IN PLIST_ENTRY  Entry)
-{
-    PLIST_ENTRY OldBlink;
-    OldBlink = ListHead->Blink;
-    Entry->Flink = ListHead;
-    Entry->Blink = OldBlink;
-    OldBlink->Flink = Entry;
-    ListHead->Blink = Entry;
-}
-
-#define IsListEmpty(ListHead) \
-    ((ListHead)->Flink == (ListHead))
-
-#define PopEntryList(ListHead) \
-    (ListHead)->Next; \
-    { \
-        PSINGLE_LIST_ENTRY _FirstEntry; \
-        _FirstEntry = (ListHead)->Next; \
-        if (_FirstEntry != NULL) \
-            (ListHead)->Next = _FirstEntry->Next; \
-    }
-
-#define PushEntryList(_ListHead, _Entry) \
-    (_Entry)->Next = (_ListHead)->Next; \
-    (_ListHead)->Next = (_Entry); \
-
-static __inline 
-BOOLEAN
-RemoveEntryList(
-    IN PLIST_ENTRY  Entry)
-{
-    PLIST_ENTRY OldFlink;
-    PLIST_ENTRY OldBlink;
-
-    OldFlink = Entry->Flink;
-    OldBlink = Entry->Blink;
-    OldFlink->Blink = OldBlink;
-    OldBlink->Flink = OldFlink;
-    return (OldFlink == OldBlink);
-}
-
-static __inline 
-PLIST_ENTRY 
-RemoveHeadList(
-    IN PLIST_ENTRY  ListHead)
-{
-    PLIST_ENTRY Flink;
-    PLIST_ENTRY Entry;
-
-    Entry = ListHead->Flink;
-    Flink = Entry->Flink;
-    ListHead->Flink = Flink;
-    Flink->Blink = ListHead;
-    return Entry;
-}
-
-static __inline 
-PLIST_ENTRY
-RemoveTailList(
-    IN PLIST_ENTRY  ListHead)
-{
-    PLIST_ENTRY Blink;
-    PLIST_ENTRY Entry;
-
-    Entry = ListHead->Blink;
-    Blink = Entry->Blink;
-    ListHead->Blink = Blink;
-    Blink->Flink = ListHead;
-    return Entry;
-}
-
-#define IsFirstEntry(ListHead, Entry) \
-    ((ListHead)->Flink == Entry)
-  
-#define IsLastEntry(ListHead, Entry) \
-    ((ListHead)->Blink == Entry)
-    
-#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
-{\
-  PLIST_ENTRY current;\
-\
-  current = (ListHead)->Flink;\
-  while (current != (ListHead))\
-  {\
-    if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
-        (NewEntry)->SortField)\
-    {\
-      break;\
-    }\
-    current = current->Flink;\
-  }\
-\
-  InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
-{\
-  PLIST_ENTRY current;\
-\
-  current = (ListHead)->Flink;\
-  while (current != (ListHead))\
-  {\
-    if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
-        (NewEntry)->SortField)\
-    {\
-      break;\
-    }\
-    current = current->Flink;\
-  }\
-\
-  InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
-{\
-  PLIST_ENTRY current;\
-\
-  current = (ListHead)->Flink;\
-  while (current != (ListHead))\
-  {\
-    if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
-        (NewEntry)->SortField)\
-    {\
-      break;\
-    }\
-    current = current->Flink;\
-  }\
-\
-  InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
-{\
-  PLIST_ENTRY current;\
-\
-  current = (ListHead)->Flink;\
-  while (current != (ListHead))\
-  {\
-    if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
-        (NewEntry)->SortField)\
-    {\
-      break;\
-    }\
-    current = current->Flink;\
-  }\
-\
-  InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
 /*
- * Constant String Macro
- */
-#define RTL_CONSTANT_STRING(__SOURCE_STRING__) \
-{ \
- sizeof(__SOURCE_STRING__) - sizeof((__SOURCE_STRING__)[0]), \
- sizeof(__SOURCE_STRING__), \
- (__SOURCE_STRING__) \
-}
-
-/*
  * Error and Exception Functions
  */
 PVOID

Modified: trunk/reactos/include/ndk/rtltypes.h
--- trunk/reactos/include/ndk/rtltypes.h	2005-06-22 04:02:32 UTC (rev 16213)
+++ trunk/reactos/include/ndk/rtltypes.h	2005-06-22 05:04:02 UTC (rev 16214)
@@ -381,6 +381,12 @@
         SYSTEMTIME DaylightDate;
         LONG DaylightBias;
     } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
+    
+    typedef enum _ACL_INFORMATION_CLASS 
+    {
+        AclRevisionInformation = 1,
+        AclSizeInformation
+    } ACL_INFORMATION_CLASS;
 #endif
 
 #endif

Modified: trunk/reactos/include/ndk/umtypes.h
--- trunk/reactos/include/ndk/umtypes.h	2005-06-22 04:02:32 UTC (rev 16213)
+++ trunk/reactos/include/ndk/umtypes.h	2005-06-22 05:04:02 UTC (rev 16214)
@@ -184,6 +184,192 @@
 #define VER_CONDITION_MASK              7
 #define VER_NUM_BITS_PER_CONDITION_MASK 3
 
+/* List Macros */
+static __inline 
+VOID
+InitializeListHead(
+    IN PLIST_ENTRY  ListHead)
+{
+    ListHead->Flink = ListHead->Blink = ListHead;
+}
+
+static __inline 
+VOID
+InsertHeadList(
+    IN PLIST_ENTRY  ListHead,
+    IN PLIST_ENTRY  Entry)
+{
+    PLIST_ENTRY OldFlink;
+    OldFlink = ListHead->Flink;
+    Entry->Flink = OldFlink;
+    Entry->Blink = ListHead;
+    OldFlink->Blink = Entry;
+    ListHead->Flink = Entry;
+}
+
+static __inline 
+VOID
+InsertTailList(
+    IN PLIST_ENTRY  ListHead,
+    IN PLIST_ENTRY  Entry)
+{
+    PLIST_ENTRY OldBlink;
+    OldBlink = ListHead->Blink;
+    Entry->Flink = ListHead;
+    Entry->Blink = OldBlink;
+    OldBlink->Flink = Entry;
+    ListHead->Blink = Entry;
+}
+
+#define IsListEmpty(ListHead) \
+    ((ListHead)->Flink == (ListHead))
+
+#define PopEntryList(ListHead) \
+    (ListHead)->Next; \
+    { \
+        PSINGLE_LIST_ENTRY _FirstEntry; \
+        _FirstEntry = (ListHead)->Next; \
+        if (_FirstEntry != NULL) \
+            (ListHead)->Next = _FirstEntry->Next; \
+    }
+
+#define PushEntryList(_ListHead, _Entry) \
+    (_Entry)->Next = (_ListHead)->Next; \
+    (_ListHead)->Next = (_Entry); \
+
+static __inline 
+BOOLEAN
+RemoveEntryList(
+    IN PLIST_ENTRY  Entry)
+{
+    PLIST_ENTRY OldFlink;
+    PLIST_ENTRY OldBlink;
+
+    OldFlink = Entry->Flink;
+    OldBlink = Entry->Blink;
+    OldFlink->Blink = OldBlink;
+    OldBlink->Flink = OldFlink;
+    return (OldFlink == OldBlink);
+}
+
+static __inline 
+PLIST_ENTRY 
+RemoveHeadList(
+    IN PLIST_ENTRY  ListHead)
+{
+    PLIST_ENTRY Flink;
+    PLIST_ENTRY Entry;
+
+    Entry = ListHead->Flink;
+    Flink = Entry->Flink;
+    ListHead->Flink = Flink;
+    Flink->Blink = ListHead;
+    return Entry;
+}
+
+static __inline 
+PLIST_ENTRY
+RemoveTailList(
+    IN PLIST_ENTRY  ListHead)
+{
+    PLIST_ENTRY Blink;
+    PLIST_ENTRY Entry;
+
+    Entry = ListHead->Blink;
+    Blink = Entry->Blink;
+    ListHead->Blink = Blink;
+    Blink->Flink = ListHead;
+    return Entry;
+}
+
+#define IsFirstEntry(ListHead, Entry) \
+    ((ListHead)->Flink == Entry)
+  
+#define IsLastEntry(ListHead, Entry) \
+    ((ListHead)->Blink == Entry)
+    
+#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
+{\
+  PLIST_ENTRY current;\
+\
+  current = (ListHead)->Flink;\
+  while (current != (ListHead))\
+  {\
+    if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
+        (NewEntry)->SortField)\
+    {\
+      break;\
+    }\
+    current = current->Flink;\
+  }\
+\
+  InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
+{\
+  PLIST_ENTRY current;\
+\
+  current = (ListHead)->Flink;\
+  while (current != (ListHead))\
+  {\
+    if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
+        (NewEntry)->SortField)\
+    {\
+      break;\
+    }\
+    current = current->Flink;\
+  }\
+\
+  InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
+{\
+  PLIST_ENTRY current;\
+\
+  current = (ListHead)->Flink;\
+  while (current != (ListHead))\
+  {\
+    if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
+        (NewEntry)->SortField)\
+    {\
+      break;\
+    }\
+    current = current->Flink;\
+  }\
+\
+  InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
+{\
+  PLIST_ENTRY current;\
+\
+  current = (ListHead)->Flink;\
+  while (current != (ListHead))\
+  {\
+    if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
+        (NewEntry)->SortField)\
+    {\
+      break;\
+    }\
+    current = current->Flink;\
+  }\
+\
+  InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+/*
+ * Constant String Macro
+ */
+#define RTL_CONSTANT_STRING(__SOURCE_STRING__) \
+{ \
+ sizeof(__SOURCE_STRING__) - sizeof((__SOURCE_STRING__)[0]), \
+ sizeof(__SOURCE_STRING__), \
+ (__SOURCE_STRING__) \
+}
+
 /* ENUMERATIONS **************************************************************/
 
 /* Kernel Shared Data Values */
@@ -283,23 +469,6 @@
     MaximumInterfaceType
 }INTERFACE_TYPE, *PINTERFACE_TYPE;
 
-typedef enum _PNP_VETO_TYPE
-{
-    PNP_VetoTypeUnknown,
-    PNP_VetoLegacyDevice,
-    PNP_VetoPendingClose,
-    PNP_VetoWindowsApp,
-    PNP_VetoWindowsService,
-    PNP_VetoOutstandingOpen,
-    PNP_VetoDevice,
-    PNP_VetoDriver,
-    PNP_VetoIllegalDeviceRequest,
-    PNP_VetoInsufficientPower,
-    PNP_VetoNonDisableable,
-    PNP_VetoLegacyDriver,
-    PNP_VetoInsufficientRights
-} PNP_VETO_TYPE, *PPNP_VETO_TYPE;
-
 typedef enum _MODE 
 {
     KernelMode,

Modified: trunk/reactos/include/ndk/zwtypes.h
--- trunk/reactos/include/ndk/zwtypes.h	2005-06-22 04:02:32 UTC (rev 16213)
+++ trunk/reactos/include/ndk/zwtypes.h	2005-06-22 05:04:02 UTC (rev 16214)
@@ -11,6 +11,7 @@
 
 /* DEPENDENCIES **************************************************************/
 #include "rtltypes.h"
+#include <ddk/cfg.h>
 
 /* EXPORTED DATA *************************************************************/
 
@@ -92,6 +93,8 @@
 /*
  * Process (extra ones not defined in DDK)
  */
+/* FIXME: Temporary hack until all KMODE stuf are NDK */
+#ifndef __WINDDK_H
 typedef enum _PROCESS_INFORMATION_FLAGS
 {    
     ProcessUnknown33 = 33,
@@ -99,6 +102,7 @@
     ProcessUnknown35,
     ProcessCookie
 } PROCESS_INFORMATION_FLAGS;
+#endif
 
 /*
  * System

Modified: trunk/reactos/include/ntos/rtltypes.h
--- trunk/reactos/include/ntos/rtltypes.h	2005-06-22 04:02:32 UTC (rev 16213)
+++ trunk/reactos/include/ntos/rtltypes.h	2005-06-22 05:04:02 UTC (rev 16214)
@@ -40,6 +40,7 @@
 #define VER_NT_SERVER					0x0000003
 */
 
+  
 typedef struct _CONTROLLER_OBJECT
 {
   CSHORT Type;
@@ -440,4 +441,44 @@
 (*PHEAP_ENUMERATION_ROUTINE)(IN PVOID HeapHandle,
                              IN PVOID UserParam);
 
+                             
+#define RTL_RANGE_LIST_ADD_IF_CONFLICT    0x00000001
+#define RTL_RANGE_LIST_ADD_SHARED         0x00000002
+
+#define RTL_RANGE_LIST_SHARED_OK          0x00000001
+#define RTL_RANGE_LIST_NULL_CONFLICT_OK   0x00000002
+
+#define RTL_RANGE_LIST_MERGE_IF_CONFLICT  RTL_RANGE_LIST_ADD_IF_CONFLICT
+
+typedef struct _RTL_RANGE {
+  ULONGLONG  Start;
+  ULONGLONG  End;
+  PVOID  UserData;
+  PVOID  Owner;
+  UCHAR  Attributes;
+  UCHAR  Flags;
+} RTL_RANGE, *PRTL_RANGE;
+
+#define RTL_RANGE_SHARED                  0x01
+#define RTL_RANGE_CONFLICT                0x02
+
+typedef struct _RTL_RANGE_LIST {
+  LIST_ENTRY  ListHead;
+  ULONG  Flags;
+  ULONG  Count;
+  ULONG  Stamp;
+} RTL_RANGE_LIST, *PRTL_RANGE_LIST;
+
+typedef struct _RANGE_LIST_ITERATOR {
+  PLIST_ENTRY  RangeListHead;
+  PLIST_ENTRY  MergedHead;
+  PVOID  Current;
+  ULONG  Stamp;
+} RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
+
+typedef BOOLEAN
+(STDCALL *PRTL_CONFLICT_RANGE_CALLBACK)(
+  IN PVOID  Context,
+  IN PRTL_RANGE  Range);
+
 #endif /* __DDK_RTLTYPES_H */

Modified: trunk/reactos/w32api/include/ddk/ntifs.h
--- trunk/reactos/w32api/include/ddk/ntifs.h	2005-06-22 04:02:32 UTC (rev 16213)
+++ trunk/reactos/w32api/include/ddk/ntifs.h	2005-06-22 05:04:02 UTC (rev 16214)
@@ -1163,16 +1163,6 @@
     WCHAR           Name[1];
 } FILE_PIPE_WAIT_FOR_BUFFER, *PFILE_PIPE_WAIT_FOR_BUFFER;
 
-typedef struct _FILE_QUOTA_INFORMATION {
-    ULONG           NextEntryOffset;
-    ULONG           SidLength;
-    LARGE_INTEGER   ChangeTime;
-    LARGE_INTEGER   QuotaUsed;
-    LARGE_INTEGER   QuotaThreshold;
-    LARGE_INTEGER   QuotaLimit;
-    SID             Sid;
-} FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
-
 typedef struct _FILE_RENAME_INFORMATION {
     BOOLEAN ReplaceIfExists;
     HANDLE  RootDirectory;

Modified: trunk/reactos/w32api/include/ddk/winddk.h
--- trunk/reactos/w32api/include/ddk/winddk.h	2005-06-22 04:02:32 UTC (rev 16213)
+++ trunk/reactos/w32api/include/ddk/winddk.h	2005-06-22 05:04:02 UTC (rev 16214)
@@ -186,6 +186,7 @@
 typedef struct _HAL_PRIVATE_DISPATCH_TABLE *PHAL_PRIVATE_DISPATCH_TABLE;
 typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT;
 typedef struct _BUS_HANDLER *PBUS_HANDLER;
+typedef struct _PEB *PPEB;
 typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT;
 
 /* Constants */
@@ -2513,6 +2514,16 @@
   BOOLEAN  DeleteFile;
 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
 
+typedef struct _FILE_QUOTA_INFORMATION {
+    ULONG NextEntryOffset;
+    ULONG SidLength;
+    LARGE_INTEGER ChangeTime;
+    LARGE_INTEGER QuotaUsed;
+    LARGE_INTEGER QuotaThreshold;
+    LARGE_INTEGER QuotaLimit;
+    SID Sid;
+} FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
+
 typedef struct _FILE_END_OF_FILE_INFORMATION {
   LARGE_INTEGER  EndOfFile;
 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
@@ -4372,45 +4383,6 @@
 #define DRIVER_VERIFIER_TRACK_POOL_ALLOCATIONS      0x0008
 #define DRIVER_VERIFIER_IO_CHECKING                 0x0010
 
-#define RTL_RANGE_LIST_ADD_IF_CONFLICT    0x00000001
-#define RTL_RANGE_LIST_ADD_SHARED         0x00000002
-
-#define RTL_RANGE_LIST_SHARED_OK          0x00000001
-#define RTL_RANGE_LIST_NULL_CONFLICT_OK   0x00000002
-
-#define RTL_RANGE_LIST_MERGE_IF_CONFLICT  RTL_RANGE_LIST_ADD_IF_CONFLICT
-
-typedef struct _RTL_RANGE {
-  ULONGLONG  Start;
-  ULONGLONG  End;
-  PVOID  UserData;
-  PVOID  Owner;
-  UCHAR  Attributes;
-  UCHAR  Flags;
-} RTL_RANGE, *PRTL_RANGE;
-
-#define RTL_RANGE_SHARED                  0x01
-#define RTL_RANGE_CONFLICT                0x02
-
-typedef struct _RTL_RANGE_LIST {
-  LIST_ENTRY  ListHead;
-  ULONG  Flags;
-  ULONG  Count;
-  ULONG  Stamp;
-} RTL_RANGE_LIST, *PRTL_RANGE_LIST;
-
-typedef struct _RANGE_LIST_ITERATOR {
-  PLIST_ENTRY  RangeListHead;
-  PLIST_ENTRY  MergedHead;
-  PVOID  Current;
-  ULONG  Stamp;
-} RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
-
-typedef BOOLEAN
-(DDKAPI *PRTL_CONFLICT_RANGE_CALLBACK)(
-  IN PVOID  Context,
-  IN PRTL_RANGE  Range);
-
 #define HASH_STRING_ALGORITHM_DEFAULT     0
 #define HASH_STRING_ALGORITHM_X65599      1
 #define HASH_STRING_ALGORITHM_INVALID     0xffffffff
@@ -4915,18 +4887,6 @@
 NTOSAPI
 NTSTATUS
 DDKAPI
-RtlAddRange(
-  IN OUT PRTL_RANGE_LIST  RangeList,
-  IN ULONGLONG  Start,
-  IN ULONGLONG  End,
-  IN UCHAR  Attributes,
-  IN ULONG  Flags,
-  IN PVOID  UserData  OPTIONAL,
-  IN PVOID  Owner  OPTIONAL);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
 RtlAnsiStringToUnicodeString(
   IN OUT PUNICODE_STRING  DestinationString,
   IN PANSI_STRING  SourceString,
@@ -5078,13 +5038,6 @@
   IN ULONG  Length);
 
 NTOSAPI
-NTSTATUS
-DDKAPI
-RtlCopyRangeList(
-  OUT PRTL_RANGE_LIST  CopyRangeList,
-  IN PRTL_RANGE_LIST  RangeList);
-
-NTOSAPI
 VOID
 DDKAPI
 RtlCopyString(
@@ -5115,22 +5068,6 @@
 NTOSAPI
 NTSTATUS
 DDKAPI
-RtlDeleteOwnersRanges(
-  IN OUT PRTL_RANGE_LIST  RangeList,
-  IN PVOID  Owner);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlDeleteRange(
-  IN OUT PRTL_RANGE_LIST  RangeList,
-  IN ULONGLONG  Start,
-  IN ULONGLONG  End,
-  IN PVOID  Owner);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
 RtlDeleteRegistryValue(
   IN ULONG  RelativeTo,
   IN PCWSTR  Path,
@@ -5255,21 +5192,6 @@
   OUT PULONG  StartingRunIndex);
 
 NTOSAPI
-NTSTATUS
-DDKAPI
-RtlFindRange(
-  IN PRTL_RANGE_LIST  RangeList,
-  IN ULONGLONG  Minimum,
-  IN ULONGLONG  Maximum,
-  IN ULONG  Length,
-  IN ULONG  Alignment,
-  IN ULONG  Flags,
-  IN UCHAR  AttributeAvailableMask,
-  IN PVOID  Context  OPTIONAL,
-  IN PRTL_CONFLICT_RANGE_CALLBACK  Callback  OPTIONAL,
-  OUT PULONGLONG  Start);
-
-NTOSAPI
 ULONG
 DDKAPI
 RtlFindSetBits(
@@ -5294,12 +5216,6 @@
 NTOSAPI
 VOID
 DDKAPI
-RtlFreeRangeList(
-  IN PRTL_RANGE_LIST  RangeList);
-
-NTOSAPI
-VOID
-DDKAPI
 RtlFreeUnicodeString(
   IN PUNICODE_STRING  UnicodeString);
 
@@ -5319,32 +5235,6 @@
 NTOSAPI
 NTSTATUS
 DDKAPI
-RtlGetFirstRange(
-  IN PRTL_RANGE_LIST  RangeList,
-  OUT PRTL_RANGE_LIST_ITERATOR  Iterator,
-  OUT PRTL_RANGE  *Range);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlGetNextRange(
-  IN OUT  PRTL_RANGE_LIST_ITERATOR  Iterator,
-  OUT PRTL_RANGE  *Range,
-  IN BOOLEAN  MoveForwards);
-
-#define FOR_ALL_RANGES(RangeList, Iterator, Current)          \
-  for (RtlGetFirstRange((RangeList), (Iterator), &(Current)); \
-    (Current) != NULL;                                        \
-    RtlGetNextRange((Iterator), &(Current), TRUE))
-
-#define FOR_ALL_RANGES_BACKWARDS(RangeList, Iterator, Current) \
-  for (RtlGetLastRange((RangeList), (Iterator), &(Current));   \
-    (Current) != NULL;                                         \
-    RtlGetNextRange((Iterator), &(Current), FALSE))
-
-NTOSAPI
-NTSTATUS
-DDKAPI
 RtlGUIDFromString(
   IN PUNICODE_STRING  GuidString,
   OUT GUID  *Guid);
@@ -5376,12 +5266,6 @@
 NTOSAPI
 VOID
 DDKAPI
-RtlInitializeRangeList(
-  IN OUT PRTL_RANGE_LIST  RangeList);
-
-NTOSAPI
-VOID
-DDKAPI
 RtlInitString(
   IN OUT PSTRING  DestinationString,
   IN PCSZ  SourceString);
@@ -5417,26 +5301,6 @@
   ULONG  Base  OPTIONAL,
   PUNICODE_STRING  String);
 
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlInvertRangeList(
-  OUT PRTL_RANGE_LIST  InvertedRangeList,
-  IN PRTL_RANGE_LIST  RangeList);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlIsRangeAvailable(
-  IN PRTL_RANGE_LIST  RangeList,
-  IN ULONGLONG  Start,
-  IN ULONGLONG  End,
-  IN ULONG  Flags,
-  IN UCHAR  AttributeAvailableMask,
-  IN PVOID  Context  OPTIONAL,
-  IN PRTL_CONFLICT_RANGE_CALLBACK  Callback  OPTIONAL,
-  OUT PBOOLEAN  Available);
-
 /*
  * BOOLEAN
  * RtlIsZeroLuid(
@@ -5458,15 +5322,6 @@
   IN OUT PACCESS_MASK  AccessMask,
   IN PGENERIC_MAPPING  GenericMapping);
 
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlMergeRangeLists(
-  OUT PRTL_RANGE_LIST  MergedRangeList,
-  IN PRTL_RANGE_LIST  RangeList1,
-  IN PRTL_RANGE_LIST  RangeList2,
-  IN ULONG  Flags);
-
 /*
  * VOID
  * RtlMoveMemory(