Kill NTOS headers. So long, and thanks for all the fish
authorAlex Ionescu <aionescu@gmail.com>
Sun, 26 Jun 2005 05:52:40 +0000 (05:52 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sun, 26 Jun 2005 05:52:40 +0000 (05:52 +0000)
svn path=/trunk/; revision=16279

65 files changed:
reactos/apps/utils/ps/ps.c
reactos/drivers/dd/blue/blue.c
reactos/drivers/dd/bootvid/bootvid.c
reactos/drivers/fs/cdfs/fsctl.c
reactos/drivers/fs/cdfs/rw.c
reactos/drivers/fs/ms/create.c
reactos/drivers/fs/np/create.c
reactos/drivers/fs/ntfs/mft.c
reactos/drivers/fs/ntfs/rw.c
reactos/drivers/storage/cdrom/cdrom.c
reactos/drivers/storage/scsiport/scsiport.c
reactos/drivers/video/displays/vga/vgavideo/vgavideo.c
reactos/include/csrss/csrss.h
reactos/include/ddk/core.h [moved from reactos/include/napi/core.h with 100% similarity]
reactos/include/ddk/ntddblue.h
reactos/include/ddk/ntpnp.h [moved from reactos/include/ntos/ntpnp.h with 96% similarity]
reactos/include/ndk/halfuncs.h
reactos/include/ndk/inbvfuncs.h
reactos/include/ntos.h [deleted file]
reactos/include/ntos/bootvid.h [deleted file]
reactos/include/ntos/cdrom.h [deleted file]
reactos/include/ntos/console.h [deleted file]
reactos/include/ntos/dbgfuncs.h [deleted file]
reactos/include/ntos/disk.h [deleted file]
reactos/include/ntos/except.h [deleted file]
reactos/include/ntos/file.h [deleted file]
reactos/include/ntos/fstypes.h [deleted file]
reactos/include/ntos/gditypes.h [deleted file]
reactos/include/ntos/halfuncs.h [deleted file]
reactos/include/ntos/haltypes.h [deleted file]
reactos/include/ntos/heap.h [deleted file]
reactos/include/ntos/kdfuncs.h [deleted file]
reactos/include/ntos/kefuncs.h [deleted file]
reactos/include/ntos/keyboard.h [deleted file]
reactos/include/ntos/krnltypes.h [deleted file]
reactos/include/ntos/ldrtypes.h [deleted file]
reactos/include/ntos/minmax.h [deleted file]
reactos/include/ntos/mm.h [deleted file]
reactos/include/ntos/ntdef.h [deleted file]
reactos/include/ntos/obtypes.h [deleted file]
reactos/include/ntos/port.h [deleted file]
reactos/include/ntos/ps.h [deleted file]
reactos/include/ntos/registry.h [deleted file]
reactos/include/ntos/rtl.h [deleted file]
reactos/include/ntos/rtltypes.h [deleted file]
reactos/include/ntos/security.h [deleted file]
reactos/include/ntos/sefuncs.h [deleted file]
reactos/include/ntos/service.h [deleted file]
reactos/include/ntos/setypes.h [deleted file]
reactos/include/ntos/synch.h [deleted file]
reactos/include/ntos/tape.h [deleted file]
reactos/include/ntos/time.h [deleted file]
reactos/include/ntos/tss.h [deleted file]
reactos/include/ntos/types.h [deleted file]
reactos/include/ntos/zw.h [deleted file]
reactos/include/ntos/zwtypes.h [deleted file]
reactos/include/win32k/ntuser.h
reactos/lib/crt/except/matherr.c
reactos/lib/wdmguid/wdmguid.c
reactos/ntoskrnl/ex/init.c
reactos/ntoskrnl/inbv/inbv.c
reactos/ntoskrnl/include/ntoskrnl.h
reactos/ntoskrnl/mm/pagefile.c
reactos/services/umpnpmgr/umpnpmgr.c
reactos/w32api/include/wincon.h

index 1f1dc35..da2e54c 100644 (file)
@@ -23,8 +23,8 @@
 */
 
 #include <windows.h>
-/* NOTE: W32API ddk/ntapi.h header has wrong definition of SYSTEM_PROCESSES. */
-#include <ntos/types.h>
+#define NTOS_MODE_USER
+#include <ndk/ntndk.h>
 
 typedef struct _SYSTEM_THREADS          
  {      
index 6539d1a..7e84020 100644 (file)
@@ -12,9 +12,9 @@
 /* INCLUDES ******************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/halfuncs.h>
+#include <wincon.h>
 #include <ddk/ntddblue.h>
-#include <string.h>
+#include <ndk/halfuncs.h>
 
 #define NDEBUG
 #include <debug.h>
index 8dca7ab..7b33e9a 100644 (file)
@@ -25,8 +25,7 @@
 
 #include <ddk/ntddk.h>
 #include <ddk/ntbootvid.h>
-#include <ntos/ldrtypes.h>
-#include <ddk/ldrfuncs.h>
+#include <ndk/ldrfuncs.h>
 #include "bootvid.h"
 #include "resource.h"
 
index 0b83b98..10f37cc 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <ddk/ntddk.h>
 #include <ntddcdrm.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>
index 41a22f4..475df00 100644 (file)
@@ -29,7 +29,6 @@
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>
index c35aeac..b2a2da7 100644 (file)
@@ -10,9 +10,7 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntifs.h>
-#include <ntos/fstypes.h> /* FIXME: NDK */
-/* FIXME: The headers are broken! */
-#undef CreateMailslot
+#include <ndk/iotypes.h>
 #include "msfs.h"
 
 #define NDEBUG
index 5a2b7b5..a8b27f6 100644 (file)
@@ -10,7 +10,7 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntifs.h>
-#include <ntos/fstypes.h> /* FIXME: NDK */
+#include <ndk/iotypes.h>
 #include "npfs.h"
 
 #define NDEBUG
index daa6267..6bba5ff 100644 (file)
@@ -29,7 +29,6 @@
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>
index 287a803..3a20343 100755 (executable)
@@ -29,7 +29,6 @@
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>
index babea17..11d06fd 100644 (file)
@@ -39,7 +39,6 @@
 #include <ddk/ntdddisk.h>
 #include <ddk/ntddcdrm.h>
 #include <ddk/class2.h>
-#include <ntos/minmax.h>
 #include <stdio.h>
 
 #define NDEBUG
index 91dae10..8fa4a7b 100644 (file)
@@ -32,7 +32,6 @@
 #include <ddk/srb.h>
 #include <ddk/scsi.h>
 #include <ddk/ntddscsi.h>
-#include <ntos/minmax.h>
 #include <stdio.h>
 
 #define NDEBUG
index 032a873..98dca55 100644 (file)
@@ -1,7 +1,6 @@
 #include <ddk/ntddk.h>
 #include <ddk/ntddvdeo.h>
 #include <ddk/winddi.h>
-#include <ntos/minmax.h>
 #include <stdlib.h>
 #include "vgavideo.h"
 
index c3b0059..0c67310 100644 (file)
@@ -3,9 +3,6 @@
 
 #include <windows.h>
 #include <ddk/ntddblue.h>
-#ifndef _NTNDK_
-#include <ntos.h>
-#endif
 
 #define CSR_NATIVE     0x0000
 #define CSR_CONSOLE    0x0001
index 582d631..71e1704 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _NTDDBLUE_H_INCLUDED_
 #define _NTDDBLUE_H_INCLUDED_
 
-#include <ntos/console.h>
-
 #define IOCTL_CONSOLE_GET_SCREEN_BUFFER_INFO    CTL_CODE(FILE_DEVICE_SCREEN, 0x801, METHOD_BUFFERED, FILE_READ_ACCESS)
 #define IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO    CTL_CODE(FILE_DEVICE_SCREEN, 0x802, METHOD_BUFFERED, FILE_WRITE_ACCESS)
 #define IOCTL_CONSOLE_GET_CURSOR_INFO           CTL_CODE(FILE_DEVICE_SCREEN, 0x803, METHOD_BUFFERED, FILE_READ_ACCESS)
similarity index 96%
rename from reactos/include/ntos/ntpnp.h
rename to reactos/include/ddk/ntpnp.h
index f5d9a1c..1043ad8 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef __NTPNP_H\r
 #define __NTPNP_H\r
 \r
+#include <ddk/cfg.h>\r
+\r
 /*\r
  * TODO:\r
  *    - Describe the undocumented GUIDs.\r
index d509365..d6bb0f1 100644 (file)
@@ -22,6 +22,10 @@ HalAcquireDisplayOwnership(
     IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters
 );
 
+BOOLEAN
+STDCALL
+HalQueryDisplayOwnership(VOID);
+
 BOOLEAN
 STDCALL
 HalAllProcessorsStarted(VOID);
index 925b0e2..2a6b1b1 100644 (file)
@@ -90,11 +90,7 @@ VOID
 STDCALL
 VidCleanUp(VOID);
 
-BOOLEAN
-STDCALL
-VidInitialize(VOID);
-
-BOOLEAN
+BOOL
 STDCALL
 VidResetDisplay(VOID);
 
diff --git a/reactos/include/ntos.h b/reactos/include/ntos.h
deleted file mode 100644 (file)
index cf9f3b6..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#ifndef _NTOS_H
-#define _NTOS_H
-/* $Id$ */
-
-#if defined(NTOS_MODE_USER)
-/* 
- * Include windows.h before ntddk.h to get user mode prototype 
- * for InterlockedXxx functions.
- */
-#include <windows.h>
-#include <ddk/ntddk.h>
-#include <ddk/ntifs.h>
-#include <ddk/ntnls.h>
-#include <ddk/cfg.h>
-#include <evntrace.h>
-#include "ntos/types.h"
-#include "ntos/cdrom.h"
-#include "ntos/console.h"
-#include "ntos/disk.h"
-#include "ntos/tape.h"
-#include "ntos/except.h"
-#include "ntos/file.h"
-#include "ntos/gditypes.h"
-#include "ntos/fstypes.h"   /* AG */
-#include "ntos/heap.h"
-#include "ntos/keyboard.h"
-#include "ntos/minmax.h"
-#include "ntos/mm.h"
-#include "ntos/ntdef.h"
-#include "ntos/port.h"
-#include "ntos/ps.h"
-#include "ntos/registry.h"
-#include "ntos/security.h"
-#include "ntos/synch.h"
-#include "ntos/time.h"
-#include "napi/i386/segment.h"
-#include "napi/types.h"
-#include "napi/dbg.h"
-#include "napi/npipe.h"
-#include "napi/shared_data.h"
-#include "napi/win32.h"
-#include "ntos/rtltypes.h"
-#include "ntos/rtl.h"
-#include "ntos/zwtypes.h"
-#include "ntos/zw.h"
-#include "ntos/dbgfuncs.h"
-#include "ntos/service.h"
-//#include "ntdll/csr.h"
-#include "ntdll/dbg.h"
-#include "ntdll/ldr.h"
-#include "ntdll/rtl.h"
-#include "ntdll/trace.h"
-#include "rosrtl/thread.h"
-#else /* Assume kernel mode */
-#include <ddk/ntddk.h>
-#include <ddk/ntifs.h>
-#include <ddk/ntnls.h>
-#include <ddk/cfg.h>
-#include <evntrace.h>
-#include "ntos/types.h"
-#include "ntos/cdrom.h"
-#include "ntos/console.h"
-#include "ntos/disk.h"
-#include "ntos/tape.h"
-#include "ntos/except.h"
-#include "ntos/file.h"
-#include "ntos/gditypes.h"
-#include "ntos/heap.h"
-#include "ntos/keyboard.h"
-#include "ntos/minmax.h"
-#include "ntos/mm.h"
-#include "ntos/ntdef.h"
-#include "ntos/port.h"
-#include "ntos/ps.h"
-#include "ntos/registry.h"
-#include "ntos/security.h"
-#include "ntos/synch.h"
-#include "ntos/time.h"
-#include "napi/i386/segment.h"
-#include "napi/types.h"
-#include "napi/dbg.h"
-#include "napi/npipe.h"
-#include "napi/shared_data.h"
-#include "napi/win32.h"
-#include "ntos/rtltypes.h"
-#include "ntos/rtl.h"
-#include "ntos/zwtypes.h"
-#include "ntos/zw.h"
-#include "ntos/dbgfuncs.h"
-#include "ntos/service.h"
-#include "ntos/haltypes.h"
-#include "ntos/halfuncs.h"
-#include "ntos/kdfuncs.h"
-#include "ntos/kefuncs.h"   /* AG */
-#include "ntos/fstypes.h"   /* AG */
-#include "ntos/obtypes.h"
-#include "ntos/setypes.h"
-#include "ntos/sefuncs.h"
-#include "ntos/krnltypes.h"
-#include "ntos/tss.h"
-#include "rosrtl/thread.h"
-#endif
-
-#endif /* ndef _NTOS_H */
diff --git a/reactos/include/ntos/bootvid.h b/reactos/include/ntos/bootvid.h
deleted file mode 100755 (executable)
index b7c7b72..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef __INCLUDE_NTOS_BOOTVID_H
-#define __INCLUDE_NTOS_BOOTVID_H
-
-VOID
-STDCALL
-InbvAcquireDisplayOwnership(VOID);
-
-BOOLEAN
-STDCALL
-InbvCheckDisplayOwnership(VOID);
-
-BOOLEAN
-STDCALL
-InbvDisplayString(IN PCHAR String);
-
-VOID
-STDCALL
-InbvEnableBootDriver(IN BOOLEAN Enable);
-
-BOOLEAN
-STDCALL
-InbvEnableDisplayString(IN BOOLEAN Enable);
-
-VOID
-STDCALL
-InbvInstallDisplayStringFilter(IN PVOID Unknown);
-
-BOOLEAN
-STDCALL
-InbvIsBootDriverInstalled(VOID);
-
-VOID
-STDCALL
-InbvNotifyDisplayOwnershipLost(IN PVOID Callback);
-
-BOOLEAN
-STDCALL
-InbvResetDisplay(VOID);
-
-VOID
-STDCALL
-InbvSetScrollRegion(IN ULONG Left,
-  IN ULONG Top,
-  IN ULONG Width,
-  IN ULONG Height);
-
-VOID
-STDCALL
-InbvSetTextColor(IN ULONG Color);
-
-VOID
-STDCALL
-InbvSolidColorFill(IN ULONG Left,
-  IN ULONG Top,
-  IN ULONG Width,
-  IN ULONG Height,
-  IN ULONG Color);
-
-VOID
-STDCALL
-VidCleanUp(VOID);
-
-BOOLEAN
-STDCALL
-VidInitialize(VOID);
-
-BOOLEAN
-STDCALL
-VidResetDisplay(VOID);
-
-BOOLEAN
-STDCALL
-VidIsBootDriverInstalled(VOID);
-
-#endif /* __INCLUDE_NTOS_BOOTVID_H */
diff --git a/reactos/include/ntos/cdrom.h b/reactos/include/ntos/cdrom.h
deleted file mode 100644 (file)
index b5cc204..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* $Id$
- *
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/ntos/cdrom.h
- * PURPOSE:      CD-ROM related definitions used by all the parts of the system
- * PROGRAMMER:   Eric Kohl
- * UPDATE HISTORY:
- *               10/04/2002: Created
- */
-
-#ifndef __INCLUDE_NTOS_CDROM_H
-#define __INCLUDE_NTOS_CDROM_H
-
-
-#define IOCTL_CDROM_BASE                FILE_DEVICE_CD_ROM
-
-#define IOCTL_CDROM_READ_TOC            CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_GET_LAST_SESSION    CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_GET_DRIVE_GEOMETRY  CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_CHECK_VERIFY        CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_MEDIA_REMOVAL       CTL_CODE(IOCTL_CDROM_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_EJECT_MEDIA         CTL_CODE(IOCTL_CDROM_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_LOAD_MEDIA          CTL_CODE(IOCTL_CDROM_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_RESERVE             CTL_CODE(IOCTL_CDROM_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_RELEASE             CTL_CODE(IOCTL_CDROM_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_FIND_NEW_DEVICES    CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-#define MAXIMUM_NUMBER_TRACKS          100
-#define MAXIMUM_CDROM_SIZE             804
-
-typedef struct _TRACK_DATA
-{
-  UCHAR  Reserved;
-  UCHAR  Control : 4;
-  UCHAR  Adr : 4;
-  UCHAR  TrackNumber;
-  UCHAR  Reserved1;
-  UCHAR  Address[4];
-} TRACK_DATA, *PTRACK_DATA;
-
-typedef struct _CDROM_TOC
-{
-  UCHAR  Length[2];
-  UCHAR  FirstTrack;
-  UCHAR  LastTrack;
-  TRACK_DATA  TrackData[MAXIMUM_NUMBER_TRACKS];
-} CDROM_TOC, *PCDROM_TOC;
-
-#define CDROM_TOC_SIZE sizeof(CDROM_TOC)
-
-#endif /* __INCLUDE_NTOS_CDROM_H */
-
-/* EOF */
diff --git a/reactos/include/ntos/console.h b/reactos/include/ntos/console.h
deleted file mode 100644 (file)
index e9a83df..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/console.h
- * PURPOSE:      Console declarations used by all the parts of the 
- *               system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_CONSOLE_H
-#define __INCLUDE_CONSOLE_H
-
-/* GetConsoleMode */
-#define CONSOLE_INPUT_MODE_VALID  (0x0f)
-#define CONSOLE_OUTPUT_MODE_VALID (0x03)
-
-typedef struct _CONSOLE_SELECTION_INFO {
-  DWORD dwFlags;
-  COORD dwSelectionAnchor;
-  SMALL_RECT srSelection;
-} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO;
-
-#ifndef __USE_W32API
-
-typedef struct _CONSOLE_FONT_INFO {
-  DWORD nFont;
-  COORD dwFontSize;
-} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
-
-/* GetConsoleMode */
-#define ENABLE_LINE_INPUT                      (0x02)
-#define ENABLE_ECHO_INPUT                      (0x04)
-#define ENABLE_PROCESSED_INPUT         (0x01)
-#define ENABLE_WINDOW_INPUT                    (0x08)
-#define ENABLE_MOUSE_INPUT                     (0x0f)
-#define ENABLE_PROCESSED_OUTPUT                (0x01)
-#define ENABLE_WRAP_AT_EOL_OUTPUT      (0x02)
-
-typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
-  COORD      dwSize;
-  COORD      dwCursorPosition;
-  WORD       wAttributes;
-  SMALL_RECT srWindow;
-  COORD      dwMaximumWindowSize;
-} CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO ;
-
-typedef struct _CONSOLE_CURSOR_INFO {
-  DWORD  dwSize;
-  BOOL   bVisible;
-} CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO;
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_CONSOLE_H */
diff --git a/reactos/include/ntos/dbgfuncs.h b/reactos/include/ntos/dbgfuncs.h
deleted file mode 100755 (executable)
index 6086af6..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __INCLUDE_NTOS_DBGFUNCS_H
-#define __INCLUDE_NTOS_DBGFUNCS_H
-/* $Id$ */
-
-#define DBG_STATUS_CONTROL_C       1
-#define DBG_STATUS_SYSRQ           2
-#define DBG_STATUS_BUGCHECK_FIRST  3
-#define DBG_STATUS_BUGCHECK_SECOND 4
-#define DBG_STATUS_FATAL           5
-
-
-#define DBG_GET_SHOW_FACILITY 0x0001
-#define DBG_GET_SHOW_SEVERITY 0x0002
-#define DBG_GET_SHOW_ERRCODE  0x0004
-#define DBG_GET_SHOW_ERRTEXT  0x0008
-VOID DbgGetErrorText(NTSTATUS ErrorCode, PUNICODE_STRING ErrorText, ULONG Flags);
-VOID DbgPrintErrorMessage(NTSTATUS ErrorCode);
-
-#endif /* __INCLUDE_NTOS_DBGFUNCS_H */
diff --git a/reactos/include/ntos/disk.h b/reactos/include/ntos/disk.h
deleted file mode 100644 (file)
index 4d4146a..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/* $Id$
- *
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/disk.h
- * PURPOSE:      Disk related definitions used by all the parts of the system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-#ifndef __INCLUDE_DISK_H
-#define __INCLUDE_DISK_H
-
-#ifndef __USE_W32API
-
-#define IOCTL_DISK_BASE                   FILE_DEVICE_DISK
-
-#define IOCTL_DISK_GET_DRIVE_GEOMETRY     CTL_CODE(IOCTL_DISK_BASE, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_GET_PARTITION_INFO     CTL_CODE(IOCTL_DISK_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_SET_PARTITION_INFO     CTL_CODE(IOCTL_DISK_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_GET_DRIVE_LAYOUT       CTL_CODE(IOCTL_DISK_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_SET_DRIVE_LAYOUT       CTL_CODE(IOCTL_DISK_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_VERIFY                 CTL_CODE(IOCTL_DISK_BASE, 0x0005, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_FORMAT_TRACKS          CTL_CODE(IOCTL_DISK_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_REASSIGN_BLOCKS        CTL_CODE(IOCTL_DISK_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_PERFORMANCE            CTL_CODE(IOCTL_DISK_BASE, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_IS_WRITABLE            CTL_CODE(IOCTL_DISK_BASE, 0x0009, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_LOGGING                CTL_CODE(IOCTL_DISK_BASE, 0x000A, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_FORMAT_TRACKS_EX       CTL_CODE(IOCTL_DISK_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_HISTOGRAM_STRUCTURE    CTL_CODE(IOCTL_DISK_BASE, 0x000C, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_HISTOGRAM_DATA         CTL_CODE(IOCTL_DISK_BASE, 0x000D, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_HISTOGRAM_RESET        CTL_CODE(IOCTL_DISK_BASE, 0x000E, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_REQUEST_STRUCTURE      CTL_CODE(IOCTL_DISK_BASE, 0x000F, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_REQUEST_DATA           CTL_CODE(IOCTL_DISK_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_CONTRIOLLER_NUMBER     CTL_CODE(IOCTL_DISK_BASE, 0x0011, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define SMART_GET_VERSION                 CTL_CODE(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define SMART_SEND_DRIVE_COMMAND          CTL_CODE(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define SMART_RCV_DRIVE_DATA              CTL_CODE(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_INTERNAL_SET_VERIFY    CTL_CODE(IOCTL_DISK_BASE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define IOCTL_DISK_INTERNAL_CLEAR_VERIFY  CTL_CODE(IOCTL_DISK_BASE, 0x0101, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_CHECK_VERIFY           CTL_CODE(IOCTL_DISK_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_MEDIA_REMOVAL          CTL_CODE(IOCTL_DISK_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_EJECT_MEDIA            CTL_CODE(IOCTL_DISK_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_LOAD_MEDIA             CTL_CODE(IOCTL_DISK_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_RESERVE                CTL_CODE(IOCTL_DISK_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_RELEASE                CTL_CODE(IOCTL_DISK_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_FIND_NEW_DEVICES       CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_GET_MEDIA_TYPES        CTL_CODE(IOCTL_DISK_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-#define PARTITION_ENTRY_UNUSED          0x00
-#define PARTITION_FAT_12                0x01
-#define PARTITION_XENIX_1               0x02
-#define PARTITION_XENIX_2               0x03
-#define PARTITION_FAT_16                0x04
-#define PARTITION_EXTENDED              0x05
-#define PARTITION_HUGE                  0x06
-#define PARTITION_IFS                   0x07
-#define PARTITION_FAT32                 0x0B
-#define PARTITION_FAT32_XINT13          0x0C
-#define PARTITION_XINT13                0x0E
-#define PARTITION_XINT13_EXTENDED       0x0F
-#define PARTITION_PREP                  0x41
-#define PARTITION_LDM                   0x42
-#define PARTITION_UNIX                  0x63
-#define PARTITION_EXT2                  0x83
-
-#define PARTITION_NTFT                  0x80
-#define VALID_NTFT                      0xC0
-
-#if 0
-#define PTEmpty                         0x00
-#define PTDOS3xPrimary                  0x01
-#define PTXENIXRoot                     0x02
-#define PTXENIXUsr                      0x03
-#define PTOLDDOS16Bit                   0x04
-#define PTDosExtended                   0x05
-#define PTDos5xPrimary                  0x06
-#define PTIfs                           0x07   /* e.g.: HPFS, NTFS, etc */
-#define PTAIX                           0x08
-#define PTAIXBootable                   0x09
-#define PTOS2BootMgr                    0x0A
-#define PTWin95FAT32                    0x0B
-#define PTWin95FAT32LBA                 0x0C
-#define PTWin95FAT16LBA                 0x0E
-#define PTWin95ExtendedLBA              0x0F
-#define PTVenix286                      0x40
-#define PTNovell                        0x51
-#define PTMicroport                     0x52
-#define PTGnuHurd                       0x63
-#define PTNetware286                    0x64
-#define PTNetware386                    0x65
-#define PTPCIX                          0x75
-#define PTOldMinix                      0x80
-#define PTMinix                         0x81
-#define PTLinuxSwap                     0x82
-#define PTLinuxExt2                     0x83
-#define PTAmoeba                        0x93
-#define PTAmoebaBBT                     0x94
-#define PTBSD                           0xA5
-#define PTBSDIFS                        0xB7
-#define PTBSDISwap                      0xB8
-#define PTSyrinx                        0xC7
-#define PTCPM                           0xDB
-#define PTDOSAccess                     0xE1
-#define PTDOSRO                         0xE3
-#define PTDOSSecondary                  0xF2
-#define PTBBT                           0xFF
-#endif
-
-#define IsRecognizedPartition(P)  \
-    ((P) == PARTITION_FAT_12       || \
-     (P) == PARTITION_FAT_16       || \
-     (P) == PARTITION_HUGE         || \
-     (P) == PARTITION_IFS          || \
-     (P) == PARTITION_FAT32        || \
-     (P) == PARTITION_FAT32_XINT13 || \
-     (P) == PARTITION_XINT13       || \
-     (P) == PARTITION_EXT2)
-
-#define IsContainerPartition(P)  \
-    ((P) == PARTITION_EXTENDED || \
-     (P) == PARTITION_XINT13_EXTENDED)
-
-
-typedef enum _MEDIA_TYPE
-{
-  Unknown,
-  F5_1Pt2_512,
-  F3_1Pt44_512,
-  F3_2Pt88_512,
-  F3_20Pt8_512,
-  F3_720_512,
-  F5_360_512,
-  F5_320_512,
-  F5_320_1024,
-  F5_180_512,
-  F5_160_512,
-  RemovableMedia,
-  FixedMedia
-} MEDIA_TYPE;
-
-typedef struct _PARTITION_INFORMATION
-{
-  LARGE_INTEGER StartingOffset;
-  LARGE_INTEGER PartitionLength;
-  DWORD HiddenSectors;
-  DWORD PartitionNumber;
-  BYTE PartitionType;
-  BOOLEAN BootIndicator;
-  BOOLEAN RecognizedPartition;
-  BOOLEAN RewritePartition;
-} PARTITION_INFORMATION, *PPARTITION_INFORMATION;
-
-typedef struct _SET_PARTITION_INFORMATION
-{
-  ULONG PartitionType;
-} SET_PARTITION_INFORMATION, *PSET_PARTITION_INFORMATION;
-
-typedef struct _DISK_GEOMETRY
-{
-  LARGE_INTEGER Cylinders;
-  MEDIA_TYPE MediaType;
-  DWORD TracksPerCylinder;
-  DWORD SectorsPerTrack;
-  DWORD BytesPerSector;
-} DISK_GEOMETRY, *PDISK_GEOMETRY;
-
-typedef struct _DRIVE_LAYOUT_INFORMATION
-{
-  DWORD PartitionCount;
-  DWORD Signature;
-  PARTITION_INFORMATION PartitionEntry[1];
-} DRIVE_LAYOUT_INFORMATION;
-
-typedef DRIVE_LAYOUT_INFORMATION *PDRIVE_LAYOUT_INFORMATION;
-#endif
-
-#endif /* __INCLUDE_DISK_H */
-
-/* EOF */
diff --git a/reactos/include/ntos/except.h b/reactos/include/ntos/except.h
deleted file mode 100644 (file)
index 7034cb7..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/ntos/except.h
- * PURPOSE:      Exception handling structures
- * PROGRAMMER:   Casper S. Hornstrup <chorns@users.sourceforge.net>
- */
-
-#ifndef __INCLUDE_EXCEPT_H
-#define __INCLUDE_EXCEPT_H
-
-typedef enum {
-       ExceptionContinueExecution = 0,
-       ExceptionContinueSearch,
-       ExceptionNestedException,
-       ExceptionCollidedUnwind,
-       ExceptionDismiss = 0 /* assuming this is the same thing as DISPOSITION_DISMISS */
-} EXCEPTION_DISPOSITION;
-
-
-struct _EXCEPTION_RECORD;
-struct _EXCEPTION_REGISTRATION;
-
-/*
- * The type of function that is expected as an exception handler to be
- * installed with _try1.
- */
-#ifdef __GNUC__
-typedef EXCEPTION_DISPOSITION (CDECL *PEXCEPTION_HANDLER)(
-  struct _EXCEPTION_RECORD* ExceptionRecord,
-  struct _EXCEPTION_REGISTRATION* ExceptionRegistration,
-  PCONTEXT Context,
-  PVOID DispatcherContext);
-#else
-typedef EXCEPTION_DISPOSITION (CDECL *PEXCEPTION_HANDLER)(
-  struct _EXCEPTION_RECORD* ExceptionRecord,
-  struct _EXCEPTION_REGISTRATION* ExceptionRegistration,
-  PCONTEXT Context,
-  PVOID DispatcherContext);
-#endif /*__GNUC__*/
-
-#ifndef __USE_W32API
-
-#define EXCEPTION_MAXIMUM_PARAMETERS   (15)
-
-typedef struct _EXCEPTION_RECORD {
-  DWORD ExceptionCode;
-  DWORD ExceptionFlags;
-  struct _EXCEPTION_RECORD *ExceptionRecord;
-  PVOID ExceptionAddress;
-  DWORD NumberParameters;
-  DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
-} EXCEPTION_RECORD, *PEXCEPTION_RECORD, *LPEXCEPTION_RECORD;
-
-#endif /* !__USE_W32API */
-
-/* ExceptionFlags */
-#ifndef _GNU_H_WINDOWS32_DEFINES
-#ifdef __NTOSKRNL__
-#ifndef EXCEPTION_NONCONTINUABLE
-#define        EXCEPTION_NONCONTINUABLE        0x01
-#endif
-#endif /* __NTOSKRNL__ */
-#endif /* _GNU_H_WINDOWS32_DEFINES */
-#define        EXCEPTION_UNWINDING       0x02
-#define        EXCEPTION_EXIT_UNWIND             0x04
-#define        EXCEPTION_STACK_INVALID   0x08
-#define        EXCEPTION_NESTED_CALL             0x10
-
-
-typedef struct _EXCEPTION_REGISTRATION
-{
-       struct _EXCEPTION_REGISTRATION* prev;
-       PEXCEPTION_HANDLER              handler;
-} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
-
-typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
-typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
-
-
-/*
- * A macro which installs the supplied exception handler.
- * Push the pointer to the new handler onto the stack,
- * then push the pointer to the old registration structure (at fs:0)
- * onto the stack, then put a pointer to the new registration
- * structure (i.e. the current stack pointer) at fs:0.
- */
-#define __try1(pHandler) \
-       __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
-
-
-/*
- * A macro which (dispite its name) *removes* an installed
- * exception handler. Should be used only in conjunction with the above
- * install routine __try1.
- * Move the pointer to the old reg. struct (at the current stack
- * position) to fs:0, replacing the pointer we installed above,
- * then add 8 to the stack pointer to get rid of the space we
- * used when we pushed on our new reg. struct above. Notice that
- * the stack must be in the exact state at this point that it was
- * after we did _try1 or this will smash things.
- */
-#define        __except1       \
-       __asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
-        : : : "%eax");
-
-
-#if 1
-
-/* Runtime DLL structures */
-
-#ifndef _GNU_H_WINDOWS32_DEFINES
-#ifdef __NTOSKRNL__
-#define EXCEPTION_EXECUTE_HANDLER     1
-#define EXCEPTION_CONTINUE_SEARCH     0
-/* #define EXCEPTION_CONTINUE_EXECUTION -1 */
-#endif /* __NTOSKRNL__ */
-#endif /* _GNU_H_WINDOWS32_DEFINES */
-
-/* Functions of the following prototype return one of the above constants */
-#ifdef __GNUC__
-typedef DWORD CDECL (*PSCOPE_EXCEPTION_FILTER)(VOID);
-typedef VOID CDECL (*PSCOPE_EXCEPTION_HANDLER)(VOID);
-#else
-typedef DWORD (CDECL *PSCOPE_EXCEPTION_FILTER)(VOID);
-typedef VOID (CDECL *PSCOPE_EXCEPTION_HANDLER)(VOID);
-#endif /*__GNUC__*/
-
-typedef struct _SCOPETABLE_ENTRY
-{
-  DWORD                    PreviousTryLevel;
-  PSCOPE_EXCEPTION_FILTER  FilterRoutine;
-  PSCOPE_EXCEPTION_HANDLER HandlerRoutine;
-} SCOPETABLE_ENTRY, *PSCOPETABLE_ENTRY;
-
-/*
-   Other structures preceeding this structure:
-     ULONG_PTR              StandardESPInFrame;
-     LPEXCEPTION_POINTERS   ExceptionPointers;
- */
-typedef struct _RTL_EXCEPTION_REGISTRATION_I386
-{
-  EXCEPTION_REGISTRATION OS;
-  PSCOPETABLE_ENTRY ScopeTable;
-  DWORD             TryLevel;
-  /* Value of EBP before the EXCEPTION_REGISTRATION was created */
-  ULONG_PTR         Ebp;
-} RTL_EXCEPTION_REGISTRATION_I386, *PRTL_EXCEPTION_REGISTRATION_I386;
-
-#define TRYLEVEL_NONE -1
-
-typedef RTL_EXCEPTION_REGISTRATION_I386 RTL_EXCEPTION_REGISTRATION;
-typedef PRTL_EXCEPTION_REGISTRATION_I386 PRTL_EXCEPTION_REGISTRATION;
-
-#endif
-
-#ifndef __USE_W32API
-
-#define EXCEPTION_MAXIMUM_PARAMETERS   (15)
-
-typedef struct _EXCEPTION_POINTERS { 
-  PEXCEPTION_RECORD ExceptionRecord; 
-  PCONTEXT ContextRecord; 
-} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS, *LPEXCEPTION_POINTERS; 
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_EXCEPT_H */
diff --git a/reactos/include/ntos/file.h b/reactos/include/ntos/file.h
deleted file mode 100644 (file)
index 9349f1d..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/ps.h
- * PURPOSE:      Filesystem declarations used by all the parts of the 
- *               system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_FILE_H
-#define __INCLUDE_FILE_H
-
-#ifndef __USE_W32API
-
-#define FILE_READ_DATA            ( 0x0001 )    /* file & pipe */
-#define FILE_LIST_DIRECTORY       ( 0x0001 )    /* directory */
-
-#define FILE_WRITE_DATA           ( 0x0002 )    /* file & pipe */
-#define FILE_ADD_FILE             ( 0x0002 )    /* directory */
-
-#define FILE_APPEND_DATA          ( 0x0004 )    /* file */
-#define FILE_ADD_SUBDIRECTORY     ( 0x0004 )    /* directory */
-#define FILE_CREATE_PIPE_INSTANCE ( 0x0004 )    /* named pipe */
-
-#define FILE_READ_EA              ( 0x0008 )    /* file & directory */
-#define FILE_READ_PROPERTIES      FILE_READ_EA
-
-#define FILE_WRITE_EA             ( 0x0010 )    /* file & directory */
-#define FILE_WRITE_PROPERTIES     FILE_WRITE_EA
-
-#define FILE_EXECUTE              ( 0x0020 )    /* file */
-#define FILE_TRAVERSE             ( 0x0020 )    /* directory */
-
-#define FILE_DELETE_CHILD         ( 0x0040 )    /* directory */
-
-#define FILE_READ_ATTRIBUTES      ( 0x0080 )    /* all */
-
-#define FILE_WRITE_ATTRIBUTES     ( 0x0100 )    /* all */
-
-#define FILE_SHARE_DELETE      (4)
-#define FILE_SHARE_READ        (1)
-#define FILE_SHARE_WRITE       (2)
-#define CONSOLE_TEXTMODE_BUFFER        (1)
-#define CREATE_NEW     (1)
-#define CREATE_ALWAYS  (2)
-#define OPEN_EXISTING  (3)
-#define OPEN_ALWAYS    (4)
-#define TRUNCATE_EXISTING      (5)
-#define FILE_ATTRIBUTE_ARCHIVE (32)
-#define FILE_ATTRIBUTE_COMPRESSED      (2048)
-#define FILE_ATTRIBUTE_DEVICE   (64)
-#define FILE_ATTRIBUTE_NORMAL  (128)
-#define FILE_ATTRIBUTE_DIRECTORY       (16)
-#define FILE_ATTRIBUTE_ENCRYPTED (16384)
-#define FILE_ATTRIBUTE_HIDDEN  (2)
-#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED (8192)
-#define FILE_ATTRIBUTE_OFFLINE  (4096)
-#define FILE_ATTRIBUTE_READONLY        (1)
-#define FILE_ATTRIBUTE_REPARSE_POINT (1024)
-#define FILE_ATTRIBUTE_SPARSE_FILE (512)
-#define FILE_ATTRIBUTE_SYSTEM  (4)
-#define FILE_ATTRIBUTE_TEMPORARY       (256)
-#define FILE_ATTRIBUTE_VALID_FLAGS     (0x00007fb7)
-#define FILE_ATTRIBUTE_VALID_SET_FLAGS (0x000031a7)
-#define FILE_FLAG_WRITE_THROUGH                (0x80000000)
-#define FILE_FLAG_OVERLAPPED           (0x40000000)
-#define FILE_FLAG_NO_BUFFERING         (0x20000000)
-#define FILE_FLAG_RANDOM_ACCESS                (0x10000000)
-#define FILE_FLAG_SEQUENTIAL_SCAN      (0x08000000)
-#define FILE_FLAG_DELETE_ON_CLOSE      (0x04000000)
-#define FILE_FLAG_BACKUP_SEMANTICS     (0x02000000)
-#define FILE_FLAG_POSIX_SEMANTICS      (0x01000000)
-
-/* GetVolumeInformation */
-#define FS_CASE_IS_PRESERVED   (2)
-#define FS_CASE_SENSITIVE      (1)
-#define FS_UNICODE_STORED_ON_DISK      (4)
-#define FS_PERSISTENT_ACLS     (8)
-#define FS_FILE_COMPRESSION    (16)
-#define FS_VOL_IS_COMPRESSED   (32768)
-
-/* NtQueryVolumeInformationFile */
-#define FILE_CASE_SENSITIVE_SEARCH     (0x00000001)
-#define FILE_CASE_PRESERVED_NAMES      (0x00000002)
-#define FILE_UNICODE_ON_DISK           (0x00000004)
-#define FILE_PERSISTENT_ACLS           (0x00000008)
-#define FILE_FILE_COMPRESSION          (0x00000010)
-#define FILE_VOLUME_IS_COMPRESSED      (0x00008000)
-
-#define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
-
-#define FILE_GENERIC_READ         (STANDARD_RIGHTS_READ     |\
-                                   FILE_READ_DATA           |\
-                                   FILE_READ_ATTRIBUTES     |\
-                                   FILE_READ_EA             |\
-                                   SYNCHRONIZE)
-
-
-#define FILE_GENERIC_WRITE        (STANDARD_RIGHTS_WRITE    |\
-                                   FILE_WRITE_DATA          |\
-                                   FILE_WRITE_ATTRIBUTES    |\
-                                   FILE_WRITE_EA            |\
-                                   FILE_APPEND_DATA         |\
-                                   SYNCHRONIZE)
-
-#define FILE_GENERIC_EXECUTE      (STANDARD_RIGHTS_EXECUTE  |\
-                                   FILE_READ_ATTRIBUTES     |\
-                                   FILE_EXECUTE             |\
-                                   SYNCHRONIZE)
-
-#endif /* !__USE_W32API */
-
-
-#endif /* __INCLUDE_FILE_H */
diff --git a/reactos/include/ntos/fstypes.h b/reactos/include/ntos/fstypes.h
deleted file mode 100644 (file)
index 08e48d1..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef __INCLUDE_NTOS_FSTYPES_H
-#define __INCLUDE_NTOS_FSTYPES_H
-
-#define FSRTL_TAG      TAG('F','S','r','t')
-
-
-typedef ULONG LBN;
-typedef LBN *PLBN;
-
-typedef ULONG VBN;
-typedef VBN *PVBN;
-
-#ifndef __USE_W32API
-typedef struct _LARGE_MCB
-{
-  PFAST_MUTEX FastMutex;
-  ULONG MaximumPairCount;
-  ULONG PairCount;
-  POOL_TYPE PoolType;
-  PVOID Mapping;
-} LARGE_MCB, *PLARGE_MCB;
-
-typedef struct _MCB {
-    LARGE_MCB LargeMcb;
-} MCB, *PMCB;
-#endif
-
-typedef struct _MAILSLOT_CREATE_PARAMETERS 
-{
-    ULONG           MailslotQuota;
-    ULONG           MaximumMessageSize;
-    LARGE_INTEGER   ReadTimeout;
-    BOOLEAN         TimeoutSpecified;
-} MAILSLOT_CREATE_PARAMETERS, *PMAILSLOT_CREATE_PARAMETERS;
-
-typedef struct _NAMED_PIPE_CREATE_PARAMETERS 
-{
-    ULONG           NamedPipeType;
-    ULONG           ReadMode;
-    ULONG           CompletionMode;
-    ULONG           MaximumInstances;
-    ULONG           InboundQuota;
-    ULONG           OutboundQuota;
-    LARGE_INTEGER   DefaultTimeout;
-    BOOLEAN         TimeoutSpecified;
-} NAMED_PIPE_CREATE_PARAMETERS, *PNAMED_PIPE_CREATE_PARAMETERS;
-
-#endif  /* __INCLUDE_DDK_FSTYPES_H */
diff --git a/reactos/include/ntos/gditypes.h b/reactos/include/ntos/gditypes.h
deleted file mode 100644 (file)
index 10ae3f8..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * COPYRIGHT:      See COPYING in the top level directory
- * PROJECT:        ReactOS kernel
- * FILE:           include/ntos/gditypes.h
- * PURPOSE:        Common GDI definitions
- * PROGRAMMER:     Eric Kohl <ekohl@rz-online.de>
- * UPDATE HISTORY:
- *                 25/06/2001: Created
-*/
-
-#ifndef __INCLUDE_NTOS_GDITYPES_H
-#define __INCLUDE_NTOS_GDITYPES_H
-
-#ifndef __USE_W32API
-
-#define CCHDEVICENAME  (32)
-#define CCHFORMNAME    (32)
-
-typedef struct _devicemodeA
-{
-       BYTE dmDeviceName[CCHDEVICENAME];
-       WORD dmSpecVersion;
-       WORD dmDriverVersion;
-       WORD dmSize;
-       WORD dmDriverExtra;
-       DWORD dmFields;
-       union
-       {
-               struct
-               {
-                       short dmOrientation;
-                       short dmPaperSize;
-                       short dmPaperLength;
-                       short dmPaperWidth;
-               };
-               struct
-               {
-                       LONG x;
-                       LONG y;
-               } dmPosition;
-       };
-       short dmScale;
-       short dmCopies;
-       short dmDefaultSource;
-       short dmPrintQuality;
-       short dmColor;
-       short dmDuplex;
-       short dmYResolution;
-       short dmTTOption;
-       short dmCollate;
-       BYTE dmFormName[CCHFORMNAME];
-       WORD dmLogPixels;
-       DWORD dmBitsPerPel;
-       DWORD dmPelsWidth;
-       DWORD dmPelsHeight;
-       union
-       {
-               DWORD dmDisplayFlags;
-               DWORD dmNup;
-       };
-       DWORD dmDisplayFrequency;
-       DWORD dmICMMethod;
-       DWORD dmICMIntent;
-       DWORD dmMediaType;
-       DWORD dmDitherType;
-       union
-       {
-               DWORD dmICCManufacturer;
-               DWORD dmReserved1;
-       };
-       union
-       {
-               DWORD dmICCModel;
-               DWORD dmReserved2;
-       };
-       DWORD dmPanningWidth;
-       DWORD dmPanningHeight;
-} DEVMODEA,*LPDEVMODEA,*PDEVMODEA;
-
-typedef struct _devicemodeW
-{
-       WCHAR dmDeviceName[CCHDEVICENAME];
-       WORD dmSpecVersion;
-       WORD dmDriverVersion;
-       WORD dmSize;
-       WORD dmDriverExtra;
-       DWORD dmFields;
-       union
-       {
-               struct
-               {
-                       short dmOrientation;
-                       short dmPaperSize;
-                       short dmPaperLength;
-                       short dmPaperWidth;
-               };
-               struct
-               {
-                       LONG x;
-                       LONG y;
-               } dmPosition;
-       };
-       short dmScale;
-       short dmCopies;
-       short dmDefaultSource;
-       short dmPrintQuality;
-       short dmColor;
-       short dmDuplex;
-       short dmYResolution;
-       short dmTTOption;
-       short dmCollate;
-       WCHAR dmFormName[CCHFORMNAME];
-       WORD dmLogPixels;
-       DWORD dmBitsPerPel;
-       DWORD dmPelsWidth;
-       DWORD dmPelsHeight;
-       union
-       {
-               DWORD dmDisplayFlags;
-               DWORD dmNup;
-       };
-       DWORD dmDisplayFrequency;
-       DWORD dmICMMethod;
-       DWORD dmICMIntent;
-       DWORD dmMediaType;
-       DWORD dmDitherType;
-       union
-       {
-               DWORD dmICCManufacturer;
-               DWORD dmReserved1;
-       };
-       union
-       {
-               DWORD dmICCModel;
-               DWORD dmReserved2;
-       };
-       DWORD dmPanningWidth;
-       DWORD dmPanningHeight;
-} DEVMODEW,*LPDEVMODEW,*PDEVMODEW;
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_NTOS_GDITYPES_H */
-
-/* EOF */
diff --git a/reactos/include/ntos/halfuncs.h b/reactos/include/ntos/halfuncs.h
deleted file mode 100755 (executable)
index 889b73a..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-#ifndef __INCLUDE_NTOS_HALFUNCS_H
-#define __INCLUDE_NTOS_HALFUNCS_H
-
-#include <ntos/haltypes.h>
-
-NTSTATUS STDCALL
-HalAdjustResourceList(PCM_RESOURCE_LIST        Resources);
-
-BOOLEAN STDCALL
-HalAllProcessorsStarted(VOID);
-
-VOID
-STDCALL
-HalDisplayString (
-    IN PCHAR String
-);
-
-BOOLEAN STDCALL
-HalBeginSystemInterrupt(ULONG Vector,
-  KIRQL Irql,
-  PKIRQL OldIrql);
-
-VOID STDCALL
-HalCalibratePerformanceCounter(ULONG Count);
-
-BOOLEAN STDCALL
-HalDisableSystemInterrupt(ULONG Vector,
-  KIRQL Irql);
-
-VOID STDCALL
-HalDisplayString(IN PCH String);
-
-BOOLEAN STDCALL
-HalEnableSystemInterrupt(ULONG Vector,
-  KIRQL Irql,
-  KINTERRUPT_MODE InterruptMode);
-
-VOID STDCALL
-HalEndSystemInterrupt(KIRQL Irql,
-  ULONG Unknown2);
-
-BOOLEAN STDCALL
-HalFlushCommonBuffer(ULONG Unknown1,
-                    ULONG Unknown2,
-                    ULONG Unknown3,
-                    ULONG Unknown4,
-                    ULONG Unknown5,
-                    ULONG Unknown6,
-                    ULONG Unknown7,
-                    ULONG Unknown8);
-
-BOOLEAN STDCALL
-HalGetEnvironmentVariable(IN PCH Name,
-                         OUT PCH Value,
-                         IN USHORT ValueLength);
-
-VOID STDCALL
-HalInitializeProcessor(ULONG ProcessorNumber,
-  PVOID ProcessorStack);
-
-BOOLEAN STDCALL
-HalInitSystem(ULONG BootPhase,
-  PLOADER_PARAMETER_BLOCK LoaderBlock);
-
-VOID STDCALL
-HalQueryDisplayParameters(PULONG DispSizeX,
-                         PULONG DispSizeY,
-                         PULONG CursorPosX,
-                         PULONG CursorPosY);
-
-VOID STDCALL
-HalQueryRealTimeClock(PTIME_FIELDS Time);
-
-VOID STDCALL
-HalReportResourceUsage(VOID);
-
-VOID STDCALL
-HalRequestIpi(ULONG Unknown);
-
-VOID STDCALL
-HalSetDisplayParameters(ULONG CursorPosX,
-                       ULONG CursorPosY);
-
-BOOLEAN STDCALL
-HalSetEnvironmentVariable(IN PCH Name,
-                         IN PCH Value);
-
-ULONG FASTCALL
-HalSystemVectorDispatchEntry(ULONG Unknown1,
-                            ULONG Unknown2,
-                            ULONG Unknown3);
-
-BOOLEAN STDCALL
-HalStartNextProcessor(ULONG Unknown1,
-                     ULONG Unknown2);
-
-VOID
-STDCALL
-IoAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
-  IN  PSTRING NtDeviceName,
-  OUT PUCHAR NtSystemPath,
-  OUT PSTRING NtSystemPathString);
-
-KIRQL
-STDCALL
-KeRaiseIrqlToSynchLevel(VOID);
-
-VOID STDCALL
-HalReturnToFirmware(ULONG Action);
-
-VOID FASTCALL
-HalRequestSoftwareInterrupt(KIRQL SoftwareInterruptRequested);
-
-/*
- * Kernel debugger support functions
- */
-
-BOOLEAN STDCALL
-KdPortInitialize(PKD_PORT_INFORMATION PortInformation,
-                DWORD Unknown1,
-                DWORD Unknown2);
-
-BOOLEAN STDCALL
-KdPortGetByte(PUCHAR ByteRecieved);
-
-BOOLEAN STDCALL
-KdPortPollByte(PUCHAR ByteRecieved);
-
-VOID STDCALL
-KdPortPutByte(UCHAR ByteToSend);
-
-/* Non-standard functions */
-VOID STDCALL
-HalReleaseDisplayOwnership();
-
-BOOLEAN STDCALL
-HalQueryDisplayOwnership();
-
-#endif /* __INCLUDE_NTOS_HALDDK_H */
-
-/* EOF */
diff --git a/reactos/include/ntos/haltypes.h b/reactos/include/ntos/haltypes.h
deleted file mode 100755 (executable)
index 10c8e55..0000000
+++ /dev/null
@@ -1,685 +0,0 @@
-/* $Id$
- *
- * COPYRIGHT:                See COPYING in the top level directory
- * PROJECT:                  ReactOS kernel
- * FILE:                     include/ddk/haltypes.h
- * PURPOSE:                  HAL provided defintions for device drivers
- * PROGRAMMER:               David Welch (welch@mcmail.com)
- * REVISION HISTORY:
- *              23/06/98:   Taken from linux system.h
- */
-
-
-#ifndef __INCLUDE_NTOS_HALTYPES_H
-#define __INCLUDE_NTOS_HALTYPES_H
-
-#ifndef STDCALL_FUNC
-#define STDCALL_FUNC(a)  (STDCALL a)
-#endif
-#ifndef FASTCALL_FUNC
-#define FASTCALL_FUNC(a) (FASTCALL a)
-#endif
-
-#include "types.h"
-
-
-/* HalReturnToFirmware */
-typedef enum _FIRMWARE_ENTRY
-{
-  HalHaltRoutine,
-  HalPowerDownRoutine,
-  HalRestartRoutine,
-  HalRebootRoutine,
-  HalInteractiveModeRoutine,
-  HalMaximumRoutine
-} FIRMWARE_REENTRY, *PFIRMWARE_REENTRY;
-
-#ifndef __USE_W32API
-
-enum
-{
-   DEVICE_DESCRIPTION_VERSION,
-   DEVICE_DESCRIPTION_VERSION1,
-};
-
-/*
- * DMA speed specifiers
- */
-typedef enum _DMA_SPEED
-{
-  Compatible,
-  TypeA,
-  TypeB,
-  TypeC,
-  TypeF,
-  MaximumDmaSpeed
-} DMA_SPEED, *PDMA_SPEED;
-
-/*
- * DMA width specifiers
- */
-typedef enum _DMA_WIDTH
-{
-  Width8Bits,
-  Width16Bits,
-  Width32Bits,
-  MaximumDmaWidth
-} DMA_WIDTH, *PDMA_WIDTH;
-
-/*
- * PURPOSE: Types for HalGetBusData
- */
-typedef enum _BUS_DATA_TYPE
-{
-   ConfigurationSpaceUndefined = -1,
-   Cmos,
-   EisaConfiguration,
-   Pos,
-   CbusConfiguration,
-   PCIConfiguration,
-   VMEConfiguration,
-   NuBusConfiguration,
-   PCMCIAConfiguration,
-   MPIConfiguration,
-   MPSAConfiguration,
-   PNPISAConfiguration,
-   MaximumBusDataType,
-} BUS_DATA_TYPE, *PBUS_DATA_TYPE;
-
-typedef struct _DEVICE_DESCRIPTION
-{
-  ULONG Version;
-  BOOLEAN Master;
-  BOOLEAN ScatterGather;
-  BOOLEAN DemandMode;
-  BOOLEAN AutoInitialize;
-  BOOLEAN Dma32BitAddresses;
-  BOOLEAN IgnoreCount;
-  BOOLEAN Reserved1;        /* Must be false */
-  BOOLEAN Dma64BitAddresses;
-  ULONG BusNumber;
-  ULONG DmaChannel;
-  INTERFACE_TYPE InterfaceType;
-  DMA_WIDTH DmaWidth;
-  DMA_SPEED DmaSpeed;
-  ULONG MaximumLength;
-  ULONG DmaPort;
-} DEVICE_DESCRIPTION, *PDEVICE_DESCRIPTION;
-
-
-/* PCI bus definitions */
-
-#define PCI_TYPE0_ADDRESSES    6
-#define PCI_TYPE1_ADDRESSES    2
-#define PCI_TYPE2_ADDRESSES    5
-
-typedef struct _PCI_COMMON_CONFIG
-{
-  USHORT VendorID;             /* read-only */
-  USHORT DeviceID;             /* read-only */
-  USHORT Command;
-  USHORT Status;
-  UCHAR  RevisionID;           /* read-only */
-  UCHAR  ProgIf;               /* read-only */
-  UCHAR  SubClass;             /* read-only */
-  UCHAR  BaseClass;            /* read-only */
-  UCHAR  CacheLineSize;                /* read-only */
-  UCHAR  LatencyTimer;         /* read-only */
-  UCHAR  HeaderType;           /* read-only */
-  UCHAR  BIST;
-  union
-    {
-      struct _PCI_HEADER_TYPE_0
-       {
-         ULONG  BaseAddresses[PCI_TYPE0_ADDRESSES];
-         ULONG  CIS;
-         USHORT SubVendorID;
-         USHORT SubSystemID;
-         ULONG  ROMBaseAddress;
-         ULONG  Reserved2[2];
-
-         UCHAR  InterruptLine;
-         UCHAR  InterruptPin;          /* read-only */
-         UCHAR  MinimumGrant;          /* read-only */
-         UCHAR  MaximumLatency;        /* read-only */
-       } type0;
-
-      /* PCI to PCI Bridge */
-      struct _PCI_HEADER_TYPE_1
-       {
-         ULONG  BaseAddresses[PCI_TYPE1_ADDRESSES];
-         UCHAR  PrimaryBus;
-         UCHAR  SecondaryBus;
-         UCHAR  SubordinateBus;
-         UCHAR  SecondaryLatency;
-         UCHAR  IOBase;
-         UCHAR  IOLimit;
-         USHORT SecondaryStatus;
-         USHORT MemoryBase;
-         USHORT MemoryLimit;
-         USHORT PrefetchBase;
-         USHORT PrefetchLimit;
-         ULONG  PrefetchBaseUpper32;
-         ULONG  PrefetchLimitUpper32;
-         USHORT IOBaseUpper16;
-         USHORT IOLimitUpper16;
-         UCHAR  CapabilitiesPtr;
-         UCHAR  Reserved1[3];
-         ULONG  ROMBaseAddress;
-         UCHAR  InterruptLine;
-         UCHAR  InterruptPin;
-         USHORT BridgeControl;
-       } type1;
-
-      /* PCI to CARDBUS Bridge */
-      struct _PCI_HEADER_TYPE_2
-       {
-         ULONG  SocketRegistersBaseAddress;
-         UCHAR  CapabilitiesPtr;
-         UCHAR  Reserved;
-         USHORT SecondaryStatus;
-         UCHAR  PrimaryBus;
-         UCHAR  SecondaryBus;
-         UCHAR  SubordinateBus;
-         UCHAR  SecondaryLatency;
-         struct
-           {
-             ULONG Base;
-             ULONG Limit;
-           } Range[PCI_TYPE2_ADDRESSES-1];
-         UCHAR  InterruptLine;
-         UCHAR  InterruptPin;
-         USHORT BridgeControl;
-       } type2;
-    } u;
-  UCHAR DeviceSpecific[192];
-} PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG;
-
-#define PCI_COMMON_HDR_LENGTH (FIELD_OFFSET (PCI_COMMON_CONFIG, DeviceSpecific))
-
-#define PCI_MAX_DEVICES                     32
-#define PCI_MAX_FUNCTION                    8
-#define PCI_MAX_BRIDGE_NUMBER               0xFF
-
-#define PCI_INVALID_VENDORID                0xFFFF
-
-/* Bit encodings for PCI_COMMON_CONFIG.HeaderType */
-
-#define PCI_MULTIFUNCTION                   0x80
-#define PCI_DEVICE_TYPE                     0x00
-#define PCI_BRIDGE_TYPE                     0x01
-#define PCI_CARDBUS_BRIDGE_TYPE             0x02
-
-#define PCI_CONFIGURATION_TYPE(PciData) \
-       (((PPCI_COMMON_CONFIG)(PciData))->HeaderType & ~PCI_MULTIFUNCTION)
-
-#define PCI_MULTIFUNCTION_DEVICE(PciData) \
-       ((((PPCI_COMMON_CONFIG)(PciData))->HeaderType & PCI_MULTIFUNCTION) != 0)
-
-
-/* Bit encodings for PCI_COMMON_CONFIG.Command */
-
-#define PCI_ENABLE_IO_SPACE                 0x0001
-#define PCI_ENABLE_MEMORY_SPACE             0x0002
-#define PCI_ENABLE_BUS_MASTER               0x0004
-#define PCI_ENABLE_SPECIAL_CYCLES           0x0008
-#define PCI_ENABLE_WRITE_AND_INVALIDATE     0x0010
-#define PCI_ENABLE_VGA_COMPATIBLE_PALETTE   0x0020
-#define PCI_ENABLE_PARITY                   0x0040
-#define PCI_ENABLE_WAIT_CYCLE               0x0080
-#define PCI_ENABLE_SERR                     0x0100
-#define PCI_ENABLE_FAST_BACK_TO_BACK        0x0200
-
-
-/* Bit encodings for PCI_COMMON_CONFIG.Status */
-
-#define PCI_STATUS_FAST_BACK_TO_BACK        0x0080
-#define PCI_STATUS_DATA_PARITY_DETECTED     0x0100
-#define PCI_STATUS_DEVSEL                   0x0600  /* 2 bits wide */
-#define PCI_STATUS_SIGNALED_TARGET_ABORT    0x0800
-#define PCI_STATUS_RECEIVED_TARGET_ABORT    0x1000
-#define PCI_STATUS_RECEIVED_MASTER_ABORT    0x2000
-#define PCI_STATUS_SIGNALED_SYSTEM_ERROR    0x4000
-#define PCI_STATUS_DETECTED_PARITY_ERROR    0x8000
-
-
-/* PCI device classes */
-
-#define PCI_CLASS_PRE_20                    0x00
-#define PCI_CLASS_MASS_STORAGE_CTLR         0x01
-#define PCI_CLASS_NETWORK_CTLR              0x02
-#define PCI_CLASS_DISPLAY_CTLR              0x03
-#define PCI_CLASS_MULTIMEDIA_DEV            0x04
-#define PCI_CLASS_MEMORY_CTLR               0x05
-#define PCI_CLASS_BRIDGE_DEV                0x06
-#define PCI_CLASS_SIMPLE_COMMS_CTLR         0x07
-#define PCI_CLASS_BASE_SYSTEM_DEV           0x08
-#define PCI_CLASS_INPUT_DEV                 0x09
-#define PCI_CLASS_DOCKING_STATION           0x0a
-#define PCI_CLASS_PROCESSOR                 0x0b
-#define PCI_CLASS_SERIAL_BUS_CTLR           0x0c
-
-
-/* PCI device subclasses for class 0 */
-
-#define PCI_SUBCLASS_PRE_20_NON_VGA         0x00
-#define PCI_SUBCLASS_PRE_20_VGA             0x01
-
-
-/* PCI device subclasses for class 1 (mass storage controllers)*/
-
-#define PCI_SUBCLASS_MSC_SCSI_BUS_CTLR      0x00
-#define PCI_SUBCLASS_MSC_IDE_CTLR           0x01
-#define PCI_SUBCLASS_MSC_FLOPPY_CTLR        0x02
-#define PCI_SUBCLASS_MSC_IPI_CTLR           0x03
-#define PCI_SUBCLASS_MSC_RAID_CTLR          0x04
-#define PCI_SUBCLASS_MSC_OTHER              0x80
-
-
-/* PCI device subclasses for class 2 (network controllers)*/
-
-#define PCI_SUBCLASS_NET_ETHERNET_CTLR      0x00
-#define PCI_SUBCLASS_NET_TOKEN_RING_CTLR    0x01
-#define PCI_SUBCLASS_NET_FDDI_CTLR          0x02
-#define PCI_SUBCLASS_NET_ATM_CTLR           0x03
-#define PCI_SUBCLASS_NET_OTHER              0x80
-
-
-/* PCI device subclasses for class 3 (display controllers)*/
-
-#define PCI_SUBCLASS_VID_VGA_CTLR           0x00
-#define PCI_SUBCLASS_VID_XGA_CTLR           0x01
-#define PCI_SUBLCASS_VID_3D_CTLR            0x02
-#define PCI_SUBCLASS_VID_OTHER              0x80
-
-
-/* PCI device subclasses for class 4 (multimedia device)*/
-
-#define PCI_SUBCLASS_MM_VIDEO_DEV           0x00
-#define PCI_SUBCLASS_MM_AUDIO_DEV           0x01
-#define PCI_SUBCLASS_MM_TELEPHONY_DEV       0x02
-#define PCI_SUBCLASS_MM_OTHER               0x80
-
-
-/* PCI device subclasses for class 5 (memory controller)*/
-
-#define PCI_SUBCLASS_MEM_RAM                0x00
-#define PCI_SUBCLASS_MEM_FLASH              0x01
-#define PCI_SUBCLASS_MEM_OTHER              0x80
-
-
-/* PCI device subclasses for class 6 (bridge device)*/
-
-#define PCI_SUBCLASS_BR_HOST                0x00
-#define PCI_SUBCLASS_BR_ISA                 0x01
-#define PCI_SUBCLASS_BR_EISA                0x02
-#define PCI_SUBCLASS_BR_MCA                 0x03
-#define PCI_SUBCLASS_BR_PCI_TO_PCI          0x04
-#define PCI_SUBCLASS_BR_PCMCIA              0x05
-#define PCI_SUBCLASS_BR_NUBUS               0x06
-#define PCI_SUBCLASS_BR_CARDBUS             0x07
-#define PCI_SUBCLASS_BR_OTHER               0x80
-
-
-/* PCI device subclasses for class C (serial bus controller)*/
-
-#define PCI_SUBCLASS_SB_IEEE1394            0x00
-#define PCI_SUBCLASS_SB_ACCESS              0x01
-#define PCI_SUBCLASS_SB_SSA                 0x02
-#define PCI_SUBCLASS_SB_USB                 0x03
-#define PCI_SUBCLASS_SB_FIBRE_CHANNEL       0x04
-
-
-/* Bit encodes for PCI_COMMON_CONFIG.u.type0.BaseAddresses */
-
-#define PCI_ADDRESS_IO_SPACE                0x00000001
-#define PCI_ADDRESS_MEMORY_TYPE_MASK        0x00000006
-#define PCI_ADDRESS_MEMORY_PREFETCHABLE     0x00000008
-
-#define PCI_ADDRESS_IO_ADDRESS_MASK         0xfffffffc
-#define PCI_ADDRESS_MEMORY_ADDRESS_MASK     0xfffffff0
-#define PCI_ADDRESS_ROM_ADDRESS_MASK        0xfffff800
-
-#define PCI_TYPE_32BIT      0
-#define PCI_TYPE_20BIT      2
-#define PCI_TYPE_64BIT      4
-
-
-/* Bit encodes for PCI_COMMON_CONFIG.u.type0.ROMBaseAddresses */
-
-#define PCI_ROMADDRESS_ENABLED              0x00000001
-
-
-
-typedef struct _PCI_SLOT_NUMBER
-{
-  union
-    {
-      struct
-       {
-         ULONG DeviceNumber:5;
-         ULONG FunctionNumber:3;
-         ULONG Reserved:24;
-       } bits;
-      ULONG AsULONG;
-    } u;
-} PCI_SLOT_NUMBER, *PPCI_SLOT_NUMBER;
-
-typedef enum _RESOURCE_TRANSLATION_DIRECTION {
-    TranslateChildToParent,
-    TranslateParentToChild
-} RESOURCE_TRANSLATION_DIRECTION;
-
-typedef NTSTATUS STDCALL_FUNC
-(*PTRANSLATE_RESOURCE_HANDLER)(IN PVOID Context,
-    IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Source,
-    IN RESOURCE_TRANSLATION_DIRECTION Direction,
-    IN ULONG AlternativesCount, OPTIONAL
-    IN IO_RESOURCE_DESCRIPTOR Alternatives[], OPTIONAL
-    IN PDEVICE_OBJECT PhysicalDeviceObject,
-    OUT PCM_PARTIAL_RESOURCE_DESCRIPTOR Target
-);
-
-typedef NTSTATUS STDCALL_FUNC
-(*PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER)(IN PVOID Context,
-    IN PIO_RESOURCE_DESCRIPTOR Source,
-    IN PDEVICE_OBJECT PhysicalDeviceObject,
-    OUT PULONG TargetCount,
-    OUT PIO_RESOURCE_DESCRIPTOR *Target);
-
-typedef struct _TRANSLATOR_INTERFACE {
-    USHORT Size;
-    USHORT Version;
-    PVOID Context;
-    PINTERFACE_REFERENCE InterfaceReference;
-    PINTERFACE_DEREFERENCE InterfaceDereference;
-    PTRANSLATE_RESOURCE_HANDLER TranslateResources;
-    PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER TranslateResourceRequirements;
-} TRANSLATOR_INTERFACE, *PTRANSLATOR_INTERFACE;
-
-
-/* Hal dispatch table */
-
-typedef enum _HAL_QUERY_INFORMATION_CLASS
-{
-  HalInstalledBusInformation,
-  HalProfileSourceInformation,
-  HalSystemDockInformation,
-  HalPowerInformation,
-  HalProcessorSpeedInformation,
-  HalCallbackInformation,
-  HalMapRegisterInformation,
-  HalMcaLogInformation,
-  HalFrameBufferCachingInformation,
-  HalDisplayBiosInformation
-  /* information levels >= 0x8000000 reserved for OEM use */
-} HAL_QUERY_INFORMATION_CLASS, *PHAL_QUERY_INFORMATION_CLASS;
-
-
-typedef enum _HAL_SET_INFORMATION_CLASS
-{
-  HalProfileSourceInterval,
-  HalProfileSourceInterruptHandler,
-  HalMcaRegisterDriver
-} HAL_SET_INFORMATION_CLASS, *PHAL_SET_INFORMATION_CLASS;
-
-
-typedef struct _BUS_HANDLER *PBUS_HANDLER;
-typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT;
-
-
-typedef BOOLEAN STDCALL_FUNC
-(*PHAL_RESET_DISPLAY_PARAMETERS)(ULONG Columns, ULONG Rows);
-
-#endif /* __USE_W32API */
-/* Control codes of HalDeviceControl function */
-#define BCTL_EJECT                             0x0001
-#define BCTL_QUERY_DEVICE_ID                   0x0002
-#define BCTL_QUERY_DEVICE_UNIQUE_ID            0x0003
-#define BCTL_QUERY_DEVICE_CAPABILITIES         0x0004
-#define BCTL_QUERY_DEVICE_RESOURCES            0x0005
-#define BCTL_QUERY_DEVICE_RESOURCE_REQUIREMENTS        0x0006
-#define BCTL_QUERY_EJECT                            0x0007
-#define BCTL_SET_LOCK                               0x0008
-#define BCTL_SET_POWER                              0x0009
-#define BCTL_SET_RESUME                             0x000A
-#define BCTL_SET_DEVICE_RESOURCES                   0x000B
-
-/* Defines for BCTL structures */
-typedef struct
-{
-  BOOLEAN PowerSupported;
-  BOOLEAN ResumeSupported;
-  BOOLEAN LockSupported;
-  BOOLEAN EjectSupported;
-  BOOLEAN Removable;
-} BCTL_DEVICE_CAPABILITIES, *PBCTL_DEVICE_CAPABILITIES;
-
-#ifndef __USE_W32API
-typedef struct _DEVICE_CONTROL_CONTEXT
-{
-  NTSTATUS Status;
-  PDEVICE_HANDLER_OBJECT DeviceHandler;
-  PDEVICE_OBJECT DeviceObject;
-  ULONG ControlCode;
-  PVOID Buffer;
-  PULONG BufferLength;
-  PVOID Context;
-} DEVICE_CONTROL_CONTEXT, *PDEVICE_CONTROL_CONTEXT;
-
-typedef struct _PM_DISPATCH_TABLE {
-    ULONG   Signature;
-    ULONG   Version;
-    PVOID   Function[1];
-} PM_DISPATCH_TABLE, *PPM_DISPATCH_TABLE;
-
-typedef VOID STDCALL_FUNC
-(*PDEVICE_CONTROL_COMPLETION)(IN PDEVICE_CONTROL_CONTEXT ControlContext);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalDeviceControl)(IN PDEVICE_HANDLER_OBJECT DeviceHandler,
-                    IN PDEVICE_OBJECT DeviceObject,
-                    IN ULONG ControlCode,
-                    IN OUT PVOID Buffer OPTIONAL,
-                    IN OUT PULONG BufferLength OPTIONAL,
-                    IN PVOID Context,
-                    IN PDEVICE_CONTROL_COMPLETION CompletionRoutine);
-
-typedef VOID FASTCALL_FUNC
-(*pHalExamineMBR)(IN PDEVICE_OBJECT DeviceObject,
-                 IN ULONG SectorSize,
-                 IN ULONG MBRTypeIdentifier,
-                 OUT PVOID *Buffer);
-
-typedef VOID FASTCALL_FUNC
-(*pHalIoAssignDriveLetters)(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
-                           IN PSTRING NtDeviceName,
-                           OUT PUCHAR NtSystemPath,
-                           OUT PSTRING NtSystemPathString);
-
-typedef NTSTATUS FASTCALL_FUNC
-(*pHalIoReadPartitionTable)(IN PDEVICE_OBJECT DeviceObject,
-                           IN ULONG SectorSize,
-                           IN BOOLEAN ReturnRecognizedPartitions,
-                           OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer);
-
-typedef NTSTATUS FASTCALL_FUNC
-(*pHalIoSetPartitionInformation)(IN PDEVICE_OBJECT DeviceObject,
-                                IN ULONG SectorSize,
-                                IN ULONG PartitionNumber,
-                                IN ULONG PartitionType);
-
-typedef NTSTATUS FASTCALL_FUNC
-(*pHalIoWritePartitionTable)(IN PDEVICE_OBJECT DeviceObject,
-                            IN ULONG SectorSize,
-                            IN ULONG SectorsPerTrack,
-                            IN ULONG NumberOfHeads,
-                            IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer);
-
-typedef PBUS_HANDLER FASTCALL_FUNC
-(*pHalHandlerForBus)(IN INTERFACE_TYPE InterfaceType,
-                    IN ULONG BusNumber);
-
-typedef VOID FASTCALL_FUNC
-(*pHalReferenceBusHandler)(IN PBUS_HANDLER BusHandler);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalQuerySystemInformation)(IN HAL_QUERY_INFORMATION_CLASS InformationClass,
-                             IN ULONG BufferSize,
-                             IN OUT PVOID Buffer,
-                             OUT PULONG ReturnedLength);
-
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalSetSystemInformation)(IN HAL_SET_INFORMATION_CLASS InformationClass,
-                           IN ULONG BufferSize,
-                           IN PVOID Buffer);
-
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalQueryBusSlots)(IN PBUS_HANDLER BusHandler,
-                    IN ULONG BufferSize,
-                    OUT PULONG SlotNumbers,
-                    OUT PULONG ReturnedLength);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalInitPnpDriver)(VOID);
-typedef NTSTATUS STDCALL_FUNC
-(*pHalInitPowerManagement)(IN PPM_DISPATCH_TABLE  PmDriverDispatchTable,
-                          OUT PPM_DISPATCH_TABLE *PmHalDispatchTable);
-
-typedef struct _DMA_ADAPTER * STDCALL_FUNC
-(*pHalGetDmaAdapter)(IN PVOID Context,
-                    IN struct _DEVICE_DESCRIPTION *DeviceDescriptor,
-                    OUT PULONG NumberOfMapRegisters);
-                    
-typedef NTSTATUS STDCALL_FUNC
-(*pHalGetInterruptTranslator)(IN INTERFACE_TYPE ParentInterfaceType,
-                             IN ULONG ParentBusNumber,
-                             IN INTERFACE_TYPE BridgeInterfaceType,
-                             IN USHORT Size,
-                             IN USHORT Version,
-                             OUT PTRANSLATOR_INTERFACE Translator,
-                             OUT PULONG BridgeBusNumber);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalStartMirroring)(VOID);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalEndMirroring)(IN ULONG PassNumber);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalMirrorPhysicalMemory)(IN PHYSICAL_ADDRESS PhysicalAddress,
-    IN LARGE_INTEGER NumberOfBytes);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalMirrorVerify)(IN PHYSICAL_ADDRESS PhysicalAddress,
-    IN LARGE_INTEGER NumberOfBytes);
-
-typedef VOID STDCALL_FUNC
-(*pHalEndOfBoot)(VOID);
-        
-
-typedef struct {
-    ULONG                           Version;
-    pHalQuerySystemInformation      HalQuerySystemInformation;
-    pHalSetSystemInformation        HalSetSystemInformation;
-    pHalQueryBusSlots               HalQueryBusSlots;
-    ULONG                           Spare1;
-    pHalExamineMBR                  HalExamineMBR;
-    pHalIoAssignDriveLetters        HalIoAssignDriveLetters;
-    pHalIoReadPartitionTable        HalIoReadPartitionTable;
-    pHalIoSetPartitionInformation   HalIoSetPartitionInformation;
-    pHalIoWritePartitionTable       HalIoWritePartitionTable;
-
-    pHalHandlerForBus               HalReferenceHandlerForBus;
-    pHalReferenceBusHandler         HalReferenceBusHandler;
-    pHalReferenceBusHandler         HalDereferenceBusHandler;
-
-    pHalInitPnpDriver               HalInitPnpDriver;
-    pHalInitPowerManagement         HalInitPowerManagement;
-
-    pHalGetDmaAdapter               HalGetDmaAdapter;
-    pHalGetInterruptTranslator      HalGetInterruptTranslator;
-
-    pHalStartMirroring              HalStartMirroring;
-    pHalEndMirroring                HalEndMirroring;
-    pHalMirrorPhysicalMemory        HalMirrorPhysicalMemory;
-    pHalEndOfBoot                   HalEndOfBoot;
-    pHalMirrorVerify                HalMirrorVerify;
-
-} HAL_DISPATCH, *PHAL_DISPATCH;
-
-#ifdef __NTOSKRNL__
-extern HAL_DISPATCH EXPORTED HalDispatchTable;
-#else
-extern PHAL_DISPATCH IMPORTED HalDispatchTable;
-#endif
-
-#endif /* !__USE_W32API */
-
-#ifndef __USE_W32API
-#ifdef __NTOSKRNL__
-#define HALDISPATCH (&HalDispatchTable)
-#else
-#define HALDISPATCH ((PHAL_DISPATCH)&HalDispatchTable)
-#endif
-
-
-#define HAL_DISPATCH_VERSION           3
-#define HalDispatchTableVersion                HALDISPATCH->Version
-#define HalQuerySystemInformation      HALDISPATCH->HalQuerySystemInformation
-#define HalSetSystemInformation                HALDISPATCH->HalSetSystemInformation
-#define HalQueryBusSlots               HALDISPATCH->HalQueryBusSlots
-#define HalDeviceControl               HALDISPATCH->HalDeviceControl
-#define HalExamineMBR                  HALDISPATCH->HalExamineMBR
-#define HalIoAssignDriveLetters                HALDISPATCH->HalIoAssignDriveLetters
-#define HalIoReadPartitionTable                HALDISPATCH->HalIoReadPartitionTable
-#define HalIoSetPartitionInformation   HALDISPATCH->HalIoSetPartitionInformation
-#define HalIoWritePartitionTable       HALDISPATCH->HalIoWritePartitionTable
-#define HalReferenceHandlerForBus      HALDISPATCH->HalReferenceHandlerForBus
-#define HalReferenceBusHandler         HALDISPATCH->HalReferenceBusHandler
-#define HalDereferenceBusHandler       HALDISPATCH->HalDereferenceBusHandler
-
-
-#endif /* !__USE_W32API */
-
-/* Hal private dispatch table */
-
-typedef struct _HAL_PRIVATE_DISPATCH
-{
-  ULONG Version;
-} HAL_PRIVATE_DISPATCH, *PHAL_PRIVATE_DISPATCH;
-
-#ifdef __NTOSKRNL__
-extern HAL_PRIVATE_DISPATCH EXPORTED HalPrivateDispatchTable;
-#else
-extern PHAL_PRIVATE_DISPATCH IMPORTED HalPrivateDispatchTable;
-#endif
-
-#define HAL_PRIVATE_DISPATCH_VERSION   1
-
-
-
-/*
- * Kernel debugger section
- */
-
-typedef struct _KD_PORT_INFORMATION
-{
-  ULONG ComPort;
-  ULONG BaudRate;
-  ULONG BaseAddress;
-} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
-
-
-#ifdef __NTHAL__
-extern ULONG EXPORTED KdComPortInUse;
-#else
-extern ULONG IMPORTED KdComPortInUse;
-#endif
-
-#endif /* __INCLUDE_DDK_HALTYPES_H */
-
-/* EOF */
diff --git a/reactos/include/ntos/heap.h b/reactos/include/ntos/heap.h
deleted file mode 100644 (file)
index a2edb0d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/heap.h
- * PURPOSE:      Heap declarations used by all the parts of the 
- *               system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-#ifndef __INCLUDE_HEAP_H
-#define __INCLUDE_HEAP_H
-
-#ifndef __USE_W32API
-
-#define HEAP_NO_SERIALIZE              (1)
-#define HEAP_GROWABLE                  (2)
-#define HEAP_GENERATE_EXCEPTIONS       (4)
-#define HEAP_ZERO_MEMORY               (8)
-#define HEAP_REALLOC_IN_PLACE_ONLY     (16)
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_HEAP_H */
diff --git a/reactos/include/ntos/kdfuncs.h b/reactos/include/ntos/kdfuncs.h
deleted file mode 100755 (executable)
index bfbc805..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#ifndef __INCLUDE_DDK_KDFUNCS_H
-#define __INCLUDE_DDK_KDFUNCS_H
-/* $Id$ */
-
-#ifndef __USE_W32API
-
-#ifdef __GNUC__
-
-#if defined(__NTOSKRNL__)
-extern BOOLEAN KdDebuggerEnabled __declspec(dllexport);
-extern BOOLEAN KdDebuggerNotPresent __declspec(dllexport);
-#else
-extern BOOLEAN KdDebuggerEnabled __declspec(dllimport);
-extern BOOLEAN KdDebuggerNotPresent __declspec(dllimport);
-#endif
-
-#else /* __GNUC__ */
-/* Microsft-style */
-
-#if defined(__NTOSKRNL__)
-extern __declspec(dllexport) BOOLEAN KdDebuggerEnabled;
-extern __declspec(dllexport) BOOLEAN KdDebuggerNotPresent;
-#else
-extern __declspec(dllimport) BOOLEAN KdDebuggerEnabled;
-extern __declspec(dllimport) BOOLEAN KdDebuggerNotPresent;
-#endif
-
-#endif /* __GNUC__ */
-
-#endif /* __USE_W32API */
-
-BYTE
-STDCALL
-KdPollBreakIn (
-       VOID
-       );
-
-BOOLEAN
-STDCALL
-KdPortInitialize (
-       PKD_PORT_INFORMATION    PortInformation,
-       DWORD   Unknown1,
-       DWORD   Unknown2
-       );
-
-BOOLEAN
-STDCALL
-KdPortInitializeEx (
-       PKD_PORT_INFORMATION    PortInformation,
-       DWORD   Unknown1,
-       DWORD   Unknown2
-       );
-
-BOOLEAN
-STDCALL
-KdPortGetByte (
-       PUCHAR  ByteRecieved
-       );
-
-BOOLEAN
-STDCALL
-KdPortGetByteEx (
-       PKD_PORT_INFORMATION    PortInformation,
-       PUCHAR  ByteRecieved
-       );
-
-BOOLEAN
-STDCALL
-KdPortPollByte (
-       PUCHAR  ByteRecieved
-       );
-
-BOOLEAN
-STDCALL
-KdPortPollByteEx (
-       PKD_PORT_INFORMATION    PortInformation,
-       PUCHAR  ByteRecieved
-       );
-
-VOID
-STDCALL
-KdPortPutByte (
-       UCHAR ByteToSend
-       );
-
-VOID
-STDCALL
-KdPortPutByteEx (
-       PKD_PORT_INFORMATION    PortInformation,
-       UCHAR ByteToSend
-       );
-
-VOID
-STDCALL
-KdPortRestore (
-       VOID
-       );
-
-VOID
-STDCALL
-KdPortSave (
-       VOID
-       );
-
-BOOLEAN
-STDCALL
-KdPortDisableInterrupts(
-  VOID
-  );
-
-BOOLEAN
-STDCALL
-KdPortEnableInterrupts(
-  VOID
-  );
-
-#endif /* __INCLUDE_DDK_KDFUNCS_H */
diff --git a/reactos/include/ntos/kefuncs.h b/reactos/include/ntos/kefuncs.h
deleted file mode 100644 (file)
index 33af624..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
-    This file was added by Andrew Greenwood. So, if it messes anything up,
-    you know who to call...
-*/
-
-#ifndef __INCLUDE_NTOS_KEFUNCS_H
-#define __INCLUDE_NTOS_KEFUNCS_H
-
-#define KEBUGCHECK(a) DbgPrint("KeBugCheck (0x%X) at %s:%i\n", a, __FILE__,__LINE__), KeBugCheck(a)
-#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx (0x%X, 0x%X, 0x%X, 0x%X, 0x%X) at %s:%i\n", a, b, c, d, e, __FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e)
-
-#include <arc/arc.h>
-
-#ifdef __NTOSKRNL__
-extern CHAR EXPORTED KeNumberProcessors;
-extern LOADER_PARAMETER_BLOCK EXPORTED KeLoaderBlock;
-extern ULONG EXPORTED KeDcacheFlushCount;
-extern ULONG EXPORTED KeIcacheFlushCount;
-extern KAFFINITY EXPORTED KeActiveProcessors;
-extern ULONG EXPORTED KiDmaIoCoherency; /* RISC Architectures only */
-extern ULONG EXPORTED KeMaximumIncrement;
-extern ULONG EXPORTED KeMinimumIncrement;
-#else
-extern CHAR IMPORTED KeNumberProcessors;
-extern KAFFINITY IMPORTED KeActiveProcessors;
-extern LOADER_PARAMETER_BLOCK IMPORTED KeLoaderBlock;
-extern ULONG EXPORTED KeDcacheFlushCount;
-extern ULONG EXPORTED KeIcacheFlushCount;
-extern ULONG IMPORTED KiDmaIoCoherency; /* RISC Architectures only */
-extern ULONG IMPORTED KeMaximumIncrement;
-extern ULONG IMPORTED KeMinimumIncrement;
-#endif
-
-/* io permission map has a 8k size
- * Each bit in the IOPM corresponds to an io port byte address. The bitmap
- * is initialized to allow IO at any port. [ all bits set ]. 
- */
-typedef struct _IOPM
-{
-  UCHAR  Bitmap[8192];
-} IOPM, *PIOPM;
-
-typedef struct _CONFIGURATION_COMPONENT_DATA 
-{
-  struct _CONFIGURATION_COMPONENT_DATA *Parent;
-  struct _CONFIGURATION_COMPONENT_DATA *Child;
-  struct _CONFIGURATION_COMPONENT_DATA *Sibling;
-  CONFIGURATION_COMPONENT Component;
-} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA;
-
-VOID STDCALL
-KeCapturePersistentThreadState(
-  IN PVOID  CurrentThread,
-  IN ULONG  Setting1,
-  IN ULONG  Setting2,
-  IN ULONG  Setting3,
-  IN ULONG  Setting4,
-  IN ULONG  Setting5,
-  IN PVOID  ThreadState);
-
-BOOLEAN STDCALL
-KeConnectInterrupt(
-  PKINTERRUPT  InterruptObject);
-
-BOOLEAN STDCALL
-KeDisconnectInterrupt(
-  PKINTERRUPT  InterruptObject);
-
-VOID STDCALL
-KeDrainApcQueue(
-  VOID);
-
-VOID STDCALL
-KeEnterKernelDebugger(
-  VOID);
-
-PCONFIGURATION_COMPONENT_DATA STDCALL
-KeFindConfigurationNextEntry(
-  IN PCONFIGURATION_COMPONENT_DATA Child,
-  IN CONFIGURATION_CLASS Class,
-  IN CONFIGURATION_TYPE Type,
-  IN PULONG ComponentKey OPTIONAL,
-  IN PCONFIGURATION_COMPONENT_DATA *NextLink);
-                             
-PCONFIGURATION_COMPONENT_DATA STDCALL
-KeFindConfigurationEntry(
-  IN PCONFIGURATION_COMPONENT_DATA Child,
-  IN CONFIGURATION_CLASS Class,
-  IN CONFIGURATION_TYPE Type,
-  IN PULONG ComponentKey OPTIONAL);
-
-VOID STDCALL
-KeFlushEntireTb(
-  IN BOOLEAN  Unknown,
-  IN BOOLEAN  CurrentCpuOnly);
-
-struct _KPROCESS*
-STDCALL
-KeGetCurrentProcess(
-    VOID
-);
-
-VOID STDCALL
-KeFlushWriteBuffer(
-  VOID);
-
-VOID STDCALL
-KeInitializeApc(
-  IN PKAPC  Apc,
-  IN PKTHREAD  Thread,
-  IN KAPC_ENVIRONMENT  TargetEnvironment,
-  IN PKKERNEL_ROUTINE  KernelRoutine,
-  IN PKRUNDOWN_ROUTINE  RundownRoutine,
-  IN PKNORMAL_ROUTINE  NormalRoutine,
-  IN KPROCESSOR_MODE  Mode,
-  IN PVOID  Context);
-
-VOID STDCALL
-KeInitializeInterrupt(
-  PKINTERRUPT  InterruptObject,
-  PKSERVICE_ROUTINE  ServiceRoutine,
-  PVOID  ServiceContext,
-  PKSPIN_LOCK  SpinLock,
-  ULONG  Vector,
-  KIRQL  Irql,
-  KIRQL  SynchronizeIrql,
-  KINTERRUPT_MODE  InterruptMode,
-  BOOLEAN  ShareVector,
-  CHAR  ProcessorNumber,
-  BOOLEAN  FloatingSave);
-BOOLEAN STDCALL
-KeInsertQueueApc(
-  PKAPC  Apc,
-  PVOID  SystemArgument1,
-  PVOID  SystemArgument2,
-  KPRIORITY  PriorityBoost);
-
-BOOLEAN STDCALL
-KeIsAttachedProcess(
-  VOID);
-
-BOOLEAN STDCALL
-KeIsExecutingDpc(
-  VOID);
-VOID STDCALL
-KeRevertToUserAffinityThread(
-  VOID);
-
-BOOLEAN STDCALL
-KeRemoveSystemServiceTable(
-  IN ULONG  TableIndex);
-
-NTSTATUS STDCALL
-KeSetAffinityThread(
-  PKTHREAD  Thread,
-  KAFFINITY  Affinity);
-
-VOID STDCALL
-KeSetDmaIoCoherency(
-  IN ULONG  Coherency);
-
-VOID STDCALL
-KeSetEventBoostPriority(
-  IN PKEVENT  Event,
-  IN PKTHREAD  *Thread OPTIONAL);
-
-VOID STDCALL
-KeSetProfileIrql(
-  IN KIRQL  ProfileIrql);
-
-VOID STDCALL
-KeSetSystemAffinityThread(
-  IN KAFFINITY  Affinity);
-
-VOID STDCALL
-KeTerminateThread(
-  IN KPRIORITY  Increment);
-
-NTSTATUS STDCALL
-KeUserModeCallback(
-  IN ULONG  FunctionID,
-  IN PVOID  InputBuffer,
-  IN ULONG  InputLength,
-  OUT PVOID  *OutputBuffer,
-  OUT PULONG  OutputLength);
-NTSTATUS STDCALL
-KeRaiseUserException(
-  IN NTSTATUS  ExceptionCode);
-
-/*
- * FUNCTION: Provides the kernel with a new access map for a driver
- * ARGUMENTS:
- *     NewMap: =  If FALSE the kernel's map is set to all disabled. If TRUE
- *                     the kernel disables access to a particular port.
- *     IoPortMap = Caller supplies storage for the io permission map.
- * REMARKS
- *     Each bit in the IOPM corresponds to an io port byte address. The bitmap
- *     is initialized to allow IO at any port. [ all bits set ]. The IOPL determines
- *     the minium privilege level required to perform IO prior to checking the permission map.
- */
-BOOL STDCALL
-Ke386SetIoAccessMap(
-  ULONG  NewMap,
-  PULONG  IoPermissionMap);
-
-/*
- * FUNCTION: Queries the io permission  map.
- * ARGUMENTS:
- *     NewMap: =  If FALSE the kernel's map is set to all disabled. If TRUE
- *                     the kernel disables access to a particular port.
- *     IoPortMap = Caller supplies storage for the io permission map.
- * REMARKS
- *     Each bit in the IOPM corresponds to an io port byte address. The bitmap
- *     is initialized to allow IO at any port. [ all bits set ]. The IOPL determines
- *     the minium privilege level required to perform IO prior to checking the permission map.
- */
-BOOL STDCALL
-Ke386QueryIoAccessMap(
-  ULONG  NewMap,
-  PULONG  IoPermissionMap);
-
-/* Set the process IOPL. */
-BOOL STDCALL
-Ke386IoSetAccessProcess(
-  struct _EPROCESS  *Process,
-  BOOL  EnableIo);
-
-NTSTATUS STDCALL
-KeI386FlatToGdtSelector(
-  IN ULONG  Base,
-  IN USHORT  Length,
-  IN USHORT  Selector);
-
-/* Releases a set of Global Descriptor Table Selectors. */
-NTSTATUS STDCALL
-KeI386ReleaseGdtSelectors(
-  OUT PULONG SelArray,
-  IN ULONG NumOfSelectors);
-
-/* Allocates a set of Global Descriptor Table Selectors. */
-NTSTATUS STDCALL
-KeI386AllocateGdtSelectors(
-  OUT PULONG SelArray,
-  IN ULONG NumOfSelectors);
-
-VOID FASTCALL
-KiAcquireSpinLock(
-  PKSPIN_LOCK  SpinLock);
-
-VOID STDCALL
-KiCoprocessorError(
-  VOID);
-
-VOID STDCALL
-KiDispatchInterrupt(
-  VOID);
-NTSTATUS STDCALL
-KeRaiseUserException(
-  IN NTSTATUS ExceptionCode);
-
-VOID FASTCALL
-KiReleaseSpinLock(
-  PKSPIN_LOCK  SpinLock);
-
-VOID STDCALL
-KiUnexpectedInterrupt(
-  VOID);
-
-/* REACTOS SPECIFIC */
-
-VOID STDCALL
-KeRosDumpStackFrames(
-  PULONG  Frame,
-  ULONG  FrameCount);
-
-ULONG STDCALL
-KeRosGetStackFrames(
-  PULONG  Frames,
-  ULONG  FrameCount);
-
-#endif /* __INCLUDE_NTOS_KEFUNCS_H */
diff --git a/reactos/include/ntos/keyboard.h b/reactos/include/ntos/keyboard.h
deleted file mode 100644 (file)
index 486d318..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/keyboard.h
- * PURPOSE:      Keyboard declarations used by all the parts of the 
- *               system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_KEYBOARD_H
-#define __INCLUDE_KEYBOARD_H
-
-#include <ntos/types.h>
-
-/* Virtual Key codes */
-#define VK_0   (48)
-#define VK_1   (49)
-#define VK_2   (50)
-#define VK_3   (51)
-#define VK_4   (52)
-#define VK_5   (53)
-#define VK_6   (54)
-#define VK_7   (55)
-#define VK_8   (56)
-#define VK_9   (57)
-#define VK_A   (65)
-#define VK_B   (66)
-#define VK_C   (67)
-#define VK_D   (68)
-#define VK_E   (69)
-#define VK_F   (70)
-#define VK_G   (71)
-#define VK_H   (72)
-#define VK_I   (73)
-#define VK_J   (74)
-#define VK_K   (75)
-#define VK_L   (76)
-#define VK_M   (77)
-#define VK_N   (78)
-#define VK_O   (79)
-#define VK_P   (80)
-#define VK_Q   (81)
-#define VK_R   (82)
-#define VK_S   (83)
-#define VK_T   (84)
-#define VK_U   (85)
-#define VK_V   (86)
-#define VK_W   (87)
-#define VK_X   (88)
-#define VK_Y   (89)
-#define VK_Z   (90)
-
-#ifndef __USE_W32API
-
-/* KEY_EVENT_RECORD structure */
-#define CAPSLOCK_ON    (128)
-#define ENHANCED_KEY   (256)
-#define LEFT_ALT_PRESSED       (2)
-#define LEFT_CTRL_PRESSED      (8)
-#define NUMLOCK_ON     (32)
-#define RIGHT_ALT_PRESSED      (1)
-#define RIGHT_CTRL_PRESSED     (4)
-#define SCROLLLOCK_ON  (64)
-#define SHIFT_PRESSED  (16)
-
-/* MOUSE_EVENT_RECORD structure */
-#define FROM_LEFT_1ST_BUTTON_PRESSED   (1)
-#define RIGHTMOST_BUTTON_PRESSED       (2)
-#define FROM_LEFT_2ND_BUTTON_PRESSED   (4)
-#define FROM_LEFT_3RD_BUTTON_PRESSED   (8)
-#define FROM_LEFT_4TH_BUTTON_PRESSED   (16)
-#define DOUBLE_CLICK   (2)
-#define MOUSE_MOVED    (1)
-
-/* INPUT_RECORD structure */
-#define KEY_EVENT      (1)
-#define MOUSE_EVENT    (2)
-#define WINDOW_BUFFER_SIZE_EVENT       (4)
-#define MENU_EVENT     (8)
-#define FOCUS_EVENT    (16)
-
-
-#include <pshpack1.h>
-
-typedef struct _KEY_EVENT_RECORD
-{
-  BOOL bKeyDown;
-  WORD wRepeatCount;
-  WORD wVirtualKeyCode;
-  WORD wVirtualScanCode;
-  union
-  {
-    WCHAR UnicodeChar;
-    CHAR  AsciiChar;
-  } uChar;
-  DWORD dwControlKeyState;
-} KEY_EVENT_RECORD;
-
-#include <poppack.h>
-
-
-typedef struct _MOUSE_EVENT_RECORD
-{
-  COORD dwMousePosition;
-  DWORD dwButtonState;
-  DWORD dwControlKeyState;
-  DWORD dwEventFlags;
-} MOUSE_EVENT_RECORD;
-
-typedef struct _WINDOW_BUFFER_SIZE_RECORD
-{
-  COORD dwSize;
-} WINDOW_BUFFER_SIZE_RECORD;
-
-typedef struct _MENU_EVENT_RECORD
-{
-  UINT dwCommandId; 
-} MENU_EVENT_RECORD, *PMENU_EVENT_RECORD;
-
-typedef struct _FOCUS_EVENT_RECORD
-{
-  BOOL bSetFocus;
-} FOCUS_EVENT_RECORD;
-
-typedef struct _INPUT_RECORD
-{
-  WORD EventType;
-  union
-  {
-#ifndef __cplus_plus
-    /* this will be the wrong size in c++ */
-    KEY_EVENT_RECORD KeyEvent;
-#endif
-    MOUSE_EVENT_RECORD MouseEvent;
-    WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
-    MENU_EVENT_RECORD MenuEvent;
-    FOCUS_EVENT_RECORD FocusEvent;
-  } Event;
-} INPUT_RECORD, *PINPUT_RECORD;
-
-/* Virtual Key codes */
-#define VK_LBUTTON     (1)
-#define VK_RBUTTON     (2)
-#define VK_CANCEL      (3)
-#define VK_MBUTTON     (4)
-#define VK_BACK        (8)
-#define VK_TAB (9)
-#define VK_CLEAR       (12)
-#define VK_RETURN      (13)
-#define VK_SHIFT       (16)
-#define VK_CONTROL     (17)
-#define VK_MENU        (18)
-#define VK_PAUSE       (19)
-#define VK_CAPITAL     (20)
-#define VK_ESCAPE      (27)
-#define VK_SPACE       (32)
-#define VK_PRIOR       (33)
-#define VK_NEXT        (34)
-#define VK_END (35)
-#define VK_HOME        (36)
-#define VK_LEFT        (37)
-#define VK_UP  (38)
-#define VK_RIGHT       (39)
-#define VK_DOWN        (40)
-#define VK_SELECT      (41)
-#define VK_PRINT       (42)
-#define VK_EXECUTE     (43)
-#define VK_SNAPSHOT    (44)
-#define VK_INSERT      (45)
-#define VK_DELETE      (46)
-#define VK_HELP            (47)
-#define VK_LWIN     (91)
-#define VK_RWIN     (92)
-#define VK_APPS     (93)
-#define VK_SLEEP    (95)
-#define VK_NUMPAD0     (96)
-#define VK_NUMPAD1     (97)
-#define VK_NUMPAD2     (98)
-#define VK_NUMPAD3     (99)
-#define VK_NUMPAD4     (100)
-#define VK_NUMPAD5     (101)
-#define VK_NUMPAD6     (102)
-#define VK_NUMPAD7     (103)
-#define VK_NUMPAD8     (104)
-#define VK_NUMPAD9     (105)
-#define VK_MULTIPLY    (106)
-#define VK_ADD (107)
-#define VK_SEPARATOR   (108)
-#define VK_SUBTRACT    (109)
-#define VK_DECIMAL     (110)
-#define VK_DIVIDE      (111)
-#define VK_F1  (112)
-#define VK_F2  (113)
-#define VK_F3  (114)
-#define VK_F4  (115)
-#define VK_F5  (116)
-#define VK_F6  (117)
-#define VK_F7  (118)
-#define VK_F8  (119)
-#define VK_F9  (120)
-#define VK_F10 (121)
-#define VK_F11 (122)
-#define VK_F12 (123)
-#define VK_F13 (124)
-#define VK_F14 (125)
-#define VK_F15 (126)
-#define VK_F16 (127)
-#define VK_F17 (128)
-#define VK_F18 (129)
-#define VK_F19 (130)
-#define VK_F20 (131)
-#define VK_F21 (132)
-#define VK_F22 (133)
-#define VK_F23 (134)
-#define VK_F24 (135)
-
-/* GetAsyncKeyState */
-#define VK_NUMLOCK     (144)
-#define VK_SCROLL      (145)
-#define VK_LSHIFT      (160)
-#define VK_LCONTROL    (162)
-#define VK_LMENU       (164)
-#define VK_RSHIFT      (161)
-#define VK_RCONTROL    (163)
-#define VK_RMENU       (165)
-
-#define VK_BROWSER_BACK        (166)
-#define VK_BROWSER_FORWARD     (167)
-#define VK_BROWSER_REFRESH     (168)
-#define VK_BROWSER_STOP        (169)
-#define VK_BROWSER_SEARCH      (170)
-#define VK_BROWSER_FAVORITES   (171)
-#define VK_BROWSER_HOME        (172)
-#define VK_VOLUME_MUTE         (173)
-#define VK_VOLUME_DOWN         (174)
-#define VK_VOLUME_UP           (175)
-#define VK_MEDIA_NEXT_TRACK    (176)
-#define VK_MEDIA_PREV_TRACK    (177)
-#define VK_MEDIA_STOP          (178)
-#define VK_MEDIA_PLAY_PAUSE    (179)
-#define VK_LAUNCH_MAIL         (180)
-#define VK_LAUNCH_MEDIA_SELECT (181)
-#define VK_LAUNCH_APP1         (182)
-#define VK_LAUNCH_APP2         (183)
-
-#define VK_PROCESSKEY          (229)
-#define VK_ICO_CLEAR           (230)
-
-/* Fujitsu/OASYS keys */
-#define VK_OEM_FJ_JISHO        (146) /* 'Dictionary' key */
-#define VK_OEM_FJ_MASSHOU      (147) /* 'Unregister word' key */
-#define VK_OEM_FJ_TOUROKU      (148) /* 'Register word' key */
-#define VK_OEM_FJ_LOYA         (149) /* 'Left OYAYUBI' key */
-#define VK_OEM_FJ_ROYA         (150) /* 'Right OYAYUBI' key */
-
-/* Nokia/Ericsson keys */
-#define VK_OEM_RESET           (223)
-#define VK_OEM_JUMP            (234)
-#define VK_OEM_PA1             (235)
-#define VK_OEM_PA2             (236)
-#define VK_OEM_PA3             (237)
-#define VK_OEM_WSCTRL          (238)
-#define VK_OEM_CUSEL           (239)
-#define VK_OEM_ATTN            (240)
-#define VK_OEM_FINISH          (241)
-#define VK_OEM_COPY            (242)
-#define VK_OEM_AUTO            (243)
-#define VK_OEM_ENLW            (244)
-#define VK_OEM_BACKTAB         (245)
-#define VK_ATTN                (246)
-#define VK_CRSEL               (247)
-#define VK_EXSEL               (248)
-#define VK_EREOF               (249)
-#define VK_PLAY                (250)
-#define VK_ZOOM                (251)
-#define VK_NONAME              (252)
-#define VK_PA1                 (253)
-#define VK_OEM_CLEAR           (254)
-
-#define VK_OEM_NEC_EQUAL       (146) /* = key on numpad */
-
-#define VK_OEM_1               (186) /* ';:' for US */
-#define VK_OEM_PLUS            (187) /* '+' any country */
-#define VK_OEM_COMMA           (188) /* ',' any country */
-#define VK_OEM_MINUS           (189) /* '-' any country */
-#define VK_OEM_PERIOD          (190) /* '.' any country */
-#define VK_OEM_2               (191) /* '/?' for US */
-#define VK_OEM_3               (192) /* '`~' for US */
-
-#define VK_OEM_4               (219) /* '[{' for US */
-#define VK_OEM_5               (220) /* '\|' for US */
-#define VK_OEM_6               (221) /* ']}' for US */
-#define VK_OEM_7               (222) /* ''"' for US */
-#define VK_OEM_8               (223)
-
-#define VK_OEM_AX              (225) /* AX key on Japanese AX keyboard */
-#define VK_OEM_102             (226) /* <> or | on RT 102-key keyboard */
-#define VK_ICO_HELP            (227) /* Help key on ICO */
-#define VK_ICO_00              (228) /* 00 key on ICO */
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_KEYBOARD_H */
-
-
-
diff --git a/reactos/include/ntos/krnltypes.h b/reactos/include/ntos/krnltypes.h
deleted file mode 100644 (file)
index fdd208b..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-/* \r
- * FIXME: *** NDK ***\r
- */\r
-\r
-#ifndef __INCLUDE_NTOS_KRNLTYPES_H\r
-#define __INCLUDE_NTOS_KRNLTYPES_H\r
-\r
-#define DOE_UNLOAD_PENDING    0x1\r
-#define DOE_DELETE_PENDING    0x2\r
-#define DOE_REMOVE_PENDING    0x4\r
-#define DOE_REMOVE_PROCESSED  0x8\r
-#define DOE_START_PENDING     0x10\r
-\r
-extern POBJECT_TYPE EXPORTED ExMutantObjectType;\r
-extern POBJECT_TYPE EXPORTED ExTimerType;\r
-\r
-/*\r
- * PURPOSE: Special timer associated with each device\r
- */\r
-typedef struct _IO_TIMER {\r
-   USHORT Type;                                /* Every IO Object has a Type */\r
-   USHORT TimerEnabled;                        /* Tells us if the Timer is enabled or not */\r
-   LIST_ENTRY IoTimerList;             /* List of other Timers on the system */\r
-   PIO_TIMER_ROUTINE TimerRoutine;     /* The associated timer routine */\r
-   PVOID Context;                      /* Context */\r
-   PDEVICE_OBJECT DeviceObject;                /* Driver that owns this IO Timer */\r
-} IO_TIMER, *PIO_TIMER;\r
-\r
-typedef struct _EX_QUEUE_WORKER_INFO {\r
-    UCHAR QueueDisabled:1;\r
-    UCHAR MakeThreadsAsNecessary:1;\r
-    UCHAR WaitMode:1;\r
-    ULONG WorkerCount:29;\r
-} EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;\r
-\r
-typedef struct _EX_WORK_QUEUE {\r
-    KQUEUE WorkerQueue;\r
-    ULONG DynamicThreadCount;\r
-    ULONG WorkItemsProcessed;\r
-    ULONG WorkItemsProcessedLastPass;\r
-    ULONG QueueDepthLastPass;\r
-    EX_QUEUE_WORKER_INFO Info;    \r
-} EX_WORK_QUEUE, *PEX_WORK_QUEUE;\r
-\r
-typedef struct _KDPC_DATA \r
-{\r
-    LIST_ENTRY  DpcListHead;\r
-    ULONG  DpcLock;\r
-    ULONG  DpcQueueDepth;\r
-    ULONG  DpcCount;\r
-} KDPC_DATA, *PKDPC_DATA;\r
-\r
-typedef struct _KTRAP_FRAME \r
-{\r
-    PVOID DebugEbp;\r
-    PVOID DebugEip;\r
-    PVOID DebugArgMark;\r
-    PVOID DebugPointer;\r
-    PVOID TempCs;\r
-    PVOID TempEip;\r
-    ULONG Dr0;\r
-    ULONG Dr1;\r
-    ULONG Dr2;\r
-    ULONG Dr3;\r
-    ULONG Dr6;\r
-    ULONG Dr7;\r
-    USHORT Gs;\r
-    USHORT Reserved1;\r
-    USHORT Es;\r
-    USHORT Reserved2;\r
-    USHORT Ds;\r
-    USHORT Reserved3;\r
-    ULONG Edx;\r
-    ULONG Ecx;\r
-    ULONG Eax;\r
-    ULONG PreviousMode;\r
-    PVOID ExceptionList;\r
-    USHORT Fs;\r
-    USHORT Reserved4;\r
-    ULONG Edi;\r
-    ULONG Esi;\r
-    ULONG Ebx;\r
-    ULONG Ebp;\r
-    ULONG ErrorCode;\r
-    ULONG Eip;\r
-    ULONG Cs;\r
-    ULONG Eflags;\r
-    ULONG Esp;\r
-    USHORT Ss;\r
-    USHORT Reserved5;\r
-    USHORT V86_Es;\r
-    USHORT Reserved6;\r
-    USHORT V86_Ds;\r
-    USHORT Reserved7;\r
-    USHORT V86_Fs;\r
-    USHORT Reserved8;\r
-    USHORT V86_Gs;\r
-    USHORT Reserved9;\r
-} KTRAP_FRAME, *PKTRAP_FRAME;\r
-\r
-typedef struct _PP_LOOKASIDE_LIST \r
-{\r
-   struct _GENERAL_LOOKASIDE *P;\r
-   struct _GENERAL_LOOKASIDE *L;\r
-} PP_LOOKASIDE_LIST, *PPP_LOOKASIDE_LIST;\r
-\r
-typedef enum _PP_NPAGED_LOOKASIDE_NUMBER\r
-{\r
-   LookasideSmallIrpList = 0,\r
-   LookasideLargeIrpList = 1,\r
-   LookasideMdlList = 2,\r
-   LookasideCreateInfoList = 3,\r
-   LookasideNameBufferList = 4,\r
-   LookasideTwilightList = 5,\r
-   LookasideCompletionList = 6,\r
-   LookasideMaximumList = 7\r
-} PP_NPAGED_LOOKASIDE_NUMBER;\r
-\r
-typedef enum _KOBJECTS {\r
-   EventNotificationObject = 0,\r
-   EventSynchronizationObject = 1,\r
-   MutantObject = 2,\r
-   ProcessObject = 3,\r
-   QueueObject = 4,\r
-   SemaphoreObject = 5,\r
-   ThreadObject = 6,\r
-   GateObject = 7,\r
-   TimerNotificationObject = 8,\r
-   TimerSynchronizationObject = 9,\r
-   Spare2Object = 10,\r
-   Spare3Object = 11,\r
-   Spare4Object = 12,\r
-   Spare5Object = 13,\r
-   Spare6Object = 14,\r
-   Spare7Object = 15,\r
-   Spare8Object = 16,\r
-   Spare9Object = 17,\r
-   ApcObject = 18,\r
-   DpcObject = 19,\r
-   DeviceQueueObject = 20,\r
-   EventPairObject = 21,\r
-   InterruptObject = 22,\r
-   ProfileObject = 23,\r
-   ThreadedDpcObject = 24,\r
-   MaximumKernelObject = 25\r
-} KOBJECTS;\r
-\r
-typedef struct _M128 {\r
-    ULONGLONG Low;\r
-    LONGLONG High;\r
-} M128, *PM128;\r
-\r
-typedef struct _KEXCEPTION_FRAME {\r
-    ULONG64 P1Home;\r
-    ULONG64 P2Home;\r
-    ULONG64 P3Home;\r
-    ULONG64 P4Home;\r
-    ULONG64 P5;\r
-    ULONG64 InitialStack;\r
-    M128 Xmm6;\r
-    M128 Xmm7;\r
-    M128 Xmm8;\r
-    M128 Xmm9;\r
-    M128 Xmm10;\r
-    M128 Xmm11;\r
-    M128 Xmm12;\r
-    M128 Xmm13;\r
-    M128 Xmm14;\r
-    M128 Xmm15;\r
-    ULONG64 TrapFrame;\r
-    ULONG64 CallbackStack;\r
-    ULONG64 OutputBuffer;\r
-    ULONG64 OutputLength;\r
-    UCHAR ExceptionRecord[64];\r
-    ULONG64 Fill1;\r
-    ULONG64 Rbp;\r
-    ULONG64 Rbx;\r
-    ULONG64 Rdi;\r
-    ULONG64 Rsi;\r
-    ULONG64 R12;\r
-    ULONG64 R13;\r
-    ULONG64 R14;\r
-    ULONG64 R15;\r
-    ULONG64 Return;\r
-} KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;\r
-\r
-typedef struct _KEVENT_PAIR\r
-{\r
-    CSHORT Type;\r
-    CSHORT Size;\r
-    KEVENT LowEvent;\r
-    KEVENT HighEvent;\r
-} KEVENT_PAIR, *PKEVENT_PAIR;\r
-\r
-typedef struct _RUNDOWN_DESCRIPTOR {\r
-    ULONG_PTR References;\r
-    KEVENT RundownEvent;\r
-} RUNDOWN_DESCRIPTOR, *PRUNDOWN_DESCRIPTOR;\r
-\r
-#endif /* __INCLUDE_NTOS_KRNLTYPES_H */\r
-\r
diff --git a/reactos/include/ntos/ldrtypes.h b/reactos/include/ntos/ldrtypes.h
deleted file mode 100755 (executable)
index 74501a3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* $Id$ */
-
-#ifndef __INCLUDE_DDK_LDRTYPES_H
-#define __INCLUDE_DDK_LDRTYPES_H
-
-typedef struct _LDR_RESOURCE_INFO
-{
-    ULONG Type;
-    ULONG Name;
-    ULONG Language;
-} LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
-
-#define RESOURCE_TYPE_LEVEL      0
-#define RESOURCE_NAME_LEVEL      1
-#define RESOURCE_LANGUAGE_LEVEL  2
-#define RESOURCE_DATA_LEVEL      3
-
-#endif /* __INCLUDE_DDK_LDRTYPES_H */
diff --git a/reactos/include/ntos/minmax.h b/reactos/include/ntos/minmax.h
deleted file mode 100644 (file)
index 1ee3dd5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef max
-#define max(a, b)  (((a) > (b)) ? (a) : (b))
-#endif
-
-#ifndef min
-#define min(a, b)  (((a) < (b)) ? (a) : (b))
-#endif
diff --git a/reactos/include/ntos/mm.h b/reactos/include/ntos/mm.h
deleted file mode 100644 (file)
index ca752bc..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/mm.h
- * PURPOSE:      Memory managment declarations used by all the parts of the 
- *               system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_MM_H
-#define __INCLUDE_MM_H
-
-#ifndef __USE_W32API
-
-#define SEC_BASED       (0x00200000)
-#define SEC_NO_CHANGE   (0x00400000)
-#define SEC_FILE        (0x00800000)
-#define SEC_IMAGE       (0x01000000)
-#define SEC_VLM         (0x02000000)
-#define SEC_RESERVE     (0x04000000)
-#define SEC_COMMIT      (0x08000000)
-#define SEC_NOCACHE     (0x10000000)
-#define PAGE_NOACCESS  (1)
-#define PAGE_READONLY  (2)
-#define PAGE_READWRITE (4)
-#define PAGE_WRITECOPY (8)
-#define PAGE_EXECUTE   (16)
-#define PAGE_EXECUTE_READ      (32)
-#define PAGE_EXECUTE_READWRITE (64)
-#define PAGE_EXECUTE_WRITECOPY (128)
-#define PAGE_GUARD     (256)
-#define PAGE_NOCACHE   (512)
-#define PAGE_WRITECOMBINE      (1024)
-#define MEM_COMMIT     (4096)
-#define MEM_FREE       (65536)
-#define MEM_RESERVE    (8192)
-#define MEM_IMAGE      (16777216)
-#define MEM_MAPPED     (262144)
-#define MEM_PRIVATE    (131072)
-#define MEM_DECOMMIT   (16384)
-#define MEM_RELEASE    (32768)
-#define MEM_TOP_DOWN   (1048576)
-#define EXCEPTION_GUARD_PAGE   (0x80000001L)
-#define SECTION_EXTEND_SIZE    (0x10)
-#define SECTION_MAP_EXECUTE    (0x8)
-#define SECTION_MAP_READ       (0x4)
-#define SECTION_MAP_WRITE      (0x2)
-#define SECTION_QUERY          (0x1)
-#define SECTION_ALL_ACCESS     (0xf001fL)
-
-#define FILE_MAP_ALL_ACCESS    (0xf001fL)
-#define FILE_MAP_READ  (4)
-#define FILE_MAP_WRITE (2)
-#define FILE_MAP_COPY  (1)
-
-#else /* __USE_W32API */
-
-#include <ddk/ntifs.h>
-
-#endif /* __USE_W32API */
-
-#define PAGE_ROUND_UP(x) ( (((ULONG_PTR)x)%PAGE_SIZE) ? ((((ULONG_PTR)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG_PTR)x) )
-#define PAGE_ROUND_DOWN(x) (((ULONG_PTR)x)&(~(PAGE_SIZE-1)))
-
-#endif /* __INCLUDE_MM_H */
diff --git a/reactos/include/ntos/ntdef.h b/reactos/include/ntos/ntdef.h
deleted file mode 100644 (file)
index 4b3eb85..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/ntdef.h
- * PURPOSE:      Defines used by all the parts of the system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-#ifndef __INCLUDE_NTDEF_H
-#define __INCLUDE_NTDEF_H
-
-#ifndef __USE_W32API
-#define MAXIMUM_WAIT_OBJECTS (64)
-#endif
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define TYPE_ALIGNMENT(t) __alignof(t)
-#elif defined(__GNUC__)
-# define TYPE_ALIGNMENT(t) __alignof__(t)
-#else
-# define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
-#endif
-
-#ifdef _WIN64
-# define PROBE_ALIGNMENT(_s) \
-    (TYPE_ALIGNMENT(_s) > TYPE_ALIGNMENT(DWORD) ? \
-    TYPE_ALIGNMENT(_s) : TYPE_ALIGNMENT(DWORD))
-# define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(DWORD)
-#else
-# define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(DWORD)
-#endif
-
-
-#if defined(_MSC_VER)
-   #define Const64(a) (a##i64)
-   static __inline LARGE_INTEGER MK_LARGE_INTEGER(__int64 i)
-   {
-      LARGE_INTEGER li;
-      li.QuadPart = i;
-      return li;
-   }
-   #define INIT_LARGE_INTEGER(a) {{(ULONG)a, (LONG)(a>>32)}}   
-#elif defined (__GNUC__)
-   #define Const64(a) (a##LL)
-   #define MK_LARGE_INTEGER(a) ((LARGE_INTEGER)(LONGLONG)(a))
-   #define INIT_LARGE_INTEGER(a) MK_LARGE_INTEGER(Const64(a))    
-#endif
-
-#define LargeInteger0 MK_LARGE_INTEGER(0)
-
-
-/* Compile time asserts */
-#define C_ASSERT(e) do{extern char __C_ASSERT__[(e)?1:-1]; (void)__C_ASSERT__;}while(0)
-
-
-/* Helpers for easy conversion to system time units (100ns) */
-#define ABSOLUTE_TIME(wait) (wait)
-#define RELATIVE_TIME(wait) (-(wait))
-#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100)
-#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000))
-#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000))
-#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000))
-#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60))
-#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60))
-
-
-
-
-/* Helpers for enumarating lists */
-#define LIST_FOR_EACH(entry, head) \
-   for((entry) = (head)->Flink; (entry) != (head); (entry) = (entry)->Flink)
-
-/* 
-Safe version which saves pointer to the next entry so the current ptr->field entry
-can be unlinked without corrupting the list. NOTE: Never unlink tmp_entry!!!!!!!!!
-*/
-#define LIST_FOR_EACH_SAFE(tmp_entry, head, ptr, type, field) \
-   for ((tmp_entry)=(head)->Flink; (tmp_entry)!=(head) && \
-        ((ptr) = CONTAINING_RECORD(tmp_entry,type,field)) && \
-        ((tmp_entry) = (tmp_entry)->Flink); )
-
-
-#ifndef __USE_W32API
-
-#define ANYSIZE_ARRAY  (1)
-
-#define DELETE         (0x00010000L)
-#define READ_CONTROL   (0x00020000L)
-#define WRITE_DAC      (0x00040000L)
-#define WRITE_OWNER    (0x00080000L)
-#define SYNCHRONIZE    (0x00100000L)
-
-#define DUPLICATE_CLOSE_SOURCE (1)
-#define DUPLICATE_SAME_ACCESS  (2)
-
-#define INVALID_HANDLE_VALUE   ((HANDLE)-1)
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_NTDEF_H */
diff --git a/reactos/include/ntos/obtypes.h b/reactos/include/ntos/obtypes.h
deleted file mode 100755 (executable)
index e54474a..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-#ifndef _INCLUDE_DDK_OBTYPES_H
-#define _INCLUDE_DDK_OBTYPES_H
-/* $Id$ */
-struct _DIRECTORY_OBJECT;
-struct _OBJECT_ATTRIBUTES;
-
-#ifndef __USE_W32API
-
-typedef struct _OBJECT_HANDLE_INFORMATION
-{
-  ULONG HandleAttributes;
-  ACCESS_MASK GrantedAccess;
-} OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION;
-
-
-typedef struct _OBJECT_BASIC_INFORMATION
-{
-  ULONG Attributes;
-  ACCESS_MASK GrantedAccess;
-  ULONG HandleCount;
-  ULONG PointerCount;
-  ULONG PagedPoolUsage;
-  ULONG NonPagedPoolUsage;
-  ULONG Reserved[3];
-  ULONG NameInformationLength;
-  ULONG TypeInformationLength;
-  ULONG SecurityDescriptorLength;
-  LARGE_INTEGER CreateTime;
-} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
-
-
-typedef struct _OBJECT_NAME_INFORMATION
-{
-  UNICODE_STRING Name;
-} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
-
-
-typedef struct _OBJECT_TYPE_INFORMATION {
-   UNICODE_STRING TypeName;
-   ULONG TotalNumberOfObjects;
-   ULONG TotalNumberOfHandles;
-   ULONG TotalPagedPoolUsage;
-   ULONG TotalNonPagedPoolUsage;
-   ULONG TotalNamePoolUsage;
-   ULONG TotalHandleTableUsage;
-   ULONG PeakNumberOfObjects;
-   ULONG PeakNumberOfHandles;
-   ULONG PeakPagedPoolUsage;
-   ULONG PeakNonPagedPoolUsage;
-   ULONG PeakNamePoolUsage;
-   ULONG PeakHandleTableUsage;
-   ULONG InvalidAttributes;
-   GENERIC_MAPPING GenericMapping;
-   ULONG ValidAccessMask;
-   BOOLEAN SecurityRequired;
-   BOOLEAN MaintainHandleCount;
-   ULONG PoolType;
-   ULONG DefaultPagedPoolCharge;
-   ULONG DefaultNonPagedPoolCharge;
-} OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
-
-
-typedef struct _OBJECT_ALL_TYPES_INFORMATION
-{
-  ULONG NumberOfTypes;
-  OBJECT_TYPE_INFORMATION TypeInformation[1];
-} OBJECT_ALL_TYPES_INFORMATION, *POBJECT_ALL_TYPES_INFORMATION;
-
-
-typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFORMATION
-{
-  BOOLEAN Inherit;
-  BOOLEAN ProtectFromClose;
-} OBJECT_HANDLE_ATTRIBUTE_INFORMATION, *POBJECT_HANDLE_ATTRIBUTE_INFORMATION;
-
-
-typedef struct _OBJECT_TYPE *POBJECT_TYPE;
-
-
-typedef struct _OBJECT_ATTRIBUTES
-{
-   ULONG Length;
-   HANDLE RootDirectory;
-   PUNICODE_STRING ObjectName;
-   ULONG Attributes;
-   PVOID SecurityDescriptor;
-   PVOID SecurityQualityOfService;
-} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
-
-#endif
-
-typedef struct _HANDLE_TABLE_ENTRY_INFO {
-    ULONG AuditMask;
-} HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
-
-typedef struct _HANDLE_TABLE_ENTRY {
-    union {
-        PVOID Object;
-        ULONG_PTR ObAttributes;
-        PHANDLE_TABLE_ENTRY_INFO InfoTable;
-        ULONG_PTR Value;
-    } u1;
-    union {
-        ULONG GrantedAccess;
-        USHORT GrantedAccessIndex;
-        LONG NextFreeTableEntry;
-    } u2;
-} HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
-
-typedef struct _HANDLE_TABLE
-{
-    ULONG Flags;
-    LONG HandleCount;
-    PHANDLE_TABLE_ENTRY **Table;
-    PEPROCESS QuotaProcess;
-    HANDLE UniqueProcessId;
-    LONG FirstFreeTableEntry;
-    LONG NextIndexNeedingPool;
-    ERESOURCE HandleTableLock;
-    LIST_ENTRY HandleTableList;
-    KEVENT HandleContentionEvent;
-} HANDLE_TABLE;
-
-#ifndef __USE_W32API
-
-typedef struct _HANDLE_TABLE *PHANDLE_TABLE;
-
-/*
- * FIXME: These will eventually become centerfold in the compliant Ob Manager
- * For now, they are only here so Device Map is properly defined before the header
- * changes
- */
-typedef struct _OBJECT_DIRECTORY_ENTRY {
-    struct _OBJECT_DIRECTORY_ENTRY *ChainLink;
-    PVOID Object;
-    ULONG HashValue;
-} OBJECT_DIRECTORY_ENTRY, *POBJECT_DIRECTORY_ENTRY;
-
-#define NUMBER_HASH_BUCKETS 37
-typedef struct _OBJECT_DIRECTORY {
-    struct _OBJECT_DIRECTORY_ENTRY *HashBuckets[NUMBER_HASH_BUCKETS];
-    struct _EX_PUSH_LOCK *Lock;
-    struct _DEVICE_MAP *DeviceMap;
-    ULONG SessionId;
-} OBJECT_DIRECTORY, *POBJECT_DIRECTORY;
-
-#endif /* __USE_W32API */
-
-typedef struct _DEVICE_MAP {
-    POBJECT_DIRECTORY   DosDevicesDirectory;
-    POBJECT_DIRECTORY   GlobalDosDevicesDirectory;
-    ULONG               ReferenceCount;
-    ULONG               DriveMap;
-    UCHAR               DriveType[32];
-} DEVICE_MAP, *PDEVICE_MAP; 
-
-extern POBJECT_TYPE ObDirectoryType;
-extern PDEVICE_MAP ObSystemDeviceMap;
-
-#endif /* ndef _INCLUDE_DDK_OBTYPES_H */
diff --git a/reactos/include/ntos/port.h b/reactos/include/ntos/port.h
deleted file mode 100644 (file)
index 8ff3b2f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* $Id$
- *
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/ntos/port.h
- * PURPOSE:      Port declarations used by all the parts of the 
- *               system
- * PROGRAMMER:   Eric Kohl <ekokl@rz-online.de>
- * UPDATE HISTORY: 
- *               02/02/2001: Created
- */
-
-#ifndef __INCLUDE_PORT_H
-#define __INCLUDE_PORT_H
-
-/* Port Object Access */
-
-#define PORT_ALL_ACCESS               (0x1)
-
-#include <ddk/ntifs.h>
-
-#endif /* __INCLUDE_PORT_H */
-
-/* EOF */
diff --git a/reactos/include/ntos/ps.h b/reactos/include/ntos/ps.h
deleted file mode 100644 (file)
index d2e93d0..0000000
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/ntos/ps.h
- * PURPOSE:      Process/thread declarations used by all the parts of the 
- *               system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_PS_H
-#define __INCLUDE_PS_H
-
-#include <napi/teb.h>
-
-#define THREAD_READ                    (0x020048L)
-#define THREAD_WRITE                   (0x020037L)
-#define THREAD_EXECUTE                 (0x120000L)
-
-#define PROCESS_READ                   (0x020410L)
-#define PROCESS_WRITE                  (0x020bebL)
-#define PROCESS_EXECUTE                        (0x120000L)
-
-/* Thread priorities */
-#define THREAD_PRIORITY_BELOW_NORMAL   (-1)
-#define THREAD_PRIORITY_IDLE   (-15)
-#define THREAD_PRIORITY_LOWEST (-2)
-
-/* Process priority classes */
-#define PROCESS_PRIORITY_CLASS_HIGH    (4) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_IDLE    (0) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_NORMAL  (2) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_REALTIME        (5) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL (1) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL (3) /* FIXME */
-
-/* Job access rights */
-#define JOB_OBJECT_ASSIGN_PROCESS      (1)
-#define JOB_OBJECT_SET_ATTRIBUTES      (2)
-#define JOB_OBJECT_QUERY       (4)
-#define JOB_OBJECT_TERMINATE   (8)
-#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES     (16)
-#define JOB_OBJECT_ALL_ACCESS  (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
-
-/* Thread access rights */
-#define THREAD_ALERT (0x0004L)
-
-#ifndef __USE_W32API
-
-/* Thread access rights */
-#define THREAD_TERMINATE               (0x0001L)
-#define THREAD_SUSPEND_RESUME          (0x0002L)
-#define THREAD_GET_CONTEXT             (0x0008L)
-#define THREAD_SET_CONTEXT             (0x0010L)
-#define THREAD_SET_INFORMATION         (0x0020L)
-#define THREAD_QUERY_INFORMATION       (0x0040L)
-#define THREAD_SET_THREAD_TOKEN                (0x0080L)
-#define THREAD_IMPERSONATE             (0x0100L)
-#define THREAD_DIRECT_IMPERSONATION    (0x0200L)
-
-#define THREAD_ALL_ACCESS              (0x1f03ffL)
-
-/* Process access rights */
-#define PROCESS_TERMINATE              (0x0001L)
-#define PROCESS_CREATE_THREAD          (0x0002L)
-#define PROCESS_SET_SESSIONID          (0x0004L)
-#define PROCESS_VM_OPERATION           (0x0008L)
-#define PROCESS_VM_READ                        (0x0010L)
-#define PROCESS_VM_WRITE               (0x0020L)
-#define PROCESS_DUP_HANDLE             (0x0040L)
-#define PROCESS_CREATE_PROCESS         (0x0080L)
-#define PROCESS_SET_QUOTA              (0x0100L)
-#define PROCESS_SET_INFORMATION                (0x0200L)
-#define PROCESS_QUERY_INFORMATION      (0x0400L)
-#define PROCESS_SUSPEND_RESUME         (0x0800L)
-
-#define PROCESS_ALL_ACCESS             (0x1f0fffL)
-
-/* Thread priorities */
-#define THREAD_PRIORITY_ABOVE_NORMAL   (1)
-#define THREAD_PRIORITY_HIGHEST        (2)
-#define THREAD_PRIORITY_NORMAL (0)
-#define THREAD_PRIORITY_TIME_CRITICAL  (15)
-#define THREAD_PRIORITY_ERROR_RETURN   (2147483647)
-
-/* CreateProcess */
-#define CREATE_DEFAULT_ERROR_MODE      (67108864)
-#define CREATE_NEW_CONSOLE     (16)
-#define CREATE_NEW_PROCESS_GROUP       (512)
-#define CREATE_SEPARATE_WOW_VDM        (2048)
-#define CREATE_SUSPENDED       (4)
-#define CREATE_UNICODE_ENVIRONMENT     (1024)
-#define DEBUG_PROCESS  (1)
-#define DEBUG_ONLY_THIS_PROCESS        (2)
-#define DETACHED_PROCESS       (8)
-#define HIGH_PRIORITY_CLASS    (128)
-#define IDLE_PRIORITY_CLASS    (64)
-#define NORMAL_PRIORITY_CLASS  (32)
-#define REALTIME_PRIORITY_CLASS        (256)
-#define BELOW_NORMAL_PRIORITY_CLASS (16384)
-#define ABOVE_NORMAL_PRIORITY_CLASS (32768)
-
-/* ResumeThread / SuspendThread */
-#define MAXIMUM_SUSPEND_COUNT  (0x7f)
-
-#endif /* !__USE_W32API */
-
-#ifdef NTOS_MODE_KERNEL
-
-#ifdef __NTOSKRNL__
-#ifdef __GNUC__
-extern struct _EPROCESS* EXPORTED PsInitialSystemProcess;
-extern POBJECT_TYPE EXPORTED      PsProcessType;
-extern POBJECT_TYPE EXPORTED      PsThreadType;
-#else /* __GNUC__ */
-/* Microsft-style */
-extern EXPORTED struct _EPROCESS* PsInitialSystemProcess;
-extern EXPORTED POBJECT_TYPE      PsProcessType;
-extern EXPORTED POBJECT_TYPE      PsThreadType;
-#endif /* __GNUC__ */
-#else /* __NTOSKRNL__ */
-#ifdef __GNUC__ // robd
-extern struct _EPROCESS* IMPORTED PsInitialSystemProcess;
-extern POBJECT_TYPE IMPORTED PsProcessType;
-extern POBJECT_TYPE IMPORTED PsThreadType;
-#endif
-#endif
-
-typedef NTSTATUS
-(STDCALL *PW32_PROCESS_CALLBACK)(struct _EPROCESS *Process,
-                                BOOLEAN Create);
-
-typedef NTSTATUS
-(STDCALL *PW32_THREAD_CALLBACK)(struct _ETHREAD *Thread,
-                               BOOLEAN Create);
-
-struct _EJOB;
-
-NTSTATUS STDCALL
-PsCreateSystemProcess (PHANDLE ProcessHandle,
-                      ACCESS_MASK DesiredAccess,
-                      POBJECT_ATTRIBUTES ObjectAttributes);
-
-
-NTSTATUS STDCALL PsCreateWin32Process(struct _EPROCESS* Process);
-
-NTSTATUS STDCALL PsCreateWin32Thread(struct _ETHREAD* Thread);
-
-
-NTSTATUS
-STDCALL PsChargeProcessNonPagedPoolQuota (
-       IN PEPROCESS Process,
-    IN ULONG_PTR Amount
-       );
-
-
-NTSTATUS
-STDCALL PsChargeProcessPagedPoolQuota (
-       IN PEPROCESS Process,
-    IN ULONG_PTR Amount
-       );
-
-
-ULONG
-STDCALL PsGetCurrentProcessSessionId (
-    VOID
-       );
-
-
-KPROCESSOR_MODE
-STDCALL PsGetCurrentThreadPreviousMode (
-    VOID
-       );
-
-
-PVOID
-STDCALL PsGetCurrentThreadStackBase (
-    VOID
-       );
-
-
-PVOID
-STDCALL PsGetCurrentThreadStackLimit (
-    VOID
-       );
-
-
-PVOID
-STDCALL PsGetJobLock(
-    struct _EJOB*      Job
-       );
-
-
-PVOID
-STDCALL PsGetJobSessionId(
-    struct _EJOB*      Job
-       );
-
-
-ULONG
-STDCALL PsGetJobUIRestrictionsClass(
-       struct _EJOB*   Job
-       );
-
-
-LONGLONG
-STDCALL PsGetProcessCreateTimeQuadPart(
-    PEPROCESS  Process
-       );
-
-
-PVOID
-STDCALL PsGetProcessDebugPort(
-    PEPROCESS  Process
-       );
-
-
-BOOLEAN
-STDCALL PsGetProcessExitProcessCalled(
-    PEPROCESS  Process
-       );
-
-
-NTSTATUS
-STDCALL PsGetProcessExitStatus(
-       PEPROCESS Process
-       );
-
-
-HANDLE
-STDCALL PsGetProcessId(
-       PEPROCESS       Process
-       );
-
-
-LPSTR
-STDCALL PsGetProcessImageFileName(
-    PEPROCESS  Process
-       );
-
-
-HANDLE
-STDCALL PsGetProcessInheritedFromUniqueProcessId(
-       PEPROCESS       Process
-       );
-
-
-struct _EJOB*
-STDCALL PsGetProcessJob(
-       PEPROCESS Process
-       );
-
-
-PPEB
-STDCALL PsGetProcessPeb(
-    PEPROCESS  Process
-       );
-
-
-ULONG
-STDCALL PsGetProcessPriorityClass(
-    PEPROCESS  Process
-       );
-
-
-PVOID
-STDCALL PsGetProcessSectionBaseAddress(
-    PEPROCESS  Process
-       );
-
-
-PVOID
-STDCALL PsGetProcessSecurityPort(
-       PEPROCESS Process
-       );
-
-
-HANDLE
-STDCALL PsGetProcessSessionId(
-    PEPROCESS  Process
-       );
-
-
-PVOID
-STDCALL PsGetProcessWin32Process(
-       PEPROCESS Process
-       );
-
-
-PVOID
-STDCALL PsGetProcessWin32WindowStation(
-    PEPROCESS  Process
-       );
-
-
-ULONG
-STDCALL PsGetThreadFreezeCount(
-       struct _ETHREAD* Thread
-       );
-
-
-BOOLEAN
-STDCALL PsGetThreadHardErrorsAreDisabled(
-    struct _ETHREAD*   Thread
-       );
-
-
-HANDLE
-STDCALL PsGetThreadId(
-    struct _ETHREAD*   Thread
-       );
-
-
-PEPROCESS
-STDCALL PsGetThreadProcess(
-    struct _ETHREAD*   Thread
-       );
-
-
-HANDLE
-STDCALL PsGetThreadProcessId(
-    struct _ETHREAD*   Thread
-       );
-
-
-HANDLE
-STDCALL PsGetThreadSessionId(
-    struct _ETHREAD*   Thread
-       );
-
-
-PTEB
-STDCALL PsGetThreadTeb(
-    struct _ETHREAD*   Thread
-       );
-
-
-PVOID
-STDCALL PsGetThreadWin32Thread(
-    struct _ETHREAD*   Thread
-       );
-
-
-BOOLEAN
-STDCALL PsIsProcessBeingDebugged(
-    PEPROCESS  Process
-       );
-
-
-BOOLEAN
-STDCALL PsIsThreadImpersonating(
-    struct _ETHREAD*   Thread
-       );
-
-
-VOID
-STDCALL PsReturnProcessNonPagedPoolQuota(
-    IN PEPROCESS Process,
-    IN ULONG_PTR Amount
-    );
-
-
-VOID
-STDCALL PsReturnProcessPagedPoolQuota(
-    IN PEPROCESS Process,
-    IN ULONG_PTR Amount
-    );
-
-
-VOID
-STDCALL
-PsRevertThreadToSelf(
-       IN struct _ETHREAD* Thread
-       );
-
-
-VOID
-STDCALL PsSetJobUIRestrictionsClass(
-    struct _EJOB*      Job,
-    ULONG      UIRestrictionsClass     
-       );
-
-
-ULONG 
-STDCALL PsSetLegoNotifyRoutine(
-       PVOID LegoNotifyRoutine          
-       );
-
-
-VOID
-STDCALL PsSetProcessPriorityClass(
-    PEPROCESS  Process,
-    ULONG      PriorityClass   
-       );
-
-
-VOID
-STDCALL PsSetProcessSecurityPort(
-    PEPROCESS  Process,
-    PVOID      SecurityPort    
-       );
-
-
-VOID
-STDCALL PsSetProcessWin32Process(
-    PEPROCESS  Process,
-    PVOID      Win32Process
-       );
-
-
-VOID
-STDCALL PsSetProcessWin32WindowStation(
-    PEPROCESS  Process,
-    PVOID      WindowStation
-       );
-
-
-VOID
-STDCALL PsSetThreadHardErrorsAreDisabled(
-    struct _ETHREAD*   Thread,
-    BOOLEAN    HardErrorsAreDisabled
-       );
-
-
-VOID
-STDCALL PsSetThreadWin32Thread(
-    struct _ETHREAD*   Thread,
-    PVOID      Win32Thread
-       );
-
-
-struct _W32_OBJECT_CALLBACK;
-
-
-VOID STDCALL
-STDCALL PsEstablishWin32Callouts (PW32_PROCESS_CALLBACK W32ProcessCallback,
-                         PW32_THREAD_CALLBACK W32ThreadCallback,
-                         struct _W32_OBJECT_CALLBACK *W32ObjectCallback,
-                         PVOID Param4,
-                         ULONG W32ThreadSize,
-                         ULONG W32ProcessSize);
-
-
-NTSTATUS STDCALL PsLookupProcessByProcessId(IN HANDLE ProcessId,
-                                           OUT PEPROCESS *Process);
-
-
-NTSTATUS STDCALL PsLookupProcessThreadByCid(IN PCLIENT_ID Cid,
-                                           OUT PEPROCESS *Process OPTIONAL,
-                                           OUT struct _ETHREAD **Thread);
-                                        /* OUT PETHREAD *Thread); */
-
-NTSTATUS STDCALL PsLookupThreadByThreadId(IN HANDLE ThreadId,
-                                         OUT struct _ETHREAD **Thread);
-                                       /* OUT PETHREAD *Thread); */
-
-#endif /* NTOS_MODE_KERNEL */
-
-#endif /* __INCLUDE_PS_H */
diff --git a/reactos/include/ntos/registry.h b/reactos/include/ntos/registry.h
deleted file mode 100644 (file)
index 008f375..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* $Id$
- *
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/ntos/registry.h
- * PURPOSE:      Registry declarations used by all the parts of the 
- *               system
- * PROGRAMMER:   Eric Kohl <ekohl@rz-online.de>
- * UPDATE HISTORY: 
- *               25/01/2001: Created
- */
-
-#ifndef __INCLUDE_NTOS_REGISTRY_H
-#define __INCLUDE_NTOS_REGISTRY_H
-
-#ifndef __USE_W32API
-
-/* Key access rights */
-#define KEY_QUERY_VALUE                        (1)
-#define KEY_SET_VALUE                  (2)
-#define KEY_CREATE_SUB_KEY             (4)
-#define KEY_ENUMERATE_SUB_KEYS         (8)
-#define KEY_NOTIFY                     (16)
-#define KEY_CREATE_LINK                        (32)
-
-#define KEY_READ                       (0x20019L)
-#define KEY_WRITE                      (0x20006L)
-#define KEY_EXECUTE                    (0x20019L)
-#define KEY_ALL_ACCESS                 (0xf003fL)
-
-/* Key create options */
-#define REG_OPTION_NON_VOLATILE                (0x0L)
-#define REG_OPTION_VOLATILE            (0x1L)
-#define REG_OPTION_CREATE_LINK         (0x2L)
-#define REG_OPTION_BACKUP_RESTORE      (0x8L)
-#define REG_OPTION_OPEN_LINK           (0x8L)
-
-/* Key load/restore options */
-#define REG_WHOLE_HIVE_VOLATILE                (0x1L)
-#define REG_REFRESH_HIVE               (0x2L)
-#define REG_NO_LAZY_FLUSH              (0x4L)
-#define REG_FORCE_RESTORE              (0x8L)
-
-/* Key create/open disposition */
-#define REG_CREATED_NEW_KEY            (0x1L)
-#define REG_OPENED_EXISTING_KEY                (0x2L)
-
-/* Value types */
-#define REG_NONE                       (0)
-#define REG_SZ                         (1)
-#define REG_EXPAND_SZ                  (2)
-#define REG_BINARY                     (3)
-#define REG_DWORD                      (4)
-#define REG_DWORD_LITTLE_ENDIAN                (4)
-#define REG_DWORD_BIG_ENDIAN           (5)
-#define REG_LINK                       (6)
-#define REG_MULTI_SZ                   (7)
-#define REG_RESOURCE_LIST              (8)
-#define REG_FULL_RESOURCE_DESCRIPTOR   (9)
-#define REG_RESOURCE_REQUIREMENTS_LIST (10)
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_NTOS_REGISTRY_H */
diff --git a/reactos/include/ntos/rtl.h b/reactos/include/ntos/rtl.h
deleted file mode 100755 (executable)
index 74e3949..0000000
+++ /dev/null
@@ -1,2935 +0,0 @@
-/* $Id$
- * 
- */
-#ifndef __DDK_RTL_H
-#define __DDK_RTL_H
-
-/* RTLP Functions */
-#include <rosrtl/string.h>
-
-#if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined (__NTAPP__)
-
-#include <stddef.h>
-#include <stdarg.h>
-
-#endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
-
-#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
-#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
-
-#ifndef __USE_W32API
-
-/*
- * PURPOSE: Flags for RtlQueryRegistryValues
- */
-#define RTL_QUERY_REGISTRY_SUBKEY      (0x00000001)
-#define RTL_QUERY_REGISTRY_TOPKEY      (0x00000002)
-#define RTL_QUERY_REGISTRY_REQUIRED    (0x00000004)
-#define RTL_QUERY_REGISTRY_NOVALUE     (0x00000008)
-#define RTL_QUERY_REGISTRY_NOEXPAND    (0x00000010)
-#define RTL_QUERY_REGISTRY_DIRECT      (0x00000020)
-#define RTL_QUERY_REGISTRY_DELETE      (0x00000040)
-
-
-/*
- * PURPOSE: Flags used by RtlIsTextUnicode and IsTextUnicode
- */
-#define IS_TEXT_UNICODE_ASCII16                        (0x00000001)
-#define IS_TEXT_UNICODE_REVERSE_ASCII16                (0x00000010)
-#define IS_TEXT_UNICODE_STATISTICS             (0x00000002)
-#define IS_TEXT_UNICODE_REVERSE_STATISTICS     (0x00000020)
-#define IS_TEXT_UNICODE_CONTROLS               (0x00000004)
-#define IS_TEXT_UNICODE_REVERSE_CONTROLS       (0x00000040)
-#define IS_TEXT_UNICODE_SIGNATURE              (0x00000008)
-#define IS_TEXT_UNICODE_REVERSE_SIGNATURE      (0x00000080)
-#define IS_TEXT_UNICODE_ILLEGAL_CHARS          (0x00000100)
-#define IS_TEXT_UNICODE_ODD_LENGTH             (0x00000200)
-#define IS_TEXT_UNICODE_NULL_BYTES             (0x00001000)
-#define IS_TEXT_UNICODE_UNICODE_MASK           (0x0000000F)
-#define IS_TEXT_UNICODE_REVERSE_MASK           (0x000000F0)
-#define IS_TEXT_UNICODE_NOT_UNICODE_MASK       (0x00000F00)
-#define IS_TEXT_UNICODE_NOT_ASCII_MASK         (0x0000F000)
-
-/*
- * VOID
- * InitializeObjectAttributes (
- *     POBJECT_ATTRIBUTES      InitializedAttributes,
- *     PUNICODE_STRING         ObjectName,
- *     ULONG                   Attributes,
- *     HANDLE                  RootDirectory,
- *     PSECURITY_DESCRIPTOR    SecurityDescriptor
- *     );
- *
- * FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a 
- * subsequent call to ZwCreateXXX or ZwOpenXXX
- * ARGUMENTS:
- *        InitializedAttributes (OUT) = Caller supplied storage for the
- *                                      object attributes
- *        ObjectName = Full path name for object
- *        Attributes = Attributes for the object
- *        RootDirectory = Where the object should be placed or NULL
- *        SecurityDescriptor = Ignored
- */
-#define InitializeObjectAttributes(p,n,a,r,s) \
-{ \
-       (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
-       (p)->ObjectName = n; \
-       (p)->Attributes = a; \
-       (p)->RootDirectory = r; \
-       (p)->SecurityDescriptor = s; \
-       (p)->SecurityQualityOfService = NULL; \
-}
-
-
-/*
- * VOID
- * InitializeListHead (
- *             PLIST_ENTRY     ListHead
- *             );
- *
- * FUNCTION: Initializes a double linked list
- * ARGUMENTS:
- *         ListHead = Caller supplied storage for the head of the list
- */
-static __inline VOID
-InitializeListHead(
-       IN PLIST_ENTRY  ListHead)
-{
-       ListHead->Flink = ListHead->Blink = ListHead;
-}
-
-
-/*
- * VOID
- * InsertHeadList (
- *             PLIST_ENTRY     ListHead,
- *             PLIST_ENTRY     Entry
- *             );
- *
- * FUNCTION: Inserts an entry in a double linked list
- * ARGUMENTS:
- *        ListHead = Head of the list
- *        Entry = Entry to insert
- */
-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;
-}
-
-
-/*
- * VOID
- * InsertTailList (
- *             PLIST_ENTRY     ListHead,
- *             PLIST_ENTRY     Entry
- *             );
- *
- * FUNCTION:
- *     Inserts an entry in a double linked list
- *
- * ARGUMENTS:
- *     ListHead = Head of the list
- *     Entry = Entry to insert
- */
-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;
-}
-
-/*
- * BOOLEAN
- * IsListEmpty (
- *     PLIST_ENTRY     ListHead
- *     );
- *
- * FUNCTION:
- *     Checks if a double linked list is empty
- *
- * ARGUMENTS:
- *     ListHead = Head of the list
-*/
-#define IsListEmpty(ListHead) \
-       ((ListHead)->Flink == (ListHead))
-
-
-/*
- * PSINGLE_LIST_ENTRY
- * PopEntryList (
- *     PSINGLE_LIST_ENTRY      ListHead
- *     );
- *
- * FUNCTION:
- *     Removes an entry from the head of a single linked list
- *
- * ARGUMENTS:
- *     ListHead = Head of the list
- *
- * RETURNS:
- *     The removed entry
- */
-#define PopEntryList(ListHead) \
-       (ListHead)->Next; \
-       { \
-               PSINGLE_LIST_ENTRY _FirstEntry; \
-               _FirstEntry = (ListHead)->Next; \
-               if (_FirstEntry != NULL) \
-                       (ListHead)->Next = _FirstEntry->Next; \
-       }
-
-#define RtlCopyMemory(Destination,Source,Length) \
-       memcpy((Destination),(Source),(Length))
-
-#define PushEntryList(_ListHead, _Entry) \
-       (_Entry)->Next = (_ListHead)->Next; \
-       (_ListHead)->Next = (_Entry); \
-
-/*
- *BOOLEAN
- *RemoveEntryList (
- *     PLIST_ENTRY     Entry
- *     );
- *
- * FUNCTION:
- *     Removes an entry from a double linked list
- *
- * ARGUMENTS:
- *     ListEntry = Entry to remove
- */
-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);
-}
-
-
-/*
- * PLIST_ENTRY
- * RemoveHeadList (
- *     PLIST_ENTRY     ListHead
- *     );
- *
- * FUNCTION:
- *     Removes the head entry from a double linked list
- *
- * ARGUMENTS:
- *     ListHead = Head of the list
- *
- * RETURNS:
- *     The removed entry
- */
-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;
-}
-
-
-/*
- * PLIST_ENTRY
- * RemoveTailList (
- *     PLIST_ENTRY     ListHead
- *     );
- *
- * FUNCTION:
- *     Removes the tail entry from a double linked list
- *
- * ARGUMENTS:
- *     ListHead = Head of the list
- *
- * RETURNS:
- *     The removed 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;
-}
-
-/*
- * BOOLEAN
- * IsXstEntry (
- *  PLIST_ENTRY ListHead,
- *  PLIST_ENTRY Entry
- *  );
-*/
-#define IsFirstEntry(ListHead, Entry) ((ListHead)->Flink == Entry)
-  
-#define IsLastEntry(ListHead, Entry) ((ListHead)->Blink == Entry)
-  
-#define RtlEqualMemory(Destination,Source,Length)   (!memcmp((Destination), (Source), (Length)))
-
-NTSTATUS
-STDCALL
-RtlCreateUserThread (
-   IN HANDLE         ProcessHandle,
-   IN PSECURITY_DESCRIPTOR SecurityDescriptor,
-   IN BOOLEAN        CreateSuspended,
-   IN LONG        StackZeroBits,
-   IN OUT   PULONG         StackReserve,
-   IN OUT   PULONG         StackCommit,
-   IN PTHREAD_START_ROUTINE   StartAddress,
-   IN PVOID       Parameter,
-   IN OUT   PHANDLE        ThreadHandle,
-   IN OUT   PCLIENT_ID     ClientId
-   );      
-
-NTSTATUS
-STDCALL
-RtlAppendUnicodeToString (
-       PUNICODE_STRING Destination,
-       PCWSTR          Source
-       );
-
-SIZE_T STDCALL
-RtlCompareMemory(IN const VOID *Source1,
-                 IN const VOID *Source2,
-                 IN SIZE_T Length);
-
-BOOLEAN
-STDCALL
-RtlEqualUnicodeString (
-       PUNICODE_STRING String1,
-       PUNICODE_STRING String2,
-       BOOLEAN         CaseInSensitive
-       );
-
-NTSTATUS
-STDCALL
-RtlQueryRegistryValues (
-       IN      ULONG                           RelativeTo,
-       IN      PCWSTR                          Path,
-       IN      PRTL_QUERY_REGISTRY_TABLE       QueryTable,
-       IN      PVOID                           Context,
-       IN      PVOID                           Environment
-       );
-
-NTSTATUS
-STDCALL
-RtlWriteRegistryValue (
-       ULONG   RelativeTo,
-       PCWSTR  Path,
-       PCWSTR  ValueName,
-       ULONG   ValueType,
-       PVOID   ValueData,
-       ULONG   ValueLength
-       );
-
-NTSTATUS STDCALL
-RtlDeleteRegistryValue(IN ULONG RelativeTo,
-                      IN PCWSTR Path,
-                      IN PCWSTR ValueName);
-
-VOID STDCALL
-RtlMoveMemory (PVOID Destination, CONST VOID* Source, ULONG Length);
-
-BOOLEAN STDCALL
-RtlEqualLuid(IN PLUID Luid1,
-            IN PLUID Luid2);
-
-VOID
-STDCALL
-RtlFillMemory (
-       PVOID   Destination,
-       ULONG   Length,
-       UCHAR   Fill
-       );
-
-VOID STDCALL
-RtlZeroMemory (PVOID Destination, ULONG Length);
-
-#else /* __USE_W32API */
-
-#include <ddk/ntifs.h>
-
-#endif /* __USE_W32API */
-
-/*
- * FIFO versions are slower but ensures that entries with equal SortField value
- * are placed in FIFO order (assuming that entries are removed from Head).
- */
-
-#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));\
-}
-
-/*
- * PURPOSE: Used with RtlCheckRegistryKey, RtlCreateRegistryKey, 
- * RtlDeleteRegistryKey
- */
-#define RTL_REGISTRY_ABSOLUTE   0
-#define RTL_REGISTRY_SERVICES   1
-#define RTL_REGISTRY_CONTROL    2
-#define RTL_REGISTRY_WINDOWS_NT 3
-#define RTL_REGISTRY_DEVICEMAP  4
-#define RTL_REGISTRY_USER       5
-#define RTL_REGISTRY_MAXIMUM    6
-
-#define RTL_REGISTRY_HANDLE     0x40000000
-#define RTL_REGISTRY_OPTIONAL   0x80000000
-
-
-#define SHORT_SIZE     (sizeof(USHORT))
-#define SHORT_MASK     (SHORT_SIZE-1)
-#define LOWBYTE_MASK   0x00FF
-
-#define FIRSTBYTE(Value)       ((Value) & LOWBYTE_MASK)
-#define SECONDBYTE(Value)      (((Value) >> 8) & LOWBYTE_MASK)
-#define THIRDBYTE(Value)       (((Value) >> 16) & LOWBYTE_MASK)
-#define FOURTHBYTE(Value)      (((Value) >> 24) & LOWBYTE_MASK)
-
-/* FIXME: reverse byte-order on big-endian machines (e.g. MIPS) */
-#define SHORT_LEAST_SIGNIFICANT_BIT    0
-#define SHORT_MOST_SIGNIFICANT_BIT     1
-
-#define LONG_LEAST_SIGNIFICANT_BIT     0
-#define LONG_3RD_MOST_SIGNIFICANT_BIT  1
-#define LONG_2RD_MOST_SIGNIFICANT_BIT  2
-#define LONG_MOST_SIGNIFICANT_BIT      3
-
-
-#define NLS_ANSI_CODE_PAGE       NlsAnsiCodePage
-#define NLS_LEAD_BYTE_INFO       NlsLeadByteInfo
-#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
-#define NLS_OEM_LEAD_BYTE_INFO   NlsOemLeadByteInfo
-
-#if defined(__NTOSKRNL__) || defined(__NTDLL__)
-extern USHORT  EXPORTED NlsAnsiCodePage;
-extern PUSHORT EXPORTED NlsLeadByteInfo;
-extern BOOLEAN EXPORTED NlsMbCodePageTag;
-extern BOOLEAN EXPORTED NlsMbOemCodePageTag;
-extern PUSHORT EXPORTED NlsOemLeadByteInfo;
-#else
-extern USHORT  IMPORTED NlsAnsiCodePage;
-extern PUSHORT IMPORTED NlsLeadByteInfo;
-extern BOOLEAN IMPORTED NlsMbCodePageTag;
-extern BOOLEAN IMPORTED NlsMbOemCodePageTag;
-extern PUSHORT IMPORTED NlsOemLeadByteInfo;
-#endif /* __NTOSKRNL__ || __NTDLL__ */
-
-/*
-VOID
-PushEntryList (
-       PSINGLE_LIST_ENTRY      ListHead,
-       PSINGLE_LIST_ENTRY      Entry
-       );
-*/
-/*
-#define PushEntryList(ListHead,Entry) \
-       (Entry)->Next = (ListHead)->Next; \
-       (ListHead)->Next = (Entry)
-*/
-
-
-NTSTATUS STDCALL
-RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD,
-                            PSECURITY_DESCRIPTOR_RELATIVE RelSD,
-                            PULONG BufferLength);
-
-NTSTATUS STDCALL
-RtlAddAccessAllowedAce (PACL Acl,
-                       ULONG Revision,
-                       ACCESS_MASK AccessMask,
-                       PSID Sid);
-
-NTSTATUS 
-STDCALL 
-RtlAddAccessAllowedAceEx(
-       IN OUT PACL pAcl,
-       IN DWORD dwAceRevision,
-       IN DWORD AceFlags,
-       IN DWORD AccessMask,
-       IN PSID pSid);
-
-
-NTSTATUS STDCALL
-RtlAddAccessDeniedAce (PACL Acl,
-                      ULONG Revision,
-                      ACCESS_MASK AccessMask,
-                      PSID Sid);
-
-NTSTATUS STDCALL
-RtlAddAce (PACL Acl,
-          ULONG Revision,
-          ULONG StartingIndex,
-          PACE AceList,
-          ULONG AceListLength);
-
-NTSTATUS STDCALL
-RtlAddAtomToAtomTable (IN PRTL_ATOM_TABLE AtomTable,
-                      IN PWSTR AtomName,
-                      OUT PRTL_ATOM Atom);
-
-NTSTATUS STDCALL
-RtlAddAuditAccessAce (PACL Acl,
-                     ULONG Revision,
-                     ACCESS_MASK AccessMask,
-                     PSID Sid,
-                     BOOLEAN Success,
-                     BOOLEAN Failure);
-
-NTSTATUS STDCALL
-RtlAddRange (IN OUT PRTL_RANGE_LIST RangeList,
-            IN ULONGLONG Start,
-            IN ULONGLONG End,
-            IN UCHAR Attributes,
-            IN ULONG Flags,  /* RTL_RANGE_LIST_ADD_... flags */
-            IN PVOID UserData OPTIONAL,
-            IN PVOID Owner OPTIONAL);
-
-NTSTATUS STDCALL
-RtlAllocateAndInitializeSid (IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
-                            IN UCHAR SubAuthorityCount,
-                            IN ULONG SubAuthority0,
-                            IN ULONG SubAuthority1,
-                            IN ULONG SubAuthority2,
-                            IN ULONG SubAuthority3,
-                            IN ULONG SubAuthority4,
-                            IN ULONG SubAuthority5,
-                            IN ULONG SubAuthority6,
-                            IN ULONG SubAuthority7,
-                            OUT PSID *Sid);
-
-PVOID STDCALL
-RtlAllocateHeap (
-       HANDLE  Heap,
-       ULONG   Flags,
-       ULONG   Size
-       );
-
-WCHAR STDCALL
-RtlAnsiCharToUnicodeChar (IN CHAR AnsiChar);
-
-ULONG
-STDCALL
-RtlAnsiStringToUnicodeSize (
-       PANSI_STRING    AnsiString
-       );
-
-NTSTATUS
-STDCALL
-RtlAnsiStringToUnicodeString (
-       PUNICODE_STRING DestinationString,
-       PANSI_STRING    SourceString,
-       BOOLEAN         AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlAppendAsciizToString(
-       PSTRING Destination,
-       PCSZ    Source
-       );
-
-NTSTATUS
-STDCALL
-RtlAppendStringToString (
-       PSTRING Destination,
-       PSTRING Source
-       );
-
-NTSTATUS
-STDCALL
-RtlAppendUnicodeStringToString (
-       PUNICODE_STRING Destination,
-       PUNICODE_STRING Source
-       );
-
-BOOLEAN STDCALL
-RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess,
-                         ACCESS_MASK DesiredAccess);
-
-BOOLEAN STDCALL
-RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess,
-                         ACCESS_MASK DesiredAccess);
-
-BOOLEAN
-STDCALL
-RtlAreBitsClear (
-       PRTL_BITMAP     BitMapHeader,
-       ULONG           StartingIndex,
-       ULONG           Length
-       );
-
-BOOLEAN
-STDCALL
-RtlAreBitsSet (
-       PRTL_BITMAP     BitMapHeader,
-       ULONG           StartingIndex,
-       ULONG           Length
-       );
-
-VOID
-STDCALL
-RtlAssert (
-       PVOID FailedAssertion,
-       PVOID FileName,
-       ULONG LineNumber,
-       PCHAR Message
-       );
-
-VOID
-STDCALL
-RtlCaptureContext (
-       OUT PCONTEXT ContextRecord
-       );
-
-USHORT
-STDCALL
-RtlCaptureStackBackTrace (
-       IN ULONG FramesToSkip,
-       IN ULONG FramesToCapture,
-       OUT PVOID *BackTrace,
-       OUT PULONG BackTraceHash OPTIONAL
-       );
-
-
-
-NTSTATUS
-STDCALL
-RtlCharToInteger (
-       PCSZ    String,
-       ULONG   Base,
-       PULONG  Value
-       );
-
-NTSTATUS
-STDCALL
-RtlCheckRegistryKey (
-       ULONG   RelativeTo,
-       PWSTR   Path
-       );
-
-VOID
-STDCALL
-RtlClearAllBits (
-       IN      PRTL_BITMAP     BitMapHeader
-       );
-
-VOID
-STDCALL
-RtlClearBit (
-       PRTL_BITMAP BitMapHeader,
-       ULONG BitNumber
-       );
-
-VOID
-STDCALL
-RtlClearBits (
-       IN      PRTL_BITMAP     BitMapHeader,
-       IN      ULONG           StartingIndex,
-       IN      ULONG           NumberToClear
-       );
-
-ULONG STDCALL
-RtlCompactHeap (
-       HANDLE Heap,
-       ULONG   Flags
-       );
-
-LONG
-STDCALL
-RtlCompareString (
-       PSTRING String1,
-       PSTRING String2,
-       BOOLEAN CaseInsensitive
-       );
-
-LONG
-STDCALL
-RtlCompareUnicodeString (
-       PUNICODE_STRING String1,
-       PUNICODE_STRING String2,
-       BOOLEAN         CaseInsensitive
-       );
-
-NTSTATUS STDCALL
-RtlCompressBuffer(IN USHORT CompressionFormatAndEngine,
-                 IN PUCHAR UncompressedBuffer,
-                 IN ULONG UncompressedBufferSize,
-                 OUT PUCHAR CompressedBuffer,
-                 IN ULONG CompressedBufferSize,
-                 IN ULONG UncompressedChunkSize,
-                 OUT PULONG FinalCompressedSize,
-                 IN PVOID WorkSpace);
-
-NTSTATUS STDCALL
-RtlCompressChunks(IN PUCHAR UncompressedBuffer,
-                 IN ULONG UncompressedBufferSize,
-                 OUT PUCHAR CompressedBuffer,
-                 IN ULONG CompressedBufferSize,
-                 IN OUT PCOMPRESSED_DATA_INFO CompressedDataInfo,
-                 IN ULONG CompressedDataInfoLength,
-                 IN PVOID WorkSpace);
-
-LARGE_INTEGER STDCALL
-RtlConvertLongToLargeInteger (IN LONG SignedInteger);
-
-NTSTATUS STDCALL
-RtlConvertSidToUnicodeString (IN OUT PUNICODE_STRING String,
-                             IN PSID Sid,
-                             IN BOOLEAN AllocateString);
-
-LARGE_INTEGER STDCALL
-RtlConvertUlongToLargeInteger (IN ULONG UnsignedInteger);
-
-#if 0
-VOID
-RtlCopyBytes (
-       PVOID           Destination,
-       CONST VOID      * Source,
-       ULONG           Length
-       );
-
-VOID
-RtlCopyMemory (
-       VOID            * Destination,
-       CONST VOID      * Source,
-       ULONG           Length
-       );
-#endif
-
-#define RtlCopyBytes RtlCopyMemory
-
-VOID STDCALL
-RtlCopyLuid(IN PLUID LuidDest,
-           IN PLUID LuidSrc);
-
-VOID STDCALL
-RtlCopyLuidAndAttributesArray(ULONG Count,
-                             PLUID_AND_ATTRIBUTES Src,
-                             PLUID_AND_ATTRIBUTES Dest);
-
-NTSTATUS STDCALL
-RtlCopyRangeList (OUT PRTL_RANGE_LIST CopyRangeList,
-                 IN PRTL_RANGE_LIST RangeList);
-
-NTSTATUS STDCALL
-RtlCopySid(ULONG BufferLength,
-          PSID Dest,
-          PSID Src);
-
-NTSTATUS STDCALL
-RtlCopySidAndAttributesArray(ULONG Count,
-                            PSID_AND_ATTRIBUTES Src,
-                            ULONG SidAreaSize,
-                            PSID_AND_ATTRIBUTES Dest,
-                            PVOID SidArea,
-                            PVOID* RemainingSidArea,
-                            PULONG RemainingSidAreaSize);
-
-VOID STDCALL
-RtlCopyString(PSTRING DestinationString,
-             PSTRING SourceString);
-
-VOID STDCALL
-RtlCopyUnicodeString(PUNICODE_STRING DestinationString,
-                    PUNICODE_STRING SourceString);
-
-NTSTATUS STDCALL
-RtlCreateAcl (PACL Acl,
-             ULONG AclSize,
-             ULONG AclRevision);
-
-NTSTATUS STDCALL
-RtlCreateAtomTable(IN ULONG TableSize,
-                  IN OUT PRTL_ATOM_TABLE *AtomTable);
-
-HANDLE
-STDCALL
-RtlCreateHeap (
-       ULONG                   Flags,
-       PVOID                   BaseAddress,
-       ULONG                   SizeToReserve,     /* dwMaximumSize */
-       ULONG                   SizeToCommit,      /* dwInitialSize */
-       PVOID                   Unknown,
-       PRTL_HEAP_DEFINITION    Definition
-       );
-
-NTSTATUS STDCALL
-RtlCreateRegistryKey (ULONG RelativeTo,
-                     PWSTR Path);
-
-NTSTATUS STDCALL
-RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                            ULONG Revision);
-
-NTSTATUS STDCALL
-RtlCreateSecurityDescriptorRelative (PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
-                                    ULONG Revision);
-
-NTSTATUS
-STDCALL
-RtlCreateSystemVolumeInformationFolder(
-       IN  PUNICODE_STRING VolumeRootPath
-       );
-
-BOOLEAN STDCALL
-RtlCreateUnicodeString (OUT PUNICODE_STRING Destination,
-                       IN PCWSTR Source);
-
-BOOLEAN STDCALL
-RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
-                                 IN PCSZ Source);
-
-NTSTATUS
-STDCALL
-RtlCustomCPToUnicodeN (
-       IN      PCPTABLEINFO    CustomCP,
-       PWCHAR          UnicodeString,
-       ULONG           UnicodeSize,
-       PULONG          ResultSize,
-       PCHAR           CustomString,
-       ULONG           CustomSize
-       );
-
-BOOLEAN STDCALL
-RtlCutoverTimeToSystemTime(IN PTIME_FIELDS CutoverTimeFields,
-                           OUT PLARGE_INTEGER SystemTime,
-                           IN PLARGE_INTEGER CurrentTime,
-                           IN BOOLEAN ThisYearsCutoverOnly);
-
-NTSTATUS STDCALL
-RtlDecompressBuffer(IN USHORT CompressionFormat,
-                   OUT PUCHAR UncompressedBuffer,
-                   IN ULONG UncompressedBufferSize,
-                   IN PUCHAR CompressedBuffer,
-                   IN ULONG CompressedBufferSize,
-                   OUT PULONG FinalUncompressedSize);
-
-NTSTATUS STDCALL
-RtlDecompressChunks(OUT PUCHAR UncompressedBuffer,
-                   IN ULONG UncompressedBufferSize,
-                   IN PUCHAR CompressedBuffer,
-                   IN ULONG CompressedBufferSize,
-                   IN PUCHAR CompressedTail,
-                   IN ULONG CompressedTailSize,
-                   IN PCOMPRESSED_DATA_INFO CompressedDataInfo);
-
-NTSTATUS STDCALL
-RtlDecompressFragment(IN USHORT CompressionFormat,
-                     OUT PUCHAR UncompressedFragment,
-                     IN ULONG UncompressedFragmentSize,
-                     IN PUCHAR CompressedBuffer,
-                     IN ULONG CompressedBufferSize,
-                     IN ULONG FragmentOffset,
-                     OUT PULONG FinalUncompressedSize,
-                     IN PVOID WorkSpace);
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlDelete (
-       PRTL_SPLAY_LINKS Links
-       );
-
-NTSTATUS STDCALL
-RtlDeleteAce (PACL Acl,
-             ULONG AceIndex);
-
-NTSTATUS STDCALL
-RtlDeleteAtomFromAtomTable (IN PRTL_ATOM_TABLE AtomTable,
-                           IN RTL_ATOM Atom);
-
-BOOLEAN
-STDCALL
-RtlDeleteElementGenericTable (
-       PRTL_GENERIC_TABLE Table,
-       PVOID Buffer
-       );
-
-BOOLEAN
-STDCALL
-RtlDeleteElementGenericTableAvl (
-       PRTL_AVL_TABLE Table,
-       PVOID Buffer
-       );
-
-VOID
-STDCALL
-RtlDeleteNoSplay (
-       PRTL_SPLAY_LINKS Links,
-       PRTL_SPLAY_LINKS *Root
-       );
-
-
-NTSTATUS STDCALL
-RtlDeleteOwnersRanges (IN OUT PRTL_RANGE_LIST RangeList,
-                      IN PVOID Owner);
-
-NTSTATUS STDCALL
-RtlDeleteRange (IN OUT PRTL_RANGE_LIST RangeList,
-               IN ULONGLONG Start,
-               IN ULONGLONG End,
-               IN PVOID Owner);
-
-NTSTATUS STDCALL
-RtlDescribeChunk(IN USHORT CompressionFormat,
-                IN OUT PUCHAR *CompressedBuffer,
-                IN PUCHAR EndOfCompressedBufferPlus1,
-                OUT PUCHAR *ChunkBuffer,
-                OUT PULONG ChunkSize);
-
-NTSTATUS STDCALL
-RtlDestroyAtomTable (IN PRTL_ATOM_TABLE AtomTable);
-
-HANDLE STDCALL
-RtlDestroyHeap (HANDLE hheap);
-
-NTSTATUS
-STDCALL
-RtlDispatchException(
-       PEXCEPTION_RECORD pExcptRec, 
-       CONTEXT * pContext 
-       );
-
-
-NTSTATUS
-STDCALL
-RtlDowncaseUnicodeString (
-       IN OUT PUNICODE_STRING  DestinationString,
-       IN PUNICODE_STRING      SourceString,
-       IN BOOLEAN              AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlEmptyAtomTable (
-       IN      PRTL_ATOM_TABLE AtomTable,
-       IN      BOOLEAN         DeletePinned
-       );
-
-LARGE_INTEGER
-STDCALL
-RtlEnlargedIntegerMultiply (
-       LONG    Multiplicand,
-       LONG    Multiplier
-       );
-
-ULONG
-STDCALL
-RtlEnlargedUnsignedDivide (
-       ULARGE_INTEGER  Dividend,
-       ULONG           Divisor,
-       PULONG          Remainder
-       );
-
-LARGE_INTEGER
-STDCALL
-RtlEnlargedUnsignedMultiply (
-       ULONG   Multiplicand,
-       ULONG   Multiplier
-       );
-
-PVOID
-STDCALL
-RtlEnumerateGenericTable (
-       PRTL_GENERIC_TABLE Table,
-       BOOLEAN Restart
-       );
-       
-PVOID
-STDCALL
-RtlEnumerateGenericTableAvl (
-       PRTL_AVL_TABLE Table,
-       BOOLEAN Restart
-       );
-
-PVOID
-STDCALL
-RtlEnumerateGenericTableLikeADirectory (
-       IN PRTL_AVL_TABLE Table,
-       IN PRTL_AVL_MATCH_FUNCTION MatchFunction,
-       IN PVOID MatchData,
-       IN ULONG NextFlag,
-       IN OUT PVOID *RestartKey,
-       IN OUT PULONG DeleteCount,
-       IN OUT PVOID Buffer
-       );
-
-PVOID
-STDCALL
-RtlEnumerateGenericTableWithoutSplaying (
-       PRTL_GENERIC_TABLE Table,
-       PVOID *RestartKey
-       );
-
-PVOID
-STDCALL
-RtlEnumerateGenericTableWithoutSplayingAvl (
-       PRTL_AVL_TABLE Table,
-       PVOID *RestartKey
-       );
-
-BOOLEAN STDCALL
-RtlEqualPrefixSid (PSID Sid1,
-                  PSID Sid2);
-
-BOOLEAN STDCALL
-RtlEqualSid (PSID Sid1,
-            PSID Sid2);
-
-BOOLEAN
-STDCALL
-RtlEqualString (
-       PSTRING String1,
-       PSTRING String2,
-       BOOLEAN CaseInSensitive
-       );
-
-LARGE_INTEGER
-STDCALL
-RtlExtendedIntegerMultiply (
-       LARGE_INTEGER   Multiplicand,
-       LONG            Multiplier
-       );
-
-LARGE_INTEGER
-STDCALL
-RtlExtendedLargeIntegerDivide (
-       LARGE_INTEGER   Dividend,
-       ULONG           Divisor,
-       PULONG          Remainder
-       );
-
-LARGE_INTEGER
-STDCALL
-RtlExtendedMagicDivide (
-       LARGE_INTEGER   Dividend,
-       LARGE_INTEGER   MagicDivisor,
-       CCHAR           ShiftCount
-       );
-
-VOID
-STDCALL
-RtlFillMemoryUlong (
-       PVOID   Destination,
-       ULONG   Length,
-       ULONG   Fill
-       );
-
-ULONG
-STDCALL
-RtlFindClearBits (
-       PRTL_BITMAP     BitMapHeader,
-       ULONG           NumberToFind,
-       ULONG           HintIndex
-       );
-
-ULONG
-STDCALL
-RtlFindClearBitsAndSet (
-       PRTL_BITMAP     BitMapHeader,
-       ULONG           NumberToFind,
-       ULONG           HintIndex
-       );
-
-ULONG
-STDCALL
-RtlFindClearRuns (
-       PRTL_BITMAP BitMapHeader,
-       PRTL_BITMAP_RUN RunArray,
-       ULONG SizeOfRunArray,
-       BOOLEAN LocateLongestRuns
-       );
-
-ULONG
-STDCALL
-RtlFindLastBackwardRunClear (
-       IN PRTL_BITMAP BitMapHeader,
-       IN ULONG FromIndex,
-       IN PULONG StartingRunIndex
-       );
-
-ULONG
-STDCALL
-RtlFindNextForwardRunClear (
-       IN PRTL_BITMAP BitMapHeader,
-       IN ULONG FromIndex,
-       IN PULONG StartingRunIndex
-       );
-       
-
-PUNICODE_PREFIX_TABLE_ENTRY
-STDCALL
-RtlFindUnicodePrefix (
-       PUNICODE_PREFIX_TABLE PrefixTable,
-       PUNICODE_STRING FullName,
-       ULONG CaseInsensitiveIndex
-       );
-
-ULONG
-STDCALL
-RtlFindFirstRunClear (
-       PRTL_BITMAP     BitMapHeader,
-       PULONG          StartingIndex
-       );
-
-ULONG
-STDCALL
-RtlFindFirstRunSet (
-       PRTL_BITMAP     BitMapHeader,
-       PULONG          StartingIndex
-       );
-
-CCHAR STDCALL
-RtlFindLeastSignificantBit (IN ULONGLONG Set);
-
-ULONG
-STDCALL
-RtlFindLongestRunClear (
-       PRTL_BITMAP     BitMapHeader,
-       PULONG          StartingIndex
-       );
-
-ULONG
-STDCALL
-RtlFindLongestRunSet (
-       PRTL_BITMAP     BitMapHeader,
-       PULONG          StartingIndex
-       );
-
-NTSTATUS
-STDCALL
-RtlFindMessage (
-       IN      PVOID                           BaseAddress,
-       IN      ULONG                           Type,
-       IN      ULONG                           Language,
-       IN      ULONG                           MessageId,
-       OUT     PRTL_MESSAGE_RESOURCE_ENTRY     *MessageResourceEntry
-       );
-
-CCHAR STDCALL
-RtlFindMostSignificantBit (IN ULONGLONG Set);
-
-NTSTATUS STDCALL
-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);
-
-ULONG
-STDCALL
-RtlFindSetBits (
-       PRTL_BITMAP     BitMapHeader,
-       ULONG           NumberToFind,
-       ULONG           HintIndex
-       );
-
-ULONG
-STDCALL
-RtlFindSetBitsAndClear (
-       PRTL_BITMAP     BitMapHeader,
-       ULONG           NumberToFind,
-       ULONG           HintIndex
-       );
-
-BOOLEAN STDCALL
-RtlFirstFreeAce (PACL Acl,
-                PACE* Ace);
-
-NTSTATUS STDCALL
-RtlFormatCurrentUserKeyPath (IN OUT PUNICODE_STRING KeyPath);
-
-VOID STDCALL
-RtlFreeAnsiString (IN PANSI_STRING AnsiString);
-
-BOOLEAN
-STDCALL
-RtlFreeHeap (
-       HANDLE  Heap,
-       ULONG   Flags,
-       PVOID   Address
-       );
-
-VOID STDCALL
-RtlFreeOemString (IN POEM_STRING OemString);
-
-VOID STDCALL
-RtlFreeRangeList (IN PRTL_RANGE_LIST RangeList);
-
-PVOID STDCALL
-RtlFreeSid (PSID Sid);
-
-VOID STDCALL
-RtlFreeUnicodeString (IN PUNICODE_STRING UnicodeString);
-
-VOID STDCALL
-RtlGenerate8dot3Name (IN PUNICODE_STRING Name,
-                     IN BOOLEAN AllowExtendedCharacters,
-                     IN OUT PGENERATE_NAME_CONTEXT Context,
-                     OUT PUNICODE_STRING Name8dot3);
-
-NTSTATUS STDCALL
-RtlGetAce (PACL Acl,
-          ULONG AceIndex,
-          PACE *Ace);
-
-VOID
-STDCALL
-RtlGetCallersAddress(
-       OUT PVOID *CallersAddress,
-       OUT PVOID *CallersCaller
-       );
-
-NTSTATUS STDCALL
-RtlGetCompressionWorkSpaceSize (IN USHORT CompressionFormatAndEngine,
-                               OUT PULONG CompressBufferAndWorkSpaceSize,
-                               OUT PULONG CompressFragmentWorkSpaceSize);
-
-NTSTATUS STDCALL
-RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                                PSECURITY_DESCRIPTOR_CONTROL Control,
-                                PULONG Revision);
-
-NTSTATUS STDCALL
-RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                             PBOOLEAN DaclPresent,
-                             PACL* Dacl,
-                             PBOOLEAN DaclDefaulted);
-
-VOID STDCALL
-RtlGetDefaultCodePage (OUT PUSHORT AnsiCodePage,
-                      OUT PUSHORT OemCodePage);
-
-PVOID
-STDCALL
-RtlGetElementGenericTable(
-       PRTL_GENERIC_TABLE Table,
-       ULONG I
-       );
-
-PVOID
-STDCALL
-RtlGetElementGenericTableAvl (
-       PRTL_AVL_TABLE Table,
-       ULONG I
-       );
-
-NTSTATUS STDCALL
-RtlGetFirstRange (IN PRTL_RANGE_LIST RangeList,
-                 OUT PRTL_RANGE_LIST_ITERATOR Iterator,
-                 OUT PRTL_RANGE *Range);
-
-NTSTATUS STDCALL
-RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                              PSID* Group,
-                              PBOOLEAN GroupDefaulted);
-
-NTSTATUS STDCALL
-RtlGetLastNtStatus(VOID);
-
-ULONG STDCALL
-RtlGetLastWin32Error(VOID);
-
-NTSTATUS STDCALL
-RtlGetNextRange (IN OUT PRTL_RANGE_LIST_ITERATOR Iterator,
-                OUT PRTL_RANGE *Range,
-                IN BOOLEAN MoveForwards);
-
-ULONG
-STDCALL
-RtlGetNtGlobalFlags (
-       VOID
-       ); 
-
-NTSTATUS STDCALL
-RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                              PSID* Owner,
-                              PBOOLEAN OwnerDefaulted);
-
-NTSTATUS STDCALL
-RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                             PBOOLEAN SaclPresent,
-                             PACL* Sacl,
-                             PBOOLEAN SaclDefaulted);
-
-BOOLEAN STDCALL
-RtlGetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,
-                                 PUCHAR RMControl);
-
-NTSTATUS
-STDCALL
-RtlGetSetBootStatusData(
-       HANDLE Filehandle,
-       BOOLEAN WriteMode,
-       DWORD DataClass,
-       PVOID Buffer,
-       ULONG BufferSize,
-       DWORD DataClass2
-       );
-
-NTSTATUS STDCALL
-RtlGUIDFromString (IN PUNICODE_STRING GuidString,
-                  OUT GUID* Guid);
-
-NTSTATUS
-STDCALL
-RtlHashUnicodeString(
-       IN const UNICODE_STRING *String,
-       IN BOOLEAN CaseInSensitive,
-       IN ULONG HashAlgorithm,
-       OUT PULONG HashValue
-       );
-
-PSID_IDENTIFIER_AUTHORITY STDCALL
-RtlIdentifierAuthoritySid (PSID Sid);
-
-PVOID
-STDCALL
-RtlImageDirectoryEntryToData (
-       PVOID   BaseAddress,
-       BOOLEAN bFlag,
-       ULONG   Directory,
-       PULONG  Size
-       );
-
-PIMAGE_NT_HEADERS
-STDCALL
-RtlImageNtHeader (
-       IN      PVOID   BaseAddress
-       );
-
-PIMAGE_SECTION_HEADER
-STDCALL
-RtlImageRvaToSection (
-       PIMAGE_NT_HEADERS       NtHeader,
-       PVOID                   BaseAddress,
-       ULONG                   Rva
-       );
-
-ULONG
-STDCALL
-RtlImageRvaToVa (
-       PIMAGE_NT_HEADERS       NtHeader,
-       PVOID                   BaseAddress,
-       ULONG                   Rva,
-       PIMAGE_SECTION_HEADER   *SectionHeader
-       );
-
-VOID
-STDCALL
-RtlInitAnsiString (
-       PANSI_STRING    DestinationString,
-       PCSZ            SourceString
-       );
-
-VOID
-STDCALL
-RtlInitCodePageTable (
-       IN      PUSHORT         TableBase,
-       OUT     PCPTABLEINFO    CodePageTable
-       );
-
-VOID
-STDCALL
-RtlInitializeUnicodePrefix (
-       PUNICODE_PREFIX_TABLE PrefixTable
-       );
-
-NTSTATUS STDCALL
-RtlInitializeSid (PSID Sid,
-                 PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
-                 UCHAR SubAuthorityCount);
-
-VOID
-STDCALL
-RtlInitializeBitMap(
-  IN PRTL_BITMAP  BitMapHeader,
-  IN PULONG  BitMapBuffer,
-  IN ULONG  SizeOfBitMap); 
-  
-VOID
-STDCALL
-RtlInitNlsTables (
-       IN      PUSHORT         AnsiTableBase,
-       IN      PUSHORT         OemTableBase,
-       IN      PUSHORT         CaseTableBase,
-       OUT     PNLSTABLEINFO   NlsTable
-       );
-
-VOID
-STDCALL
-RtlInitString (
-       PSTRING DestinationString,
-       PCSZ    SourceString
-       );
-
-VOID
-STDCALL
-RtlInitUnicodeString (
-       PUNICODE_STRING DestinationString,
-       PCWSTR          SourceString
-       );
-
-VOID
-STDCALL
-RtlInitializeBitMap (
-       IN OUT  PRTL_BITMAP     BitMapHeader,
-       IN      PULONG          BitMapBuffer,
-       IN      ULONG           SizeOfBitMap
-       );
-
-NTSTATUS
-STDCALL
-RtlInitializeContext (
-       IN      HANDLE                  ProcessHandle,
-       OUT     PCONTEXT                ThreadContext,
-       IN      PVOID                   ThreadStartParam  OPTIONAL,
-       IN      PTHREAD_START_ROUTINE   ThreadStartAddress,
-       IN      PINITIAL_TEB            InitialTeb
-       );
-
-VOID
-STDCALL
-RtlInitializeGenericTable (
-       PRTL_GENERIC_TABLE Table,
-       PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine,
-       PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine,
-       PRTL_GENERIC_FREE_ROUTINE FreeRoutine,
-       PVOID TableContext
-       );
-
-VOID
-STDCALL
-RtlInitializeGenericTableAvl (
-       PRTL_AVL_TABLE Table,
-       PRTL_AVL_COMPARE_ROUTINE CompareRoutine,
-       PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine,
-       PRTL_AVL_FREE_ROUTINE FreeRoutine,
-       PVOID TableContext
-       );
-
-VOID STDCALL
-RtlInitializeRangeList (IN OUT PRTL_RANGE_LIST RangeList);
-
-PVOID
-STDCALL
-RtlInsertElementGenericTable (
-       PRTL_GENERIC_TABLE Table,
-       PVOID Buffer,
-       ULONG BufferSize,
-       PBOOLEAN NewElement OPTIONAL
-       );
-
-PVOID
-STDCALL
-RtlInsertElementGenericTableAvl (
-       PRTL_AVL_TABLE Table,
-       PVOID Buffer,
-       ULONG BufferSize,
-       PBOOLEAN NewElement OPTIONAL
-       );
-
-PVOID
-STDCALL
-RtlInsertElementGenericTableFull (
-       PRTL_GENERIC_TABLE Table,
-       PVOID Buffer,
-       ULONG BufferSize,
-       PBOOLEAN NewElement OPTIONAL,
-       PVOID NodeOrParent,
-       TABLE_SEARCH_RESULT SearchResult
-       );
-
-PVOID
-STDCALL
-RtlInsertElementGenericTableFullAvl (
-       PRTL_AVL_TABLE Table,
-       PVOID Buffer,
-       ULONG BufferSize,
-       PBOOLEAN NewElement OPTIONAL,
-       PVOID NodeOrParent,
-       TABLE_SEARCH_RESULT SearchResult
-       );
-
-BOOLEAN
-STDCALL
-RtlInsertUnicodePrefix (
-       PUNICODE_PREFIX_TABLE PrefixTable,
-       PUNICODE_STRING Prefix,
-       PUNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry
-       );
-
-NTSTATUS
-STDCALL
-RtlInt64ToUnicodeString (
-       IN ULONGLONG Value,
-       IN ULONG Base OPTIONAL,
-       IN OUT PUNICODE_STRING String
-       );
-
-NTSTATUS
-STDCALL
-RtlIntegerToChar (
-       IN      ULONG   Value,
-       IN      ULONG   Base,
-       IN      ULONG   Length,
-       IN OUT  PCHAR   String
-       );
-
-NTSTATUS 
-STDCALL
-RtlIntegerToUnicode(
-       IN ULONG Value,
-       IN ULONG Base  OPTIONAL,
-       IN ULONG Length OPTIONAL,
-       IN OUT LPWSTR String
-       );
-
-NTSTATUS
-STDCALL
-RtlIntegerToUnicodeString (
-       IN      ULONG           Value,
-       IN      ULONG           Base,
-       IN OUT  PUNICODE_STRING String
-       );
-
-NTSTATUS STDCALL
-RtlInvertRangeList (OUT PRTL_RANGE_LIST InvertedRangeList,
-                   IN PRTL_RANGE_LIST RangeList);
-
-LPSTR
-STDCALL
-RtlIpv4AddressToStringA(
-       PULONG IP,
-       LPSTR Buffer
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv4AddressToStringExA(
-       PULONG IP,
-       PULONG Port,
-       LPSTR Buffer,
-       PULONG MaxSize
-       );
-
-LPWSTR
-STDCALL
-RtlIpv4AddressToStringW(
-       PULONG IP,
-       LPWSTR Buffer
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv4AddressToStringExW(
-       PULONG IP,
-       PULONG Port,
-       LPWSTR Buffer,
-       PULONG MaxSize
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv4StringToAddressA(
-       IN LPSTR IpString,
-       IN ULONG Base,
-       OUT PVOID PtrToIpAddr,
-       OUT ULONG IpAddr
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv4StringToAddressExA(
-       IN LPSTR IpString,
-       IN ULONG Base,
-       OUT PULONG IpAddr,
-       OUT PULONG Port
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv4StringToAddressW(
-       IN LPWSTR IpString, 
-       IN ULONG Base, 
-       OUT PVOID PtrToIpAddr,
-       OUT ULONG IpAddr
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv4StringToAddressExW(
-       IN LPWSTR IpString,
-       IN ULONG Base,
-       OUT PULONG IpAddr,
-       OUT PULONG Port
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv6AddressToStringA(
-       PULONG IP,
-       LPSTR Buffer
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv6AddressToStringExA(
-       PULONG IP,
-       PULONG Port,
-       LPSTR Buffer,
-       PULONG MaxSize
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv6AddressToStringW(
-       PULONG IP,
-       LPWSTR Buffer
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv6AddressToStringExW(
-       PULONG IP,
-       PULONG Port,
-       LPWSTR Buffer,
-       PULONG MaxSize
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv6StringToAddressA(
-       IN LPSTR IpString,
-       IN ULONG Base,
-       OUT PVOID PtrToIpAddr,
-       OUT ULONG IpAddr
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv6StringToAddressExA(
-       IN LPSTR IpString,
-       IN ULONG Base,
-       OUT PULONG IpAddr,
-       OUT PULONG Port
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv6StringToAddressW(
-       IN LPWSTR IpString,
-       IN ULONG Base,
-       OUT PVOID PtrToIpAddr,
-       OUT ULONG IpAddr
-       );
-
-NTSTATUS
-STDCALL
-RtlIpv6StringToAddressExW(
-       IN LPWSTR IpString,
-       IN ULONG Base,
-       OUT PULONG IpAddr,
-       OUT PULONG Port
-       );
-
-BOOLEAN
-STDCALL
-RtlIsGenericTableEmpty (
-       PRTL_GENERIC_TABLE Table
-       );
-
-BOOLEAN
-STDCALL
-RtlIsGenericTableEmptyAvl (
-       PRTL_AVL_TABLE Table
-       );
-
-
-BOOLEAN STDCALL
-RtlIsNameLegalDOS8Dot3 (IN PUNICODE_STRING UnicodeName,
-                       IN PANSI_STRING AnsiName,
-                       OUT PBOOLEAN SpacesFound);
-
-NTSTATUS STDCALL
-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);
-
-ULONG
-STDCALL
-RtlIsTextUnicode (
-       PVOID   Buffer,
-       ULONG   Length,
-       ULONG   *Flags
-       );
-
-BOOLEAN
-STDCALL
-RtlIsValidOemCharacter (
-       IN PWCHAR Char
-       );
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerAdd (
-       LARGE_INTEGER   Addend1,
-       LARGE_INTEGER   Addend2
-       );
-
-/*
- * VOID
- * RtlLargeIntegerAnd (
- *     PLARGE_INTEGER  Result,
- *     LARGE_INTEGER   Source,
- *     LARGE_INTEGER   Mask
- *     );
- */
-#define RtlLargeIntegerAnd(Result, Source, Mask) \
-{ \
-       Result.HighPart = Source.HighPart & Mask.HighPart; \
-       Result.LowPart = Source.LowPart & Mask.LowPart; \
-}
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerArithmeticShift (
-       LARGE_INTEGER   LargeInteger,
-       CCHAR   ShiftCount
-       );
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerDivide (
-       LARGE_INTEGER   Dividend,
-       LARGE_INTEGER   Divisor,
-       PLARGE_INTEGER  Remainder
-       );
-
-/*
- * BOOLEAN
- * RtlLargeIntegerEqualTo (
- *     LARGE_INTEGER   Operand1,
- *     LARGE_INTEGER   Operand2
- *     );
- */
-#define RtlLargeIntegerEqualTo(X,Y) \
-       (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerEqualToZero (
- *     LARGE_INTEGER   Operand
- *     );
- */
-#define RtlLargeIntegerEqualToZero(X) \
-       (!((X).LowPart | (X).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerGreaterThan (
- *     LARGE_INTEGER   Operand1,
- *     LARGE_INTEGER   Operand2
- *     );
- */
-#define RtlLargeIntegerGreaterThan(X,Y) \
-       ((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
-         ((X).HighPart > (Y).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerGreaterThanOrEqualTo (
- *     LARGE_INTEGER   Operand1,
- *     LARGE_INTEGER   Operand2
- *     );
- */
-#define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
-       ((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
-         ((X).HighPart > (Y).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerGreaterThanOrEqualToZero (
- *     LARGE_INTEGER   Operand1
- *     );
- */
-#define RtlLargeIntegerGreaterOrEqualToZero(X) \
-       ((X).HighPart >= 0)
-
-/*
- * BOOLEAN
- * RtlLargeIntegerGreaterThanZero (
- *     LARGE_INTEGER   Operand1
- *     );
- */
-#define RtlLargeIntegerGreaterThanZero(X) \
-       ((((X).HighPart == 0) && ((X).LowPart > 0)) || \
-         ((X).HighPart > 0 ))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerLessThan (
- *     LARGE_INTEGER   Operand1,
- *     LARGE_INTEGER   Operand2
- *     );
- */
-#define RtlLargeIntegerLessThan(X,Y) \
-       ((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
-         ((X).HighPart < (Y).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerLessThanOrEqualTo (
- *     LARGE_INTEGER   Operand1,
- *     LARGE_INTEGER   Operand2
- *     );
- */
-#define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
-       ((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
-         ((X).HighPart < (Y).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerLessThanOrEqualToZero (
- *     LARGE_INTEGER   Operand
- *     );
- */
-#define RtlLargeIntegerLessOrEqualToZero(X) \
-       (((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerLessThanZero (
- *     LARGE_INTEGER   Operand
- *     );
- */
-#define RtlLargeIntegerLessThanZero(X) \
-       (((X).HighPart < 0))
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerNegate (
-       LARGE_INTEGER   Subtrahend
-       );
-
-/*
- * BOOLEAN
- * RtlLargeIntegerNotEqualTo (
- *     LARGE_INTEGER   Operand1,
- *     LARGE_INTEGER   Operand2
- *     );
- */
-#define RtlLargeIntegerNotEqualTo(X,Y) \
-       ((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerNotEqualToZero (
- *     LARGE_INTEGER   Operand
- *     );
- */
-#define RtlLargeIntegerNotEqualToZero(X) \
-       (((X).LowPart | (X).HighPart))
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerShiftLeft (
-       LARGE_INTEGER   LargeInteger,
-       CCHAR           ShiftCount
-       );
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerShiftRight (
-       LARGE_INTEGER   LargeInteger,
-       CCHAR           ShiftCount
-       );
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerSubtract (
-       LARGE_INTEGER   Minuend,
-       LARGE_INTEGER   Subtrahend
-       );
-
-ULONG STDCALL
-RtlLengthRequiredSid (UCHAR SubAuthorityCount);
-
-ULONG STDCALL
-RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-ULONG STDCALL
-RtlLengthSid (PSID Sid);
-
-NTSTATUS
-STDCALL
-RtlLockBootStatusData(
-       HANDLE Filehandle
-       );
-
-BOOLEAN STDCALL
-RtlLockHeap (IN HANDLE Heap);
-
-NTSTATUS STDCALL
-RtlLookupAtomInAtomTable (IN PRTL_ATOM_TABLE AtomTable,
-                         IN PWSTR AtomName,
-                         OUT PRTL_ATOM Atom);
-
-PVOID
-STDCALL
-RtlLookupElementGenericTable (
-       PRTL_GENERIC_TABLE Table,
-       PVOID Buffer
-       );
-
-PVOID
-STDCALL
-RtlLookupElementGenericTableAvl (
-       PRTL_AVL_TABLE Table,
-       PVOID Buffer
-       );
-
-PVOID
-STDCALL
-RtlLookupElementGenericTableFull (
-       PRTL_GENERIC_TABLE Table,
-       PVOID Buffer,
-       OUT PVOID *NodeOrParent,
-       OUT TABLE_SEARCH_RESULT *SearchResult
-       );
-
-PVOID
-STDCALL
-RtlLookupElementGenericTableFullAvl (
-       PRTL_AVL_TABLE Table,
-       PVOID Buffer,
-       OUT PVOID *NodeOrParent,
-       OUT TABLE_SEARCH_RESULT *SearchResult
-       );
-
-NTSTATUS STDCALL
-RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD,
-                      PSECURITY_DESCRIPTOR_RELATIVE RelSD,
-                      PULONG BufferLength);
-
-VOID STDCALL
-RtlMapGenericMask (PACCESS_MASK AccessMask,
-                  PGENERIC_MAPPING GenericMapping);
-
-NTSTATUS
-STDCALL
-RtlMapSecurityErrorToNtStatus(
-       IN ULONG SecurityError
-       );
-
-NTSTATUS STDCALL
-RtlMergeRangeLists (OUT PRTL_RANGE_LIST MergedRangeList,
-                   IN PRTL_RANGE_LIST RangeList1,
-                   IN PRTL_RANGE_LIST RangeList2,
-                   IN ULONG Flags);
-
-NTSTATUS
-STDCALL
-RtlMultiByteToUnicodeN (
-       PWCHAR UnicodeString,
-       ULONG  UnicodeSize,
-       PULONG ResultSize,
-       const PCHAR  MbString,
-       ULONG  MbSize
-       );
-
-NTSTATUS
-STDCALL
-RtlMultiByteToUnicodeSize (
-       PULONG UnicodeSize,
-       PCHAR  MbString,
-       ULONG  MbSize
-       );
-
-PUNICODE_PREFIX_TABLE_ENTRY
-STDCALL
-RtlNextUnicodePrefix (
-       PUNICODE_PREFIX_TABLE PrefixTable,
-       BOOLEAN Restart
-       );
-
-DWORD
-STDCALL
-RtlNtStatusToDosError (
-       NTSTATUS        StatusCode
-       );
-
-DWORD
-STDCALL
-RtlNtStatusToDosErrorNoTeb (
-       NTSTATUS        StatusCode
-       );
-
-int
-STDCALL
-RtlNtStatusToPsxErrno (
-       NTSTATUS        StatusCode
-       );
-
-ULONG
-STDCALL
-RtlNumberGenericTableElements(
-       PRTL_GENERIC_TABLE Table
-       );
-
-ULONG
-STDCALL
-RtlNumberGenericTableElementsAvl (
-       PRTL_AVL_TABLE Table
-       );
-
-
-ULONG
-STDCALL
-RtlNumberOfClearBits (
-       PRTL_BITMAP     BitMapHeader
-       );
-
-ULONG
-STDCALL
-RtlNumberOfSetBits (
-       PRTL_BITMAP     BitMapHeader
-       );
-
-ULONG
-STDCALL
-RtlOemStringToUnicodeSize (
-       POEM_STRING     AnsiString
-       );
-
-NTSTATUS
-STDCALL
-RtlOemStringToUnicodeString (
-       PUNICODE_STRING DestinationString,
-       POEM_STRING     SourceString,
-       BOOLEAN         AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlOemToUnicodeN(
-       PWSTR UnicodeString,
-       ULONG MaxBytesInUnicodeString,
-       PULONG BytesInUnicodeString,
-       IN PCHAR OemString,
-       ULONG BytesInOemString
-       );
-
-NTSTATUS STDCALL
-RtlPinAtomInAtomTable (
-       IN      PRTL_ATOM_TABLE AtomTable,
-       IN      RTL_ATOM        Atom
-       );
-
-VOID
-FASTCALL
-RtlPrefetchMemoryNonTemporal(
-       IN PVOID Source,
-       IN SIZE_T Length
-       );
-
-BOOLEAN
-STDCALL
-RtlPrefixString (
-       PANSI_STRING    String1,
-       PANSI_STRING    String2,
-       BOOLEAN         CaseInsensitive
-       );
-
-BOOLEAN
-STDCALL
-RtlPrefixUnicodeString (
-       PUNICODE_STRING String1,
-       PUNICODE_STRING String2,
-       BOOLEAN         CaseInsensitive
-       );
-
-NTSTATUS
-STDCALL
-RtlQueryAtomInAtomTable (
-       IN      PRTL_ATOM_TABLE AtomTable,
-       IN      RTL_ATOM        Atom,
-       IN OUT  PULONG          RefCount OPTIONAL,
-       IN OUT  PULONG          PinCount OPTIONAL,
-       IN OUT  PWSTR           AtomName OPTIONAL,
-       IN OUT  PULONG          NameLength OPTIONAL
-       );
-
-NTSTATUS STDCALL
-RtlQueryInformationAcl (PACL Acl,
-                       PVOID Information,
-                       ULONG InformationLength,
-                       ACL_INFORMATION_CLASS InformationClass);
-
-NTSTATUS STDCALL
-RtlQueryTimeZoneInformation (IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation);
-
-VOID STDCALL
-RtlRaiseException (IN PEXCEPTION_RECORD ExceptionRecord);
-
-VOID STDCALL
-RtlRaiseStatus(NTSTATUS Status);
-
-ULONG STDCALL
-RtlRandom (PULONG Seed);
-
-ULONG
-STDCALL
-RtlRandomEx(
-       PULONG Seed
-       ); 
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlRealPredecessor (
-       PRTL_SPLAY_LINKS Links
-       );
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlRealSuccessor (
-       PRTL_SPLAY_LINKS Links
-       );
-
-PVOID STDCALL
-RtlReAllocateHeap (
-       HANDLE Heap,
-       ULONG Flags,
-       PVOID Ptr,
-       ULONG Size
-       );
-
-VOID
-STDCALL
-RtlRemoveUnicodePrefix (
-       PUNICODE_PREFIX_TABLE PrefixTable,
-       PUNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry
-       );
-
-NTSTATUS
-STDCALL
-RtlReserveChunk (
-       IN      USHORT  CompressionFormat,
-       IN OUT  PUCHAR  *CompressedBuffer,
-       IN      PUCHAR  EndOfCompressedBufferPlus1,
-       OUT     PUCHAR  *ChunkBuffer,
-       IN      ULONG   ChunkSize
-       );
-
-VOID STDCALL
-RtlResetRtlTranslations (IN PNLSTABLEINFO NlsTable);
-
-VOID STDCALL
-RtlRestoreLastWin32Error(IN ULONG Error);
-
-/*
- * VOID
- * RtlRetrieveUlong (
- *     PULONG  DestinationAddress,
- *     PULONG  SourceAddress
- *     );
- */
-#define RtlRetrieveUlong(DestAddress,SrcAddress) \
-       if ((ULONG_PTR)(SrcAddress) & LONG_MASK) \
-       { \
-               ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
-               ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
-               ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
-               ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
-       } \
-       else \
-       { \
-               *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
-       }
-
-/*
- * VOID
- * RtlRetrieveUshort (
- *     PUSHORT DestinationAddress,
- *     PUSHORT SourceAddress
- *     );
- */
-#define RtlRetrieveUshort(DestAddress,SrcAddress) \
-       if ((ULONG_PTR)(SrcAddress) & SHORT_MASK) \
-       { \
-               ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
-               ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
-       } \
-       else \
-       { \
-               *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
-       }
-
-VOID STDCALL
-RtlSecondsSince1970ToTime (ULONG SecondsSince1970,
-                          PLARGE_INTEGER Time);
-
-VOID STDCALL
-RtlSecondsSince1980ToTime (ULONG SecondsSince1980,
-                          PLARGE_INTEGER Time);
-
-NTSTATUS STDCALL
-RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR_RELATIVE RelSD,
-                            PSECURITY_DESCRIPTOR AbsSD,
-                            PULONG AbsSDSize,
-                            PACL Dacl,
-                            PULONG DaclSize,
-                            PACL Sacl,
-                            PULONG SaclSize,
-                            PSID Owner,
-                            PULONG OwnerSize,
-                            PSID Group,
-                            PULONG GroupSize);
-
-NTSTATUS
-STDCALL
-RtlSelfRelativeToAbsoluteSD2(
-       PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
-       PULONG BufferSize
-       );
-
-VOID STDCALL
-RtlSetAllBits (IN PRTL_BITMAP BitMapHeader);
-
-NTSTATUS STDCALL
-RtlSetAttributesSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
-                                  IN SECURITY_DESCRIPTOR_CONTROL Control,
-                                  OUT PULONG Revision);
-
-VOID
-STDCALL
-RtlSetBit (
-       PRTL_BITMAP BitMapHeader,
-       ULONG BitNumber
-       );
-
-VOID
-STDCALL
-RtlSetBits (
-       PRTL_BITMAP     BitMapHeader,
-       ULONG           StartingIndex,
-       ULONG           NumberToSet
-       );
-
-NTSTATUS STDCALL
-RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
-                               IN SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
-                               IN SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet);
-
-NTSTATUS STDCALL
-RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                             BOOLEAN DaclPresent,
-                             PACL Dacl,
-                             BOOLEAN DaclDefaulted);
-
-NTSTATUS STDCALL
-RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                              PSID Group,
-                              BOOLEAN GroupDefaulted);
-
-NTSTATUS STDCALL
-RtlSetInformationAcl (PACL Acl,
-                     PVOID Information,
-                     ULONG InformationLength,
-                     ACL_INFORMATION_CLASS InformationClass);
-
-VOID STDCALL
-RtlSetLastWin32Error(IN ULONG Error);
-
-VOID STDCALL
-RtlSetLastWin32ErrorAndNtStatusFromNtStatus(IN NTSTATUS Status);
-
-NTSTATUS STDCALL
-RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                              PSID Owner,
-                              BOOLEAN OwnerDefaulted);
-
-NTSTATUS STDCALL
-RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
-                             BOOLEAN SaclPresent,
-                             PACL Sacl,
-                             BOOLEAN SaclDefaulted);
-
-VOID STDCALL
-RtlSetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,
-                                 PUCHAR RMControl);
-
-NTSTATUS STDCALL
-RtlSetTimeZoneInformation (IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation);
-
-ULONG STDCALL
-RtlSizeHeap(
-       IN PVOID HeapHandle, 
-       IN ULONG Flags, 
-       IN PVOID MemoryPointer
-       ); 
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlSplay (
-       PRTL_SPLAY_LINKS Links
-       );
-
-/*
- * VOID
- * RtlStoreUlong (
- *     PULONG  Address,
- *     ULONG   Value
- *     );
- */
-#define RtlStoreUlong(Address,Value) \
-       if ((ULONG_PTR)(Address) & LONG_MASK) \
-       { \
-               ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
-               ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
-               ((PUCHAR)(Address))[LONG_2ND_MOST_SIGNIFICANT_BIT]=(UCHAR)(THIRDBYTE(Value)); \
-               ((PUCHAR)(Address))[LONG_MOST_SIGNIFICANT_BIT]=(UCHAR)(FOURTHBYTE(Value)); \
-       } \
-       else \
-       { \
-               *((PULONG)(Address))=(ULONG)(Value); \
-       }
-
-/*
- * VOID
- * RtlStoreUshort (
- *     PUSHORT Address,
- *     USHORT  Value
- *     );
- */
-#define RtlStoreUshort(Address,Value) \
-       if ((ULONG_PTR)(Address) & SHORT_MASK) \
-       { \
-               ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
-               ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
-       } \
-       else \
-       { \
-               *((PUSHORT)(Address))=(USHORT)(Value); \
-       }
-
-NTSTATUS STDCALL
-RtlStringFromGUID (IN REFGUID Guid,
-                  OUT PUNICODE_STRING GuidString);
-
-PULONG STDCALL
-RtlSubAuthoritySid (PSID Sid,
-                   ULONG SubAuthority);
-
-PULONG STDCALL
-RtlSubAuthoritySid (PSID Sid,
-                   ULONG SubAuthority);
-
-PUCHAR STDCALL
-RtlSubAuthorityCountSid (PSID Sid);
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlSubtreePredecessor (
-       PRTL_SPLAY_LINKS Links
-       );
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlSubtreeSuccessor (
-       PRTL_SPLAY_LINKS Links
-       );
-
-BOOLEAN
-STDCALL
-RtlTestBit (
-       PRTL_BITMAP BitMapHeader,
-       ULONG BitNumber
-       );
-
-
-BOOLEAN STDCALL
-RtlTimeFieldsToTime (PTIME_FIELDS TimeFields,
-                    PLARGE_INTEGER Time);
-
-BOOLEAN
-STDCALL
-RtlTimeToSecondsSince1970 (
-       PLARGE_INTEGER Time,
-       PULONG SecondsSince1970
-       );
-
-BOOLEAN
-STDCALL
-RtlTimeToSecondsSince1980 (
-       PLARGE_INTEGER Time,
-       PULONG SecondsSince1980
-       );
-
-VOID
-STDCALL
-RtlTimeToElapsedTimeFields( 
-       PLARGE_INTEGER Time, 
-       PTIME_FIELDS TimeFields 
-       );
-
-VOID
-STDCALL
-RtlTimeToTimeFields (
-       PLARGE_INTEGER  Time,
-       PTIME_FIELDS    TimeFields
-       );
-
-
-ULONG FASTCALL
-RtlUlongByteSwap (IN ULONG Source);
-
-ULONGLONG FASTCALL
-RtlUlonglongByteSwap (IN ULONGLONG Source);
-
-ULONG
-STDCALL
-RtlUnicodeStringToAnsiSize (
-       IN      PUNICODE_STRING UnicodeString
-       );
-
-NTSTATUS
-STDCALL
-RtlUnicodeStringToAnsiString (
-       IN OUT  PANSI_STRING    DestinationString,
-       IN      PUNICODE_STRING SourceString,
-       IN      BOOLEAN         AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlUnicodeStringToInteger (
-       IN      PUNICODE_STRING String,
-       IN      ULONG           Base,
-       OUT     PULONG          Value
-       );
-
-ULONG
-STDCALL
-RtlUnicodeStringToOemSize (
-       IN      PUNICODE_STRING UnicodeString
-       );
-
-NTSTATUS
-STDCALL
-RtlUnicodeStringToCountedOemString (
-       IN OUT  POEM_STRING     DestinationString,
-       IN      PUNICODE_STRING SourceString,
-       IN      BOOLEAN         AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlUnicodeStringToOemString (
-       IN OUT  POEM_STRING     DestinationString,
-       IN      PUNICODE_STRING SourceString,
-       IN      BOOLEAN         AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlUnicodeToCustomCPN (
-       IN      PCPTABLEINFO    CustomCP,
-       PCHAR           MbString,
-       ULONG           MbSize,
-       PULONG          ResultSize,
-       PWCHAR          UnicodeString,
-       ULONG           UnicodeSize
-       );
-
-NTSTATUS
-STDCALL
-RtlUnicodeToMultiByteN (
-       PCHAR   MbString,
-       ULONG   MbSize,
-       PULONG  ResultSize,
-       PWCHAR  UnicodeString,
-       ULONG   UnicodeSize
-       );
-
-NTSTATUS
-STDCALL
-RtlUnicodeToMultiByteSize (
-       PULONG  MbSize,
-       PWCHAR  UnicodeString,
-       ULONG   UnicodeSize
-       );
-
-NTSTATUS
-STDCALL
-RtlUnicodeToOemN (
-       PCHAR   OemString,
-       ULONG   OemSize,
-       PULONG  ResultSize,
-       PWCHAR  UnicodeString,
-       ULONG   UnicodeSize
-       );
-
-ULONG STDCALL
-RtlUniform (PULONG Seed);
-
-BOOLEAN STDCALL
-RtlUnlockHeap (IN HANDLE Heap);
-
-NTSTATUS
-STDCALL
-RtlUnlockBootStatusData(
-       HANDLE Filehandle
-       );
-
-VOID
-STDCALL
-RtlUnwind (
-  PEXCEPTION_REGISTRATION RegistrationFrame,
-  PVOID ReturnAddress,
-  PEXCEPTION_RECORD ExceptionRecord,
-  DWORD EaxValue
-       );
-
-WCHAR
-STDCALL
-RtlUpcaseUnicodeChar (
-       WCHAR Source
-       );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeString (
-       IN OUT  PUNICODE_STRING DestinationString,
-       IN      PCUNICODE_STRING        SourceString,
-       IN      BOOLEAN         AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeStringToAnsiString (
-       IN OUT  PANSI_STRING    DestinationString,
-       IN      PUNICODE_STRING SourceString,
-       IN      BOOLEAN         AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeStringToCountedOemString (
-       IN OUT  POEM_STRING     DestinationString,
-       IN      PUNICODE_STRING SourceString,
-       IN      BOOLEAN         AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeStringToOemString (
-       IN OUT  POEM_STRING     DestinationString,
-       IN      PUNICODE_STRING SourceString,
-       IN      BOOLEAN         AllocateDestinationString
-       );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeToCustomCPN (
-       IN      PCPTABLEINFO    CustomCP,
-       PCHAR           MbString,
-       ULONG           MbSize,
-       PULONG          ResultSize,
-       PWCHAR          UnicodeString,
-       ULONG           UnicodeSize
-       );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeToMultiByteN (
-       PCHAR   MbString,
-       ULONG   MbSize,
-       PULONG  ResultSize,
-       PWCHAR  UnicodeString,
-       ULONG   UnicodeSize
-       );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeToOemN (
-       PCHAR   OemString,
-       ULONG   OemSize,
-       PULONG  ResultSize,
-       PWCHAR  UnicodeString,
-       ULONG   UnicodeSize
-       );
-
-CHAR STDCALL
-RtlUpperChar (CHAR Source);
-
-VOID STDCALL
-RtlUpperString (PSTRING DestinationString,
-               PSTRING SourceString);
-
-USHORT FASTCALL
-RtlUshortByteSwap (IN USHORT Source);
-
-BOOLEAN STDCALL
-RtlValidAcl (PACL Acl);
-
-BOOLEAN STDCALL
-RtlValidateHeap (
-       HANDLE Heap,
-       ULONG   Flags,
-       PVOID   pmem
-       );
-
-BOOLEAN
-STDCALL
-RtlValidRelativeSecurityDescriptor (
-       IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
-       IN ULONG SecurityDescriptorLength,
-       IN SECURITY_INFORMATION RequiredInformation
-       );
-
-BOOLEAN STDCALL
-RtlValidSecurityDescriptor (IN PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-BOOLEAN STDCALL
-RtlValidSid (IN PSID Sid);
-
-/*
-NTSTATUS
-STDCALL
-RtlVerifyVersionInfo(
-       IN PRTL_OSVERSIONINFOEXW VersionInfo,
-       IN ULONG TypeMask,
-       IN ULONGLONG  ConditionMask
-       );
-*/
-
-NTSTATUS
-STDCALL
-RtlVolumeDeviceToDosName(
-       IN  PVOID VolumeDeviceObject,
-       OUT PUNICODE_STRING DosName
-       );
-
-ULONG
-STDCALL
-RtlWalkFrameChain (
-       OUT PVOID *Callers,
-       IN ULONG Count,
-       IN ULONG Flags
-       );
-
-BOOLEAN STDCALL
-RtlZeroHeap(
-    IN PVOID HeapHandle,
-    IN ULONG Flags
-    );
-
-ULONG
-STDCALL
-RtlxAnsiStringToUnicodeSize (
-       IN      PANSI_STRING    AnsiString
-       );
-
-ULONG
-STDCALL
-RtlxOemStringToUnicodeSize (
-       IN      POEM_STRING     OemString
-       );
-
-ULONG
-STDCALL
-RtlxUnicodeStringToAnsiSize (
-       IN      PUNICODE_STRING UnicodeString
-       );
-
-ULONG
-STDCALL
-RtlxUnicodeStringToOemSize (
-       IN      PUNICODE_STRING UnicodeString
-       );
-   
-/* Register io functions */
-
-UCHAR
-STDCALL
-READ_REGISTER_UCHAR (
-       PUCHAR  Register
-       );
-
-USHORT
-STDCALL
-READ_REGISTER_USHORT (
-       PUSHORT Register
-       );
-
-ULONG
-STDCALL
-READ_REGISTER_ULONG (
-       PULONG  Register
-       );
-
-VOID
-STDCALL
-READ_REGISTER_BUFFER_UCHAR (
-       PUCHAR  Register,
-       PUCHAR  Buffer,
-       ULONG   Count
-       );
-
-VOID
-STDCALL
-READ_REGISTER_BUFFER_USHORT (
-       PUSHORT Register,
-       PUSHORT Buffer,
-       ULONG   Count
-       );
-
-VOID
-STDCALL
-READ_REGISTER_BUFFER_ULONG (
-       PULONG  Register,
-       PULONG  Buffer,
-       ULONG   Count
-       );
-
-VOID
-STDCALL
-WRITE_REGISTER_UCHAR (
-       PUCHAR  Register,
-       UCHAR   Value
-       );
-
-VOID
-STDCALL
-WRITE_REGISTER_USHORT (
-       PUSHORT Register,
-       USHORT  Value
-       );
-
-VOID
-STDCALL
-WRITE_REGISTER_ULONG (
-       PULONG  Register,
-       ULONG   Value
-       );
-
-VOID
-STDCALL
-WRITE_REGISTER_BUFFER_UCHAR (
-       PUCHAR  Register,
-       PUCHAR  Buffer,
-       ULONG   Count
-       );
-
-VOID
-STDCALL
-WRITE_REGISTER_BUFFER_USHORT (
-       PUSHORT Register,
-       PUSHORT Buffer,
-       ULONG   Count
-       );
-
-VOID
-STDCALL
-WRITE_REGISTER_BUFFER_ULONG (
-       PULONG  Register,
-       PULONG  Buffer,
-       ULONG   Count
-       );
-
-
-/*  functions exported from NTOSKRNL.EXE which are considered RTL  */
-
-#if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
-
-char *_itoa (int value, char *string, int radix);
-wchar_t *_itow (int value, wchar_t *string, int radix);
-int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
-int _snwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, ...);
-int _stricmp(const char *s1, const char *s2);
-char * _strlwr(char *x);
-int _strnicmp(const char *s1, const char *s2, size_t n);
-char * _strnset(char* szToFill, int szFill, size_t sizeMaxFill);
-char * _strrev(char *s);
-char * _strset(char* szToFill, int szFill);
-char * _strupr(char *x);
-int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args);
-int _wcsicmp (const wchar_t* cs, const wchar_t* ct);
-wchar_t * _wcslwr (wchar_t *x);
-int _wcsnicmp (const wchar_t * cs,const wchar_t * ct,size_t count);
-wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
-wchar_t * _wcsrev(wchar_t *s);
-wchar_t *_wcsupr(wchar_t *x);
-
-int atoi(const char *str);
-long atol(const char *str);
-int isdigit(int c);
-int islower(int c);
-int isprint(int c);
-int isspace(int c);
-int isupper(int c);
-int isxdigit(int c);
-size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count);
-int mbtowc (wchar_t *wchar, const char *mbchar, size_t count);
-void * memchr(const void *s, int c, size_t n);
-void * memcpy(void *to, const void *from, size_t count);
-void * memmove(void *dest,const void *src, size_t count);
-void * memset(void *src, int val, size_t count);
-
-#if 0
-qsort
-#endif
-
-int rand(void);
-int sprintf(char * buf, const char *fmt, ...);
-void srand(unsigned seed);
-char * strcat(char *s, const char *append);
-char * strchr(const char *s, int c);
-int strcmp(const char *s1, const char *s2);
-char * strcpy(char *to, const char *from);
-size_t strlen(const char *str);
-char * strncat(char *dst, const char *src, size_t n);
-int strncmp(const char *s1, const char *s2, size_t n);
-char *strncpy(char *dst, const char *src, size_t n);
-char *strrchr(const char *s, int c);
-size_t strspn(const char *s1, const char *s2);
-char *strstr(const char *s, const char *find);
-int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
-int tolower(int c);
-int toupper(int c);
-wchar_t towlower(wchar_t c);
-wchar_t towupper(wchar_t c);
-int vsprintf(char *buf, const char *fmt, va_list args);
-wchar_t * wcscat(wchar_t *dest, const wchar_t *src);
-wchar_t * wcschr(const wchar_t *str, wchar_t ch);
-int wcscmp(const wchar_t *cs, const wchar_t *ct);
-wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2);
-size_t wcscspn(const wchar_t *str,const wchar_t *reject);
-size_t wcslen(const wchar_t *s);
-wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t count);
-int wcsncmp(const wchar_t *cs, const wchar_t *ct, size_t count);
-wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
-wchar_t * wcsrchr(const wchar_t *str, wchar_t ch);
-size_t wcsspn(const wchar_t *str,const wchar_t *accept);
-wchar_t *wcsstr(const wchar_t *s,const wchar_t *b);
-size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count);
-int wctomb (char *mbchar, wchar_t wchar);
-
-#endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
-
-#endif /* __DDK_RTL_H */
-
-
diff --git a/reactos/include/ntos/rtltypes.h b/reactos/include/ntos/rtltypes.h
deleted file mode 100755 (executable)
index 62ea03c..0000000
+++ /dev/null
@@ -1,517 +0,0 @@
-/* $Id$
- * 
- */
-
-#ifndef __DDK_RTLTYPES_H
-#define __DDK_RTLTYPES_H
-
-#ifndef __USE_W32API
-
-#define COMPRESSION_FORMAT_NONE                0x0000
-#define COMPRESSION_FORMAT_DEFAULT     0x0001
-#define COMPRESSION_FORMAT_LZNT1       0x0002
-
-#define COMPRESSION_ENGINE_STANDARD    0x0000
-#define COMPRESSION_ENGINE_MAXIMUM     0x0100
-#define COMPRESSION_ENGINE_HIBER       0x0200
-/*
-#define VER_EQUAL                                              1
-#define VER_GREATER                                            2
-#define VER_GREATER_EQUAL                              3
-#define VER_LESS                                               4
-#define VER_LESS_EQUAL                                 5
-#define VER_AND                                                        6
-#define VER_OR                                                 7
-
-#define VER_CONDITION_MASK                             7
-#define VER_NUM_BITS_PER_CONDITION_MASK        3
-
-#define VER_MINORVERSION                               0x0000001
-#define VER_MAJORVERSION                               0x0000002
-#define VER_BUILDNUMBER                                        0x0000004
-#define VER_PLATFORMID                                 0x0000008
-#define VER_SERVICEPACKMINOR                   0x0000010
-#define VER_SERVICEPACKMAJOR                   0x0000020
-#define VER_SUITENAME                                  0x0000040
-#define VER_PRODUCT_TYPE                               0x0000080
-
-#define VER_NT_WORKSTATION                             0x0000001
-#define VER_NT_DOMAIN_CONTROLLER               0x0000002
-#define VER_NT_SERVER                                  0x0000003
-*/
-
-  
-typedef struct _CONTROLLER_OBJECT
-{
-  CSHORT Type;
-  CSHORT Size;
-  PVOID ControllerExtension;
-  KDEVICE_QUEUE DeviceWaitQueue;
-  ULONG Spare1;
-  LARGE_INTEGER Spare2;
-} CONTROLLER_OBJECT, *PCONTROLLER_OBJECT;
-
-typedef struct _STRING
-{
-  /*
-   * Length in bytes of the string stored in buffer
-   */
-  USHORT Length;
-
-  /*
-   * Maximum length of the string 
-   */
-  USHORT MaximumLength;
-
-  /*
-   * String
-   */
-  PCHAR Buffer;
-} STRING, *PSTRING;
-
-typedef STRING ANSI_STRING;
-typedef PSTRING PANSI_STRING;
-
-typedef STRING OEM_STRING;
-typedef PSTRING POEM_STRING;
-
-typedef struct _TIME_FIELDS
-{
-  CSHORT Year;
-  CSHORT Month;
-  CSHORT Day;
-  CSHORT Hour;
-  CSHORT Minute;
-  CSHORT Second;
-  CSHORT Milliseconds;
-  CSHORT Weekday;
-} TIME_FIELDS, *PTIME_FIELDS;
-
-typedef struct _RTL_BITMAP
-{
-  ULONG SizeOfBitMap;
-  PULONG Buffer;
-} RTL_BITMAP, *PRTL_BITMAP;
-
-typedef struct _RTL_BITMAP_RUN
-{
-  ULONG StarttingIndex;
-  ULONG NumberOfBits;
-} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
-
-#ifndef STDCALL_FUNC
-#define STDCALL_FUNC(a)  (STDCALL a)
-#endif
-
-typedef NTSTATUS STDCALL_FUNC
-(*PRTL_QUERY_REGISTRY_ROUTINE) (PWSTR ValueName,
-                              ULONG ValueType,
-                              PVOID ValueData,
-                              ULONG ValueLength,
-                              PVOID Context,
-                              PVOID EntryContext);
-
-typedef struct _RTL_QUERY_REGISTRY_TABLE
-{
-  PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
-  ULONG Flags;
-  PWSTR Name;
-  PVOID EntryContext;
-  ULONG DefaultType;
-  PVOID DefaultData;
-  ULONG DefaultLength;
-} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
-
-typedef struct _GENERATE_NAME_CONTEXT
-{
-  USHORT Checksum;
-  BOOLEAN CheckSumInserted;
-  UCHAR NameLength;
-  WCHAR NameBuffer[8];
-  ULONG ExtensionLength;
-  WCHAR ExtensionBuffer[4];
-  ULONG LastIndexValue;
-} GENERATE_NAME_CONTEXT, *PGENERATE_NAME_CONTEXT;
-
-typedef struct _RTL_SPLAY_LINKS
-{
-  struct _RTL_SPLAY_LINKS *Parent;
-  struct _RTL_SPLAY_LINKS *LeftChild;
-  struct _RTL_SPLAY_LINKS *RightChild;
-} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
-
-
-typedef struct _RTL_RANGE_LIST
-{
-  LIST_ENTRY ListHead;
-  ULONG Flags;  /* RTL_RANGE_LIST_... flags */
-  ULONG Count;
-  ULONG Stamp;
-} RTL_RANGE_LIST, *PRTL_RANGE_LIST;
-
-#define RTL_RANGE_LIST_ADD_IF_CONFLICT  0x00000001
-#define RTL_RANGE_LIST_ADD_SHARED       0x00000002
-
-typedef struct _RTL_RANGE
-{
-  ULONGLONG Start;
-  ULONGLONG End;
-  PVOID UserData;
-  PVOID Owner;
-  UCHAR Attributes;
-  UCHAR Flags;  /* RTL_RANGE_... flags */
-} RTL_RANGE, *PRTL_RANGE;
-
-#define RTL_RANGE_SHARED      0x01
-#define RTL_RANGE_CONFLICT    0x02
-
-typedef BOOLEAN
-(STDCALL *PRTL_CONFLICT_RANGE_CALLBACK) (PVOID Context,
-                                        PRTL_RANGE Range);
-
-
-typedef struct _RANGE_LIST_ITERATOR
-{
-  PLIST_ENTRY RangeListHead;
-  PLIST_ENTRY MergedHead;
-  PVOID Current;
-  ULONG Stamp;
-} RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
-
-
-typedef struct _INITIAL_TEB
-{
-  PVOID StackBase;
-  PVOID StackLimit;
-  PVOID StackCommit;
-  PVOID StackCommitMax;
-  PVOID StackReserved;
-} INITIAL_TEB, *PINITIAL_TEB;
-
-#define MAXIMUM_LEADBYTES 12
-
-typedef struct _CPTABLEINFO
-{
-  USHORT  CodePage;
-  USHORT  MaximumCharacterSize;  /* SBCS = 1, DBCS = 2 */
-  USHORT  DefaultChar;
-  USHORT  UniDefaultChar;
-  USHORT  TransDefaultChar;
-  USHORT  TransUniDefaultChar;
-  USHORT  DBCSCodePage;
-  UCHAR   LeadByte[MAXIMUM_LEADBYTES];
-  PUSHORT MultiByteTable;
-  PVOID   WideCharTable;
-  PUSHORT DBCSRanges;
-  PUSHORT DBCSOffsets;
-} CPTABLEINFO, *PCPTABLEINFO;
-
-typedef struct _NLSTABLEINFO
-{
-  CPTABLEINFO OemTableInfo;
-  CPTABLEINFO AnsiTableInfo;
-  PUSHORT UpperCaseTable;
-  PUSHORT LowerCaseTable;
-} NLSTABLEINFO, *PNLSTABLEINFO;
-
-
-#else /* __USE_W32API */
-
-#include <ddk/ntifs.h>
-
-#endif /* __USE_W32API */
-
-typedef struct _RTL_HEAP_DEFINITION
-{
-  ULONG Length;
-  ULONG Unknown[11];
-} RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
-
-typedef struct _RTL_HANDLE_TABLE_ENTRY
-{
-     ULONG Flags;
-     struct _RTL_HANDLE_TABLE_ENTRY *NextFree;
-} RTL_HANDLE_TABLE_ENTRY, *PRTL_HANDLE_TABLE_ENTRY;
-typedef struct _RTL_HANDLE_TABLE
-{
-     ULONG MaximumNumberOfHandles;
-     ULONG SizeOfHandleTableEntry;
-     ULONG Reserved[2];
-     PRTL_HANDLE_TABLE_ENTRY FreeHandles;
-     PRTL_HANDLE_TABLE_ENTRY CommittedHandles;
-     PRTL_HANDLE_TABLE_ENTRY UnCommittedHandles;
-     PRTL_HANDLE_TABLE_ENTRY MaxReservedHandles;
-} RTL_HANDLE_TABLE, *PRTL_HANDLE_TABLE;
-
-typedef struct _RTL_ATOM_TABLE_ENTRY
-{
-    struct _RTL_ATOM_TABLE_ENTRY *HashLink;
-    USHORT HandleIndex;
-    USHORT Atom;
-    USHORT ReferenceCount;
-    UCHAR Flags;
-    UCHAR NameLength;
-    WCHAR Name[1];
-} RTL_ATOM_TABLE_ENTRY, *PRTL_ATOM_TABLE_ENTRY;
-
-typedef struct _RTL_ATOM_TABLE
-{
-    ULONG Signature;
-    union
-    {
-        RTL_CRITICAL_SECTION CriticalSection;
-        FAST_MUTEX FastMutex;
-    };
-    union
-    {
-        RTL_HANDLE_TABLE RtlHandleTable;
-        PHANDLE_TABLE ExHandleTable;
-    };
-    ULONG NumberOfBuckets;
-    PRTL_ATOM_TABLE_ENTRY Buckets[1];
-} RTL_ATOM_TABLE, *PRTL_ATOM_TABLE;
-
-
-#include <pshpack1.h>
-
-typedef struct _NLS_FILE_HEADER
-{
-  USHORT  HeaderSize;
-  USHORT  CodePage;
-  USHORT  MaximumCharacterSize;  /* SBCS = 1, DBCS = 2 */
-  USHORT  DefaultChar;
-  USHORT  UniDefaultChar;
-  USHORT  TransDefaultChar;
-  USHORT  TransUniDefaultChar;
-  USHORT  DBCSCodePage;
-  UCHAR   LeadByte[MAXIMUM_LEADBYTES];
-} NLS_FILE_HEADER, *PNLS_FILE_HEADER;
-
-#include <poppack.h>
-/*
-typedef struct _OSVERSIONINFOEXA {
-       ULONG dwOSVersionInfoSize;
-       ULONG dwMajorVersion;
-       ULONG dwMinorVersion;
-       ULONG dwBuildNumber;
-       ULONG dwPlatformId;
-       CHAR szCSDVersion [128];
-       USHORT wServicePackMajor;
-       USHORT wServicePackMinor;
-       USHORT wSuiteMask;
-       UCHAR wProductType;
-       UCHAR wReserved;
-} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
-
-typedef struct _OSVERSIONINFOEXW {
-       ULONG dwOSVersionInfoSize;
-       ULONG dwMajorVersion;
-       ULONG dwMinorVersion;
-       ULONG dwBuildNumber;
-       ULONG dwPlatformId;
-       WCHAR szCSDVersion[128];
-       USHORT wServicePackMajor;
-       USHORT wServicePackMinor;
-       USHORT wSuiteMask;
-       UCHAR wProductType;
-       UCHAR wReserved;
-} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW, RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW;
-
-*/
-typedef struct _RTL_MESSAGE_RESOURCE_ENTRY
-{
-  USHORT Length;
-  USHORT Flags;
-  CHAR Text[1];
-} RTL_MESSAGE_RESOURCE_ENTRY, *PRTL_MESSAGE_RESOURCE_ENTRY;
-
-typedef struct _RTL_MESSAGE_RESOURCE_BLOCK
-{
-  ULONG LowId;
-  ULONG HighId;
-  ULONG OffsetToEntries;
-} RTL_MESSAGE_RESOURCE_BLOCK, *PRTL_MESSAGE_RESOURCE_BLOCK;
-
-typedef struct _RTL_MESSAGE_RESOURCE_DATA
-{
-  ULONG NumberOfBlocks;
-  RTL_MESSAGE_RESOURCE_BLOCK Blocks[1];
-} RTL_MESSAGE_RESOURCE_DATA, *PRTL_MESSAGE_RESOURCE_DATA;
-
-typedef VOID
-(STDCALL *PRTL_BASE_PROCESS_START_ROUTINE)(PTHREAD_START_ROUTINE StartAddress,
-  PVOID Parameter);
-
-
-typedef struct _UNICODE_PREFIX_TABLE_ENTRY {
-       USHORT NodeTypeCode;
-       USHORT NameLength;
-       struct _UNICODE_PREFIX_TABLE_ENTRY *NextPrefixTree;
-       struct _UNICODE_PREFIX_TABLE_ENTRY *CaseMatch;
-       RTL_SPLAY_LINKS Links;
-       PUNICODE_STRING Prefix;
-} UNICODE_PREFIX_TABLE_ENTRY;
-typedef UNICODE_PREFIX_TABLE_ENTRY *PUNICODE_PREFIX_TABLE_ENTRY;
-
-typedef struct _UNICODE_PREFIX_TABLE {
-       USHORT NodeTypeCode;
-       USHORT NameLength;
-       PUNICODE_PREFIX_TABLE_ENTRY NextPrefixTree;
-       PUNICODE_PREFIX_TABLE_ENTRY LastNextEntry;
-} UNICODE_PREFIX_TABLE;
-typedef UNICODE_PREFIX_TABLE *PUNICODE_PREFIX_TABLE;
-
-typedef enum _TABLE_SEARCH_RESULT{
-    TableEmptyTree,
-    TableFoundNode,
-    TableInsertAsLeft,
-    TableInsertAsRight
-} TABLE_SEARCH_RESULT;
-
-
-typedef enum _RTL_GENERIC_COMPARE_RESULTS {
-       GenericLessThan,
-       GenericGreaterThan,
-       GenericEqual
-} RTL_GENERIC_COMPARE_RESULTS;
-
-struct _RTL_AVL_TABLE;
-
-typedef
-RTL_GENERIC_COMPARE_RESULTS
-(STDCALL *PRTL_AVL_COMPARE_ROUTINE) (
-       struct _RTL_AVL_TABLE *Table,
-       PVOID FirstStruct,
-       PVOID SecondStruct
-       );
-
-typedef
-PVOID
-(STDCALL *PRTL_AVL_ALLOCATE_ROUTINE) (
-       struct _RTL_AVL_TABLE *Table,
-       ULONG ByteSize
-       );
-
-typedef
-VOID
-(STDCALL *PRTL_AVL_FREE_ROUTINE) (
-       struct _RTL_AVL_TABLE *Table,
-       PVOID Buffer
-       );
-
-typedef
-NTSTATUS
-(STDCALL *PRTL_AVL_MATCH_FUNCTION) (
-       struct _RTL_AVL_TABLE *Table,
-       PVOID UserData,
-       PVOID MatchData
-       );
-
-typedef struct _RTL_BALANCED_LINKS {
-       struct _RTL_BALANCED_LINKS *Parent;
-       struct _RTL_BALANCED_LINKS *LeftChild;
-       struct _RTL_BALANCED_LINKS *RightChild;
-       CHAR Balance;
-       UCHAR Reserved[3];
-} RTL_BALANCED_LINKS;
-
-typedef RTL_BALANCED_LINKS *PRTL_BALANCED_LINKS;
-
-typedef struct _RTL_AVL_TABLE {
-       RTL_BALANCED_LINKS BalancedRoot;
-       PVOID OrderedPointer;
-       ULONG WhichOrderedElement;
-       ULONG NumberGenericTableElements;
-       ULONG DepthOfTree;
-       PRTL_BALANCED_LINKS RestartKey;
-       ULONG DeleteCount;
-       PRTL_AVL_COMPARE_ROUTINE CompareRoutine;
-       PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine;
-       PRTL_AVL_FREE_ROUTINE FreeRoutine;
-       PVOID TableContext;
-} RTL_AVL_TABLE;
-typedef RTL_AVL_TABLE *PRTL_AVL_TABLE;
-
-struct _RTL_GENERIC_TABLE;
-
-typedef
-RTL_GENERIC_COMPARE_RESULTS
-(STDCALL *PRTL_GENERIC_COMPARE_ROUTINE) (
-       struct _RTL_GENERIC_TABLE *Table,
-       PVOID FirstStruct,
-       PVOID SecondStruct
-       );
-
-typedef
-PVOID
-(STDCALL *PRTL_GENERIC_ALLOCATE_ROUTINE) (
-       struct _RTL_GENERIC_TABLE *Table,
-       ULONG ByteSize
-       );
-
-typedef
-VOID
-(STDCALL *PRTL_GENERIC_FREE_ROUTINE) (
-       struct _RTL_GENERIC_TABLE *Table,
-       PVOID Buffer
-       );
-
-
-typedef struct _RTL_GENERIC_TABLE {
-       PRTL_SPLAY_LINKS TableRoot;
-       LIST_ENTRY InsertOrderList;
-       PLIST_ENTRY OrderedPointer;
-       ULONG WhichOrderedElement;
-       ULONG NumberGenericTableElements;
-       PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine;
-       PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine;
-       PRTL_GENERIC_FREE_ROUTINE FreeRoutine;
-       PVOID TableContext;
-} RTL_GENERIC_TABLE;
-typedef RTL_GENERIC_TABLE *PRTL_GENERIC_TABLE;
-
-typedef NTSTATUS
-(*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 */
diff --git a/reactos/include/ntos/security.h b/reactos/include/ntos/security.h
deleted file mode 100644 (file)
index f7ec107..0000000
+++ /dev/null
@@ -1,446 +0,0 @@
-#ifndef __INCLUDE_SECURITY_H
-#define __INCLUDE_SECURITY_H
-
-#include <ntos/ntdef.h>
-#include <ntos/types.h>
-
-#ifndef __USE_W32API
-/* Privileges */
-#define SE_MIN_WELL_KNOWN_PRIVILEGE            (2L)
-#define SE_CREATE_TOKEN_PRIVILEGE              (2L)
-#define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE                (3L)
-#define SE_LOCK_MEMORY_PRIVILEGE               (4L)
-#define SE_INCREASE_QUOTA_PRIVILEGE            (5L)
-#define SE_UNSOLICITED_INPUT_PRIVILEGE         (6L)  /* unused */
-#define SE_MACHINE_ACCOUNT_PRIVILEGE           (6L)
-#define SE_TCB_PRIVILEGE                       (7L)
-#define SE_SECURITY_PRIVILEGE                  (8L)
-#define SE_TAKE_OWNERSHIP_PRIVILEGE            (9L)
-#define SE_LOAD_DRIVER_PRIVILEGE               (10L)
-#define SE_SYSTEM_PROFILE_PRIVILEGE            (11L)
-#define SE_SYSTEMTIME_PRIVILEGE                        (12L)
-#define SE_PROF_SINGLE_PROCESS_PRIVILEGE       (13L)
-#define SE_INC_BASE_PRIORITY_PRIVILEGE         (14L)
-#define SE_CREATE_PAGEFILE_PRIVILEGE           (15L)
-#define SE_CREATE_PERMANENT_PRIVILEGE          (16L)
-#define SE_BACKUP_PRIVILEGE                    (17L)
-#define SE_RESTORE_PRIVILEGE                   (18L)
-#define SE_SHUTDOWN_PRIVILEGE                  (19L)
-#define SE_DEBUG_PRIVILEGE                     (20L)
-#define SE_AUDIT_PRIVILEGE                     (21L)
-#define SE_SYSTEM_ENVIRONMENT_PRIVILEGE                (22L)
-#define SE_CHANGE_NOTIFY_PRIVILEGE             (23L)
-#define SE_REMOTE_SHUTDOWN_PRIVILEGE           (24L)
-#define SE_MAX_WELL_KNOWN_PRIVILEGE            SE_REMOTE_SHUTDOWN_PRIVILEGE
-#endif
-/* TOKEN_GROUPS structure */
-#ifndef SE_GROUP_MANDATORY
-#define SE_GROUP_MANDATORY                (0x1L)
-#define SE_GROUP_ENABLED_BY_DEFAULT       (0x2L)
-#define SE_GROUP_ENABLED                  (0x4L)
-#define SE_GROUP_OWNER                    (0x8L)
-#define SE_GROUP_LOGON_ID                 (0xC0000000L)
-#endif
-
-#if 0
-/* Security descriptor control. */
-#define SECURITY_DESCRIPTOR_REVISION   (1)
-#define SECURITY_DESCRIPTOR_MIN_LENGTH (20)
-#define SE_OWNER_DEFAULTED     (0x0001)
-#define SE_GROUP_DEFAULTED     (0x0002)
-#define SE_DACL_PRESENT                (0x0004)
-#define SE_DACL_DEFAULTED      (0x0008)
-#define SE_SACL_PRESENT                (0x0010)
-#define SE_SACL_DEFAULTED      (0x0020)
-#define SE_RM_CONTROL_VALID    (0x4000)
-#define SE_SELF_RELATIVE       (0x8000)
-#endif
-
-/* This is defined in the Win 32 API headers as something else: */
-#if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
-typedef ULONG ACCESS_MODE, *PACCESS_MODE;
-#endif
-
-#if 0
-typedef struct _ACE_HEADER
-{
-  CHAR AceType;
-  CHAR AceFlags;
-  USHORT AceSize;
-  ACCESS_MASK AccessMask;
-} ACE_HEADER, *PACE_HEADER;
-
-typedef struct
-{
-  ACE_HEADER Header;
-} ACE, *PACE;
-#endif
-
-#ifdef __GNU__
-typedef struct _SECURITY_DESCRIPTOR_CONTEXT
-{
-} SECURITY_DESCRIPTOR_CONTEXT, *PSECURITY_DESCRIPTOR_CONTEXT;
-#endif
-
-
-#ifndef __USE_W32API
-
-#define SYSTEM_LUID                     { 0x3E7, 0x0 }
-#define ANONYMOUS_LOGON_LUID            { 0x3e6, 0x0 }
-#define LOCALSERVICE_LUID               { 0x3e5, 0x0 }
-#define NETWORKSERVICE_LUID             { 0x3e4, 0x0 }
-    
-/* SID Auhority */
-#define SECURITY_NULL_SID_AUTHORITY            {0,0,0,0,0,0}
-#define SECURITY_WORLD_SID_AUTHORITY           {0,0,0,0,0,1}
-#define SECURITY_LOCAL_SID_AUTHORITY           {0,0,0,0,0,2}
-#define SECURITY_CREATOR_SID_AUTHORITY         {0,0,0,0,0,3}
-#define SECURITY_NON_UNIQUE_AUTHORITY          {0,0,0,0,0,4}
-#define SECURITY_NT_AUTHORITY                  {0,0,0,0,0,5}
-
-/* SID */
-#define SECURITY_NULL_RID                      (0L)
-#define SECURITY_WORLD_RID                     (0L)
-#define SECURITY_LOCAL_RID                     (0L)
-#define SECURITY_CREATOR_OWNER_RID             (0L)
-#define SECURITY_CREATOR_GROUP_RID             (0x1L)
-#define SECURITY_CREATOR_OWNER_SERVER_RID      (0x2L)
-#define SECURITY_CREATOR_GROUP_SERVER_RID      (0x3L)
-#define SECURITY_DIALUP_RID                    (0x1L)
-#define SECURITY_NETWORK_RID                   (0x2L)
-#define SECURITY_BATCH_RID                     (0x3L)
-#define SECURITY_INTERACTIVE_RID               (0x4L)
-#define SECURITY_LOGON_IDS_RID                 (0x5L)
-#define SECURITY_LOGON_IDS_RID_COUNT           (0x3L)
-#define SECURITY_SERVICE_RID                   (0x6L)
-#define SECURITY_ANONYMOUS_LOGON_RID           (0x7L)
-#define SECURITY_PROXY_RID                     (0x8L)
-#define SECURITY_ENTERPRISE_CONTROLLERS_RID    (0x9L)
-#define SECURITY_SERVER_LOGON_RID              SECURITY_ENTERPRISE_CONTROLLERS_RID
-#define SECURITY_PRINCIPAL_SELF_RID            (0xAL)
-#define SECURITY_AUTHENTICATED_USER_RID                (0xBL)
-#define SECURITY_RESTRICTED_CODE_RID           (0xCL)
-#define SECURITY_LOCAL_SYSTEM_RID              (0x12L)
-#define SECURITY_NT_NON_UNIQUE_RID             (0x15L)
-#define SECURITY_BUILTIN_DOMAIN_RID            (0x20L)
-#define DOMAIN_USER_RID_ADMIN                  (0x1F4L)
-#define DOMAIN_USER_RID_GUEST                  (0x1F5L)
-#define DOMAIN_GROUP_RID_ADMINS                        (0x200L)
-#define DOMAIN_GROUP_RID_USERS                 (0x201L)
-#define DOMAIN_ALIAS_RID_ADMINS                        (0x220L)
-#define DOMAIN_ALIAS_RID_USERS                 (0x221L)
-#define DOMAIN_ALIAS_RID_GUESTS                        (0x222L)
-#define DOMAIN_ALIAS_RID_POWER_USERS           (0x223L)
-#define DOMAIN_ALIAS_RID_ACCOUNT_OPS           (0x224L)
-#define DOMAIN_ALIAS_RID_SYSTEM_OPS            (0x225L)
-#define DOMAIN_ALIAS_RID_PRINT_OPS             (0x226L)
-#define DOMAIN_ALIAS_RID_BACKUP_OPS            (0x227L)
-#define DOMAIN_ALIAS_RID_REPLICATOR            (0x228L)
-
-/* ACCESS_MASK */
-/* Generic rights */
-#define GENERIC_READ                   (0x80000000L)
-#define GENERIC_WRITE                  (0x40000000L)
-#define GENERIC_EXECUTE                        (0x20000000L)
-#define GENERIC_ALL                    (0x10000000L)
-#define MAXIMUM_ALLOWED                        (0x02000000L)
-#define ACCESS_SYSTEM_SECURITY         (0x01000000L)
-
-/* Standard rights */
-#define STANDARD_RIGHTS_REQUIRED       (0x000f0000L)
-#define STANDARD_RIGHTS_WRITE          (0x00020000L)
-#define STANDARD_RIGHTS_READ           (0x00020000L)
-#define STANDARD_RIGHTS_EXECUTE                (0x00020000L)
-#define STANDARD_RIGHTS_ALL            (0x001f0000L)
-#define SPECIFIC_RIGHTS_ALL            (0x0000ffffL)
-
-/* Token rights */
-#define TOKEN_ASSIGN_PRIMARY           (0x0001L)
-#define TOKEN_DUPLICATE                        (0x0002L)
-#define TOKEN_IMPERSONATE              (0x0004L)
-#define TOKEN_QUERY                    (0x0008L)
-#define TOKEN_QUERY_SOURCE             (0x0010L)
-#define TOKEN_ADJUST_PRIVILEGES                (0x0020L)
-#define TOKEN_ADJUST_GROUPS            (0x0040L)
-#define TOKEN_ADJUST_DEFAULT           (0x0080L)
-#define TOKEN_ADJUST_SESSIONID         (0x0100L)
-
-#define TOKEN_ALL_ACCESS               (0xf01ffL)
-#define TOKEN_READ                     (0x20008L)
-#define TOKEN_WRITE                    (0x200e0L)
-#define TOKEN_EXECUTE                  (0x20000L)
-
-typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE, *PSECURITY_CONTEXT_TRACKING_MODE;
-
-#define SECURITY_STATIC_TRACKING       (0)
-#define SECURITY_DYNAMIC_TRACKING      (1)
-
-typedef ULONG SECURITY_INFORMATION, *PSECURITY_INFORMATION;
-
-#define OWNER_SECURITY_INFORMATION     (0x1L)
-#define GROUP_SECURITY_INFORMATION     (0x2L)
-#define DACL_SECURITY_INFORMATION      (0x4L)
-#define SACL_SECURITY_INFORMATION      (0x8L)
-
-typedef enum _TOKEN_INFORMATION_CLASS
-{
-  TokenUser = 1,
-  TokenGroups,
-  TokenPrivileges,
-  TokenOwner,
-  TokenPrimaryGroup,
-  TokenDefaultDacl,
-  TokenSource,
-  TokenType,
-  TokenImpersonationLevel,
-  TokenStatistics,
-  TokenRestrictedSids,
-  TokenSessionId,
-  TokenGroupsAndPrivileges,
-  TokenSessionReference,
-  TokenSandBoxInert,
-  TokenAuditPolicy,
-  TokenOrigin
-} TOKEN_INFORMATION_CLASS;
-
-typedef enum _SECURITY_IMPERSONATION_LEVEL
-{
-  SecurityAnonymous,
-  SecurityIdentification,
-  SecurityImpersonation,
-  SecurityDelegation
-} SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL;
-
-typedef ULONG ACCESS_MASK, *PACCESS_MASK;
-typedef ULONG TOKEN_TYPE, *PTOKEN_TYPE;
-
-#define TokenPrimary           ((TOKEN_TYPE)1)
-#define TokenImpersonation     ((TOKEN_TYPE)2)
-
-typedef struct _SECURITY_QUALITY_OF_SERVICE
-{
-  ULONG Length;
-  SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
-  SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
-  BOOLEAN EffectiveOnly;
-} SECURITY_QUALITY_OF_SERVICE;
-
-typedef SECURITY_QUALITY_OF_SERVICE* PSECURITY_QUALITY_OF_SERVICE;
-
-typedef struct _ACE_HEADER
-{
-  BYTE AceType;
-  BYTE AceFlags;
-  WORD AceSize;
-} ACE_HEADER, *PACE_HEADER;
-
-typedef struct _SID_IDENTIFIER_AUTHORITY
-{
-  BYTE Value[6];
-} SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
-
-typedef struct _SID
-{
-  UCHAR  Revision;
-  UCHAR  SubAuthorityCount;
-  SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
-  ULONG SubAuthority[1];
-} SID, *PISID;
-
-typedef PVOID PSID;
-
-typedef struct _ACL
-{
-  UCHAR AclRevision;
-  UCHAR Sbz1;
-  USHORT AclSize;
-  USHORT AceCount;
-  USHORT Sbz2;
-} ACL, *PACL;
-
-typedef struct _ACL_REVISION_INFORMATION
-{
-  ULONG AclRevision;
-} ACL_REVISION_INFORMATION, *PACL_REVISION_INFORMATION;
-
-typedef struct _ACL_SIZE_INFORMATION
-{
-  ULONG AceCount;
-  ULONG AclBytesInUse;
-  ULONG AclBytesFree;
-} ACL_SIZE_INFORMATION, *PACL_SIZE_INFORMATION;
-
-typedef enum _ACL_INFORMATION_CLASS
-{
-  AclRevisionInformation = 1,
-  AclSizeInformation
-} ACL_INFORMATION_CLASS;
-
-typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
-
-typedef struct _LUID
-{
-  ULONG LowPart;
-  LONG  HighPart;
-} LUID, *PLUID;
-
-typedef struct _SECURITY_DESCRIPTOR
-{
-  UCHAR  Revision;
-  UCHAR  Sbz1;
-  SECURITY_DESCRIPTOR_CONTROL Control;
-  PSID Owner;
-  PSID Group;
-  PACL Sacl;
-  PACL Dacl;
-} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
-
-typedef struct _SECURITY_DESCRIPTOR_RELATIVE
-{
-  UCHAR  Revision;
-  UCHAR  Sbz1;
-  SECURITY_DESCRIPTOR_CONTROL Control;
-  ULONG Owner;
-  ULONG Group;
-  ULONG Sacl;
-  ULONG Dacl;
-} SECURITY_DESCRIPTOR_RELATIVE, *PSECURITY_DESCRIPTOR_RELATIVE;
-
-typedef struct _LUID_AND_ATTRIBUTES
-{
-  LUID  Luid;
-  ULONG Attributes;
-} LUID_AND_ATTRIBUTES, *PLUID_AND_ATTRIBUTES;
-
-typedef struct _TOKEN_SOURCE
-{
-  CHAR SourceName[8];
-  LUID SourceIdentifier;
-} TOKEN_SOURCE, *PTOKEN_SOURCE;
-
-typedef struct _TOKEN_CONTROL
-{
-  LUID TokenId;
-  LUID AuthenticationId;
-  LUID ModifiedId;
-  TOKEN_SOURCE TokenSource;
-} TOKEN_CONTROL, *PTOKEN_CONTROL;
-
-typedef struct _SID_AND_ATTRIBUTES
-{
-  PSID  Sid;
-  DWORD Attributes;
-} SID_AND_ATTRIBUTES, *PSID_AND_ATTRIBUTES;
-
-typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
-typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY;
-
-typedef struct _TOKEN_USER
-{
-  SID_AND_ATTRIBUTES User;
-} TOKEN_USER, *PTOKEN_USER;
-
-typedef struct _TOKEN_PRIMARY_GROUP
-{
-  PSID PrimaryGroup;
-} TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;
-
-typedef struct _TOKEN_GROUPS
-{
-  DWORD GroupCount;
-  SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
-} TOKEN_GROUPS, *PTOKEN_GROUPS, *LPTOKEN_GROUPS;
-
-typedef struct _TOKEN_GROUPS_AND_PRIVILEGES
-{
-  ULONG SidCount;
-  ULONG SidLength;
-  PSID_AND_ATTRIBUTES Sids;
-  ULONG RestrictedSidCount;
-  ULONG RestrictedSidLength;
-  PSID_AND_ATTRIBUTES RestrictedSids;
-  ULONG PrivilegeCount;
-  ULONG PrivilegeLength;
-  PLUID_AND_ATTRIBUTES Privileges;
-  LUID AuthenticationId;
-} TOKEN_GROUPS_AND_PRIVILEGES, *PTOKEN_GROUPS_AND_PRIVILEGES;
-
-typedef struct _TOKEN_PRIVILEGES
-{
-  DWORD PrivilegeCount;
-  LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
-} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES, *LPTOKEN_PRIVILEGES;
-
-typedef struct _TOKEN_OWNER
-{
-  PSID Owner;
-} TOKEN_OWNER, *PTOKEN_OWNER;
-
-typedef struct _TOKEN_DEFAULT_DACL
-{
-  PACL DefaultDacl;
-} TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;
-
-typedef struct _TOKEN_STATISTICS
-{
-  LUID  TokenId;
-  LUID  AuthenticationId;
-  LARGE_INTEGER ExpirationTime;
-  TOKEN_TYPE TokenType;
-  SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
-  DWORD DynamicCharged;
-  DWORD DynamicAvailable;
-  DWORD GroupCount;
-  DWORD PrivilegeCount;
-  LUID  ModifiedId;
-} TOKEN_STATISTICS, *PTOKEN_STATISTICS;
-
-typedef struct _TOKEN_ORIGIN {
-  LUID OriginatingLogonSession;
-} TOKEN_ORIGIN, *PTOKEN_ORIGIN;
-
-typedef struct _GENERIC_MAPPING
-{
-  ACCESS_MASK GenericRead;
-  ACCESS_MASK GenericWrite;
-  ACCESS_MASK GenericExecute;
-  ACCESS_MASK GenericAll;
-} GENERIC_MAPPING, *PGENERIC_MAPPING;
-
-typedef struct _PRIVILEGE_SET
-{
-  DWORD PrivilegeCount;
-  DWORD Control;
-  LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY];
-} PRIVILEGE_SET, *PPRIVILEGE_SET, *LPPRIVILEGE_SET;
-
-#define INITIAL_PRIVILEGE_COUNT 3
-
-typedef struct _INITIAL_PRIVILEGE_SET
-{
-  ULONG PrivilegeCount;
-  ULONG Control;
-  LUID_AND_ATTRIBUTES Privilege[INITIAL_PRIVILEGE_COUNT];
-} INITIAL_PRIVILEGE_SET, *PINITIAL_PRIVILEGE_SET;
-
-typedef struct _SECURITY_ATTRIBUTES
-{
-  DWORD  nLength;
-  LPVOID lpSecurityDescriptor;
-  BOOL   bInheritHandle;
-} SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
-
-#else /* !__USE_W32API */
-
-typedef struct _ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION;
-typedef struct _ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION;
-
-#endif /* __USE_W32API */
-
-typedef struct
-{
-  ACE_HEADER Header;
-  ACCESS_MASK AccessMask;
-} ACE, *PACE;
-
-#endif /* __INCLUDE_SECURITY_H */
diff --git a/reactos/include/ntos/sefuncs.h b/reactos/include/ntos/sefuncs.h
deleted file mode 100644 (file)
index b5dbb19..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef _INCLUDE_NTOS_SEFUNCS_H\r
-#define _INCLUDE_NTOS_SEFUNCS_H\r
-\r
-NTSTATUS\r
-STDCALL\r
-SeCaptureSecurityDescriptor(\r
-       IN PSECURITY_DESCRIPTOR OriginalSecurityDescriptor,\r
-       IN KPROCESSOR_MODE CurrentMode,\r
-       IN POOL_TYPE PoolType,\r
-       IN BOOLEAN CaptureIfKernel,\r
-       OUT PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor\r
-       );\r
-\r
-VOID\r
-STDCALL\r
-SeCloseObjectAuditAlarm(\r
-       IN PVOID Object,\r
-       IN HANDLE Handle,\r
-       IN BOOLEAN PerformAction\r
-       );\r
-\r
-NTSTATUS\r
-STDCALL\r
-SeCreateAccessState(\r
-       PACCESS_STATE AccessState,\r
-       PAUX_DATA AuxData,\r
-       ACCESS_MASK Access,\r
-       PGENERIC_MAPPING GenericMapping\r
-       );\r
-\r
-VOID STDCALL\r
-SeDeleteAccessState(IN PACCESS_STATE AccessState);\r
-\r
-VOID\r
-STDCALL\r
-SePrivilegeObjectAuditAlarm(\r
-       IN HANDLE Handle,\r
-       IN PSECURITY_SUBJECT_CONTEXT SubjectContext,\r
-       IN ACCESS_MASK DesiredAccess,\r
-       IN PPRIVILEGE_SET Privileges,\r
-       IN BOOLEAN AccessGranted,\r
-       IN KPROCESSOR_MODE CurrentMode\r
-       );\r
-\r
-NTSTATUS\r
-STDCALL\r
-SeReleaseSecurityDescriptor(\r
-       IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor,\r
-       IN KPROCESSOR_MODE CurrentMode,\r
-       IN BOOLEAN CaptureIfKernelMode\r
-       );\r
-\r
-SECURITY_IMPERSONATION_LEVEL STDCALL\r
-SeTokenImpersonationLevel(IN PACCESS_TOKEN Token);\r
-\r
-BOOLEAN\r
-STDCALL\r
-SeTokenIsWriteRestricted(\r
-       IN PACCESS_TOKEN Token\r
-       );\r
-\r
-#endif /* _INCLUDE_NTOS_SEFUNCS_H */\r
-\r
diff --git a/reactos/include/ntos/service.h b/reactos/include/ntos/service.h
deleted file mode 100755 (executable)
index 59e8b0a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-
-#ifndef __NTOS_SERVICE_H
-#define __NTOS_SERVICE_H
-
-
-/* number of entries in the service descriptor tables */
-#define SSDT_MAX_ENTRIES 4
-
-
-#ifndef __USE_W32API
-
-/* System Service Dispatch Table */
-typedef PVOID (NTAPI * SSDT)(VOID);
-typedef SSDT * PSSDT;
-
-/* System Service Parameters Table */
-typedef UCHAR SSPT, *PSSPT;
-
-typedef struct t_KeServiceDescriptorTableEntry {
-                PSSDT               SSDT;
-                PULONG              ServiceCounterTable;
-                ULONG               NumberOfServices;
-                PSSPT               SSPT;
-
-} SSDT_ENTRY, *PSSDT_ENTRY;
-
-#endif /* __USE_W32API */
-
-
-/* --- NTOSKRNL.EXE --- */
-#if defined(__NTOSKRNL__)
-#ifdef __GNUC__
-extern
-SSDT_ENTRY
-KeServiceDescriptorTable[SSDT_MAX_ENTRIES] __declspec(dllexport);
-#else /* __GNUC__ */
-/* Microsft-style */
-extern
-__declspec(dllexport)
-SSDT_ENTRY
-KeServiceDescriptorTable[SSDT_MAX_ENTRIES];
-#endif /* __GNUC__ */
-#else /* __NTOSKRNL__ */
-#ifdef __GNUC__
-extern
-SSDT_ENTRY
-KeServiceDescriptorTable[SSDT_MAX_ENTRIES] __declspec(dllimport);
-#else /* __GNUC__ */
-/* Microsft-style */
-extern
-__declspec(dllimport)
-SSDT_ENTRY
-KeServiceDescriptorTable[SSDT_MAX_ENTRIES];
-#endif /* __GNUC__ */
-#endif /* __NTOSKRNL__ */
-
-extern
-SSDT_ENTRY
-KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES];
-
-
-#ifndef __USE_W32API
-
-BOOLEAN
-STDCALL
-KeAddSystemServiceTable (
-       PSSDT   SSDT,
-       PULONG  ServiceCounterTable,
-       ULONG   NumberOfServices,
-       PSSPT   SSPT,
-       ULONG   TableIndex
-       );
-
-#endif /* __USE_W32API */
-
-#endif /* __NTOS_SERVICE_H */
-
diff --git a/reactos/include/ntos/setypes.h b/reactos/include/ntos/setypes.h
deleted file mode 100644 (file)
index 8ab0b16..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef __INCLUDE_NTOS_SETYPES_H\r
-#define __INCLUDE_NTOS_SETYPES_H\r
-\r
-typedef struct _SEP_AUDIT_POLICY_CATEGORIES {\r
-    UCHAR System:4;\r
-    UCHAR Logon:4;\r
-    UCHAR ObjectAccess:4;\r
-    UCHAR PrivilegeUse:4;\r
-    UCHAR DetailedTracking:4;\r
-    UCHAR PolicyChange:4;\r
-    UCHAR AccountManagement:4;\r
-    UCHAR DirectoryServiceAccess:4;\r
-    UCHAR AccountLogon:4;\r
-} SEP_AUDIT_POLICY_CATEGORIES, *PSEP_AUDIT_POLICY_CATEGORIES;\r
-\r
-typedef struct _SEP_AUDIT_POLICY_OVERLAY {\r
-    ULONGLONG PolicyBits:36;\r
-    UCHAR SetBit:1;\r
-} SEP_AUDIT_POLICY_OVERLAY, *PSEP_AUDIT_POLICY_OVERLAY;\r
-\r
-typedef struct _SEP_AUDIT_POLICY {\r
-    union {\r
-        SEP_AUDIT_POLICY_CATEGORIES PolicyElements;\r
-        SEP_AUDIT_POLICY_OVERLAY PolicyOverlay;\r
-        ULONGLONG Overlay;\r
-    };\r
-} SEP_AUDIT_POLICY, *PSEP_AUDIT_POLICY;\r
\r
-#define TOKEN_HAS_TRAVERSE_PRIVILEGE    0x01\r
-typedef struct _TOKEN {\r
-  TOKEN_SOURCE TokenSource;                         /* 0x00 */\r
-  LUID TokenId;                                     /* 0x10 */\r
-  LUID AuthenticationId;                            /* 0x18 */\r
-  LUID ParentTokenId;                               /* 0x20 */\r
-  LARGE_INTEGER ExpirationTime;                     /* 0x28 */\r
-  struct _ERESOURCE *TokenLock;                     /* 0x30 */\r
-  SEP_AUDIT_POLICY  AuditPolicy;                    /* 0x38 */\r
-  LUID ModifiedId;                                  /* 0x40 */\r
-  ULONG SessionId;                                  /* 0x48 */\r
-  ULONG UserAndGroupCount;                          /* 0x4C */\r
-  ULONG RestrictedSidCount;                         /* 0x50 */\r
-  ULONG PrivilegeCount;                             /* 0x54 */\r
-  ULONG VariableLength;                             /* 0x58 */\r
-  ULONG DynamicCharged;                             /* 0x5C */\r
-  ULONG DynamicAvailable;                           /* 0x60 */\r
-  ULONG DefaultOwnerIndex;                          /* 0x64 */\r
-  PSID_AND_ATTRIBUTES UserAndGroups;                /* 0x68 */\r
-  PSID_AND_ATTRIBUTES RestrictedSids;               /* 0x6C */\r
-  PSID PrimaryGroup;                                /* 0x70 */\r
-  PLUID_AND_ATTRIBUTES Privileges;                  /* 0x74 */\r
-  PULONG DynamicPart;                               /* 0x78 */\r
-  PACL DefaultDacl;                                 /* 0x7C */\r
-  TOKEN_TYPE TokenType;                             /* 0x80 */\r
-  SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;  /* 0x84 */\r
-  ULONG TokenFlags;                                 /* 0x88 */\r
-  BOOLEAN TokenInUse;                               /* 0x8C */\r
-  PVOID ProxyData;                                  /* 0x90 */\r
-  PVOID AuditData;                                  /* 0x94 */\r
-  LUID OriginatingLogonSession;                     /* 0x98 */\r
-  ULONG VariablePart;                               /* 0xA0 */\r
-} TOKEN, *PTOKEN;\r
-\r
-typedef struct _AUX_DATA\r
-{\r
-    PPRIVILEGE_SET PrivilegeSet;\r
-    GENERIC_MAPPING GenericMapping;\r
-    ULONG Reserved;\r
-} AUX_DATA, *PAUX_DATA;\r
-\r
-#endif /* __INCLUDE_NTOS_SETYPES_H */\r
diff --git a/reactos/include/ntos/synch.h b/reactos/include/ntos/synch.h
deleted file mode 100644 (file)
index 512c750..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/ntos/synch.h
- * PURPOSE:      Synchronization declarations used by all the parts of the 
- *               system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-#ifndef __INCLUDE_SYNCH_H
-#define __INCLUDE_SYNCH_H
-
-#ifndef __USE_W32API
-
-#define EVENT_ALL_ACCESS       (0x1f0003L)
-#define EVENT_MODIFY_STATE     (2)
-#define EVENT_QUERY_STATE      (1)
-#define MUTEX_ALL_ACCESS       (0x1f0001L)
-#define MUTANT_ALL_ACCESS      (0x1f0001L)
-#define MUTANT_QUERY_STATE     (1)
-#define SEMAPHORE_ALL_ACCESS   (0x1f0003L)
-#define SEMAPHORE_QUERY_STATE  (1)
-#define SEMAPHORE_MODIFY_STATE (2)
-#define TIMER_ALL_ACCESS       (0x1f0003L)
-#define TIMER_QUERY_STATE      (1)
-#define TIMER_MODIFY_STATE     (2)
-#define IO_COMPLETION_QUERY_STATE       (0x0001)
-#define IO_COMPLETION_MODIFY_STATE      (0x0002)
-#define IO_COMPLETION_ALL_ACCESS        (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
-
-#endif /* !__USE_W32API */
-
-#define EVENT_PAIR_ALL_ACCESS  (0x1f0000L)
-#define MUTEX_QUERY_STATE      (1)
-
-#endif /* __INCLUDE_SYNCH_H */
diff --git a/reactos/include/ntos/tape.h b/reactos/include/ntos/tape.h
deleted file mode 100644 (file)
index f72df53..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $Id$
- *
- * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
- * FILE:            include/ntos/tape.h
- * PURPOSE:         Tape drive definitions
- * PROGRAMMER:      Eric Kohl
- */
-
-#ifndef __INCLUDE_TAPE_H
-#define __INCLUDE_TAPE_H
-
-
-#define IOCTL_TAPE_BASE                   FILE_DEVICE_TAPE
-
-#define IOCTL_TAPE_CHECK_VERIFY \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_CREATE_PARTITION \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x000a, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_TAPE_ERASE \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_TAPE_FIND_NEW_DEVICES \
-  CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_GET_DRIVE_PARAMS \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_GET_MEDIA_PARAMS \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_GET_POSITION \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_GET_STATUS \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0009, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-#define IOCTL_TAPE_PREPARE \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_SET_DRIVE_PARAMS \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_TAPE_SET_MEDIA_PARAMS \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0008, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_SET_POSITION \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_WRITE_MARKS \
-  CTL_CODE(IOCTL_TAPE_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-
-#endif /* __INCLUDE_TAPE_H */
diff --git a/reactos/include/ntos/time.h b/reactos/include/ntos/time.h
deleted file mode 100644 (file)
index 3c77ab3..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/time.h
- * PURPOSE:      Time declarations used by all the parts of the system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * UPDATE HISTORY: 
- *               27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_NTOS_TIME_H
-#define __INCLUDE_NTOS_TIME_H
-
-#include <ntos/types.h>
-
-#ifndef __USE_W32API
-
-typedef struct _SYSTEMTIME
-{
-   WORD wYear;
-   WORD wMonth;
-   WORD wDayOfWeek;
-   WORD wDay;
-   WORD wHour;
-   WORD wMinute;
-   WORD wSecond;
-   WORD wMilliseconds;
-} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
-
-typedef struct _TIME_ZONE_INFORMATION
-{
-   LONG Bias;
-   WCHAR StandardName[32];
-   SYSTEMTIME StandardDate;
-   LONG StandardBias;
-   WCHAR DaylightName[32];
-   SYSTEMTIME DaylightDate;
-   LONG DaylightBias;
-} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
-
-#else /* __USE_W32API */
-
-#include <ddk/ntapi.h>
-
-typedef LPTIME_ZONE_INFORMATION PTIME_ZONE_INFORMATION;
-
-#endif /* __USE_W32API */
-
-
-#endif /* __INCLUDE_NTOS_TIME_H */
diff --git a/reactos/include/ntos/tss.h b/reactos/include/ntos/tss.h
deleted file mode 100755 (executable)
index c48b436..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 
- */
-
-#ifndef __INCLUDE_DDK_I386_TSS_H
-#define __INCLUDE_DDK_I386_TSS_H
-
-#define KTSS_ESP0      (0x4)
-#define KTSS_CR3       (0x1C)
-#define KTSS_EFLAGS    (0x24)
-#define KTSS_IOMAPBASE (0x66)
-
-#ifndef __ASM__
-
-#include <pshpack1.h>
-
-typedef struct _KTSSNOIOPM
-{
-  USHORT PreviousTask;
-  USHORT Reserved1;
-  ULONG  Esp0;
-  USHORT Ss0;
-  USHORT Reserved2;
-  ULONG  Esp1;
-  USHORT Ss1;
-  USHORT Reserved3;
-  ULONG  Esp2;
-  USHORT Ss2;
-  USHORT Reserved4;
-  ULONG  Cr3;
-  ULONG  Eip;
-  ULONG  Eflags;
-  ULONG  Eax;
-  ULONG  Ecx;
-  ULONG  Edx;
-  ULONG  Ebx;
-  ULONG  Esp;
-  ULONG  Ebp;
-  ULONG  Esi;
-  ULONG  Edi;
-  USHORT Es;
-  USHORT Reserved5;
-  USHORT Cs;
-  USHORT Reserved6;
-  USHORT Ss;
-  USHORT Reserved7;
-  USHORT Ds;
-  USHORT Reserved8;
-  USHORT Fs;
-  USHORT Reserved9;
-  USHORT Gs;
-  USHORT Reserved10;
-  USHORT Ldt;
-  USHORT Reserved11;
-  USHORT Trap;
-  USHORT IoMapBase;
-  /* no interrupt redirection map */
-  UCHAR IoBitmap[1];
-} KTSSNOIOPM;
-
-
-typedef struct _KTSS
-{
-  USHORT PreviousTask;
-  USHORT Reserved1;
-  ULONG  Esp0;
-  USHORT Ss0;
-  USHORT Reserved2;
-  ULONG  Esp1;
-  USHORT Ss1;
-  USHORT Reserved3;
-  ULONG  Esp2;
-  USHORT Ss2;
-  USHORT Reserved4;
-  ULONG  Cr3;
-  ULONG  Eip;
-  ULONG  Eflags;
-  ULONG  Eax;
-  ULONG  Ecx;
-  ULONG  Edx;
-  ULONG  Ebx;
-  ULONG  Esp;
-  ULONG  Ebp;
-  ULONG  Esi;
-  ULONG  Edi;
-  USHORT Es;
-  USHORT Reserved5;
-  USHORT Cs;
-  USHORT Reserved6;
-  USHORT Ss;
-  USHORT Reserved7;
-  USHORT Ds;
-  USHORT Reserved8;
-  USHORT Fs;
-  USHORT Reserved9;
-  USHORT Gs;
-  USHORT Reserved10;
-  USHORT Ldt;
-  USHORT Reserved11;
-  USHORT Trap;
-  USHORT IoMapBase;
-  /* no interrupt redirection map */
-  UCHAR  IoBitmap[8193];
-} KTSS;
-
-#include <poppack.h>
-
-#endif /* not __ASM__ */
-
-#endif /* __INCLUDE_DDK_I386_TSS_H */
diff --git a/reactos/include/ntos/types.h b/reactos/include/ntos/types.h
deleted file mode 100644 (file)
index 2f0d11d..0000000
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- * COPYRIGHT:    See COPYING in the top level directory
- * PROJECT:      ReactOS kernel
- * FILE:         include/types.h
- * PURPOSE:      Types used by all the parts of the system
- * PROGRAMMER:   David Welch <welch@cwcom.net>
- * DEFINES:      _WIN64: 64-bit architecture
- *               _WIN32: 32-bit architecture (default)
- * UPDATE HISTORY:
- *               27/06/00: Created
- *               01/05/01: Portabillity changes
- */
-
-#ifndef __INCLUDE_TYPES_H
-#define __INCLUDE_TYPES_H
-
-#define EXPORTED __declspec(dllexport)
-#define IMPORTED __declspec(dllimport)
-
-#include <basetsd.h>
-
-#ifndef STDCALL_FUNC
-#define STDCALL_FUNC(a)  (STDCALL a)
-#endif
-
-/* Fixed precision types */
-typedef signed char         INT8, *PINT8;
-typedef unsigned char       UINT8, *PUINT8;
-
-#ifndef __USE_W32API
-typedef signed short        INT16, *PINT16;
-typedef unsigned short      UINT16, *PUINT16;
-#endif
-
-
-/* Check VOID before defining CHAR, SHORT */
-#ifndef VOID
-#define VOID void
-typedef char CHAR;
-typedef short SHORT;
-#endif
-
-
-#ifndef __USE_W32API
-
-#ifdef i386
-#ifdef __GNUC__
-#define STDCALL     __attribute__ ((stdcall))
-#define CDECL       __attribute__ ((cdecl))
-#else
-#define STDCALL __stdcall
-#define CDECL __cdecl
-#endif
-#define CALLBACK    STDCALL
-#define PASCAL      WINAPI
-#else
-
-#ifdef __GNUC__
-#define STDCALL
-#define CDECL
-#define CALLBACK
-#define PASCAL
-#else
-#define STDCALL __stdcall
-#define CDECL __cdecl
-#define CALLBACK
-#define PASCAL
-#endif /*__GNUC__*/
-
-#endif /*i386*/
-
-typedef INT32 INT, *PINT;
-typedef LONG32 LONG, *PLONG;
-typedef unsigned long DWORD, *PDWORD;
-typedef UINT32 UINT, *PUINT;
-typedef unsigned long ULONG, *PULONG;
-
-#ifndef _WCHAR_T_
-#define _WCHAR_T_
-#define _WCHAR_T
-#define _WCHAR_T_DEFINED
-#ifndef __WCHAR_TYPE__
-#define __WCHAR_TYPE__      short unsigned int
-#endif
-
-#ifndef __cplusplus
-typedef __WCHAR_TYPE__      wchar_t;
-#endif  /* C++ */
-
-#endif  /* wchar_t not already defined */
-
-
-/* #ifndef __cplusplus
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-typedef unsigned short wchar_t;
-#endif
-#endif
-*/
-
-typedef unsigned char UCHAR;
-typedef unsigned short USHORT;
-typedef wchar_t WCHAR;
-typedef unsigned short WORD;
-typedef int BOOL;
-typedef unsigned char BOOLEAN;
-typedef BOOLEAN* PBOOLEAN;
-typedef wchar_t *LPWSTR;
-typedef wchar_t *PWSTR;
-typedef unsigned char *PUCHAR;
-typedef unsigned short *PUSHORT;
-typedef void *PVOID;
-typedef unsigned char BYTE;
-typedef void *LPVOID;
-typedef float *PFLOAT;
-typedef wchar_t *PWCH;
-typedef unsigned short *PWORD;
-
-typedef const void *LPCVOID;
-typedef BYTE *LPBYTE, *PBYTE;
-typedef BOOL *PBOOL;
-typedef DWORD LCID;
-typedef DWORD *PLCID;
-typedef const char *LPCSTR;
-typedef char *LPSTR;
-typedef const wchar_t *LPCWSTR;
-typedef CHAR *PCHAR;
-typedef CHAR *PCH;
-typedef void *HANDLE;
-typedef HANDLE *PHANDLE;
-typedef char CCHAR;
-typedef CCHAR *PCCHAR;
-typedef wchar_t *PWCHAR;
-typedef ULONG WAIT_TYPE;
-typedef USHORT CSHORT;
-typedef const wchar_t *PCWSTR;
-typedef char* PCSZ;
-typedef long long LONGLONG;
-typedef LONGLONG *PLONGLONG;
-typedef unsigned long long ULONGLONG;
-typedef ULONGLONG *PULONGLONG;
-
-typedef DWORD STDCALL_FUNC (*PTHREAD_START_ROUTINE) (LPVOID);
-
-
-typedef union _LARGE_INTEGER
-{
-  struct
-  {
-    DWORD LowPart;
-    LONG  HighPart;
-  } u;
-#ifdef ANONYMOUSUNIONS
-  struct
-  {
-    DWORD LowPart;
-    LONG  HighPart;
-  };
-#endif /* ANONYMOUSUNIONS */
-  LONGLONG QuadPart;
-} LARGE_INTEGER, *PLARGE_INTEGER;
-
-typedef union _ULARGE_INTEGER
-{
-  struct
-  {
-    DWORD LowPart;
-    DWORD HighPart;
-  } u;
-#ifdef ANONYMOUSUNIONS
-  struct
-  {
-    DWORD LowPart;
-    DWORD HighPart;
-  };
-#endif /* ANONYMOUSUNIONS */
-  ULONGLONG QuadPart;
-} ULARGE_INTEGER, *PULARGE_INTEGER;
-
-
-/* 
- * Moved here by AG
- * typedef ULARGE_INTEGER TIME, *PTIME;
- */
-
-typedef struct _FILETIME
-{
-  DWORD dwLowDateTime;
-  DWORD dwHighDateTime;
-} FILETIME, *LPFILETIME, *PFILETIME;
-
-typedef struct _LIST_ENTRY
-{
-  struct _LIST_ENTRY *Flink;
-  struct _LIST_ENTRY *Blink;
-} LIST_ENTRY, *PLIST_ENTRY;
-
-typedef struct _SINGLE_LIST_ENTRY
-{
-  struct _SINGLE_LIST_ENTRY *Next;
-} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
-
-#define SLIST_ENTRY SINGLE_LIST_ENTRY
-#define PSLIST_ENTRY PSINGLE_LIST_ENTRY
-
-typedef struct _UNICODE_STRING
-{
-  USHORT Length;
-  USHORT MaximumLength;
-  PWSTR Buffer;
-} UNICODE_STRING, *PUNICODE_STRING;
-
-typedef const UNICODE_STRING* PCUNICODE_STRING;
-
-#define UNICODE_NULL ((WCHAR)0)
-
-typedef struct _FLOATING_SAVE_AREA
-{
-  DWORD   ControlWord;
-  DWORD   StatusWord;
-  DWORD   TagWord;
-  DWORD   ErrorOffset;
-  DWORD   ErrorSelector;
-  DWORD   DataOffset;
-  DWORD   DataSelector;
-  BYTE    RegisterArea[80];
-  DWORD   Cr0NpxState;
-} FLOATING_SAVE_AREA;
-
-typedef unsigned short RTL_ATOM;
-typedef unsigned short *PRTL_ATOM;
-
-#else /* __USE_W32API */
-
-#include <windows.h>
-
-#endif /* __USE_W32API */
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL ((void*)0)
-#endif /* __cplusplus */
-#endif /* NULL */
-
-#define CONST const
-
-#ifdef __PPC__
-#define CONTEXT_CONTROL         1L
-#define CONTEXT_FLOATING_POINT  2L
-#define CONTEXT_INTEGER         4L
-#define CONTEXT_DEBUG_REGISTERS        8L
-
-#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
-#define CONTEXT_DEBUGGER (CONTEXT_FULL)
-
-#else /* x86 */
-
-#define SIZE_OF_80387_REGISTERS      80
-
-/* Values for contextflags */
-#define CONTEXT_i386    0x10000
-
-#ifndef __USE_W32API
-
-#define CONTEXT_CONTROL            (CONTEXT_i386 | 1)
-#define CONTEXT_INTEGER            (CONTEXT_i386 | 2)
-#define CONTEXT_SEGMENTS           (CONTEXT_i386 | 4)
-#define CONTEXT_FLOATING_POINT     (CONTEXT_i386 | 8)
-#define CONTEXT_DEBUG_REGISTERS    (CONTEXT_i386 | 0x10)
-#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386 | 0x20)
-#define CONTEXT_FULL               (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS)
-
-#define MAXIMUM_SUPPORTED_EXTENSION  512
-
-#endif /* !__USE_W32API */
-
-/* our own invention */
-#define FLAG_TRACE_BIT 0x100
-#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
-
-#endif
-
-typedef struct _CONTEXT_X86
-{
-  DWORD ContextFlags;
-
-  DWORD   Dr0;
-  DWORD   Dr1;
-  DWORD   Dr2;
-  DWORD   Dr3;
-  DWORD   Dr6;
-  DWORD   Dr7;
-
-  FLOATING_SAVE_AREA FloatSave;
-
-  DWORD   SegGs;
-  DWORD   SegFs;
-  DWORD   SegEs;
-  DWORD   SegDs;
-
-  DWORD   Edi;
-  DWORD   Esi;
-  DWORD   Ebx;
-  DWORD   Edx;
-  DWORD   Ecx;
-  DWORD   Eax;
-
-  DWORD   Ebp;
-  DWORD   Eip;
-  DWORD   SegCs;
-  DWORD   EFlags;
-  DWORD   Esp;
-  DWORD   SegSs;
-
-  BYTE    ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
-} CONTEXT_X86, *PCONTEXT_X86, *LPCONTEXT_X86;
-
-typedef struct _CONTEXT_PPC
-{
-  /* Floating point registers returned when CONTEXT_FLOATING_POINT is set */
-  double Fpr0;
-  double Fpr1;
-  double Fpr2;
-  double Fpr3;
-  double Fpr4;
-  double Fpr5;
-  double Fpr6;
-  double Fpr7;
-  double Fpr8;
-  double Fpr9;
-  double Fpr10;
-  double Fpr11;
-  double Fpr12;
-  double Fpr13;
-  double Fpr14;
-  double Fpr15;
-  double Fpr16;
-  double Fpr17;
-  double Fpr18;
-  double Fpr19;
-  double Fpr20;
-  double Fpr21;
-  double Fpr22;
-  double Fpr23;
-  double Fpr24;
-  double Fpr25;
-  double Fpr26;
-  double Fpr27;
-  double Fpr28;
-  double Fpr29;
-  double Fpr30;
-  double Fpr31;
-  double Fpscr;
-
-  /* Integer registers returned when CONTEXT_INTEGER is set. */
-  DWORD Gpr0;
-  DWORD Gpr1;
-  DWORD Gpr2;
-  DWORD Gpr3;
-  DWORD Gpr4;
-  DWORD Gpr5;
-  DWORD Gpr6;
-  DWORD Gpr7;
-  DWORD Gpr8;
-  DWORD Gpr9;
-  DWORD Gpr10;
-  DWORD Gpr11;
-  DWORD Gpr12;
-  DWORD Gpr13;
-  DWORD Gpr14;
-  DWORD Gpr15;
-  DWORD Gpr16;
-  DWORD Gpr17;
-  DWORD Gpr18;
-  DWORD Gpr19;
-  DWORD Gpr20;
-  DWORD Gpr21;
-  DWORD Gpr22;
-  DWORD Gpr23;
-  DWORD Gpr24;
-  DWORD Gpr25;
-  DWORD Gpr26;
-  DWORD Gpr27;
-  DWORD Gpr28;
-  DWORD Gpr29;
-  DWORD Gpr30;
-  DWORD Gpr31;
-
-  DWORD Cr;    /* Condition register */
-  DWORD Xer;   /* Fixed point exception register */
-
-  /* The following are set when CONTEXT_CONTROL is set. */
-  DWORD Msr;   /* Machine status register */
-  DWORD Iar;   /* Instruction address register */
-  DWORD Lr;    /* Link register */
-  DWORD Ctr;   /* Control register */
-
-  /* Control which context values are returned */
-  DWORD ContextFlags;
-  DWORD Fill[3];
-
-  /* Registers returned if CONTEXT_DEBUG_REGISTERS is set. */
-  DWORD Dr0;   /* Breakpoint Register 1 */
-  DWORD Dr1;   /* Breakpoint Register 2 */
-  DWORD Dr2;   /* Breakpoint Register 3 */
-  DWORD Dr3;   /* Breakpoint Register 4 */
-  DWORD Dr4;   /* Breakpoint Register 5 */
-  DWORD Dr5;   /* Breakpoint Register 6 */
-  DWORD Dr6;   /* Debug Status Register */
-  DWORD Dr7;   /* Debug Control Register */
-} CONTEXT_PPC, *PCONTEXT_PPC, *LPCONTEXT_PPC;
-
-typedef struct value_ent
-{
-  LPWSTR ve_valuename;
-  DWORD  ve_valuelen;
-  DWORD  ve_valueptr;
-  DWORD  ve_type;
-} WVALENT, *PWVALENT;
-
-/* #include "except.h" */
-
-#ifndef __USE_W32API
-
-typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
-
-#ifdef __i386__
-
-typedef CONTEXT_X86 CONTEXT;
-typedef PCONTEXT_X86 PCONTEXT;
-typedef LPCONTEXT_X86 LPCONTEXT;
-
-#else /* __ppc__ */
-
-typedef CONTEXT_PPC CONTEXT;
-typedef PCONTEXT_PPC PCONTEXT;
-typedef LPCONTEXT_PPC LPCONTEXT;
-
-#endif
-
-typedef WORD ATOM;
-
-typedef struct _COORD
-{
-  SHORT X;
-  SHORT Y;
-} COORD;
-
-typedef struct _SMALL_RECT
-{
-  SHORT Left;
-  SHORT Top;
-  SHORT Right;
-  SHORT Bottom;
-} SMALL_RECT, *PSMALL_RECT;
-
-#include "except.h"
-
-#else /* __USE_W32API */
-
-typedef LPTHREAD_START_ROUTINE PTHREAD_START_ROUTINE;
-
-#include <ddk/ntapi.h>
-
-#endif /* __USE_W32API */
-
-typedef struct _ADDRESS_RANGE
-{
-   ULONG BaseAddrLow;
-   ULONG BaseAddrHigh;
-   ULONG LengthLow;
-   ULONG LengthHigh;
-   ULONG Type;
-} ADDRESS_RANGE, *PADDRESS_RANGE;
-
-#define MB_FLAGS_MEM_INFO         (0x1)
-#define MB_FLAGS_BOOT_DEVICE      (0x2)
-#define MB_FLAGS_COMMAND_LINE     (0x4)
-#define MB_FLAGS_MODULE_INFO      (0x8)
-#define MB_FLAGS_AOUT_SYMS        (0x10)
-#define MB_FLAGS_ELF_SYMS         (0x20)
-#define MB_FLAGS_MMAP_INFO        (0x40)
-#define MB_FLAGS_DRIVES_INFO      (0x80)
-#define MB_FLAGS_CONFIG_TABLE     (0x100)
-#define MB_FLAGS_BOOT_LOADER_NAME (0x200)
-#define MB_FLAGS_APM_TABLE        (0x400)
-#define MB_FLAGS_GRAPHICS_TABLE   (0x800)
-#define MB_FLAGS_ACPI_TABLE       (0x1000)
-
-typedef struct _LOADER_MODULE
-{
-   ULONG ModStart;
-   ULONG ModEnd;
-   ULONG String;
-   ULONG Reserved;
-} LOADER_MODULE, *PLOADER_MODULE;
-
-typedef struct _LOADER_PARAMETER_BLOCK
-{
-   ULONG Flags;
-   ULONG MemLower;
-   ULONG MemHigher;
-   ULONG BootDevice;
-   ULONG CommandLine;
-   ULONG ModsCount;
-   ULONG ModsAddr;
-   UCHAR Syms[12];
-   ULONG MmapLength;
-   ULONG MmapAddr;
-   ULONG DrivesCount;
-   ULONG DrivesAddr;
-   ULONG ConfigTable;
-   ULONG BootLoaderName;
-   ULONG PageDirectoryStart;
-   ULONG PageDirectoryEnd;
-   ULONG KernelBase;
-} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
-
-typedef enum _KAPC_ENVIRONMENT
-{
-  OriginalApcEnvironment,
-  AttachedApcEnvironment,
-  CurrentApcEnvironment
-} KAPC_ENVIRONMENT;
-
-/* FIXME: Are these official values ?? */
-#define STATUS_FS_QUERY_REQUIRED                    ((NTSTATUS)0xC1000001)
-#define STATUS_HANDLE_NOT_WAITABLE                  ((NTSTATUS)0xC1000002)
-#define STATUS_OBJECT_FILE_MISMATCH                 ((NTSTATUS)0xC1000003)
-#define STATUS_INVALID_PARAMETER_MAX                ((NTSTATUS)0xC1000004)
-#define STATUS_CONFLICTING_ADDRESS                  ((NTSTATUS)0xC1000005)
-#define STATUS_NO_MEDIA_IN_DRIVE                    ((NTSTATUS)0xC1000006)
-
-#define NTSTAT_SEVERITY_SHIFT 30
-#define NTSTAT_SEVERITY_MASK  0x00000003
-#define NTSTAT_FACILITY_SHIFT 16
-#define NTSTAT_FACILITY_MASK  0x00000FFF
-#define NTSTAT_CUSTOMER_MASK  0x20000000
-
-#define NT_SEVERITY(StatCode) (((StatCode) >> NTSTAT_SEVERITY_SHIFT) & NTSTAT_SEVERITY_MASK)
-#define NT_FACILITY(StatCode) (((StatCode) >> NTSTAT_FACILITY_SHIFT) & NTSTAT_FACILITY_MASK)
-#define NT_CUSTOMER(StatCode) ((StatCode) & NTSTAT_CUSTOMER_MASK)
-
-#endif /* __INCLUDE_TYPES_H */
diff --git a/reactos/include/ntos/zw.h b/reactos/include/ntos/zw.h
deleted file mode 100755 (executable)
index ebfda3f..0000000
+++ /dev/null
@@ -1,6646 +0,0 @@
-/* $Id$
- *
- * COPYRIGHT:        See COPYING in the top level directory
- * PROJECT:          ReactOS kernel
- * PURPOSE:          System call definitions
- * FILE:             include/ddk/zw.h
- * REVISION HISTORY: 
- *              ??/??/??: First few functions (David Welch)
- *              ??/??/??: Complete implementation by Ariadne
- *              13/07/98: Reorganised things a bit (David Welch)
- *              04/08/98: Added some documentation (Ariadne)
- *             14/08/98: Added type TIME and change variable type from [1] to [0]
- *              14/09/98: Added for each Nt call a corresponding Zw Call
- *              09/08/03: Added ThreadEventPair routines
- */
-
-#ifndef __DDK_ZW_H
-#define __DDK_ZW_H
-
-#include <ntos/security.h>
-#include <ntos/zwtypes.h>
-#include <napi/npipe.h>
-
-#ifndef _RTLGETPROCESSHEAP_DEFINED_
-#define _RTLGETPROCESSHEAP_DEFINED_
-#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
-#endif
-
-// semaphore information
-
-typedef enum _SEMAPHORE_INFORMATION_CLASS
-{
-       SemaphoreBasicInformation               = 0
-} SEMAPHORE_INFORMATION_CLASS;
-
-typedef struct _SEMAPHORE_BASIC_INFORMATION
-{
-       LONG CurrentCount;
-       LONG MaximumCount;
-} SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
-
-// event information
-
-typedef enum _EVENT_INFORMATION_CLASS
-{
-       EventBasicInformation                   = 0
-} EVENT_INFORMATION_CLASS;
-
-typedef struct _EVENT_BASIC_INFORMATION
-{
-       EVENT_TYPE EventType;
-       LONG EventState;
-} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
-
-// wmi trace event data
-typedef struct _FILE_USER_QUOTA_INFORMATION {
-       ULONG NextEntryOffset;
-       ULONG SidLength;
-       LARGE_INTEGER ChangeTime;
-       LARGE_INTEGER QuotaUsed;
-       LARGE_INTEGER QuotaThreshold;
-       LARGE_INTEGER QuotaLimit;
-       SID Sid[1];
-} FILE_USER_QUOTA_INFORMATION, *PFILE_USER_QUOTA_INFORMATION;
-
-
-//#define LCID ULONG
-//#define SECURITY_INFORMATION ULONG
-//typedef ULONG SECURITY_INFORMATION;
-
-#ifndef __USE_NT_LPC__
-NTSTATUS STDCALL
-NtAcceptConnectPort (OUT PHANDLE PortHandle,
-                    IN  PVOID Context,
-                    IN  PLPC_MESSAGE ServerReply,
-                    IN  BOOLEAN AcceptIt,
-                    IN  PLPC_SECTION_WRITE WriteMap,
-                    IN  PLPC_SECTION_READ ReadMap);
-#else
-NTSTATUS STDCALL
-NtAcceptConnectPort (PHANDLE PortHandle,
-                    ULONG PortIdentifier,
-                    PLPC_MESSAGE ServerReply,
-                    BOOLEAN AcceptIt,
-                    PLPC_SECTION_WRITE WriteMap,
-                    PLPC_SECTION_READ ReadMap);
-#endif /* ndef __USE_NT_LPC__ */
-
-NTSTATUS
-STDCALL
-NtAddBootEntry(
-       IN PUNICODE_STRING EntryName,
-       IN PUNICODE_STRING EntryValue
-       );
-
-NTSTATUS
-STDCALL
-ZwAddBootEntry(
-       IN PUNICODE_STRING EntryName,
-       IN PUNICODE_STRING EntryValue
-       );
-
-/*
- * FUNCTION: Adjusts the groups in an access token
- * ARGUMENTS: 
- *       TokenHandle = Specifies the access token
- *       ResetToDefault = If true the NewState parameter is ignored and the groups are set to
- *                     their default state, if false the groups specified in
- *                     NewState are set.
- *       NewState = 
- *       BufferLength = Specifies the size of the buffer for the PreviousState.
- *       PreviousState = 
- *       ReturnLength = Bytes written in PreviousState buffer.
- * REMARKS: The arguments map to the win32 AdjustTokenGroups
- * RETURNS: Status
- */
-
-NTSTATUS 
-STDCALL 
-NtAdjustGroupsToken(
-       IN HANDLE TokenHandle,
-       IN BOOLEAN  ResetToDefault,
-       IN PTOKEN_GROUPS  NewState,
-       IN ULONG  BufferLength,
-       OUT PTOKEN_GROUPS  PreviousState OPTIONAL,
-       OUT PULONG  ReturnLength
-       );
-
-NTSTATUS
-STDCALL
-ZwAdjustGroupsToken(
-       IN HANDLE TokenHandle,
-       IN BOOLEAN  ResetToDefault,
-       IN PTOKEN_GROUPS  NewState,
-       IN ULONG  BufferLength,
-       OUT PTOKEN_GROUPS  PreviousState,
-       OUT PULONG  ReturnLength
-       );
-
-
-/*
- * FUNCTION:
- *
- * ARGUMENTS:
- *        TokenHandle = Handle to the access token
- *        DisableAllPrivileges =  The resulting suspend count.
-         NewState = 
-         BufferLength =
-         PreviousState =
-         ReturnLength =
- * REMARK:
- *       The arguments map to the win32 AdjustTokenPrivileges
- * RETURNS: Status
- */
-
-NTSTATUS 
-STDCALL 
-NtAdjustPrivilegesToken(
-       IN HANDLE  TokenHandle,
-       IN BOOLEAN  DisableAllPrivileges,
-       IN PTOKEN_PRIVILEGES  NewState,
-       IN ULONG  BufferLength,
-       OUT PTOKEN_PRIVILEGES  PreviousState,
-       OUT PULONG ReturnLength
-       );
-
-NTSTATUS 
-STDCALL 
-ZwAdjustPrivilegesToken(
-       IN HANDLE  TokenHandle,
-       IN BOOLEAN  DisableAllPrivileges,
-       IN PTOKEN_PRIVILEGES  NewState,
-       IN ULONG  BufferLength,
-       OUT PTOKEN_PRIVILEGES  PreviousState,
-       OUT PULONG ReturnLength
-       );
-
-
-/*
- * FUNCTION: Decrements a thread's suspend count and places it in an alerted 
- *           state.
- * ARGUMENTS: 
- *        ThreadHandle = Handle to the thread that should be resumed
- *        SuspendCount =  The resulting suspend count.
- * REMARK:
- *       A thread is resumed if its suspend count is 0
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtAlertResumeThread(
-       IN HANDLE ThreadHandle,
-       OUT PULONG SuspendCount
-       );
-
-NTSTATUS
-STDCALL
-ZwAlertResumeThread(
-       IN HANDLE ThreadHandle,
-       OUT PULONG SuspendCount
-       );
-
-/*
- * FUNCTION: Puts the thread in a alerted state
- * ARGUMENTS: 
- *        ThreadHandle = Handle to the thread that should be alerted
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtAlertThread(
-       IN HANDLE ThreadHandle
-       );
-
-NTSTATUS
-STDCALL
-ZwAlertThread(
-       IN HANDLE ThreadHandle
-       );
-
-
-/*
- * FUNCTION: Allocates a locally unique id
- * ARGUMENTS: 
- *        LocallyUniqueId = Locally unique number
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtAllocateLocallyUniqueId(
-       OUT LUID *LocallyUniqueId
-       );
-
-NTSTATUS
-STDCALL
-ZwAllocateLocallyUniqueId(
-       OUT PLUID Luid
-       );
-
-/*
- * FUNCTION: Allocates a block of virtual memory in the process address space
- * ARGUMENTS:
- *      ProcessHandle = The handle of the process which owns the virtual memory
- *      BaseAddress   = A pointer to the virtual memory allocated. If you supply a non zero
- *                     value the system will try to allocate the memory at the address supplied. It rounds
- *                     it down to a multiple if the page size.
- *      ZeroBits  = (OPTIONAL) You can specify the number of high order bits that must be zero, ensuring that 
- *                     the memory will be allocated at a address below a certain value.
- *      RegionSize = The number of bytes to allocate
- *      AllocationType = Indicates the type of virtual memory you like to allocated,
- *                       can be one of the values : MEM_COMMIT, MEM_RESERVE, MEM_RESET, MEM_TOP_DOWN
- *      Protect = Indicates the protection type of the pages allocated, can be a combination of
- *                      PAGE_READONLY, PAGE_READWRITE, PAGE_EXECUTE_READ,
- *                      PAGE_EXECUTE_READWRITE, PAGE_GUARD, PAGE_NOACCESS, PAGE_NOACCESS
- * REMARKS:
- *       This function maps to the win32 VirtualAllocEx. Virtual memory is process based so the 
- *       protocol starts with a ProcessHandle. I splitted the functionality of obtaining the actual address and specifying
- *       the start address in two parameters ( BaseAddress and StartAddress ) The NumberOfBytesAllocated specify the range
- *       and the AllocationType and ProctectionType map to the other two parameters.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtAllocateVirtualMemory (
-       IN HANDLE ProcessHandle,
-       IN OUT PVOID *BaseAddress,
-       IN ULONG  ZeroBits,
-       IN OUT PULONG  RegionSize,
-       IN ULONG  AllocationType,
-       IN ULONG  Protect
-       );
-
-NTSTATUS
-STDCALL
-ZwAllocateVirtualMemory (
-       IN HANDLE ProcessHandle,
-       IN OUT PVOID *BaseAddress,
-       IN ULONG  ZeroBits,
-       IN OUT PULONG  RegionSize,
-       IN ULONG  AllocationType,
-       IN ULONG  Protect);
-
-
-
-NTSTATUS 
-STDCALL 
-NtAssignProcessToJobObject(
-       HANDLE JobHandle,
-    HANDLE ProcessHandle);
-
-NTSTATUS 
-STDCALL 
-ZwAssignProcessToJobObject(
-       HANDLE JobHandle,
-    HANDLE ProcessHandle);
-
-/*
- * FUNCTION: Returns from a callback into user mode
- * ARGUMENTS:
- * RETURN Status
- */
-//FIXME: this function might need 3 parameters
-NTSTATUS STDCALL NtCallbackReturn(PVOID Result,
-                                 ULONG ResultLength,
-                                 NTSTATUS Status);
-
-NTSTATUS STDCALL ZwCallbackReturn(PVOID Result,
-                                 ULONG ResultLength,
-                                 NTSTATUS Status);
-
-/*
- * FUNCTION: Cancels a IO request
- * ARGUMENTS: 
- *        FileHandle = Handle to the file
- *        IoStatusBlock  = 
- *
- * REMARKS:
- *        This function maps to the win32 CancelIo.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCancelIoFile(
-       IN HANDLE FileHandle,
-       OUT PIO_STATUS_BLOCK IoStatusBlock
-       );
-
-NTSTATUS
-STDCALL
-ZwCancelIoFile(
-       IN HANDLE FileHandle,
-       OUT PIO_STATUS_BLOCK IoStatusBlock
-       );
-
-/*
- * FUNCTION: Sets the status of the event back to non-signaled
- * ARGUMENTS: 
- *        EventHandle = Handle to the event
- * REMARKS:
- *       This function maps to win32 function ResetEvent.
- * RETURcNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtClearEvent(
-       IN HANDLE  EventHandle
-       );
-
-NTSTATUS
-STDCALL
-ZwClearEvent(
-       IN HANDLE  EventHandle
-       );
-
-NTSTATUS 
-STDCALL 
-NtCreateJobObject(
-       PHANDLE JobHandle, 
-       ACCESS_MASK DesiredAccess,
-    POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-NTSTATUS 
-STDCALL 
-ZwCreateJobObject(
-       PHANDLE JobHandle, 
-       ACCESS_MASK DesiredAccess,
-    POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-
-/*
- * FUNCTION: Closes an object handle
- * ARGUMENTS:
- *         Handle = Handle to the object
- * REMARKS:
- *       This function maps to the win32 function CloseHandle. 
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtClose(
-       IN HANDLE Handle
-       );
-
-NTSTATUS
-STDCALL
-ZwClose(
-       IN HANDLE Handle
-       );
-
-/*
- * FUNCTION: Generates an audit message when a handle to an object is dereferenced
- * ARGUMENTS:
- *         SubsystemName   = 
-          HandleId        = Handle to the object
-          GenerateOnClose =
- * REMARKS:
- *       This function maps to the win32 function ObjectCloseAuditAlarm. 
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCloseObjectAuditAlarm(
-       IN PUNICODE_STRING SubsystemName,
-       IN PVOID HandleId,
-       IN BOOLEAN GenerateOnClose
-       );
-
-NTSTATUS
-STDCALL
-ZwCloseObjectAuditAlarm(
-       IN PUNICODE_STRING SubsystemName,
-       IN PVOID HandleId,
-       IN BOOLEAN GenerateOnClose
-       );
-
-
-NTSTATUS STDCALL
-NtCompleteConnectPort (HANDLE PortHandle);
-
-NTSTATUS STDCALL
-ZwCompleteConnectPort (HANDLE PortHandle);
-
-
-NTSTATUS STDCALL
-NtConnectPort (PHANDLE PortHandle,
-              PUNICODE_STRING PortName,
-              PSECURITY_QUALITY_OF_SERVICE SecurityQos,
-              PLPC_SECTION_WRITE SectionInfo,
-              PLPC_SECTION_READ MapInfo,
-              PULONG MaxMessageSize,
-              PVOID ConnectInfo,
-              PULONG ConnectInfoLength);
-
-NTSTATUS STDCALL
-ZwConnectPort (PHANDLE PortHandle,
-              PUNICODE_STRING PortName,
-              PSECURITY_QUALITY_OF_SERVICE SecurityQos,
-              PLPC_SECTION_WRITE SectionInfo,
-              PLPC_SECTION_READ MapInfo,
-              PULONG MaxMessageSize,
-              PVOID ConnectInfo,
-              PULONG ConnectInfoLength);
-
-/*
- * FUNCTION: Creates a directory object
- * ARGUMENTS:
- *        DirectoryHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies access to the directory
- *        ObjectAttribute = Initialized attributes for the object
- * REMARKS: This function maps to the win32 CreateDirectory. A directory is like a file so it needs a
- *          handle, a access mask and a OBJECT_ATTRIBUTES structure to map the path name and the SECURITY_ATTRIBUTES.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateDirectoryObject(
-       OUT PHANDLE DirectoryHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateDirectoryObject(
-       OUT PHANDLE DirectoryHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-/*
- * FUNCTION: Creates an event object
- * ARGUMENTS:
- *        EventHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies access to the event
- *        ObjectAttribute = Initialized attributes for the object
- *        ManualReset = manual-reset or auto-reset if true you have to reset the state of the event manually
- *                       using NtResetEvent/NtClearEvent. if false the system will reset the event to a non-signalled state
- *                       automatically after the system has rescheduled a thread waiting on the event.
- *        InitialState = specifies the initial state of the event to be signaled ( TRUE ) or non-signalled (FALSE).
- * REMARKS: This function maps to the win32 CreateEvent. Demanding a out variable  of type HANDLE,
- *          a access mask and a OBJECT_ATTRIBUTES structure mapping to the SECURITY_ATTRIBUTES. ManualReset and InitialState are
- *          both parameters aswell ( possibly the order is reversed ).
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateEvent(
-       OUT PHANDLE EventHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes  OPTIONAL,
-       IN EVENT_TYPE EventType,
-       IN BOOLEAN InitialState
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateEvent(
-       OUT PHANDLE EventHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes  OPTIONAL,
-       IN EVENT_TYPE EventType,
-       IN BOOLEAN InitialState
-       );
-
-/*
- * FUNCTION: Creates an eventpair object
- * ARGUMENTS:
- *        EventPairHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies access to the event
- *        ObjectAttribute = Initialized attributes for the object
- */
-
-NTSTATUS
-STDCALL
-NtCreateEventPair(
-       OUT PHANDLE EventPairHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateEventPair(
-       OUT PHANDLE EventPairHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-
-/*
- * FUNCTION: Creates or opens a file, directory or device object.
- * ARGUMENTS:
- *        FileHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the file can
- *                        be a combination of DELETE | FILE_READ_DATA ..  
- *        ObjectAttribute = Initialized attributes for the object, contains the rootdirectory and the filename
- *        IoStatusBlock (OUT) = Caller supplied storage for the resulting status information, indicating if the
- *                              the file is created and opened or allready existed and is just opened.
- *        FileAttributes = file attributes can be a combination of FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN ...
- *        ShareAccess = can be a combination of the following: FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE 
- *        CreateDisposition = specifies what the behavior of the system if the file allready exists.
- *        CreateOptions = specifies the behavior of the system on file creation.
- *        EaBuffer (OPTIONAL) = Extended Attributes buffer, applies only to files and directories.
- *        EaLength = Extended Attributes buffer size,  applies only to files and directories.
- * REMARKS: This function maps to the win32 CreateFile. 
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateFile(
-       OUT PHANDLE FileHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN PLARGE_INTEGER AllocationSize OPTIONAL,
-       IN ULONG FileAttributes,
-       IN ULONG ShareAccess,
-       IN ULONG CreateDisposition,
-       IN ULONG CreateOptions,
-       IN PVOID EaBuffer OPTIONAL,
-       IN ULONG EaLength
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateFile(
-       OUT PHANDLE FileHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN PLARGE_INTEGER AllocationSize OPTIONAL,
-       IN ULONG FileAttributes,
-       IN ULONG ShareAccess,
-       IN ULONG CreateDisposition,
-       IN ULONG CreateOptions,
-       IN PVOID EaBuffer OPTIONAL,
-       IN ULONG EaLength
-       );
-
-/*
- * FUNCTION: Creates or opens a file, directory or device object.
- * ARGUMENTS:
- *        CompletionPort (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the port
- *        IoStatusBlock =
- *        NumberOfConcurrentThreads =
- * REMARKS: This function maps to the win32 CreateIoCompletionPort
- * RETURNS:
- *     Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateIoCompletion(
-   OUT PHANDLE             IoCompletionHandle,
-   IN  ACCESS_MASK         DesiredAccess,
-   IN  POBJECT_ATTRIBUTES  ObjectAttributes,
-   IN  ULONG               NumberOfConcurrentThreads
-   );
-
-NTSTATUS
-STDCALL
-ZwCreateIoCompletion(
-   OUT PHANDLE             IoCompletionHandle,
-   IN  ACCESS_MASK         DesiredAccess,
-   IN  POBJECT_ATTRIBUTES  ObjectAttributes,
-   IN  ULONG               NumberOfConcurrentThreads
-   );
-
-/*
- * FUNCTION: Creates a registry key
- * ARGUMENTS:
- *        KeyHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the key
- *          It can have a combination of the following values:
- *          KEY_READ | KEY_WRITE | KEY_EXECUTE | KEY_ALL_ACCESS
- *          or
- *          KEY_QUERY_VALUE The values of the key can be queried.
- *          KEY_SET_VALUE The values of the key can be modified.
- *          KEY_CREATE_SUB_KEYS The key may contain subkeys.
- *          KEY_ENUMERATE_SUB_KEYS Subkeys can be queried.
- *          KEY_NOTIFY
- *          KEY_CREATE_LINK A symbolic link to the key can be created. 
- *        ObjectAttributes = The name of the key may be specified directly in the name field 
- *          of object attributes or relative to a key in rootdirectory.
- *        TitleIndex = Might specify the position in the sequential order of subkeys. 
- *        Class = Specifies the kind of data, for example REG_SZ for string data. [ ??? ]
- *        CreateOptions = Specifies additional options with which the key is created
- *          REG_OPTION_VOLATILE  The key is not preserved across boots.
- *          REG_OPTION_NON_VOLATILE  The key is preserved accross boots.
- *          REG_OPTION_CREATE_LINK  The key is a symbolic link to another key. 
- *          REG_OPTION_BACKUP_RESTORE  Key is being opened or created for backup/restore operations. 
- *        Disposition = Indicates if the call to NtCreateKey resulted in the creation of a key it 
- *          can have the following values: REG_CREATED_NEW_KEY | REG_OPENED_EXISTING_KEY
- * RETURNS:
- *  Status
- */
-
-NTSTATUS STDCALL
-NtCreateKey(OUT PHANDLE KeyHandle,
-            IN ACCESS_MASK DesiredAccess,
-            IN POBJECT_ATTRIBUTES ObjectAttributes,
-            IN ULONG TitleIndex,
-            IN PUNICODE_STRING Class OPTIONAL,
-            IN ULONG CreateOptions,
-            IN PULONG Disposition OPTIONAL);
-
-NTSTATUS STDCALL
-ZwCreateKey(OUT PHANDLE KeyHandle,
-            IN ACCESS_MASK DesiredAccess,
-            IN POBJECT_ATTRIBUTES ObjectAttributes,
-            IN ULONG TitleIndex,
-            IN PUNICODE_STRING Class OPTIONAL,
-            IN ULONG CreateOptions,
-            IN PULONG Disposition OPTIONAL);
-
-/*
- * FUNCTION: Creates a mail slot file
- * ARGUMENTS:
- *        MailSlotFileHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the file
- *        ObjectAttributes = Contains the name of the mailslotfile.
- *        IoStatusBlock = 
- *        FileAttributes =
- *        ShareAccess =
- *        MaxMessageSize =
- *        TimeOut =
- *       
- * REMARKS: This funciton maps to the win32 function CreateMailSlot
- * RETURNS:
- *     Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateMailslotFile(
-       OUT PHANDLE MailSlotFileHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN ULONG FileAttributes,
-       IN ULONG ShareAccess,
-       IN ULONG MaxMessageSize,
-       IN PLARGE_INTEGER TimeOut
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateMailslotFile(
-       OUT PHANDLE MailSlotFileHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN ULONG FileAttributes,
-       IN ULONG ShareAccess,
-       IN ULONG MaxMessageSize,
-       IN PLARGE_INTEGER TimeOut
-       );
-
-/*
- * FUNCTION: Creates or opens a mutex
- * ARGUMENTS:
- *        MutantHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the port
- *        ObjectAttributes = Contains the name of the mutex.
- *        InitialOwner = If true the calling thread acquires ownership 
- *                     of the mutex.
- * REMARKS: This funciton maps to the win32 function CreateMutex
- * RETURNS:
- *     Status
- */
-NTSTATUS
-STDCALL
-NtCreateMutant(
-       OUT PHANDLE MutantHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes  OPTIONAL,
-       IN BOOLEAN InitialOwner
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateMutant(
-       OUT PHANDLE MutantHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes  OPTIONAL,
-       IN BOOLEAN InitialOwner
-       );
-
-/*
- * FUNCTION: Creates a named pipe
- * ARGUMENTS:
- *        NamedPipeFileHandle (OUT) = Caller supplied storage for the 
- *                                    resulting handle
- *        DesiredAccess = Specifies the type of access that the caller 
- *                        requires to the file boject
- *        ObjectAttributes = Points to a structure that specifies the
- *                           object attributes.
- *        IoStatusBlock = Points to a variable that receives the final
- *                        completion status and information
- *        ShareAccess = Specifies the limitations on sharing of the file.
- *                      This parameter can be zero or any compatible 
- *                      combination of the following flags
- *                         FILE_SHARE_READ
- *                         FILE_SHARE_WRITE
- *        CreateDisposition = Specifies what to do depending on whether
- *                            the file already exists. This must be one of
- *                            the following values
- *                                  FILE_OPEN
- *                                  FILE_CREATE
- *                                  FILE_OPEN_IF
- *        CreateOptions = Specifies the options to be applied when
- *                        creating or opening the file, as a compatible
- *                        combination of the following flags
- *                            FILE_WRITE_THROUGH
- *                            FILE_SYNCHRONOUS_IO_ALERT
- *                            FILE_SYNCHRONOUS_IO_NONALERT
- *        TypeMessage = Specifies whether the data written to the pipe is
- *                      interpreted as a sequence of messages or as a 
- *                      stream of bytes
- *        ReadModeMessage = Specifies whether the data read from the pipe
- *                          is interpreted as a sequence of messages or as
- *                          a stream of bytes
- *        NonBlocking = Specifies whether non-blocking mode is enabled
- *        MaxInstances = Specifies the maximum number of instancs that can
- *                       be created for this pipe
- *        InBufferSize = Specifies the number of bytes to reserve for the
- *                       input buffer
- *        OutBufferSize = Specifies the number of bytes to reserve for the
- *                        output buffer
- *        DefaultTimeout = Optionally points to a variable that specifies
- *                         the default timeout value in units of 
- *                         100-nanoseconds.
- * REMARKS: This funciton maps to the win32 function CreateNamedPipe
- * RETURNS:
- *     Status
- */
-NTSTATUS STDCALL
-NtCreateNamedPipeFile (OUT PHANDLE NamedPipeFileHandle,
-                      IN ACCESS_MASK DesiredAccess,
-                      IN POBJECT_ATTRIBUTES ObjectAttributes,
-                      OUT PIO_STATUS_BLOCK IoStatusBlock,
-                      IN ULONG ShareAccess,
-                      IN ULONG CreateDisposition,
-                      IN ULONG CreateOptions,
-                      IN ULONG NamedPipeType,
-                      IN ULONG ReadMode,
-                      IN ULONG CompletionMode,
-                      IN ULONG MaxInstances,
-                      IN ULONG InBufferSize,
-                      IN ULONG OutBufferSize,
-                      IN PLARGE_INTEGER DefaultTimeOut);
-
-NTSTATUS STDCALL
-ZwCreateNamedPipeFile (OUT PHANDLE NamedPipeFileHandle,
-                      IN ACCESS_MASK DesiredAccess,
-                      IN POBJECT_ATTRIBUTES ObjectAttributes,
-                      OUT PIO_STATUS_BLOCK IoStatusBlock,
-                      IN ULONG ShareAccess,
-                      IN ULONG CreateDisposition,
-                      IN ULONG CreateOptions,
-                      IN ULONG NamedPipeType,
-                      IN ULONG ReadMode,
-                      IN ULONG CompletionMode,
-                      IN ULONG MaxInstances,
-                      IN ULONG InBufferSize,
-                      IN ULONG OutBufferSize,
-                      IN PLARGE_INTEGER DefaultTimeOut);
-
-
-NTSTATUS STDCALL
-NtCreatePort (PHANDLE PortHandle,
-             POBJECT_ATTRIBUTES ObjectAttributes,
-             ULONG MaxConnectInfoLength,
-             ULONG MaxDataLength,
-             ULONG NPMessageQueueSize OPTIONAL);
-
-NTSTATUS STDCALL
-NtCreatePort (PHANDLE PortHandle,
-             POBJECT_ATTRIBUTES ObjectAttributes,
-             ULONG MaxConnectInfoLength,
-             ULONG MaxDataLength,
-             ULONG NPMessageQueueSize OPTIONAL);
-
-
-/*
- * FUNCTION: Creates a process.
- * ARGUMENTS:
- *        ProcessHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the process can
- *                        be a combinate of STANDARD_RIGHTS_REQUIRED| ..  
- *        ObjectAttribute = Initialized attributes for the object, contains the rootdirectory and the filename
- *        ParentProcess = Handle to the parent process.
- *        InheritObjectTable = Specifies to inherit the objects of the parent process if true.
- *        SectionHandle = Handle to a section object to back the image file
- *        DebugPort = Handle to a DebugPort if NULL the system default debug port will be used.
- *        ExceptionPort = Handle to a exception port.
- * REMARKS:
- *        This function maps to the win32 CreateProcess.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCreateProcess(
-       OUT PHANDLE ProcessHandle,
-        IN ACCESS_MASK DesiredAccess,
-        IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
-        IN HANDLE ParentProcess,
-        IN BOOLEAN InheritObjectTable,
-        IN HANDLE SectionHandle OPTIONAL,
-        IN HANDLE DebugPort OPTIONAL,
-        IN HANDLE ExceptionPort OPTIONAL
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateProcess(
-       OUT PHANDLE ProcessHandle,
-        IN ACCESS_MASK DesiredAccess,
-        IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
-        IN HANDLE ParentProcess,
-        IN BOOLEAN InheritObjectTable,
-        IN HANDLE SectionHandle OPTIONAL,
-        IN HANDLE DebugPort OPTIONAL,
-        IN HANDLE ExceptionPort OPTIONAL
-       );
-
-/*
- * FUNCTION: Creates a section object.
- * ARGUMENTS:
- *        SectionHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the desired access to the section can be a combination of STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_WRITE |  
- *                        SECTION_MAP_READ | SECTION_MAP_EXECUTE.
- *        ObjectAttribute = Initialized attributes for the object can be used to create a named section
- *        MaxiumSize = Maximizes the size of the memory section. Must be non-NULL for a page-file backed section. 
- *                     If value specified for a mapped file and the file is not large enough, file will be extended. 
- *        SectionPageProtection = Can be a combination of PAGE_READONLY | PAGE_READWRITE | PAGE_WRITEONLY | PAGE_WRITECOPY.
- *        AllocationAttributes = can be a combination of SEC_IMAGE | SEC_RESERVE
- *        FileHanlde = Handle to a file to create a section mapped to a file instead of a memory backed section.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateSection(
-       OUT PHANDLE SectionHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
-       IN PLARGE_INTEGER MaximumSize OPTIONAL,
-       IN ULONG SectionPageProtection OPTIONAL,
-       IN ULONG AllocationAttributes,
-       IN HANDLE FileHandle OPTIONAL
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateSection(
-       OUT PHANDLE SectionHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
-       IN PLARGE_INTEGER MaximumSize OPTIONAL,
-       IN ULONG SectionPageProtection OPTIONAL,
-       IN ULONG AllocationAttributes,
-       IN HANDLE FileHandle OPTIONAL
-       );
-
-/*
- * FUNCTION: Creates a semaphore object for interprocess synchronization.
- * ARGUMENTS:
- *        SemaphoreHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the semaphore. 
- *        ObjectAttribute = Initialized attributes for the object.
- *        InitialCount = Not necessary zero, might be smaller than zero.
- *        MaximumCount = Maxiumum count the semaphore can reach.
- * RETURNS: Status
- * REMARKS: 
- *        The semaphore is set to signaled when its count is greater than zero, and non-signaled when its count is zero.
- */
-
-//FIXME: should a semaphore's initial count allowed to be smaller than zero ??
-NTSTATUS
-STDCALL
-NtCreateSemaphore(
-       OUT PHANDLE SemaphoreHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
-       IN LONG InitialCount,
-       IN LONG MaximumCount
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateSemaphore(
-       OUT PHANDLE SemaphoreHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
-       IN LONG InitialCount,
-       IN LONG MaximumCount
-       );
-
-/*
- * FUNCTION: Creates a symbolic link object
- * ARGUMENTS:
- *        SymbolicLinkHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the thread. 
- *        ObjectAttributes = Initialized attributes for the object.
- *        Name = Target name of the symbolic link  
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCreateSymbolicLinkObject(
-       OUT PHANDLE LinkHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       IN PUNICODE_STRING LinkTarget
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateSymbolicLinkObject(
-       OUT PHANDLE LinkHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       IN PUNICODE_STRING LinkTarget
-       );
-
-/*
- * FUNCTION: Creates a waitable timer.
- * ARGUMENTS:
- *        TimerHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the timer. 
- *        ObjectAttributes = Initialized attributes for the object.
- *        TimerType = Specifies if the timer should be reset manually.
- * REMARKS:
- *       This function maps to the win32  CreateWaitableTimer. lpTimerAttributes and lpTimerName map to
- *       corresponding fields in OBJECT_ATTRIBUTES structure. 
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCreateTimer(
-       OUT PHANDLE TimerHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
-       IN TIMER_TYPE TimerType
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateTimer(
-       OUT PHANDLE TimerHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
-       IN TIMER_TYPE TimerType
-       );
-
-/*
- * FUNCTION: Creates a token.
- * ARGUMENTS:
- *        TokenHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Specifies the allowed or desired access to the process can
- *                        be a combinate of STANDARD_RIGHTS_REQUIRED| ..  
- *        ObjectAttribute = Initialized attributes for the object, contains the rootdirectory and the filename
- *        TokenType = 
- *        AuthenticationId = 
- *        ExpirationTime = 
- *        TokenUser = 
- *        TokenGroups =
- *        TokenPrivileges = 
- *        TokenOwner = 
- *        TokenPrimaryGroup = 
- *        TokenDefaultDacl =
- *        TokenSource =
- * REMARKS:
- *        This function does not map to a win32 function
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateToken(
-       OUT PHANDLE TokenHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       IN TOKEN_TYPE TokenType,
-       IN PLUID AuthenticationId,
-       IN PLARGE_INTEGER ExpirationTime,
-       IN PTOKEN_USER TokenUser,
-       IN PTOKEN_GROUPS TokenGroups,
-       IN PTOKEN_PRIVILEGES TokenPrivileges,
-       IN PTOKEN_OWNER TokenOwner,
-       IN PTOKEN_PRIMARY_GROUP TokenPrimaryGroup,
-       IN PTOKEN_DEFAULT_DACL TokenDefaultDacl,
-       IN PTOKEN_SOURCE TokenSource
-       );
-
-NTSTATUS
-STDCALL
-ZwCreateToken(
-       OUT PHANDLE TokenHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       IN TOKEN_TYPE TokenType,
-       IN PLUID AuthenticationId,
-       IN PLARGE_INTEGER ExpirationTime,
-       IN PTOKEN_USER TokenUser,
-       IN PTOKEN_GROUPS TokenGroups,
-       IN PTOKEN_PRIVILEGES TokenPrivileges,
-       IN PTOKEN_OWNER TokenOwner,
-       IN PTOKEN_PRIMARY_GROUP TokenPrimaryGroup,
-       IN PTOKEN_DEFAULT_DACL TokenDefaultDacl,
-       IN PTOKEN_SOURCE TokenSource
-       );
-
-/*
- * FUNCTION: Returns the callers thread TEB.
- * RETURNS: The resulting teb.
- */
-#if 0
- NT_TEB *
-STDCALL 
-NtCurrentTeb(VOID
-       );
-#endif
-
-
-NTSTATUS STDCALL
-NtCreateWaitablePort (PHANDLE PortHandle,
-                     POBJECT_ATTRIBUTES ObjectAttributes,
-                     ULONG MaxConnectInfoLength,
-                     ULONG MaxDataLength,
-                     ULONG NPMessageQueueSize OPTIONAL);
-
-NTSTATUS STDCALL
-ZwCreateWaitablePort (PHANDLE PortHandle,
-                     POBJECT_ATTRIBUTES ObjectAttributes,
-                     ULONG MaxConnectInfoLength,
-                     ULONG MaxDataLength,
-                     ULONG NPMessageQueueSize OPTIONAL);
-
-
-/*
- * FUNCTION: Deletes an atom from the global atom table
- * ARGUMENTS:
- *        Atom = Identifies the atom to delete
- * REMARKS:
- *      The function maps to the win32 GlobalDeleteAtom
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtDeleteAtom(
-       IN RTL_ATOM Atom
-       );
-
-NTSTATUS
-STDCALL
-ZwDeleteAtom(
-       IN RTL_ATOM Atom
-       );
-
-NTSTATUS
-STDCALL
-NtDeleteBootEntry(
-       IN PUNICODE_STRING EntryName,
-       IN PUNICODE_STRING EntryValue
-       );
-
-NTSTATUS
-STDCALL
-ZwDeleteBootEntry(
-       IN PUNICODE_STRING EntryName,
-       IN PUNICODE_STRING EntryValue
-       );
-
-/*
- * FUNCTION: Deletes a file or a directory
- * ARGUMENTS:
- *        ObjectAttributes = Name of the file which should be deleted
- * REMARKS:
- *      This system call is functionally equivalent to NtSetInformationFile
- *      setting the disposition information.
- *      The function maps to the win32 DeleteFile. 
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtDeleteFile(
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-NTSTATUS
-STDCALL
-ZwDeleteFile(
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-/*
- * FUNCTION: Deletes a registry key
- * ARGUMENTS:
- *         KeyHandle = Handle of the key
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtDeleteKey(
-       IN HANDLE KeyHandle
-       );
-NTSTATUS
-STDCALL
-ZwDeleteKey(
-       IN HANDLE KeyHandle
-       );
-
-/*
- * FUNCTION: Generates a audit message when an object is deleted
- * ARGUMENTS:
- *         SubsystemName = Spefies the name of the subsystem can be 'WIN32' or 'DEBUG'
- *         HandleId= Handle to an audit object
- *        GenerateOnClose = Value returned by NtAccessCheckAndAuditAlarm
- * REMARKS: This function maps to the win32 ObjectCloseAuditAlarm
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtDeleteObjectAuditAlarm ( 
-       IN PUNICODE_STRING SubsystemName, 
-       IN PVOID HandleId, 
-       IN BOOLEAN GenerateOnClose 
-       );
-
-NTSTATUS
-STDCALL
-ZwDeleteObjectAuditAlarm ( 
-       IN PUNICODE_STRING SubsystemName, 
-       IN PVOID HandleId, 
-       IN BOOLEAN GenerateOnClose 
-       );  
-
-
-/*
- * FUNCTION: Deletes a value from a registry key
- * ARGUMENTS:
- *         KeyHandle = Handle of the key
- *         ValueName = Name of the value to delete
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtDeleteValueKey(
-       IN HANDLE KeyHandle,
-       IN PUNICODE_STRING ValueName
-       );
-
-NTSTATUS
-STDCALL
-ZwDeleteValueKey(
-       IN HANDLE KeyHandle,
-       IN PUNICODE_STRING ValueName
-       );
-/*
- * FUNCTION: Sends IOCTL to the io sub system
- * ARGUMENTS:
- *        DeviceHandle = Points to the handle that is created by NtCreateFile
- *        Event = Event to synchronize on STATUS_PENDING
- *        ApcRoutine = Asynchroneous procedure callback
- *       ApcContext = Callback context.
- *       IoStatusBlock = Caller should supply storage for extra information.. 
- *        IoControlCode = Contains the IO Control command. This is an 
- *                     index to the structures in InputBuffer and OutputBuffer.
- *       InputBuffer = Caller should supply storage for input buffer if IOTL expects one.
- *       InputBufferSize = Size of the input bufffer
- *        OutputBuffer = Caller should supply storage for output buffer if IOTL expects one.
- *        OutputBufferSize  = Size of the input bufffer
- * RETURNS: Status 
- */
-
-NTSTATUS
-STDCALL
-NtDeviceIoControlFile(
-       IN HANDLE DeviceHandle,
-       IN HANDLE Event OPTIONAL, 
-       IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL, 
-       IN PVOID UserApcContext OPTIONAL, 
-       OUT PIO_STATUS_BLOCK IoStatusBlock, 
-       IN ULONG IoControlCode,
-       IN PVOID InputBuffer, 
-       IN ULONG InputBufferSize,
-       OUT PVOID OutputBuffer,
-       IN ULONG OutputBufferSize
-       );
-
-NTSTATUS
-STDCALL
-ZwDeviceIoControlFile(
-       IN HANDLE DeviceHandle,
-       IN HANDLE Event OPTIONAL, 
-       IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL, 
-       IN PVOID UserApcContext OPTIONAL, 
-       OUT PIO_STATUS_BLOCK IoStatusBlock, 
-       IN ULONG IoControlCode,
-       IN PVOID InputBuffer, 
-       IN ULONG InputBufferSize,
-       OUT PVOID OutputBuffer,
-       IN ULONG OutputBufferSize
-       );
-/*
- * FUNCTION: Displays a string on the blue screen
- * ARGUMENTS:
- *         DisplayString = The string to display
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtDisplayString(
-       IN PUNICODE_STRING DisplayString
-       );
-
-NTSTATUS
-STDCALL
-ZwDisplayString(
-       IN PUNICODE_STRING DisplayString
-       );
-
-
-NTSTATUS
-STDCALL
-NtEnumerateBootEntries(
-       IN ULONG Unknown1,
-       IN ULONG Unknown2
-       );
-
-NTSTATUS
-STDCALL
-ZwEnumerateBootEntries(
-       IN ULONG Unknown1,
-       IN ULONG Unknown2
-       );
-
-
-/*
- * FUNCTION: Returns information about the subkeys of an open key
- * ARGUMENTS:
- *         KeyHandle = Handle of the key whose subkeys are to enumerated
- *         Index = zero based index of the subkey for which information is
- *                 request
- *         KeyInformationClass = Type of information returned
- *         KeyInformation (OUT) = Caller allocated buffer for the information
- *                                about the key
- *         Length = Length in bytes of the KeyInformation buffer
- *         ResultLength (OUT) = Caller allocated storage which holds
- *                              the number of bytes of information retrieved
- *                              on return
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtEnumerateKey(
-       IN HANDLE KeyHandle,
-       IN ULONG Index,
-       IN KEY_INFORMATION_CLASS KeyInformationClass,
-       OUT PVOID KeyInformation,
-       IN ULONG Length,
-       OUT PULONG ResultLength
-       );
-
-NTSTATUS
-STDCALL
-ZwEnumerateKey(
-       IN HANDLE KeyHandle,
-       IN ULONG Index,
-       IN KEY_INFORMATION_CLASS KeyInformationClass,
-       OUT PVOID KeyInformation,
-       IN ULONG Length,
-       OUT PULONG ResultLength
-       );
-/*
- * FUNCTION: Returns information about the value entries of an open key
- * ARGUMENTS:
- *         KeyHandle = Handle of the key whose value entries are to enumerated
- *         Index = zero based index of the subkey for which information is
- *                 request
- *         KeyInformationClass = Type of information returned
- *         KeyInformation (OUT) = Caller allocated buffer for the information
- *                                about the key
- *         Length = Length in bytes of the KeyInformation buffer
- *         ResultLength (OUT) = Caller allocated storage which holds
- *                              the number of bytes of information retrieved
- *                              on return
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtEnumerateValueKey(
-       IN HANDLE KeyHandle,
-       IN ULONG Index,
-       IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
-       OUT PVOID KeyValueInformation,
-       IN ULONG Length,
-       OUT PULONG ResultLength
-       );
-
-NTSTATUS
-STDCALL
-ZwEnumerateValueKey(
-       IN HANDLE KeyHandle,
-       IN ULONG Index,
-       IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
-       OUT PVOID KeyValueInformation,
-       IN ULONG Length,
-       OUT PULONG ResultLength
-       );
-
-/*
- * FUNCTION: Flushes chached file data to disk
- * ARGUMENTS:
- *       FileHandle = Points to the file
- *      IoStatusBlock = Caller must supply storage to receive the result of the flush
- *             buffers operation. The information field is set to number of bytes
- *             flushed to disk.
- * RETURNS: Status 
- * REMARKS:
- *     This funciton maps to the win32 FlushFileBuffers
- */
-NTSTATUS
-STDCALL
-NtFlushBuffersFile(
-       IN HANDLE FileHandle,
-       OUT PIO_STATUS_BLOCK IoStatusBlock
-       );
-
-NTSTATUS
-STDCALL
-ZwFlushBuffersFile(
-       IN HANDLE FileHandle,
-       OUT PIO_STATUS_BLOCK IoStatusBlock
-       );
-
-/*
- * FUNCTION: Flushes a registry key to disk
- * ARGUMENTS:
- *       KeyHandle = Points to the registry key handle
- * RETURNS: Status 
- * REMARKS:
- *     This funciton maps to the win32 RegFlushKey.
- */
-NTSTATUS
-STDCALL
-NtFlushKey(
-       IN HANDLE KeyHandle
-       );
-
-NTSTATUS
-STDCALL
-ZwFlushKey(
-       IN HANDLE KeyHandle
-       );
-/*
- * FUNCTION: Flushes the dirty pages to file
- * RETURNS: Status
- * FIXME: Not sure this does (how is the file specified)
- */
-NTSTATUS STDCALL NtFlushWriteBuffer(VOID);
-NTSTATUS STDCALL ZwFlushWriteBuffer(VOID);                      
-
- /*
- * FUNCTION: Frees a range of virtual memory
- * ARGUMENTS:
- *        ProcessHandle = Points to the process that allocated the virtual 
- *                        memory
- *        BaseAddress = Points to the memory address, rounded down to a 
- *                      multiple of the pagesize
- *        RegionSize = Limits the range to free, rounded up to a multiple of 
- *                     the paging size
- *        FreeType = Can be one of the values:  MEM_DECOMMIT, or MEM_RELEASE
- * RETURNS: Status 
- */
-NTSTATUS STDCALL NtFreeVirtualMemory(IN HANDLE ProcessHandle,
-                                    IN PVOID  *BaseAddress,    
-                                    IN PULONG  RegionSize,     
-                                    IN ULONG  FreeType);
-NTSTATUS STDCALL ZwFreeVirtualMemory(IN HANDLE ProcessHandle,
-                                    IN PVOID  *BaseAddress,    
-                                    IN PULONG  RegionSize,     
-                                    IN ULONG  FreeType);  
-
-/*
- * FUNCTION: Sends FSCTL to the filesystem
- * ARGUMENTS:
- *        DeviceHandle = Points to the handle that is created by NtCreateFile
- *        Event = Event to synchronize on STATUS_PENDING
- *        ApcRoutine = 
- *       ApcContext =
- *       IoStatusBlock = Caller should supply storage for 
- *        IoControlCode = Contains the File System Control command. This is an 
- *                     index to the structures in InputBuffer and OutputBuffer.
- *             FSCTL_GET_RETRIEVAL_POINTERS  [Input/Output] RETRIEVAL_POINTERS_BUFFER
- *             FSCTL_GET_VOLUME_BITMAP       [Input]        STARTING_LCN_INPUT_BUFFER
- *             FSCTL_GET_VOLUME_BITMAP       [Output]       VOLUME_BITMAP_BUFFER
- *             FSCTL_MOVE_FILE               [Input]        MOVE_FILE_DATA
- *
- *       InputBuffer = Caller should supply storage for input buffer if FSCTL expects one.
- *       InputBufferSize = Size of the input bufffer
- *        OutputBuffer = Caller should supply storage for output buffer if FSCTL expects one.
- *        OutputBufferSize  = Size of the input bufffer
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_PENDING | STATUS_ACCESS_DENIED | STATUS_INSUFFICIENT_RESOURCES |
- *             STATUS_INVALID_PARAMETER | STATUS_INVALID_DEVICE_REQUEST ]
- */
-NTSTATUS
-STDCALL
-NtFsControlFile(
-       IN HANDLE DeviceHandle,
-       IN HANDLE Event OPTIONAL, 
-       IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, 
-       IN PVOID ApcContext OPTIONAL, 
-       OUT PIO_STATUS_BLOCK IoStatusBlock, 
-       IN ULONG IoControlCode,
-       IN PVOID InputBuffer, 
-       IN ULONG InputBufferSize,
-       OUT PVOID OutputBuffer,
-       IN ULONG OutputBufferSize
-       );
-
-NTSTATUS
-STDCALL
-ZwFsControlFile(
-       IN HANDLE DeviceHandle,
-       IN HANDLE Event OPTIONAL, 
-       IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, 
-       IN PVOID ApcContext OPTIONAL, 
-       OUT PIO_STATUS_BLOCK IoStatusBlock, 
-       IN ULONG IoControlCode,
-       IN PVOID InputBuffer, 
-       IN ULONG InputBufferSize,
-       OUT PVOID OutputBuffer,
-       IN ULONG OutputBufferSize
-       );
-
-/*
- * FUNCTION: Retrieves the processor context of a thread
- * ARGUMENTS:
- *        ThreadHandle = Handle to a thread
- *        ThreadContext (OUT) = Caller allocated storage for the processor context
- * RETURNS: Status 
- */
-
-NTSTATUS
-STDCALL 
-NtGetContextThread(
-       IN HANDLE ThreadHandle,
-       OUT PCONTEXT ThreadContext
-       );
-
-NTSTATUS
-STDCALL 
-ZwGetContextThread(
-       IN HANDLE ThreadHandle,
-       OUT PCONTEXT ThreadContext
-       );
-
-
-NTSTATUS STDCALL
-NtImpersonateClientOfPort (HANDLE PortHandle,
-                          PLPC_MESSAGE ClientMessage);
-
-NTSTATUS STDCALL
-ZwImpersonateClientOfPort (HANDLE PortHandle,
-                          PLPC_MESSAGE ClientMessage);
-
-/*
- * FUNCTION: Sets a thread to impersonate another 
- * ARGUMENTS:
- *        ThreadHandle = Server thread that will impersonate a client.
-         ThreadToImpersonate = Client thread that will be impersonated
-         SecurityQualityOfService = Specifies the impersonation level.
- * RETURNS: Status 
- */
-
-NTSTATUS
-STDCALL 
-NtImpersonateThread(
-       IN HANDLE ThreadHandle,
-       IN HANDLE ThreadToImpersonate,
-       IN PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
-       );
-
-NTSTATUS
-STDCALL 
-ZwImpersonateThread(
-       IN HANDLE ThreadHandle,
-       IN HANDLE ThreadToImpersonate,
-       IN PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
-       );
-
-NTSTATUS
-STDCALL
-NtInitiatePowerAction (
-       IN POWER_ACTION SystemAction,
-       IN SYSTEM_POWER_STATE MinSystemState,
-       IN ULONG Flags,
-       IN BOOLEAN Asynchronous
-);
-
-NTSTATUS
-STDCALL
-ZwInitiatePowerAction (
-       IN POWER_ACTION SystemAction,
-       IN SYSTEM_POWER_STATE MinSystemState,
-       IN ULONG Flags,
-       IN BOOLEAN Asynchronous
-);
-/*
- * FUNCTION: Initializes the registry.
- * ARGUMENTS:
- *        SetUpBoot = This parameter is true for a setup boot.
- * RETURNS: Status 
- */
-NTSTATUS
-STDCALL 
-NtInitializeRegistry(
-       BOOLEAN SetUpBoot
-       );
-NTSTATUS
-STDCALL 
-ZwInitializeRegistry(
-       BOOLEAN SetUpBoot
-       );
-
-NTSTATUS
-STDCALL
-NtIsProcessInJob(
-       IN HANDLE ProcessHandle,  // ProcessHandle must grant PROCESS_QUERY_INFORMATION access.
-       IN HANDLE JobHandle OPTIONAL    // JobHandle must JOB_OBJECT_QUERY grant access. Defaults to the current process's job object.
-       );
-
-NTSTATUS
-STDCALL
-ZwIsProcessInJob(
-       IN HANDLE ProcessHandle,  // ProcessHandle must grant PROCESS_QUERY_INFORMATION access.
-       IN HANDLE JobHandle OPTIONAL    // JobHandle must JOB_OBJECT_QUERY grant access. Defaults to the current process's job object. 
-       );
-
-NTSTATUS STDCALL
-NtListenPort (HANDLE PortHandle,
-             PLPC_MESSAGE LpcMessage);
-
-NTSTATUS STDCALL
-ZwListenPort (HANDLE PortHandle,
-             PLPC_MESSAGE LpcMessage);
-
-
-/*
- * FUNCTION: Loads a driver. 
- * ARGUMENTS: 
- *      DriverServiceName = Name of the driver to load
- * RETURNS: Status
- */    
-NTSTATUS
-STDCALL 
-NtLoadDriver(
-       IN PUNICODE_STRING DriverServiceName
-       );
-
-NTSTATUS
-STDCALL 
-ZwLoadDriver(
-       IN PUNICODE_STRING DriverServiceName
-       );
-
-/*
- * FUNCTION: Locks a range of bytes in a file. 
- * ARGUMENTS: 
- *       FileHandle = Handle to the file
- *       Event = Should be null if apc is specified.
- *       ApcRoutine = Asynchroneous Procedure Callback
- *       ApcContext = Argument to the callback
- *       IoStatusBlock (OUT) = Caller should supply storage for a structure containing
- *                      the completion status and information about the requested lock operation.
- *       ByteOffset = Offset 
- *       Length = Number of bytes to lock.
- *       Key  = Special value to give other threads the possibility to unlock the file
-               by supplying the key in a call to NtUnlockFile.
- *       FailImmediatedly = If false the request will block untill the lock is obtained. 
- *       ExclusiveLock = Specifies whether a exclusive or a shared lock is obtained.
- * REMARK:
-       This procedure maps to the win32 procedure LockFileEx. STATUS_PENDING is returned if the lock could
-       not be obtained immediately, the device queue is busy and the IRP is queued.
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_PENDING | STATUS_ACCESS_DENIED | STATUS_INSUFFICIENT_RESOURCES |
-               STATUS_INVALID_PARAMETER | STATUS_INVALID_DEVICE_REQUEST | STATUS_LOCK_NOT_GRANTED ]
-
- */    
-NTSTATUS 
-STDCALL
-NtLockFile(
-       IN  HANDLE FileHandle,
-       IN  HANDLE Event OPTIONAL,
-       IN  PIO_APC_ROUTINE ApcRoutine OPTIONAL,
-       IN  PVOID ApcContext OPTIONAL,
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN  PLARGE_INTEGER ByteOffset,
-       IN  PLARGE_INTEGER Length,
-       IN  PULONG Key,
-       IN  BOOLEAN FailImmediatedly,
-       IN  BOOLEAN ExclusiveLock
-       );
-
-NTSTATUS 
-STDCALL
-ZwLockFile(
-       IN  HANDLE FileHandle,
-       IN  HANDLE Event OPTIONAL,
-       IN  PIO_APC_ROUTINE ApcRoutine OPTIONAL,
-       IN  PVOID ApcContext OPTIONAL,
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN  PLARGE_INTEGER ByteOffset,
-       IN  PLARGE_INTEGER Length,
-       IN  PULONG Key,
-       IN  BOOLEAN FailImmediatedly,
-       IN  BOOLEAN ExclusiveLock
-       );
-
-/*
- * FUNCTION: Makes temporary object that will be removed at next boot.
- * ARGUMENTS: 
- *       Handle = Handle to object
- * RETURNS: Status
- */    
-
-
-NTSTATUS
-STDCALL
-NtMakePermanentObject(
-       IN HANDLE ObjectHandle
-       );
-
-NTSTATUS
-STDCALL
-ZwMakePermanentObject(
-       IN HANDLE ObjectHandle
-       );
-
-NTSTATUS
-STDCALL
-NtMakeTemporaryObject(
-       IN HANDLE ObjectHandle
-       );
-
-NTSTATUS
-STDCALL
-ZwMakeTemporaryObject(
-       IN HANDLE ObjectHandle
-       );
-/*
- * FUNCTION: Maps a view of a section into the virtual address space of a 
- *           process
- * ARGUMENTS:
- *        SectionHandle = Handle of the section
- *        ProcessHandle = Handle of the process
- *        BaseAddress = Desired base address (or NULL) on entry
- *                      Actual base address of the view on exit
- *        ZeroBits = Number of high order address bits that must be zero
- *        CommitSize = Size in bytes of the initially committed section of 
- *                     the view 
- *        SectionOffset = Offset in bytes from the beginning of the section
- *                        to the beginning of the view
- *        ViewSize = Desired length of map (or zero to map all) on entry
- *                   Actual length mapped on exit
- *        InheritDisposition = Specified how the view is to be shared with
- *                            child processes
- *        AllocateType = Type of allocation for the pages
- *        Protect = Protection for the committed region of the view
- * RETURNS: Status
- */
-NTSTATUS 
-STDCALL
-NtMapViewOfSection(
-       IN HANDLE SectionHandle,
-       IN HANDLE ProcessHandle,
-       IN OUT PVOID *BaseAddress,
-       IN ULONG ZeroBits,
-       IN ULONG CommitSize,
-       IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
-       IN OUT PULONG ViewSize,
-       IN SECTION_INHERIT InheritDisposition,
-       IN ULONG AllocationType,
-       IN ULONG AccessProtection
-       );
-
-NTSTATUS
-STDCALL
-ZwMapViewOfSection(
-       IN HANDLE SectionHandle,
-       IN HANDLE ProcessHandle,
-       IN OUT PVOID *BaseAddress,
-       IN ULONG ZeroBits,
-       IN ULONG CommitSize,
-       IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
-       IN OUT PULONG ViewSize,
-       IN SECTION_INHERIT InheritDisposition,
-       IN ULONG AllocationType,
-       IN ULONG AccessProtection
-       );
-
-/*
- * FUNCTION: Installs a notify for the change of a directory's contents
- * ARGUMENTS:
- *        FileHandle = Handle to the directory
-         Event = 
- *        ApcRoutine   = Start address
- *        ApcContext = Delimits the range of virtual memory
- *                             for which the new access protection holds
- *        IoStatusBlock = The new access proctection for the pages
- *        Buffer = Caller supplies storage for resulting information --> FILE_NOTIFY_INFORMATION
- *       BufferSize =  Size of the buffer
-         CompletionFilter = Can be one of the following values:
-                       FILE_NOTIFY_CHANGE_FILE_NAME
-                       FILE_NOTIFY_CHANGE_DIR_NAME
-                       FILE_NOTIFY_CHANGE_NAME ( FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME ) 
-                       FILE_NOTIFY_CHANGE_ATTRIBUTES
-                       FILE_NOTIFY_CHANGE_SIZE
-                       FILE_NOTIFY_CHANGE_LAST_WRITE
-                       FILE_NOTIFY_CHANGE_LAST_ACCESS
-                       FILE_NOTIFY_CHANGE_CREATION ( change of creation timestamp )
-                       FILE_NOTIFY_CHANGE_EA
-                       FILE_NOTIFY_CHANGE_SECURITY
-                       FILE_NOTIFY_CHANGE_STREAM_NAME
-                       FILE_NOTIFY_CHANGE_STREAM_SIZE
-                       FILE_NOTIFY_CHANGE_STREAM_WRITE
-         WatchTree = If true the notify will be installed recursively on the targetdirectory and all subdirectories.
- *
- * REMARKS:
- *      The function maps to the win32 FindFirstChangeNotification, FindNextChangeNotification 
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtNotifyChangeDirectoryFile(
-       IN HANDLE FileHandle,
-       IN HANDLE Event OPTIONAL, 
-       IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, 
-       IN PVOID ApcContext OPTIONAL, 
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       OUT PVOID Buffer,
-       IN ULONG BufferSize,
-       IN ULONG CompletionFilter,
-       IN BOOLEAN WatchTree
-       );
-
-NTSTATUS
-STDCALL
-ZwNotifyChangeDirectoryFile(
-       IN HANDLE FileHandle,
-       IN HANDLE Event OPTIONAL, 
-       IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, 
-       IN PVOID ApcContext OPTIONAL, 
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       OUT PVOID Buffer,
-       IN ULONG BufferSize,
-       IN ULONG CompletionFilter,
-       IN BOOLEAN WatchTree
-       );
-
-/*
- * FUNCTION: Installs a notfication callback on registry changes
- * ARGUMENTS:
-       KeyHandle = Handle to the registry key
-       Event = Event that should be signalled on modification of the key
-       ApcRoutine = Routine that should be called on modification of the key
-       ApcContext = Argument to the ApcRoutine
-       IoStatusBlock = ???
-       CompletionFilter = Specifies the kind of notification the caller likes to receive.
-                       Can be a combination of the following values:
-
-                       REG_NOTIFY_CHANGE_NAME
-                       REG_NOTIFY_CHANGE_ATTRIBUTES
-                       REG_NOTIFY_CHANGE_LAST_SET
-                       REG_NOTIFY_CHANGE_SECURITY
-                               
-                               
-       Asynchroneous = If TRUE the changes are reported by signalling an event if false
-                       the function will not return before a change occurs.
-       ChangeBuffer =  Will return the old value
-       Length = Size of the change buffer
-       WatchSubtree =  Indicates if the caller likes to receive a notification of changes in
-                       sub keys or not.
- * REMARKS: If the key is closed the event is signalled aswell.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtNotifyChangeKey(
-       IN HANDLE KeyHandle,
-       IN HANDLE Event,
-       IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, 
-       IN PVOID ApcContext OPTIONAL, 
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN ULONG CompletionFilter,
-       IN BOOLEAN WatchSubtree,
-       OUT PVOID Buffer,
-       IN ULONG Length,
-       IN BOOLEAN Asynchronous
-       );
-
-NTSTATUS
-STDCALL
-ZwNotifyChangeKey(
-       IN HANDLE KeyHandle,
-       IN HANDLE Event,
-       IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, 
-       IN PVOID ApcContext OPTIONAL, 
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN ULONG CompletionFilter,
-       IN BOOLEAN WatchSubtree,
-       OUT PVOID Buffer,
-       IN ULONG Length,
-       IN BOOLEAN Asynchronous
-       );
-
-/*
- * FUNCTION: Opens an existing directory object
- * ARGUMENTS:
- *        FileHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Requested access to the directory
- *        ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtOpenDirectoryObject(
-       OUT PHANDLE FileHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-NTSTATUS
-STDCALL
-ZwOpenDirectoryObject(
-       OUT PHANDLE FileHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-/*
- * FUNCTION: Opens an existing event
- * ARGUMENTS:
- *        EventHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Requested access to the event
- *        ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenEvent(
-       OUT PHANDLE EventHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-NTSTATUS
-STDCALL
-ZwOpenEvent(
-       OUT PHANDLE EventHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-/*
- * FUNCTION: Opens an existing event pair
- * ARGUMENTS:
- *        EventHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Requested access to the event
- *        ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtOpenEventPair(
-       OUT PHANDLE EventPairHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-NTSTATUS
-STDCALL
-ZwOpenEventPair(
-       OUT PHANDLE EventPairHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-/*
- * FUNCTION: Opens an existing file
- * ARGUMENTS:
- *        FileHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Requested access to the file
- *        ObjectAttributes = Initialized attributes for the object
- *        IoStatusBlock =
- *        ShareAccess =
- *        OpenOptions =
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenFile(
-       OUT PHANDLE FileHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN ULONG ShareAccess,
-       IN ULONG OpenOptions
-       );
-
-NTSTATUS
-STDCALL
-ZwOpenFile(
-       OUT PHANDLE FileHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       OUT PIO_STATUS_BLOCK IoStatusBlock,
-       IN ULONG ShareAccess,
-       IN ULONG OpenOptions
-       );
-
-/*
- * FUNCTION: Opens an existing io completion object
- * ARGUMENTS:
- *        CompletionPort (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Requested access to the io completion object
- *        ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtOpenIoCompletion(
-       OUT PHANDLE CompetionPort,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-NTSTATUS
-STDCALL
-ZwOpenIoCompletion(
-       OUT PHANDLE CompetionPort,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-
-NTSTATUS 
-STDCALL 
-NtOpenJobObject(
-       PHANDLE JobHandle, 
-       ACCESS_MASK DesiredAccess,
-       POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-NTSTATUS 
-STDCALL 
-ZwOpenJobObject(
-       PHANDLE JobHandle, 
-       ACCESS_MASK DesiredAccess,
-       POBJECT_ATTRIBUTES ObjectAttributes
-       );
-/*
- * FUNCTION: Opens an existing key in the registry
- * ARGUMENTS:
- *        KeyHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Requested access to the key
- *        ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenKey(
-       OUT PHANDLE KeyHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-NTSTATUS
-STDCALL
-ZwOpenKey(
-       OUT PHANDLE KeyHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-/*
- * FUNCTION: Opens an existing key in the registry
- * ARGUMENTS:
- *        MutantHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Requested access to the mutant
- *        ObjectAttribute = Initialized attributes for the object
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenMutant(
-       OUT PHANDLE MutantHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-NTSTATUS
-STDCALL
-ZwOpenMutant(
-       OUT PHANDLE MutantHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes
-       );
-
-/*
- * FUNCTION: Opens an existing process
- * ARGUMENTS:
- *        ProcessHandle (OUT) = Caller supplied storage for the resulting handle
- *        DesiredAccess = Requested access to the process
- *        ObjectAttribute = Initialized attributes for the object
- *        ClientId = Identifies the process id to open
- * RETURNS: Status
- */
-NTSTATUS 
-STDCALL
-NtOpenProcess (
-       OUT PHANDLE ProcessHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       IN PCLIENT_ID ClientId
-       ); 
-NTSTATUS 
-STDCALL
-ZwOpenProcess (
-       OUT PHANDLE ProcessHandle,
-       IN ACCESS_MASK DesiredAccess,
-       IN POBJECT_ATTRIBUTES ObjectAttributes,
-       IN PCLIENT_ID ClientId
-       ); 
-/*
- * FUNCTION: Opens an existing process
- * ARGUMENTS:
- *        ProcessHandle  = Handle of the process of which owns the token
- *        DesiredAccess = Requested access to the token
- *       TokenHandle (OUT) = Caller supplies storage for the resulting token.
- * REMARKS:
-       This function maps to the win32 
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtOpenProcessToken(
-       IN HANDLE ProcessHandle,
-       IN ACCESS_MASK DesiredAccess,
-       OUT PHANDLE TokenHandle
-       );
-
-NTSTATUS
-STDCALL
-ZwOpenProcessToken(
-       IN HANDLE ProcessHandle,
-       IN ACCESS_MASK DesiredAccess,
-       OUT PHANDLE TokenHandle
-       );
-
-
-NTST