Kill NTOS headers. So long, and thanks for all the fish
Modified: trunk/reactos/apps/utils/ps/ps.c
Modified: trunk/reactos/drivers/dd/blue/blue.c
Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c
Modified: trunk/reactos/drivers/fs/cdfs/fsctl.c
Modified: trunk/reactos/drivers/fs/cdfs/rw.c
Modified: trunk/reactos/drivers/fs/ms/create.c
Modified: trunk/reactos/drivers/fs/np/create.c
Modified: trunk/reactos/drivers/fs/ntfs/mft.c
Modified: trunk/reactos/drivers/fs/ntfs/rw.c
Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c
Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c
Modified: trunk/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c
Modified: trunk/reactos/include/csrss/csrss.h
Added: trunk/reactos/include/ddk/core.h
Modified: trunk/reactos/include/ddk/ntddblue.h
Added: trunk/reactos/include/ddk/ntpnp.h
Deleted: trunk/reactos/include/napi/core.h
Modified: trunk/reactos/include/ndk/halfuncs.h
Modified: trunk/reactos/include/ndk/inbvfuncs.h
Deleted: trunk/reactos/include/ntos/
Deleted: trunk/reactos/include/ntos.h
Modified: trunk/reactos/include/win32k/ntuser.h
Modified: trunk/reactos/lib/crt/except/matherr.c
Modified: trunk/reactos/lib/wdmguid/wdmguid.c
Modified: trunk/reactos/ntoskrnl/ex/init.c
Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/mm/pagefile.c
Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
Modified: trunk/reactos/w32api/include/wincon.h

Modified: trunk/reactos/apps/utils/ps/ps.c
--- trunk/reactos/apps/utils/ps/ps.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/apps/utils/ps/ps.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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 	 
  { 	 

Modified: trunk/reactos/drivers/dd/blue/blue.c
--- trunk/reactos/drivers/dd/blue/blue.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/dd/blue/blue.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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>

Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c
--- trunk/reactos/drivers/dd/bootvid/bootvid.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/dd/bootvid/bootvid.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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"
 

Modified: trunk/reactos/drivers/fs/cdfs/fsctl.c
--- trunk/reactos/drivers/fs/cdfs/fsctl.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/fs/cdfs/fsctl.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -30,7 +30,6 @@
 
 #include <ddk/ntddk.h>
 #include <ntddcdrm.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/drivers/fs/cdfs/rw.c
--- trunk/reactos/drivers/fs/cdfs/rw.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/fs/cdfs/rw.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -29,7 +29,6 @@
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/drivers/fs/ms/create.c
--- trunk/reactos/drivers/fs/ms/create.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/fs/ms/create.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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

Modified: trunk/reactos/drivers/fs/np/create.c
--- trunk/reactos/drivers/fs/np/create.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/fs/np/create.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -10,7 +10,7 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntifs.h>
-#include <ntos/fstypes.h> /* FIXME: NDK */
+#include <ndk/iotypes.h>
 #include "npfs.h"
 
 #define NDEBUG

Modified: trunk/reactos/drivers/fs/ntfs/mft.c
--- trunk/reactos/drivers/fs/ntfs/mft.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/fs/ntfs/mft.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -29,7 +29,6 @@
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/drivers/fs/ntfs/rw.c
--- trunk/reactos/drivers/fs/ntfs/rw.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/fs/ntfs/rw.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -29,7 +29,6 @@
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c
--- trunk/reactos/drivers/storage/cdrom/cdrom.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/storage/cdrom/cdrom.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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

Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c
--- trunk/reactos/drivers/storage/scsiport/scsiport.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/storage/scsiport/scsiport.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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

Modified: trunk/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c
--- trunk/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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"
 

Modified: trunk/reactos/include/csrss/csrss.h
--- trunk/reactos/include/csrss/csrss.h	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/include/csrss/csrss.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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

Copied: trunk/reactos/include/ddk/core.h (from rev 16273, trunk/reactos/include/napi/core.h)

Modified: trunk/reactos/include/ddk/ntddblue.h
--- trunk/reactos/include/ddk/ntddblue.h	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/include/ddk/ntddblue.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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)

