Merged r16249:16330 from trunk.
Modified: branches/cache_manager_rewrite/reactos/apps/utils/ps/ps.c
Modified: branches/cache_manager_rewrite/reactos/baseaddress.xml
Modified: branches/cache_manager_rewrite/reactos/boot/freeldr/freeldr/multiboot.c
Modified: branches/cache_manager_rewrite/reactos/bootdata/hiveinst.inf
Modified: branches/cache_manager_rewrite/reactos/bootdata/txtsetup.sif
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/blue/blue.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/bootvid/bootvid.c
Added: branches/cache_manager_rewrite/reactos/drivers/dd/bootvid/ntbootvid.h
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/circularbuffer.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/cleanup.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/close.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/create.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/devctrl.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/info.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/legacy.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/misc.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/pnp.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/power.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/rw.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/serial.c
Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/serial.h
Modified: branches/cache_manager_rewrite/reactos/drivers/fs/cdfs/fsctl.c
Modified: branches/cache_manager_rewrite/reactos/drivers/fs/cdfs/rw.c
Modified: branches/cache_manager_rewrite/reactos/drivers/fs/ms/create.c
Modified: branches/cache_manager_rewrite/reactos/drivers/fs/np/create.c
Modified: branches/cache_manager_rewrite/reactos/drivers/fs/np/fsctrl.c
Modified: branches/cache_manager_rewrite/reactos/drivers/fs/ntfs/mft.c
Modified: branches/cache_manager_rewrite/reactos/drivers/fs/ntfs/rw.c
Modified: branches/cache_manager_rewrite/reactos/drivers/lib/csq/csq.c
Added: branches/cache_manager_rewrite/reactos/drivers/lib/csq/csq.h
Modified: branches/cache_manager_rewrite/reactos/drivers/net/ndis/include/ndissys.h
Modified: branches/cache_manager_rewrite/reactos/drivers/net/ndis/ndis/stubs.c
Modified: branches/cache_manager_rewrite/reactos/drivers/storage/cdrom/cdrom.c
Modified: branches/cache_manager_rewrite/reactos/drivers/storage/diskdump/diskdump.c
Modified: branches/cache_manager_rewrite/reactos/drivers/storage/scsiport/scsiport.c
Modified: branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbehci/usbehci.h
Modified: branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbohci/usbohci.h
Modified: branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbuhci/usbuhci.h
Modified: branches/cache_manager_rewrite/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c
Modified: branches/cache_manager_rewrite/reactos/drivers/video/miniport/vbe/vbemp.h
Modified: branches/cache_manager_rewrite/reactos/drivers/video/miniport/xboxvmp/xboxvmp.c
Modified: branches/cache_manager_rewrite/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h
Modified: branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.c
Modified: branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.h
Modified: branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.xml
Modified: branches/cache_manager_rewrite/reactos/hal/halx86/generic/adapter.c
Modified: branches/cache_manager_rewrite/reactos/hal/halx86/generic/generic.xml
Modified: branches/cache_manager_rewrite/reactos/hal/halx86/generic/reboot.c
Modified: branches/cache_manager_rewrite/reactos/hal/halx86/include/hal.h
Modified: branches/cache_manager_rewrite/reactos/hal/halx86/mp/apic.c
Modified: branches/cache_manager_rewrite/reactos/hal/halx86/mp/mps.S
Modified: branches/cache_manager_rewrite/reactos/hal/halx86/xbox/halxbox.xml
Modified: branches/cache_manager_rewrite/reactos/include/csrss/csrss.h
Deleted: branches/cache_manager_rewrite/reactos/include/cvconst.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3d.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3d8.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3d8caps.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3d8types.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3d9.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3d9caps.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3d9types.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3dcaps.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3dhal.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3drm.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3dtypes.h
Deleted: branches/cache_manager_rewrite/reactos/include/d3dvec.inl
Deleted: branches/cache_manager_rewrite/reactos/include/d3dx8core.h
Deleted: branches/cache_manager_rewrite/reactos/include/dbghelp.h
Deleted: branches/cache_manager_rewrite/reactos/include/dciddi.h
Deleted: branches/cache_manager_rewrite/reactos/include/ddk/af_irda.h
Added: branches/cache_manager_rewrite/reactos/include/ddk/core.h
Deleted: branches/cache_manager_rewrite/reactos/include/ddk/csq.h
Deleted: branches/cache_manager_rewrite/reactos/include/ddk/d3dhal.h
Deleted: branches/cache_manager_rewrite/reactos/include/ddk/d3dnthal.h
Deleted: branches/cache_manager_rewrite/reactos/include/ddk/ddrawi.h
Deleted: branches/cache_manager_rewrite/reactos/include/ddk/ddrawint.h
Deleted: branches/cache_manager_rewrite/reactos/include/ddk/ldrfuncs.h
Deleted: branches/cache_manager_rewrite/reactos/include/ddk/ntbootvid.h
Modified: branches/cache_manager_rewrite/reactos/include/ddk/ntddblue.h
Added: branches/cache_manager_rewrite/reactos/include/ddk/ntpnp.h
Deleted: branches/cache_manager_rewrite/reactos/include/ddraw.h
Deleted: branches/cache_manager_rewrite/reactos/include/digitalv.h
Deleted: branches/cache_manager_rewrite/reactos/include/dinput.h
Deleted: branches/cache_manager_rewrite/reactos/include/dsconf.h
Deleted: branches/cache_manager_rewrite/reactos/include/dsdriver.h
Deleted: branches/cache_manager_rewrite/reactos/include/dsound.h
Deleted: branches/cache_manager_rewrite/reactos/include/dxdiag.h
Deleted: branches/cache_manager_rewrite/reactos/include/evntrace.h
Deleted: branches/cache_manager_rewrite/reactos/include/excpt.h
Deleted: branches/cache_manager_rewrite/reactos/include/getopt.h
Deleted: branches/cache_manager_rewrite/reactos/include/ipexport.h
Deleted: branches/cache_manager_rewrite/reactos/include/ipifcons.h
Deleted: branches/cache_manager_rewrite/reactos/include/iprtrmib.h
Modified: branches/cache_manager_rewrite/reactos/include/lsass/lsass.h
Deleted: branches/cache_manager_rewrite/reactos/include/mmddk.h
Deleted: branches/cache_manager_rewrite/reactos/include/napi/
Added: branches/cache_manager_rewrite/reactos/include/ndk/dbgktypes.h
Modified: branches/cache_manager_rewrite/reactos/include/ndk/extypes.h
Added: branches/cache_manager_rewrite/reactos/include/ndk/fixmes.txt
Modified: branches/cache_manager_rewrite/reactos/include/ndk/halfuncs.h
[truncated at 100 lines; 345 more skipped]
Modified: branches/cache_manager_rewrite/reactos/apps/utils/ps/ps.c
--- branches/cache_manager_rewrite/reactos/apps/utils/ps/ps.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/apps/utils/ps/ps.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -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: branches/cache_manager_rewrite/reactos/baseaddress.xml
--- branches/cache_manager_rewrite/reactos/baseaddress.xml	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/baseaddress.xml	2005-08-14 10:30:10 UTC (rev 17381)
@@ -36,6 +36,7 @@
 <property name="BASEADDRESS_LZ32" value="0x73d80000" />
 <property name="BASEADDRESS_USERENV" value="0x74850000" />
 <property name="BASEADDRESS_SYSSETUP" value="0x74a30000" />
+<property name="BASEADDRESS_SAMSRV" value="0x74f30000" />
 <property name="BASEADDRESS_SAMLIB" value="0x750C0000" />
 <property name="BASEADDRESS_CABINET" value="0x75120000" />
 <property name="BASEADDRESS_MSGINA" value="0x75970000" />
@@ -48,6 +49,7 @@
 <property name="BASEADDRESS_RICHED32" value="0x76340000" />
 <property name="BASEADDRESS_RICHED20" value="0x76360000" />
 <property name="BASEADDRESS_TWAIN_32" value="0x76380000" />
+<property name="BASEADDRESS_LSASRV" value="0x76540000" />
 <property name="BASEADDRESS_MIDIMAP" value="0x76600000" />
 <property name="BASEADDRESS_WAVEMAP" value="0x76610000" />
 <property name="BASEADDRESS_MPR" value="0x76620000" />
@@ -59,6 +61,7 @@
 <property name="BASEADDRESS_IPHLPAPI" value="0x77300000" />
 <property name="BASEADDRESS_MMDRV" value="0x77500000" />
 <property name="BASEADDRESS_CRTDLL" value="0x77630000" />
+<property name="BASEADDRESS_CFGMGR32" value="0x77700000" />
 <property name="BASEADDRESS_MSAFD" value="0x777a0000" />
 <property name="BASEADDRESS_MSI" value="0x777b0000" />
 <property name="BASEADDRESS_SNMPAPI" value="0x777c0000" />
@@ -95,7 +98,6 @@
 <property name="BASEADDRESS_OLEDLG" value="0x74d00000" />
 <property name="BASEADDRESS_COMMCTRL" value="0x75e60000" />
 <property name="BASEADDRESS_D3D8THK" value="0x76340000" />
-<property name="BASEADDRESS_LSASRV" value="0x76540000" />
 <property name="BASEADDRESS_ODBC32" value="0x76660000" />
 <property name="BASEADDRESS_MSACM32" value="0x77400000" />
 <property name="BASEADDRESS_PACKET" value="0x77780000" />

Modified: branches/cache_manager_rewrite/reactos/boot/freeldr/freeldr/multiboot.c
--- branches/cache_manager_rewrite/reactos/boot/freeldr/freeldr/multiboot.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/boot/freeldr/freeldr/multiboot.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -71,25 +71,6 @@
 /* Kernel Entrypoint in Physical Memory */
 ULONG_PTR KernelEntry;
 