Copied: trunk/reactos/include/ddk/ntpnp.h (from rev 16273, trunk/reactos/include/ntos/ntpnp.h)
--- trunk/reactos/include/ntos/ntpnp.h	2005-06-26 01:12:21 UTC (rev 16273)
+++ trunk/reactos/include/ddk/ntpnp.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -0,0 +1,282 @@
+/*
+ * ntpnp.h
+ *
+ * Plug-and-play interface routines
+ *
+ * Contributors:
+ *   Created by Filip Navara <xnavara@volny.cz>
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef __NTPNP_H
+#define __NTPNP_H
+
+#include <ddk/cfg.h>
+
+/*
+ * TODO:
+ *    - Describe the undocumented GUIDs.
+ *    - Finish the description of NtPlugPlayControl.
+ */
+
+/*
+ * Undocumented GUIDs used by NtGetPlugPlayEvent.
+ */
+
+DEFINE_GUID(GUID_DEVICE_STANDBY_VETOED, 0x03B21C13, 0x18D6, 0x11D3, 0x97, 0xDB, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_KERNEL_INITIATED_EJECT, 0x14689B54, 0x0703, 0x11D3, 0x97, 0xD2, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_THERMAL_ZONE, 0x4AFA3D51, 0x74A7, 0x11D0, 0xBE, 0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
+DEFINE_GUID(GUID_DEVICE_SYS_BUTTON, 0x4AFA3D53, 0x74A7, 0x11D0, 0xBE, 0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
+DEFINE_GUID(GUID_DEVICE_REMOVAL_VETOED, 0x60DBD5FA, 0xDDD2, 0x11D2, 0x97, 0xB8, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_HIBERNATE_VETOED, 0x61173AD9, 0x194F, 0x11D3, 0x97, 0xDC, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_BATTERY, 0x72631E54, 0x78A4, 0x11D0, 0xBC, 0xF7, 0x00, 0xAA, 0x00, 0xB7, 0xB3, 0x2A);
+DEFINE_GUID(GUID_DEVICE_SAFE_REMOVAL, 0x8FBEF967, 0xD6C5, 0x11D2, 0x97, 0xB5, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+#ifndef __USE_W32API
+DEFINE_GUID(GUID_DEVICE_INTERFACE_ARRIVAL, 0xCB3A4004, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_INTERFACE_REMOVAL, 0xCB3A4005, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+#endif
+DEFINE_GUID(GUID_DEVICE_ARRIVAL, 0xCB3A4009, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_ENUMERATED, 0xCB3A400A, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_ENUMERATE_REQUEST, 0xCB3A400B, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_START_REQUEST, 0xCB3A400C, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_REMOVE_PENDING, 0xCB3A400D, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_QUERY_AND_REMOVE, 0xCB3A400E, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_EJECT, 0xCB3A400F, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_NOOP, 0xCB3A4010, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_WARM_EJECT_VETOED, 0xCBF4C1F9, 0x18D5, 0x11D3, 0x97, 0xDB, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_SURPRISE_REMOVAL, 0xCE5AF000, 0x80DD, 0x11D2, 0xA8, 0x8D, 0x00, 0xA0, 0xC9, 0x69, 0x6B, 0x4B);
+DEFINE_GUID(GUID_DEVICE_EJECT_VETOED, 0xCF7B71E8, 0xD8FD, 0x11D2, 0x97, 0xB5, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_EVENT_RBC, 0xD0744792, 0xA98E, 0x11D2, 0x91, 0x7A, 0x00, 0xA0, 0xC9, 0x06, 0x8F, 0xF3);
+
+
+#ifndef __GUIDS_ONLY__ /* This is defined to build libwdmguid.a */
+
+typedef enum _PLUGPLAY_EVENT_CATEGORY {
+   HardwareProfileChangeEvent,
+   TargetDeviceChangeEvent,
+   DeviceClassChangeEvent,
+   CustomDeviceEvent,
+   DeviceInstallEvent,
+   DeviceArrivalEvent,
+   PowerEvent,
+   VetoEvent,
+   BlockedDriverEvent,
+   MaxPlugEventCategory
+} PLUGPLAY_EVENT_CATEGORY;
+
+/*
+ * Plug and Play event structure used by NtGetPlugPlayEvent.
+ *
+ * EventGuid
+ *    Can be one of the following values:
+ *       GUID_HWPROFILE_QUERY_CHANGE
+ *       GUID_HWPROFILE_CHANGE_CANCELLED
+ *       GUID_HWPROFILE_CHANGE_COMPLETE
+ *       GUID_TARGET_DEVICE_QUERY_REMOVE
+ *       GUID_TARGET_DEVICE_REMOVE_CANCELLED
+ *       GUID_TARGET_DEVICE_REMOVE_COMPLETE
+ *       GUID_PNP_CUSTOM_NOTIFICATION
+ *       GUID_PNP_POWER_NOTIFICATION
+ *       GUID_DEVICE_* (see above)
+ *
+ * EventCategory
+ *    Type of the event that happened.
+ *
+ * Result
+ *    ?
+ *
+ * Flags
+ *    ?
+ *
+ * TotalSize
+ *    Size of the event block including the device IDs and other
+ *    per category specific fields.
+ */
+
+typedef struct _PLUGPLAY_EVENT_BLOCK {
+   GUID EventGuid;
+   PLUGPLAY_EVENT_CATEGORY EventCategory;
+   PULONG Result;
+   ULONG Flags;
+   ULONG TotalSize;
+   PVOID DeviceObject;
+   union {
+      struct {
+         GUID ClassGuid;
+         WCHAR SymbolicLinkName[ANYSIZE_ARRAY];
+      } DeviceClass;
+      struct {
+         WCHAR DeviceIds[ANYSIZE_ARRAY];
+      } TargetDevice;
+      struct {
+         WCHAR DeviceId[ANYSIZE_ARRAY];
+      } InstallDevice;
+      struct {
+         PVOID NotificationStructure;
+         WCHAR DeviceIds[ANYSIZE_ARRAY];
+      } CustomNotification;
+      struct {
+         PVOID Notification;
+      } ProfileNotification;
+      struct {
+         ULONG NotificationCode;
+         ULONG NotificationData;
+      } PowerNotification;
+      struct {
+         PNP_VETO_TYPE VetoType;
+         WCHAR DeviceIdVetoNameBuffer[ANYSIZE_ARRAY];
+      } VetoNotification;
+      struct {
+         GUID BlockedDriverGuid;
+      } BlockedDriverNotification;
+   };
+} PLUGPLAY_EVENT_BLOCK, *PPLUGPLAY_EVENT_BLOCK;
+
+/*
+ * NtGetPlugPlayEvent
+ *
+ * Returns one Plug & Play event from a global queue.
+ *
+ * Parameters
+ *    Reserved1
+ *    Reserved2
+ *       Always set to zero.
+ *
+ *    Buffer
+ *       The buffer that will be filled with the event information on
+ *       successful return from the function.
+ *
+ *    BufferSize
+ *       Size of the buffer pointed by the Buffer parameter. If the
+ *       buffer size is not large enough to hold the whole event
+ *       information, error STATUS_BUFFER_TOO_SMALL is returned and
+ *       the buffer remains untouched.
+ *
+ * Return Values
+ *    STATUS_PRIVILEGE_NOT_HELD
+ *    STATUS_BUFFER_TOO_SMALL
+ *    STATUS_SUCCESS
+ *
+ * Remarks
+ *    This function isn't multi-thread safe!
+NTSTATUS STDCALL
+NtGetPlugPlayEvent(
+   ULONG Reserved1,
+   ULONG Reserved2,
+   PPLUGPLAY_EVENT_BLOCK Buffer,
+   ULONG BufferSize);
+ */
+ 
+/*
+ * NtPlugPlayControl
+ *
+ * A function for doing various Plug & Play operations from user mode.
+ *
+ * Parameters
+ *    ControlCode
+ *       0x00   Reenumerate device tree
+ *
+ *              Buffer points to UNICODE_STRING decribing the instance
+ *              path (like "HTREE\ROOT\0" or "Root\ACPI_HAL\0000"). For
+ *              more information about instance paths see !devnode command
+ *              in kernel debugger or look at "Inside Windows 2000" book,
+ *              chapter "Driver Loading, Initialization, and Installation".
+ *
+ *       0x01   Register new device
+ *       0x02   Deregister device
+ *       0x03   Initialize device
+ *       0x04   Start device
+ *       0x06   Query and remove device
+ *       0x07   User response
+ *
+ *              Called after processing the message from NtGetPlugPlayEvent.
+ *
+ *       0x08   Generate legacy device
+ *       0x09   Get interface device list
+ *       0x0A   Get property data
+ *       0x0B   Device class association (Registration)
+ *       0x0C   Get related device
+ *       0x0D   Get device interface alias
+ *       0x0E   Get/set/clear device status
+ *       0x0F   Get device depth
+ *       0x10   Query device relations
+ *       0x11   Query target device relation
+ *       0x12   Query conflict list
+ *       0x13   Retrieve dock data
+ *       0x14   Reset device
+ *       0x15   Halt device
+ *       0x16   Get blocked driver data
+ *
+ *    Buffer
+ *       The buffer contains information that is specific to each control
+ *       code. The buffer is read-only.
+ *
+ *    BufferSize
+ *       Size of the buffer pointed by the Buffer parameter. If the
+ *       buffer size specifies incorrect value for specified control
+ *       code, error ??? is returned.
+ *
+ * Return Values
+ *    STATUS_PRIVILEGE_NOT_HELD
+ *    STATUS_SUCCESS
+ *    ...
+ */
+
+#define PLUGPLAY_USER_RESPONSE      0x07
+#define PLUGPLAY_GET_PROPERTY       0x0A
+#define PLUGPLAY_GET_RELATED_DEVICE 0x0C
+#define PLUGPLAY_DEVICE_STATUS      0x0E
+
+
+typedef struct _PLUGPLAY_PROPERTY_DATA
+{
+  UNICODE_STRING DeviceInstance;
+  ULONG Property;
+  PVOID Buffer;
+  ULONG BufferSize;
+} PLUGPLAY_PROPERTY_DATA, *PPLUGPLAY_PROPERTY_DATA;
+
+
+/* PLUGPLAY_GET_RELATED_DEVICE (Code 0x0C) */
+
+/* Relation values */
+#define PNP_GET_PARENT_DEVICE  1
+#define PNP_GET_CHILD_DEVICE   2
+#define PNP_GET_SIBLING_DEVICE 3
+
+typedef struct _PLUGPLAY_RELATED_DEVICE_DATA
+{
+  UNICODE_STRING DeviceInstance;
+  UNICODE_STRING RelatedDeviceInstance;
+  ULONG Relation; /* 1: Parent  2: Child  3: Sibling */
+} PLUGPLAY_RELATED_DEVICE_DATA, *PPLUGPLAY_RELATED_DEVICE_DATA;
+
+
+/* PLUGPLAY_DEVICE_STATUS (Code 0x0E) */
+
+/* Action values */
+#define PNP_GET_DEVICE_STATUS    0
+#define PNP_SET_DEVICE_STATUS    1
+#define PNP_CLEAR_DEVICE_STATUS  2
+
+
+typedef struct _PLUGPLAY_DEVICE_STATUS_DATA
+{
+  UNICODE_STRING DeviceInstance;
+  ULONG Action;   /* 0: Get  1: Set  2: Clear */
+  ULONG Problem;  /* CM_PROB_  see cfg.h */
+  ULONG Flags;    /* DN_       see cfg.h */
+} PLUGPLAY_DEVICE_STATUS_DATA, *PPLUGPLAY_DEVICE_STATUS_DATA;
+
+#endif /* __GUIDS_ONLY__ */
+
+#endif /* __NTPNP_H */

Deleted: trunk/reactos/include/napi/core.h
--- trunk/reactos/include/napi/core.h	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/include/napi/core.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -1,29 +0,0 @@
-#ifndef __INCLUDE_NAPI_CORE_H
-#define __INCLUDE_NAPI_CORE_H
-
-#define MM_CORE_DUMP_HEADER_MAGIC         (0xdeafbead)
-#define MM_CORE_DUMP_HEADER_VERSION       (0x1)
-
-#include <ddk/ntddscsi.h>
-typedef struct _MM_CORE_DUMP_HEADER
-{
-  ULONG Magic;
-  ULONG Version;
-  ULONG Type;
-  KTRAP_FRAME TrapFrame;
-  ULONG BugCheckCode;
-  ULONG BugCheckParameters[4];
-  PVOID FaultingStackBase;
-  ULONG FaultingStackSize;
-  ULONG PhysicalMemorySize;
-} MM_CORE_DUMP_HEADER, *PMM_CORE_DUMP_HEADER;
-
-typedef struct MM_CORE_DUMP_FUNCTIONS
-{
-  NTSTATUS (STDCALL *DumpPrepare)(PDEVICE_OBJECT DeviceObject, PDUMP_POINTERS DumpPointers);
-  NTSTATUS (STDCALL *DumpInit)(VOID);
-  NTSTATUS (STDCALL *DumpWrite)(LARGE_INTEGER Address, PMDL Mdl);
-  NTSTATUS (STDCALL *DumpFinish)(VOID);
-} MM_CORE_DUMP_FUNCTIONS, *PMM_CORE_DUMP_FUNCTIONS;
-
-#endif /* __INCLUDE_NAPI_CORE_H */

Modified: trunk/reactos/include/ndk/halfuncs.h
--- trunk/reactos/include/ndk/halfuncs.h	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/include/ndk/halfuncs.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -24,6 +24,10 @@
 
 BOOLEAN
 STDCALL
+HalQueryDisplayOwnership(VOID);
+
+BOOLEAN
+STDCALL
 HalAllProcessorsStarted(VOID);
 
 NTSTATUS

Modified: trunk/reactos/include/ndk/inbvfuncs.h
--- trunk/reactos/include/ndk/inbvfuncs.h	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/include/ndk/inbvfuncs.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -90,12 +90,8 @@
 STDCALL
 VidCleanUp(VOID);
 
-BOOLEAN
+BOOL
 STDCALL
-VidInitialize(VOID);
-
-BOOLEAN
-STDCALL
 VidResetDisplay(VOID);
 
 BOOLEAN

Deleted: trunk/reactos/include/ntos.h
--- trunk/reactos/include/ntos.h	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/include/ntos.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -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 */

Modified: trunk/reactos/include/win32k/ntuser.h
--- trunk/reactos/include/win32k/ntuser.h	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/include/win32k/ntuser.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -1,10 +1,6 @@
 #ifndef __WIN32K_NTUSER_H
 #define __WIN32K_NTUSER_H
 
-#ifndef _NTNDK_
-#include <ddk/ntapi.h>
-#endif
-
 #define WM_SYSTIMER 280
 
 ULONG STDCALL

Modified: trunk/reactos/lib/crt/except/matherr.c
--- trunk/reactos/lib/crt/except/matherr.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/lib/crt/except/matherr.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -1,6 +1,5 @@
 #include "precomp.h"
 #include <math.h>
-#include <ntos/except.h>
 
 
 int _matherr(struct _exception* e)

Modified: trunk/reactos/lib/wdmguid/wdmguid.c
--- trunk/reactos/lib/wdmguid/wdmguid.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/lib/wdmguid/wdmguid.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -6,6 +6,6 @@
 
 #include <ddk/wdmguid.h>
 #define __GUIDS_ONLY__
-#include <ntos/ntpnp.h>
+#include <ddk/ntpnp.h>
 
 /* EOF */

Modified: trunk/reactos/ntoskrnl/ex/init.c
--- trunk/reactos/ntoskrnl/ex/init.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/ntoskrnl/ex/init.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -10,7 +10,6 @@
  */
 
 #include <ntoskrnl.h>
-#include <ntos/bootvid.h>
 #define NDEBUG
 #include <internal/debug.h>
 

Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
--- trunk/reactos/ntoskrnl/inbv/inbv.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/ntoskrnl/inbv/inbv.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -11,7 +11,6 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntoskrnl.h>
-#include <ntos/bootvid.h>
 #include <ddk/ntbootvid.h>
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -19,13 +19,10 @@
 #include <ddk/ntddk.h>
 #include <ddk/ntifs.h>
 #include <ddk/wdmguid.h>
+#include <ddk/ntpnp.h>
 #include <ndk/ntndk.h>
 #undef IO_TYPE_FILE
 #define IO_TYPE_FILE                    0x0F5L /* Temp Hack */
-  
-/* FIXME: Add to ndk, or at least move somewhere else */
-#include <ntos/ntpnp.h>
-#include <napi/core.h>
 
 /* ReactOS Headers */
 #include <reactos/version.h>

Modified: trunk/reactos/ntoskrnl/mm/pagefile.c
--- trunk/reactos/ntoskrnl/mm/pagefile.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/ntoskrnl/mm/pagefile.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -29,6 +29,7 @@
 /* INCLUDES *****************************************************************/
 
 #include <ntoskrnl.h>
+#include <ddk/core.h>
 #define NDEBUG
 #include <internal/debug.h>
 

Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
--- trunk/reactos/services/umpnpmgr/umpnpmgr.c	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/services/umpnpmgr/umpnpmgr.c	2005-06-26 05:52:40 UTC (rev 16279)
@@ -31,10 +31,10 @@
 #define NTOS_MODE_USER
 #include <ndk/ntndk.h>
 #include <ddk/wdmguid.h>
+#include <ddk/ntpnp.h>
 
 #include <rpc.h>
 #include <rpcdce.h>
-#include <ntos/ntpnp.h>
 
 #include "pnp_c.h"
 

Modified: trunk/reactos/w32api/include/wincon.h
--- trunk/reactos/w32api/include/wincon.h	2005-06-26 05:06:38 UTC (rev 16278)
+++ trunk/reactos/w32api/include/wincon.h	2005-06-26 05:52:40 UTC (rev 16279)
@@ -28,6 +28,8 @@
 #define ENABLE_MOUSE_INPUT 16
 #define ENABLE_PROCESSED_OUTPUT 1
 #define ENABLE_WRAP_AT_EOL_OUTPUT 2
+#define CONSOLE_INPUT_MODE_VALID  (0x0f)
+#define CONSOLE_OUTPUT_MODE_VALID (0x03)
 #define KEY_EVENT 1
 #define MOUSE_EVENT 2
 #define WINDOW_BUFFER_SIZE_EVENT 4
@@ -72,6 +74,11 @@
 	SHORT X;
 	SHORT Y;
 } COORD;
+typedef struct _CONSOLE_SELECTION_INFO {
+  DWORD dwFlags;
+  COORD dwSelectionAnchor;
+  SMALL_RECT srSelection;
+} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO;
 typedef struct _CONSOLE_FONT_INFO {
 	DWORD nFont;
 	COORD dwFontSize;