-/* Page Directory and Tables for non-PAE Systems */
-extern ULONG_PTR startup_pagedirectory;
-extern ULONG_PTR lowmem_pagetable;
-extern ULONG_PTR kernel_pagetable;
-extern ULONG_PTR hyperspace_pagetable;
-extern ULONG_PTR _pae_pagedirtable;
-extern ULONG_PTR apic_pagetable;
-extern ULONG_PTR kpcr_pagetable;
-
-/* Page Directory and Tables for PAE Systems */
-extern ULONG_PTR startup_pagedirectorytable_pae;
-extern ULONG_PTR startup_pagedirectory_pae;
-extern ULONG_PTR lowmem_pagetable_pae;
-extern ULONG_PTR kernel_pagetable_pae;
-extern ULONG_PTR hyperspace_pagetable_pae;
-extern ULONG_PTR pagedirtable_pae;
-extern ULONG_PTR apic_pagetable_pae;
-extern ULONG_PTR kpcr_pagetable_pae;
-
 typedef struct _HARDWARE_PTE_X86 {
     ULONG Valid             : 1;
     ULONG Write             : 1;
@@ -126,7 +107,7 @@
 
 typedef struct _PAGE_DIRECTORY_X86 {
     HARDWARE_PTE_X86 Pde[1024];
-} PAGE_DIRECTORY_x86, *PPAGE_DIRECTORY_X86;
+} PAGE_DIRECTORY_X86, *PPAGE_DIRECTORY_X86;
 
 typedef struct _PAGE_DIRECTORY_X64 {
     HARDWARE_PTE_X64 Pde[2048];
@@ -136,6 +117,25 @@
     HARDWARE_PTE_X64 Pde[4];
 } PAGE_DIRECTORY_TABLE_X64, *PPAGE_DIRECTORY_TABLE_X64;
 
+/* Page Directory and Tables for non-PAE Systems */
+extern PAGE_DIRECTORY_X86 startup_pagedirectory;
+extern PAGE_DIRECTORY_X86 lowmem_pagetable;
+extern PAGE_DIRECTORY_X86 kernel_pagetable;
+extern ULONG_PTR hyperspace_pagetable;
+extern ULONG_PTR _pae_pagedirtable;
+extern PAGE_DIRECTORY_X86 apic_pagetable;
+extern PAGE_DIRECTORY_X86 kpcr_pagetable;
+
+/* Page Directory and Tables for PAE Systems */
+extern PAGE_DIRECTORY_TABLE_X64 startup_pagedirectorytable_pae;
+extern PAGE_DIRECTORY_X64 startup_pagedirectory_pae;
+extern PAGE_DIRECTORY_X64 lowmem_pagetable_pae;
+extern PAGE_DIRECTORY_X64 kernel_pagetable_pae;
+extern ULONG_PTR hyperspace_pagetable_pae;
+extern ULONG_PTR pagedirtable_pae;
+extern PAGE_DIRECTORY_X64 apic_pagetable_pae;
+extern PAGE_DIRECTORY_X64 kpcr_pagetable_pae;
+
 /* FUNCTIONS *****************************************************************/
 
 /*++

Modified: branches/cache_manager_rewrite/reactos/bootdata/hiveinst.inf
--- branches/cache_manager_rewrite/reactos/bootdata/hiveinst.inf	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/bootdata/hiveinst.inf	2005-08-14 10:30:10 UTC (rev 17381)
@@ -17,15 +17,3 @@
 
 ; VGA miniport driver
 HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Start",0x00010001,0x00000001
-
-
-;
-; Mouse driver section
-;
-
-; PS/2 mouse port driver
-HKLM,"SYSTEM\CurrentControlSet\Services\i8042Prt","Start",0x00010001,0x00000001
-
-
-; Serial mouse driver
-;HKLM,"SYSTEM\CurrentControlSet\Services\Sermouse","Start",0x00010001,0x00000001

Modified: branches/cache_manager_rewrite/reactos/bootdata/txtsetup.sif
--- branches/cache_manager_rewrite/reactos/bootdata/txtsetup.sif	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/bootdata/txtsetup.sif	2005-08-14 10:30:10 UTC (rev 17381)
@@ -96,23 +96,6 @@
 00000809 = kbduk.dll
 00000807 = kbdsg.dll
 
-[Mouse]
-;<id> = <user friendly name>,<spare>,<service key name>
-i8042ps2 = "PS2 Mouse",,i8042prt
-;msps2 = "Microsoft PS2 Mouse",,psaux
-msser = "Microsoft Serial Mouse",,sermouse
-mswhs = "Microsoft Serial Wheel Mouse",,sermouse
-none  = "No Mouse"
-
-[Map.Mouse]
-;<id> = <pnp id string>
-i8042ps2 = "MICROSOFT PS2 MOUSE"
-;msps2 = "MICROSOFT PS2 MOUSE"
-msser = "MICROSOFT SERIAL MOUSE"
-mswhs = "MICROSOFT MOUSE WITH WHEEL"
-none  = "NO MOUSE"
-
-
 [HiveInfs.Install]
 AddReg=hivecls.inf,AddReg
 AddReg=hivedef.inf,AddReg

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/blue/blue.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/blue/blue.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/blue/blue.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -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: branches/cache_manager_rewrite/reactos/drivers/dd/bootvid/bootvid.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/bootvid/bootvid.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/bootvid/bootvid.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -24,10 +24,9 @@
 /* INCLUDES ******************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ddk/ntbootvid.h>
-#include <ntos/ldrtypes.h>
-#include <ddk/ldrfuncs.h>
+#include <ndk/ldrfuncs.h>
 #include "bootvid.h"
+#include "ntbootvid.h"
 #include "resource.h"
 
 #define NDEBUG

Copied: branches/cache_manager_rewrite/reactos/drivers/dd/bootvid/ntbootvid.h (from rev 16330, trunk/reactos/drivers/dd/bootvid/ntbootvid.h)

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/circularbuffer.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/circularbuffer.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/circularbuffer.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/circularbuffer.c
  * PURPOSE:         Operations on a circular buffer
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/cleanup.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/cleanup.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/cleanup.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/cleanup.c
  * PURPOSE:         Serial IRP_MJ_CLEANUP operations
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/close.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/close.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/close.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/close.c
  * PURPOSE:         Serial IRP_MJ_CLOSE operations
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/create.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/create.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/create.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/create.c
  * PURPOSE:         Serial IRP_MJ_CREATE operations
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/devctrl.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/devctrl.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/devctrl.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/devctrl.c
  * PURPOSE:         Serial IRP_MJ_DEVICE_CONTROL operations
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 
 #define NDEBUG
@@ -196,12 +195,13 @@
 
 	RtlZeroMemory(pCommProp, sizeof(SERIAL_COMMPROP));
 
-	pCommProp->PacketLength = sizeof(SERIAL_COMMPROP);
+	if (!(pCommProp->ProvSpec1 & COMMPROP_INITIALIZED))
+		pCommProp->PacketLength = sizeof(SERIAL_COMMPROP);
 	pCommProp->PacketVersion = 2;
 	pCommProp->ServiceMask = SERIAL_SP_SERIALCOMM;
 	pCommProp->MaxTxQueue = pCommProp->CurrentTxQueue = DeviceExtension->OutputBuffer.Length - 1;
 	pCommProp->MaxRxQueue = pCommProp->CurrentRxQueue = DeviceExtension->InputBuffer.Length - 1;
-	pCommProp->ProvSubType = 1; // PST_RS232;
+	pCommProp->ProvSubType = PST_RS232;
 	pCommProp->ProvCapabilities = SERIAL_PCF_DTRDSR | SERIAL_PCF_INTTIMEOUTS | SERIAL_PCF_PARITY_CHECK
 		| SERIAL_PCF_RTSCTS | SERIAL_PCF_SETXCHAR | SERIAL_PCF_SPECIALCHARS | SERIAL_PCF_TOTALTIMEOUTS
 		| SERIAL_PCF_XONXOFF;
@@ -227,6 +227,8 @@
 	pCommProp->SettableStopParity = SERIAL_STOPBITS_10 | SERIAL_STOPBITS_15 | SERIAL_STOPBITS_20
 		| SERIAL_PARITY_NONE | SERIAL_PARITY_ODD | SERIAL_PARITY_EVEN | SERIAL_PARITY_MARK | SERIAL_PARITY_SPACE;
 
+	pCommProp->ProvSpec2 = 0; /* Size of provider-specific data */
+
 	return STATUS_SUCCESS;
 }
 

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/info.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/info.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/info.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/info.c
  * PURPOSE:         Serial IRP_MJ_QUERY_INFORMATION operations
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/legacy.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/legacy.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/legacy.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/bus/serial/legacy.c
  * PURPOSE:         Legacy serial port enumeration
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  *                  Mark Junker (mjscod@gmx.de)
  */
 

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/misc.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/misc.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/misc.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/misc.c
  * PURPOSE:         Misceallenous operations
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 /* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
 

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/pnp.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/pnp.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/pnp.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/pnp.c
  * PURPOSE:         Serial IRP_MJ_PNP operations
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 /* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
 

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/power.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/power.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/power.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/power.c
  * PURPOSE:         Serial IRP_MJ_POWER operations
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/rw.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/rw.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/rw.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial port driver
  * FILE:            drivers/dd/serial/create.c
  * PURPOSE:         Serial IRP_MJ_READ/IRP_MJ_WRITE operations
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/serial.c
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/serial.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/serial.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
  * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+ * PROJECT:         Serial driver
  * FILE:            drivers/dd/serial/serial.c
  * PURPOSE:         Serial driver loading/unloading
  *
- * PROGRAMMERS:     HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
  */
 
 //#define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/dd/serial/serial.h
--- branches/cache_manager_rewrite/reactos/drivers/dd/serial/serial.h	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/dd/serial/serial.h	2005-08-14 10:30:10 UTC (rev 17381)
@@ -1,47 +1,42 @@
-#if defined(__GNUC__)
-  #include <ddk/ntddk.h>
-  #include <ddk/ntddser.h>
-  #include <stdio.h>
+/*
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         Serial driver
+ * FILE:            drivers/dd/serial/serial.h
+ * PURPOSE:         Serial driver header
+ *
+ * PROGRAMMERS:     HervÚ Poussineau (hpoussin@reactos.com)
+ */
 
-  #include <debug.h>
+#include <ntddk.h>
+#include <ntddser.h>
+#include <stdio.h>
 
-  /* FIXME: these prototypes MUST NOT be here! */
-  NTSTATUS STDCALL
-  IoAttachDeviceToDeviceStackSafe(
-    IN PDEVICE_OBJECT SourceDevice,
-    IN PDEVICE_OBJECT TargetDevice,
-    OUT PDEVICE_OBJECT *AttachedToDeviceObject);
-
+#if defined(__GNUC__)
+  #include <debug.h>
 #elif defined(_MSC_VER)
-  #include <ntddk.h>
-  #include <ntddser.h>
-  #include <stdio.h>
-
   #define STDCALL
 
   #define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
   #define CHECKPOINT1 DbgPrint("(%s:%d)\n", __FILE__, __LINE__)
-
-  NTSTATUS STDCALL
-  IoAttachDeviceToDeviceStackSafe(
-    IN PDEVICE_OBJECT SourceDevice,
-    IN PDEVICE_OBJECT TargetDevice,
-    OUT PDEVICE_OBJECT *AttachedToDeviceObject);
-
-  #ifdef NDEBUG2
-    #define DPRINT
-    #define CHECKPOINT
-  #else
-    #define DPRINT DPRINT1
-    #define CHECKPOINT CHECKPOINT1
-    #undef NDEBUG
-  #endif
+  #define DPRINT
+  #define CHECKPOINT
 #else
   #error Unknown compiler!
 #endif
 
 #define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
 
+/* See winbase.h */
+#define PST_RS232 1
+#define COMMPROP_INITIALIZED 0xE73CF52E
+
+/* FIXME: I don't know why it is not defined anywhere... */
+NTSTATUS STDCALL
+IoAttachDeviceToDeviceStackSafe(
+  IN PDEVICE_OBJECT SourceDevice,
+  IN PDEVICE_OBJECT TargetDevice,
+  OUT PDEVICE_OBJECT *AttachedToDeviceObject);
+
 typedef enum
 {
   dsStopped,

Modified: branches/cache_manager_rewrite/reactos/drivers/fs/cdfs/fsctl.c
--- branches/cache_manager_rewrite/reactos/drivers/fs/cdfs/fsctl.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/fs/cdfs/fsctl.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -30,7 +30,6 @@
 
 #include <ddk/ntddk.h>
 #include <ntddcdrm.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>

Modified: branches/cache_manager_rewrite/reactos/drivers/fs/cdfs/rw.c
--- branches/cache_manager_rewrite/reactos/drivers/fs/cdfs/rw.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/fs/cdfs/rw.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -29,7 +29,6 @@
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>

Modified: branches/cache_manager_rewrite/reactos/drivers/fs/ms/create.c
--- branches/cache_manager_rewrite/reactos/drivers/fs/ms/create.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/fs/ms/create.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -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: branches/cache_manager_rewrite/reactos/drivers/fs/np/create.c
--- branches/cache_manager_rewrite/reactos/drivers/fs/np/create.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/fs/np/create.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -10,7 +10,7 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntifs.h>
-#include <ntos/fstypes.h> /* FIXME: NDK */
+#include <ndk/iotypes.h>
 #include "npfs.h"
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/fs/np/fsctrl.c
--- branches/cache_manager_rewrite/reactos/drivers/fs/np/fsctrl.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/fs/np/fsctrl.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -11,7 +11,6 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntifs.h>
-#include <napi/npipe.h>
 #include "npfs.h"
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/fs/ntfs/mft.c
--- branches/cache_manager_rewrite/reactos/drivers/fs/ntfs/mft.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/fs/ntfs/mft.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -29,7 +29,6 @@
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>

Modified: branches/cache_manager_rewrite/reactos/drivers/fs/ntfs/rw.c
--- branches/cache_manager_rewrite/reactos/drivers/fs/ntfs/rw.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/fs/ntfs/rw.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -29,7 +29,6 @@
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ntos/minmax.h>
 
 #define NDEBUG
 #include <debug.h>

Modified: branches/cache_manager_rewrite/reactos/drivers/lib/csq/csq.c
--- branches/cache_manager_rewrite/reactos/drivers/lib/csq/csq.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/lib/csq/csq.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -27,7 +27,7 @@
 
 #define __NTDRIVER__
 #include <ddk/ntddk.h>
-#include <ddk/csq.h>
+#include <ddk/ntifs.h>
 
 
 static VOID NTAPI IopCsqCancelRoutine(PDEVICE_OBJECT DeviceObject,

Copied: branches/cache_manager_rewrite/reactos/drivers/lib/csq/csq.h (from rev 16330, trunk/reactos/drivers/lib/csq/csq.h)

Modified: branches/cache_manager_rewrite/reactos/drivers/net/ndis/include/ndissys.h
--- branches/cache_manager_rewrite/reactos/drivers/net/ndis/include/ndissys.h	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/net/ndis/include/ndissys.h	2005-08-14 10:30:10 UTC (rev 17381)
@@ -19,12 +19,11 @@
 #include <ndis.h>
 #else /* _MSC_VER */
 #include <ddk/ntddk.h>
+#include <ddk/ntifs.h>
 #include <ddk/ndis.h>
 #include <ddk/xfilter.h>
 #include <ddk/afilter.h>
 typedef struct _ATM_ADDRESS *PATM_ADDRESS;
-/* FIXME: Get rid of this dependance. */
-#include <ddk/ntapi.h>
 #endif /* _MSC_VER */
 
 struct _ADAPTER_BINDING;

Modified: branches/cache_manager_rewrite/reactos/drivers/net/ndis/ndis/stubs.c
--- branches/cache_manager_rewrite/reactos/drivers/net/ndis/ndis/stubs.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/net/ndis/ndis/stubs.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -320,7 +320,7 @@
     NULL, // PLARGE_INTEGER AllocationSize
     0, // ULONG FileAttributes
     FILE_SHARE_READ, // ULONG ShareAccess
-    CREATE_NEW, // ULONG CreateDisposition
+    FILE_CREATE, // ULONG CreateDisposition
     FILE_SYNCHRONOUS_IO_NONALERT, // ULONG CreateOptions
     0, // PVOID EaBuffer
     0 ); // ULONG EaLength

Modified: branches/cache_manager_rewrite/reactos/drivers/storage/cdrom/cdrom.c
--- branches/cache_manager_rewrite/reactos/drivers/storage/cdrom/cdrom.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/storage/cdrom/cdrom.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -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: branches/cache_manager_rewrite/reactos/drivers/storage/diskdump/diskdump.c
--- branches/cache_manager_rewrite/reactos/drivers/storage/diskdump/diskdump.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/storage/diskdump/diskdump.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -32,9 +32,10 @@
 #include <ddk/ntdddisk.h>
 #include <ddk/ntddscsi.h>
 #include <ddk/class2.h>
+#include <ddk/core.h>
 
-#include <ndk/ntndk.h>
-#include <napi/core.h>
+#include <ndk/extypes.h>
+#include <ndk/rtlfuncs.h>
 #include "../scsiport/scsiport_int.h"
 
 #define NDEBUG

Modified: branches/cache_manager_rewrite/reactos/drivers/storage/scsiport/scsiport.c
--- branches/cache_manager_rewrite/reactos/drivers/storage/scsiport/scsiport.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/storage/scsiport/scsiport.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -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: branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbehci/usbehci.h
--- branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbehci/usbehci.h	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbehci/usbehci.h	2005-08-14 10:30:10 UTC (rev 17381)
@@ -26,7 +26,6 @@
 #include "stddef.h" 
 #include "windef.h"
 //#include <ddk/miniport.h>
-#include <ddk/ntapi.h>
 
 #ifdef DBG
 #define DPRINT(arg) DbgPrint arg;

Modified: branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbohci/usbohci.h
--- branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbohci/usbohci.h	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbohci/usbohci.h	2005-08-14 10:30:10 UTC (rev 17381)
@@ -26,7 +26,6 @@
 #include "stddef.h" 
 #include "windef.h"
 //#include <ddk/miniport.h>
-#include <ddk/ntapi.h>
 
 #ifdef DBG
 #define DPRINT(arg) DbgPrint arg;

Modified: branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbuhci/usbuhci.h
--- branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbuhci/usbuhci.h	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/usb/miniport/usbuhci/usbuhci.h	2005-08-14 10:30:10 UTC (rev 17381)
@@ -26,7 +26,6 @@
 #include "stddef.h" 
 #include "windef.h"
 //#include <ddk/miniport.h>
-#include <ddk/ntapi.h>
 
 // Export funcs here
 /*

Modified: branches/cache_manager_rewrite/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c
--- branches/cache_manager_rewrite/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -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: branches/cache_manager_rewrite/reactos/drivers/video/miniport/vbe/vbemp.h
--- branches/cache_manager_rewrite/reactos/drivers/video/miniport/vbe/vbemp.h	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/video/miniport/vbe/vbemp.h	2005-08-14 10:30:10 UTC (rev 17381)
@@ -27,7 +27,6 @@
 #include <ddk/miniport.h>
 #include <ddk/video.h>
 #include <ddk/ntddvdeo.h>
-#include <ddk/ntapi.h>
 
 /*
  * Compile-time define to get VBE 1.2 support. The implementation

Modified: branches/cache_manager_rewrite/reactos/drivers/video/miniport/xboxvmp/xboxvmp.c
--- branches/cache_manager_rewrite/reactos/drivers/video/miniport/xboxvmp/xboxvmp.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/video/miniport/xboxvmp/xboxvmp.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -366,7 +366,7 @@
                                           sizeof(SYSTEM_BASIC_INFORMATION),
                                           &Length)))
     {
-      FrameBuffer.u.LowPart = BasicInfo.HighestPhysicalPage * PAGE_SIZE;
+      FrameBuffer.u.LowPart = BasicInfo.HighestPhysicalPageNumber * PAGE_SIZE;
     }
   else
     {

Modified: branches/cache_manager_rewrite/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h
--- branches/cache_manager_rewrite/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h	2005-08-14 10:30:10 UTC (rev 17381)
@@ -28,7 +28,7 @@
 #include <ddk/miniport.h>
 #include <ddk/video.h>
 #include <ddk/ntddvdeo.h>
-#include <ddk/ntapi.h>
+#include <ndk/ntndk.h>
 
 #define NDEBUG
 #include <debug.h>
Property changes on: branches/cache_manager_rewrite/reactos/drivers/video/videoprt
___________________________________________________________________
Name: svn:ignore
   - videoprt.coff
*.o
*.a
*.sym
*.sys
*.map
.*.d
makefile
   + videoprt.coff
*.o
*.a
*.sym
*.sys
*.map
.*.d
makefile
*.gch

Modified: branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.c
--- branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -65,7 +65,7 @@
    IN PVOID HwDeviceExtension,
    IN PUCHAR FunctionName)
 {
-   SYSTEM_LOAD_IMAGE GdiDriverInfo;
+   SYSTEM_GDI_DRIVER_INFORMATION GdiDriverInfo;
    PVOID BaseAddress;
    PIMAGE_EXPORT_DIRECTORY ExportDir;
    PUSHORT OrdinalPtr;
@@ -76,18 +76,18 @@
 
    DPRINT("VideoPortGetProcAddress(%s)\n", FunctionName);
 
-   RtlInitUnicodeString(&GdiDriverInfo.ModuleName, L"videoprt");
+   RtlInitUnicodeString(&GdiDriverInfo.DriverName, L"videoprt");
    Status = ZwSetSystemInformation(
-      SystemLoadImage,
+      SystemLoadGdiDriverInformation,
       &GdiDriverInfo,
-      sizeof(SYSTEM_LOAD_IMAGE));
+      sizeof(SYSTEM_GDI_DRIVER_INFORMATION));
    if (!NT_SUCCESS(Status))
    {
       DPRINT("Couldn't get our own module handle?\n");
       return NULL;
    }
 
-   BaseAddress = GdiDriverInfo.ModuleBase;
+   BaseAddress = GdiDriverInfo.ImageAddress;
 
    /* Get the pointer to the export directory */
    ExportDir = (PIMAGE_EXPORT_DIRECTORY)IntVideoPortImageDirectoryEntryToData(
@@ -359,7 +359,7 @@
    {
       ConfigInfo.SystemMemorySize =
          SystemBasicInfo.NumberOfPhysicalPages *
-         SystemBasicInfo.PhysicalPageSize;
+         SystemBasicInfo.PageSize;
    }
 
    /*

Modified: branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.h
--- branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.h	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.h	2005-08-14 10:30:10 UTC (rev 17381)
@@ -28,29 +28,14 @@
 #include <ddk/miniport.h>
 #include <ddk/video.h>
 #include <ddk/ntddvdeo.h>
-#include <ddk/ntapi.h>
 #include <ddk/ntagp.h>
-/* For process attaching functions */
 #include <ddk/ntifs.h>
+#include <ndk/ntndk.h>
+#include <reactos/helper.h>
+
 #define NDEBUG
 #include <debug.h>
 
-#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
-
-int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
-int vsprintf(char *buf, const char *fmt, va_list args);
-
-BOOLEAN STDCALL
-HalDisableSystemInterrupt(ULONG Vector,
-  KIRQL Irql);
-
-BOOLEAN STDCALL
-HalEnableSystemInterrupt(ULONG Vector,
-  KIRQL Irql,
-  KINTERRUPT_MODE InterruptMode);
-
-PIMAGE_NT_HEADERS STDCALL RtlImageNtHeader(IN PVOID BaseAddress);
-
 #define TAG_VIDEO_PORT  TAG('V', 'I', 'D', 'P')
 
 typedef struct _VIDEO_PORT_ADDRESS_MAPPING

Modified: branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.xml
--- branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.xml	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/drivers/video/videoprt/videoprt.xml	2005-08-14 10:30:10 UTC (rev 17381)
@@ -5,6 +5,7 @@
 	<define name="__USE_W32API" />
 	<library>ntoskrnl</library>
 	<library>hal</library>
+    <pch>videoprt.h</pch>
 	<file>agp.c</file>
 	<file>ddc.c</file>
 	<file>dispatch.c</file>

Modified: branches/cache_manager_rewrite/reactos/hal/halx86/generic/adapter.c
--- branches/cache_manager_rewrite/reactos/hal/halx86/generic/adapter.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/hal/halx86/generic/adapter.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -17,10 +17,6 @@
 #define NDEBUG
 #include <debug.h>
 
-/* Hmm, needed for KDBG := 1. Why? */
-extern POBJECT_TYPE IMPORTED IoAdapterObjectType;
-#undef KeGetCurrentIrql
-
 /* FUNCTIONS *****************************************************************/
 
 /* NOTE: IoAllocateAdapterChannel in NTOSKRNL.EXE */

Modified: branches/cache_manager_rewrite/reactos/hal/halx86/generic/generic.xml
--- branches/cache_manager_rewrite/reactos/hal/halx86/generic/generic.xml	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/hal/halx86/generic/generic.xml	2005-08-14 10:30:10 UTC (rev 17381)
@@ -24,6 +24,7 @@
 	<file>sysinfo.c</file>
 	<file>time.c</file>
 	<file>timer.c</file>
+    <pch>../include/hal.h</pch>
 </module>
 <module name="hal_generic_up" type="objectlibrary">
 	<include base="hal_generic_up">../include</include>

Modified: branches/cache_manager_rewrite/reactos/hal/halx86/generic/reboot.c
--- branches/cache_manager_rewrite/reactos/hal/halx86/generic/reboot.c	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/hal/halx86/generic/reboot.c	2005-08-14 10:30:10 UTC (rev 17381)
@@ -54,7 +54,7 @@
 
 VOID STDCALL
 HalReturnToFirmware (
-	ULONG	Action
+	FIRMWARE_REENTRY	Action
 	)
 {
     if (Action == HalHaltRoutine)

Modified: branches/cache_manager_rewrite/reactos/hal/halx86/include/hal.h
--- branches/cache_manager_rewrite/reactos/hal/halx86/include/hal.h	2005-08-14 09:14:53 UTC (rev 17380)
+++ branches/cache_manager_rewrite/reactos/hal/halx86/include/hal.h	2005-08-14 10:30:10 UTC (rev 17381)
@@ -8,48 +8,25 @@
 
 /* INCLUDES ******************************************************************/
 
-/* SDK/DDK/NDK Headers. */
+/* IFS/DDK/NDK Headers */
 #include <ddk/ntddk.h>
-#include <stdio.h>
+#include <ddk/ntifs.h>
+#include <ndk/ntndk.h>
 
-/* FIXME: NDK Headers */
-#include <roskrnl.h>
-
 /* Internal Kernel Headers */
 //#include <internal/mm.h>
 #include <internal/ke.h>
-#include <internal/i386/ps.h>
 
-#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
+#define KPCR_BASE 0xFF000000 // HACK!
 
-//Temporary hack below.
+//Temporary hack below until ntoskrnl is on NDK
 PVOID STDCALL
 MmAllocateContiguousAlignedMemory(IN ULONG NumberOfBytes,
-					  IN PHYSICAL_ADDRESS LowestAcceptableAddress,
-			          IN PHYSICAL_ADDRESS HighestAcceptableAddress,
-			          IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL,
-			          IN MEMORY_CACHING_TYPE CacheType OPTIONAL,
-					  IN ULONG Alignment);
-                      
-/* FIXME: NDK */
-VOID STDCALL KeEnterKernelDebugger (VOID);
-VOID FASTCALL KiAcquireSpinLock(PKSPIN_LOCK SpinLock);
-VOID FASTCALL KiReleaseSpinLock(PKSPIN_LOCK SpinLock);
-VOID STDCALL KiDispatchInterrupt(VOID);
-NTSTATUS
-STDCALL
-ObCreateObject (
-    IN KPROCESSOR_MODE      ObjectAttributesAccessMode OPTIONAL,
-    IN POBJECT_TYPE         ObjectType,
-    IN POBJECT_ATTRIBUTES   ObjectAttributes OPTIONAL,
-    IN KPROCESSOR_MODE      AccessMode,
-    IN OUT PVOID            ParseContext OPTIONAL,
-    IN ULONG                ObjectSize,
-    IN ULONG                PagedPoolCharge OPTIONAL,
-    IN ULONG                NonPagedPoolCharge OPTIONAL,
-    OUT PVOID               *Object
-);
-
+				  IN PHYSICAL_ADDRESS LowestAcceptableAddress,
+				  IN PHYSICAL_ADDRESS HighestAcceptableAddress,
[truncated at 1000 lines; 71946 more skipped]