Fix kdbg build and some more header cleanups: add csq.q to ntifs, since it's now fully documented by MS (kept vizzini's comments though), moved af_irda to w32api because it's part of PSDK, moved ntbootvid.h to bootvid directory, removed ldrfuncs.h and add ndk's ldrfuncs.h to umode ndk (it was missing)
Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c
Added: trunk/reactos/drivers/dd/bootvid/ntbootvid.h
Modified: trunk/reactos/drivers/lib/csq/csq.c
Added: trunk/reactos/drivers/lib/csq/csq.h
Deleted: trunk/reactos/include/ddk/af_irda.h
Deleted: trunk/reactos/include/ddk/csq.h
Deleted: trunk/reactos/include/ddk/ldrfuncs.h
Deleted: trunk/reactos/include/ddk/ntbootvid.h
Modified: trunk/reactos/include/ndk/ldrfuncs.h
Modified: trunk/reactos/include/ndk/ntndk.h
Modified: trunk/reactos/lib/kernel32/misc/res.c
Modified: trunk/reactos/lib/ntdll/rtl/message.c
Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/kdbg/i386/kdb_help.S
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_cli.c
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_expr.c
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_string.c
Added: trunk/reactos/w32api/include/af_irda.h
Added: trunk/reactos/w32api/include/ddk/csq.h
Modified: trunk/reactos/w32api/include/ddk/ntifs.h

Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c
--- trunk/reactos/drivers/dd/bootvid/bootvid.c	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/drivers/dd/bootvid/bootvid.c	2005-06-26 19:29:12 UTC (rev 16298)
@@ -24,9 +24,9 @@
 /* INCLUDES ******************************************************************/
 
 #include <ddk/ntddk.h>
-#include <ddk/ntbootvid.h>
 #include <ndk/ldrfuncs.h>
 #include "bootvid.h"
+#include "ntbootvid.h"
 #include "resource.h"
 
 #define NDEBUG

Copied: trunk/reactos/drivers/dd/bootvid/ntbootvid.h (from rev 16273, trunk/reactos/include/ddk/ntbootvid.h)
--- trunk/reactos/include/ddk/ntbootvid.h	2005-06-26 01:12:21 UTC (rev 16273)
+++ trunk/reactos/drivers/dd/bootvid/ntbootvid.h	2005-06-26 19:29:12 UTC (rev 16298)
@@ -0,0 +1,13 @@
+
+/* FIXME: Bootvid will eventually become a DLL and this will be deprecated */
+#define FILE_DEVICE_BOOTVID 53335
+
+#define IOCTL_BOOTVID_INITIALIZE \
+  CTL_CODE(FILE_DEVICE_BOOTVID, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_BOOTVID_CLEANUP \
+  CTL_CODE(FILE_DEVICE_BOOTVID, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+typedef struct
+{
+  BOOL (STDCALL *ResetDisplay)(VOID);
+} NTBOOTVID_FUNCTION_TABLE;

Modified: trunk/reactos/drivers/lib/csq/csq.c
--- trunk/reactos/drivers/lib/csq/csq.c	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/drivers/lib/csq/csq.c	2005-06-26 19:29:12 UTC (rev 16298)
@@ -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: trunk/reactos/drivers/lib/csq/csq.h (from rev 16273, trunk/reactos/include/ddk/csq.h)

Deleted: trunk/reactos/include/ddk/af_irda.h
--- trunk/reactos/include/ddk/af_irda.h	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/include/ddk/af_irda.h	2005-06-26 19:29:12 UTC (rev 16298)
@@ -1,221 +0,0 @@
-/*
- * af_irda.h
- *
- * IrDa ports interface
- *
- * This file is part of the MinGW package.
- *
- * Contributors:
- *   Created by Robert Dickenson <robd@users.sourceforge.net>
- *
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __AF_IRDA_H
-#define __AF_IRDA_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#pragma pack(push,4)
-
-
-/* GUIDs */
-
-#ifdef DEFINE_GUID
-DEFINE_GUID(GUID_DEVINTERFACE_IRDAPORT,
-  0x86e0d1e0L, 0x8089, 0x11d0, 0x9c, 0xe4, 0x08, 0x00, 0x3e, 0x30, 0x1f, 0x74);
-DEFINE_GUID(GUID_DEVINTERFACE_IRDAENUM_BUS_ENUMERATOR,
-  0x4D36E978L, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x19);
-#endif /* DEFINE_GUID */
-
-#define WINDOWS_AF_IRDA 26
-#define WINDOWS_PF_IRDA WINDOWS_AF_IRDA
-
-#ifndef AF_IRDA
-#define AF_IRDA WINDOWS_AF_IRDA
-#endif
-
-#define IRDA_PROTO_SOCK_STREAM 1
-#define PF_IRDA AF_IRDA
-#define SOL_IRLMP 0x00FF
-#define SIO_LAZY_DISCOVERY _IOR('t', 127, ULONG)   
-
-
-#define IAS_MAX_USER_STRING  256
-#define IAS_MAX_OCTET_STRING 1024
-#define IAS_MAX_CLASSNAME    64
-#define IAS_MAX_ATTRIBNAME   256
-
-#define IAS_ATTRIB_NO_CLASS  ((ULONG)0x10)
-#define IAS_ATTRIB_NO_ATTRIB ((ULONG)0x00)
-#define IAS_ATTRIB_INT       ((ULONG)0x01)
-#define IAS_ATTRIB_OCTETSEQ  ((ULONG)0x02)
-#define IAS_ATTRIB_STR       ((ULONG)0x03)
-
-#define IRLMP_ENUMDEVICES    ((ULONG)0x10)
-#define IRLMP_IAS_SET        ((ULONG)0x11)
-#define IRLMP_IAS_QUERY      ((ULONG)0x12)
-#define IRLMP_SEND_PDU_LEN   ((ULONG)0x13)
-#define IRLMP_EXCLUSIVE_MODE ((ULONG)0x14)
-#define IRLMP_IRLPT_MODE     ((ULONG)0x15)
-#define IRLMP_9WIRE_MODE     ((ULONG)0x16)
-
-#if 0
-/* Available/Used on Windows 98 only ??? */
-#define IRLMP_TINYTP_MODE    ((ULONG)0x17)
-#define IRLMP_PARAMETERS     ((ULONG)0x18)
-#define IRLMP_DISCOVERY_MODE ((ULONG)0x19)
-/* Available/Used on Windows CE only ??? */
-#define IRLMP_SHARP_MODE     ((ULONG)0x20)
-#endif
-
-enum {
-/* First hint byte */
-  LM_HB1_PnP =         0x01,
-  LM_HB1_PDA_Palmtop = 0x02,
-  LM_HB1_Computer =    0x04,
-  LM_HB1_Printer =     0x08,
-  LM_HB1_Modem =       0x10,
-  LM_HB1_Fax =         0x20,
-  LM_HB1_LANAccess =   0x40,
-/* Second hint byte */
-  LM_HB2_Telephony =   0x01,
-  LM_HB2_FileServer =  0x02,
-/* Any hint byte */
-  LM_HB_Extension =    0x80,
-};
-
-#define LmCharSetASCII       0x00
-#define LmCharSetISO_8859_1  0x01
-#define LmCharSetISO_8859_2  0x02
-#define LmCharSetISO_8859_3  0x03
-#define LmCharSetISO_8859_4  0x04
-#define LmCharSetISO_8859_5  0x05
-#define LmCharSetISO_8859_6  0x06
-#define LmCharSetISO_8859_7  0x07
-#define LmCharSetISO_8859_8  0x08
-#define LmCharSetISO_8859_9  0x09
-#define LmCharSetUNICODE     0xFF
-
-#define  LM_BAUD_1200   1200
-#define  LM_BAUD_2400   2400
-#define  LM_BAUD_9600   9600
-#define  LM_BAUD_19200  19200
-#define  LM_BAUD_38400  38400
-#define  LM_BAUD_57600  57600
-#define  LM_BAUD_115200 115200
-#define  LM_BAUD_576K   576000
-#define  LM_BAUD_1152K  1152000
-#define  LM_BAUD_4M     4000000
-
-#if 0 /* Available/Used on Windows 98 only ??? */
-typedef ULONG LM_BAUD_RATE;
-typedef struct {
-    ULONG        nTXDataBytes;  /* packet transmit receive bytes */
-    ULONG        nRXDataBytes;  /* packet maximum receive bytes */
-    LM_BAUD_RATE nBaudRate;     /* link negotiated baud */
-    ULONG        thresholdTime; /* milliseconds for threshold time */
-    ULONG        discTime;      /* milliseconds for disconnect time
-    USHORT       nMSLinkTurn;   /* milliseconds for link turn around time */
-    UCHAR        nTXPackets;    /* transmit window packets */
-    UCHAR        nRXPackets;    /* receive window packets */
-} LM_IRPARMS;
-typedef LM_IRPARMS *PLM_IRPARMS;
-#endif
-
-typedef struct _SOCKADDR_IRDA {
-    USHORT irdaAddressFamily;
-    UCHAR  irdaDeviceID[4];
-    char   irdaServiceName[25];
-} SOCKADDR_IRDA;
-
-typedef struct _WINDOWS_IRDA_DEVICE_INFO {
-    UCHAR irdaDeviceID[4];
-    char  irdaDeviceName[22];
-    UCHAR irdaDeviceHints1;
-    UCHAR irdaDeviceHints2;
-    UCHAR irdaCharSet;
-} WINDOWS_IRDA_DEVICE_INFO;
-
-typedef struct _WINDOWS_IAS_SET {
-    char  irdaClassName[IAS_MAX_CLASSNAME];
-    char  irdaAttribName[IAS_MAX_ATTRIBNAME];
-    ULONG irdaAttribType;
-    union {
-        LONG irdaAttribInt;
-        struct {
-            USHORT Len;
-            UCHAR OctetSeq[IAS_MAX_OCTET_STRING];
-        } irdaAttribOctetSeq;
-        struct {
-            UCHAR Len;
-            UCHAR CharSet;
-            UCHAR UsrStr[IAS_MAX_USER_STRING];
-        } irdaAttribUsrStr;
-    } irdaAttribute;
-} WINDOWS_IAS_SET;
-
-typedef struct _WINDOWS_IAS_QUERY {
-    UCHAR irdaDeviceID[4];
-    char  irdaClassName[IAS_MAX_CLASSNAME];
-    char  irdaAttribName[IAS_MAX_ATTRIBNAME];
-    ULONG irdaAttribType;
-    union {
-        LONG irdaAttribInt;
-        struct {
-            ULONG Len;
-            UCHAR OctetSeq[IAS_MAX_OCTET_STRING];
-        } irdaAttribOctetSeq;
-        struct {
-            ULONG Len;
-            ULONG CharSet;
-            UCHAR UsrStr[IAS_MAX_USER_STRING];
-        } irdaAttribUsrStr;
-    } irdaAttribute;
-} WINDOWS_IAS_QUERY;
-
-typedef struct _WINDOWS_DEVICELIST {
-    ULONG numDevice;
-    WINDOWS_IRDA_DEVICE_INFO Device[1];
-} WINDOWS_DEVICELIST;
-
-typedef WINDOWS_DEVICELIST DEVICELIST;
-typedef WINDOWS_DEVICELIST *PDEVICELIST;
-typedef WINDOWS_DEVICELIST *PWINDOWS_DEVICELIST;
-
-typedef WINDOWS_IRDA_DEVICE_INFO IRDA_DEVICE_INFO;
-typedef WINDOWS_IRDA_DEVICE_INFO *PIRDA_DEVICE_INFO;
-typedef WINDOWS_IRDA_DEVICE_INFO *PWINDOWS_IRDA_DEVICE_INFO;
-
-typedef WINDOWS_IAS_SET IAS_SET;
-typedef WINDOWS_IAS_SET *PIAS_SET;
-typedef WINDOWS_IAS_SET *PWINDOWS_IAS_SET;
-
-typedef WINDOWS_IAS_QUERY IAS_QUERY;
-typedef WINDOWS_IAS_QUERY *PIAS_QUERY;
-typedef WINDOWS_IAS_QUERY *PWINDOWS_IAS_QUERY;
-
-typedef SOCKADDR_IRDA *PSOCKADDR_IRDA;
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __AF_IRDA_H */

Deleted: trunk/reactos/include/ddk/csq.h
--- trunk/reactos/include/ddk/csq.h	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/include/ddk/csq.h	2005-06-26 19:29:12 UTC (rev 16298)
@@ -1,289 +0,0 @@
-/*
- * Cancel-Safe Queue Library
- * Copyright (c) 2004, Vizzini (vizzini@plasmic.com)
- * Licensed under the GNU GPL for the ReactOS project
- *
- * This header defines the interface to the ReactOS Cancel-Safe Queue library.
- * This interface is based on and is similar to the Microsoft Cancel-Safe
- * Queue interface.
- *
- * BACKGROUND
- *
- * IRP queuing is a royal pain in the butt, due to the fact that there are
- * tons of built-in race conditions.  IRP handling is difficult in general,
- * but the cancel logic has been particularly complicated due to some subtle
- * races, coupled with the fact that the system interfaces have changed over
- * time.
- *
- * Walter Oney (2nd. Ed. of Programming the Windows Driver Model) states a
- * common opinion among driver developers when he says that it is foolish
- * to try to roll your own cancel logic.  There are only a very few people
- * who have gotten it right in the past.  He suggests, instead, that you
- * either use his own well-tested code, or use the code in the Microsoft
- * Cancel-Safe Queue Library.
- *
- * We cannot do either, of course, due to copyright issues.  I have therefore
- * created this clone of the Microsoft library in order to concentrate all
- * of the IRP-queuing bugs in one place.  I'm quite sure there are problems
- * here, so if you are a driver writer, I'd be glad to hear your feedback.
- *
- * Apart from that, please try to use these routines, rather than building
- * your own.  If you think you have found a bug, please bring it up with me
- * or on-list, as this is complicated and non-obvious stuff.  Don't just
- * change this and hope for the best!
- *
- * USAGE
- *
- * This library follows exactly the same interface as the Microsoft Cancel-Safe
- * Queue routines (IoCsqXxx()).  As such, the authoritative reference is the
- * current DDK.  There is also a DDK sample called "cancel" that has an
- * example of how to use this code.  I have also provided a sample driver
- * that makes use of this queue. Finally, please do read the header and the
- * source if you're curious about the inner workings of these routines.
- */
-
-#ifndef _REACTOS_CSQ_H
-#define _REACTOS_CSQ_H
-
-/*
- * Prevent including the CSQ definitions twice. They're present in NTDDK
- * now too, except the *_EX versions.
- */
-#ifndef IO_TYPE_CSQ_IRP_CONTEXT
-
-struct _IO_CSQ;
-
-
-/*
- * CSQ Callbacks
- *
- * The cancel-safe queue is implemented as a set of IoCsqXxx() OS routines
- * copuled with a set of driver callbacks to handle the basic operations of
- * the queue.  You need to supply one of each of these functions in your own
- * driver.  These routines are also documented in the DDK under CsqXxx().
- * That is the authoritative documentation.
- */
-
-/*
- * Function to insert an IRP in the queue.  No need to worry about locking;
- * just tack it onto your list or something.
- *
- * Sample implementation: 
- *
-	VOID NTAPI CsqInsertIrp(PIO_CSQ Csq, PIRP Irp)
-	{
-		KdPrint(("Inserting IRP 0x%x into CSQ\n", Irp));
-		InsertTailList(&IrpQueue, &Irp->Tail.Overlay.ListEntry);
-	}
- *
- */
-typedef VOID (NTAPI *PIO_CSQ_INSERT_IRP) (struct _IO_CSQ *Csq,
-                                          PIRP Irp);
-
-
-/*
- * Function to remove an IRP from the queue.
- *
- * Sample:
- *
-	VOID NTAPI CsqRemoveIrp(PIO_CSQ Csq, PIRP Irp)
-	{
-		KdPrint(("Removing IRP 0x%x from CSQ\n", Irp));
-		RemoveEntryList(&Irp->Tail.Overlay.ListEntry);
-	}
- *
- */
-typedef VOID (NTAPI *PIO_CSQ_REMOVE_IRP) (struct _IO_CSQ *Csq,
-                                          PIRP Irp);
-
-/*
- * Function to look for an IRP in the queue
- *
- * Sample:
- *
-	PIRP NTAPI CsqPeekNextIrp(PIO_CSQ Csq, PIRP Irp, PVOID PeekContext)
-	{
-		KdPrint(("Peeking for next IRP\n"));
-
-		if(Irp)
-			return CONTAINING_RECORD(&Irp->Tail.Overlay.ListEntry.Flink, IRP, Tail.Overlay.ListEntry);
-
-		if(IsListEmpty(&IrpQueue))
-			return NULL;
-
-		return CONTAINING_RECORD(IrpQueue.Flink, IRP, Tail.Overlay.ListEntry);
-	}
- *
- */
-typedef PIRP (NTAPI *PIO_CSQ_PEEK_NEXT_IRP) (struct _IO_CSQ *Csq,
-                                             PIRP Irp,
-                                             PVOID PeekContext);
-
-/*
- * Lock the queue.  This can be a spinlock, a mutex, or whatever
- * else floats your boat.
- *
- * Sample:
- *
-	VOID NTAPI CsqAcquireLock(PIO_CSQ Csq, PKIRQL Irql)
-	{
-		KdPrint(("Acquiring spin lock\n"));
-		KeAcquireSpinLock(&IrpQueueLock, Irql);
-	}
- *
- */
-typedef VOID (NTAPI *PIO_CSQ_ACQUIRE_LOCK) (struct _IO_CSQ *Csq,
-                                            PKIRQL Irql);
-
-/*
- * Unlock the queue:
- *
-	VOID NTAPI CsqReleaseLock(PIO_CSQ Csq, KIRQL Irql)
-	{
-		KdPrint(("Releasing spin lock\n"));
-		KeReleaseSpinLock(&IrpQueueLock, Irql);
-	}
- *
- */
-typedef VOID (NTAPI *PIO_CSQ_RELEASE_LOCK) (struct _IO_CSQ *Csq,
-                                            KIRQL Irql);
-
-/*
- * Finally, this is called by the queue library when it wants to complete
- * a canceled IRP.
- * 
- * Sample:
- *
-	VOID NTAPI CsqCompleteCancelledIrp(PIO_CSQ Csq, PIRP Irp)
-	{
-		KdPrint(("cancelling irp 0x%x\n", Irp));
-		Irp->IoStatus.Status = STATUS_CANCELLED;
-		Irp->IoStatus.Information = 0;
-		IoCompleteRequest(Irp, IO_NO_INCREMENT);
-	}
- *
- */
-typedef VOID (NTAPI *PIO_CSQ_COMPLETE_CANCELED_IRP) (struct _IO_CSQ *Csq,
-                                                     PIRP Irp);
-
-
-/*
- * STRUCTURES
- *
- * NOTE:  Please do not use these directly.  You will make incompatible code
- * if you do.  Always only use the documented IoCsqXxx() interfaces and you
- * will amass much Good Karma.
- */
-#define IO_TYPE_CSQ_IRP_CONTEXT 1
-#define IO_TYPE_CSQ 2
-
-/*
- * IO_CSQ - Queue control structure
- */
-typedef struct _IO_CSQ {
-	ULONG                          Type;
-	PIO_CSQ_INSERT_IRP             CsqInsertIrp;
-	PIO_CSQ_REMOVE_IRP             CsqRemoveIrp;
-	PIO_CSQ_PEEK_NEXT_IRP          CsqPeekNextIrp;
-	PIO_CSQ_ACQUIRE_LOCK           CsqAcquireLock;
-	PIO_CSQ_RELEASE_LOCK           CsqReleaseLock;
-	PIO_CSQ_COMPLETE_CANCELED_IRP  CsqCompleteCanceledIrp;
-	PVOID                          ReservePointer;	/* must be NULL */
-} IO_CSQ, *PIO_CSQ;
-
-/*
- * IO_CSQ_IRP_CONTEXT - Context used to track an IRP in the CSQ
- */
-typedef struct _IO_CSQ_IRP_CONTEXT {
-	ULONG   Type;
-	PIRP    Irp;
-	PIO_CSQ Csq;
-} IO_CSQ_IRP_CONTEXT, *PIO_CSQ_IRP_CONTEXT;
-
-#endif /* IO_TYPE_CSQ_IRP_CONTEXT */
-
-/* See IO_TYPE_CSQ_* above */
-#define IO_TYPE_CSQ_EX 3
-
-/*
- * Function to insert an IRP into the queue with extended context information.
- * This is useful if you need to be able to de-queue particular IRPs more
- * easily in some cases.
- *
- * Same deal as above; sample implementation:
- *
-	NTSTATUS NTAPI CsqInsertIrpEx(PIO_CSQ Csq, PIRP Irp, PVOID InsertContext)
-	{
-		CsqInsertIrp(Csq, Irp);
-		return STATUS_PENDING;
-	}
- *
- */
-typedef NTSTATUS (NTAPI *PIO_CSQ_INSERT_IRP_EX) (struct _IO_CSQ *Csq,
-                                                 PIRP Irp,
-                                                 PVOID InsertContext);
-
-/*
- * CANCEL-SAFE QUEUE DDIs
- *
- * These device driver interfaces are called to make use of the queue.  Again,
- * authoritative documentation for these functions is in the DDK.  The csqtest
- * driver also makes use of some of them.
- */
-
-
-/*
- * Call this in DriverEntry or similar in order to set up the Csq structure.
- * As long as the Csq struct and the functions you pass in are resident,
- * there are no IRQL restrictions.
- */
-NTSTATUS NTAPI IoCsqInitialize(PIO_CSQ Csq,
-                               PIO_CSQ_INSERT_IRP CsqInsertIrp,
-                               PIO_CSQ_REMOVE_IRP CsqRemoveIrp,
-                               PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp,
-                               PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock,
-                               PIO_CSQ_RELEASE_LOCK CsqReleaseLock,
-                               PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp);
-
-/*
- * Same as above, except you provide a CsqInsertIrpEx routine instead of
- * CsqInsertIrp.  This eventually allows you to supply extra tracking
- * information for use with the queue.
- */
-NTSTATUS NTAPI IoCsqInitializeEx(PIO_CSQ Csq,
-                                 PIO_CSQ_INSERT_IRP_EX CsqInsertIrpEx,
-                                 PIO_CSQ_REMOVE_IRP CsqRemoveIrp,
-                                 PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp,
-                                 PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock,
-                                 PIO_CSQ_RELEASE_LOCK CsqReleaseLock,
-                                 PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp);
-
-/*
- * Insert an IRP into the queue
- */
-VOID NTAPI IoCsqInsertIrp(PIO_CSQ Csq,
-                          PIRP Irp,
-                          PIO_CSQ_IRP_CONTEXT Context);
-
-/*
- * Insert an IRP into the queue, with special context maintained that
- * makes it easy to find IRPs in the queue
- */
-NTSTATUS NTAPI IoCsqInsertIrpEx(PIO_CSQ Csq,
-                                PIRP Irp,
-                                PIO_CSQ_IRP_CONTEXT Context,
-                                PVOID InsertContext);
-
-/*
- * Remove a particular IRP from the queue
- */
-PIRP NTAPI IoCsqRemoveIrp(PIO_CSQ Csq,
-                          PIO_CSQ_IRP_CONTEXT Context);
-
-/*
- * Remove the next IRP from the queue 
- */
-PIRP NTAPI IoCsqRemoveNextIrp(PIO_CSQ Csq,
-                              PVOID PeekContext);
-
-#endif /* _REACTOS_CSQ_H */

Deleted: trunk/reactos/include/ddk/ldrfuncs.h
--- trunk/reactos/include/ddk/ldrfuncs.h	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/include/ddk/ldrfuncs.h	2005-06-26 19:29:12 UTC (rev 16298)
@@ -1,30 +0,0 @@
-#ifndef __INCLUDE_DDK_LDRFUNCS_H
-#define __INCLUDE_DDK_LDRFUNCS_H
-/* $Id$ */
-
-NTSTATUS STDCALL
-LdrAccessResource(IN  PVOID BaseAddress,
-                  IN  PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry,
-                  OUT PVOID *Resource OPTIONAL,
-                  OUT PULONG Size OPTIONAL);
-
-NTSTATUS STDCALL
-LdrFindResource_U(IN  PVOID BaseAddress,
-                  IN  PLDR_RESOURCE_INFO ResourceInfo,
-                  IN  ULONG Level,
-                  OUT PIMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry);
-
-NTSTATUS STDCALL 
-LdrFindResourceDirectory_U(	IN PVOID   						BaseAddress,
-                     IN PLDR_RESOURCE_INFO  ResourceInfo,
-							IN  ULONG						Level,
-							OUT PIMAGE_RESOURCE_DIRECTORY	*ResourceDirectory);
-
-NTSTATUS STDCALL
-LdrEnumResources(IN PVOID						BaseAddress,
-				 IN PLDR_RESOURCE_INFO			ResourceInfo,
-				 IN  ULONG						Level,
-				 IN OUT PULONG					ResourceCount,
-				 OUT PVOID						Resources  OPTIONAL);
-
-#endif /* __INCLUDE_DDK_LDRFUNCS_H */

Deleted: trunk/reactos/include/ddk/ntbootvid.h
--- trunk/reactos/include/ddk/ntbootvid.h	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/include/ddk/ntbootvid.h	2005-06-26 19:29:12 UTC (rev 16298)
@@ -1,11 +0,0 @@
-#define FILE_DEVICE_BOOTVID 53335
-
-#define IOCTL_BOOTVID_INITIALIZE \
-  CTL_CODE(FILE_DEVICE_BOOTVID, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_BOOTVID_CLEANUP \
-  CTL_CODE(FILE_DEVICE_BOOTVID, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-typedef struct
-{
-  BOOL (STDCALL *ResetDisplay)(VOID);
-} NTBOOTVID_FUNCTION_TABLE;

Modified: trunk/reactos/include/ndk/ldrfuncs.h
--- trunk/reactos/include/ndk/ldrfuncs.h	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/include/ndk/ldrfuncs.h	2005-06-26 19:29:12 UTC (rev 16298)
@@ -35,6 +35,15 @@
 );
 
 NTSTATUS
+STDCALL 
+LdrFindResourceDirectory_U(
+    IN PVOID BaseAddress,
+    IN PLDR_RESOURCE_INFO ResourceInfo,
+    IN ULONG Level,
+    OUT PIMAGE_RESOURCE_DIRECTORY *ResourceDirectory
+);
+
+NTSTATUS
 STDCALL
 LdrGetProcedureAddress(
     IN PVOID BaseAddress,

Modified: trunk/reactos/include/ndk/ntndk.h
--- trunk/reactos/include/ndk/ntndk.h	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/include/ndk/ntndk.h	2005-06-26 19:29:12 UTC (rev 16298)
@@ -23,7 +23,6 @@
     #include "iofuncs.h"    /* Input/Output Manager Functions */
     #include "ketypes.h"    /* Kernel Types */
     #include "kefuncs.h"    /* Kernel Functions */
-    #include "ldrfuncs.h"   /* Loader Functions */
     #include "lpctypes.h"   /* Local Procedure Call Types */
     #include "mmtypes.h"    /* Memory Manager Types */
     #include "mmfuncs.h"    /* Memory Manager Functions */
@@ -40,6 +39,7 @@
 #endif
 
 /* Shared NDK */
+#include "ldrfuncs.h"       /* Loader Functions */
 #include "ldrtypes.h"       /* Loader Types */
 #include "pstypes.h"        /* Process Manager Types */
 #include "rtltypes.h"       /* Runtime Library Types */

Modified: trunk/reactos/lib/kernel32/misc/res.c
--- trunk/reactos/lib/kernel32/misc/res.c	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/lib/kernel32/misc/res.c	2005-06-26 19:29:12 UTC (rev 16298)
@@ -8,7 +8,6 @@
  */
 
 #include <k32.h>
-#include <ddk/ldrfuncs.h>
 
 #define NDEBUG
 #include "../include/debug.h"

Modified: trunk/reactos/lib/ntdll/rtl/message.c
--- trunk/reactos/lib/ntdll/rtl/message.c	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/lib/ntdll/rtl/message.c	2005-06-26 19:29:12 UTC (rev 16298)
@@ -14,7 +14,6 @@
 #include <ntdll.h>
 #define NDEBUG
 #include <debug.h>
-#include <ddk/ldrfuncs.h>
 
 /* FUNCTIONS *****************************************************************/
 

Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
--- trunk/reactos/ntoskrnl/inbv/inbv.c	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/ntoskrnl/inbv/inbv.c	2005-06-26 19:29:12 UTC (rev 16298)
@@ -11,7 +11,7 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntoskrnl.h>
-#include <ddk/ntbootvid.h>
+#include "../../drivers/dd/bootvid/ntbootvid.h"
 #define NDEBUG
 #include <internal/debug.h>
 

Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
--- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h	2005-06-26 19:29:12 UTC (rev 16298)
@@ -32,7 +32,7 @@
 #include "port.h"
 #include "nls.h"
 #ifdef KDBG
-#include "kdb.h"
+#include "../kdbg/kdb.h"
 #endif
 #include "dbgk.h"
 #include "tag.h"

Modified: trunk/reactos/ntoskrnl/kdbg/i386/kdb_help.S
--- trunk/reactos/ntoskrnl/kdbg/i386/kdb_help.S	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/ntoskrnl/kdbg/i386/kdb_help.S	2005-06-26 19:29:12 UTC (rev 16298)
@@ -1,5 +1,5 @@
-#include <internal/ke.h>
-#include <internal/i386/segment.h>
+#include <internal/asm.h>
+#include <ndk/i386/segment.h>
 
 .text
 

Modified: trunk/reactos/ntoskrnl/kdbg/kdb_cli.c
--- trunk/reactos/ntoskrnl/kdbg/kdb_cli.c	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/ntoskrnl/kdbg/kdb_cli.c	2005-06-26 19:29:12 UTC (rev 16298)
@@ -29,8 +29,6 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntoskrnl.h>
-#include <ctype.h>
-#include <internal/kdb.h>
 
 #define NDEBUG
 #include <internal/debug.h>

Modified: trunk/reactos/ntoskrnl/kdbg/kdb_expr.c
--- trunk/reactos/ntoskrnl/kdbg/kdb_expr.c	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/ntoskrnl/kdbg/kdb_expr.c	2005-06-26 19:29:12 UTC (rev 16298)
@@ -35,7 +35,6 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntoskrnl.h>
-#include <internal/kdb.h>
 #define NDEBUG
 #include <internal/debug.h>
 

Modified: trunk/reactos/ntoskrnl/kdbg/kdb_string.c
--- trunk/reactos/ntoskrnl/kdbg/kdb_string.c	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/ntoskrnl/kdbg/kdb_string.c	2005-06-26 19:29:12 UTC (rev 16298)
@@ -91,8 +91,8 @@
   }
   if (base == 0)
     base = c == '0' ? 8 : 10;
-  cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
-  cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
+  cutoff = (unsigned long)0xffffffff / (unsigned long)base;
+  cutlim = (unsigned long)0xffffffff % (unsigned long)base;
   for (acc = 0, any = 0;; c = *s++)
   {
     if (isdigit(c))
@@ -113,7 +113,7 @@
   }
   if (any < 0)
   {
-    acc = ULONG_MAX;
+    acc = 0xffffffff;
   }
   else if (neg)
     acc = -acc;

Copied: trunk/reactos/w32api/include/af_irda.h (from rev 16273, trunk/reactos/include/ddk/af_irda.h)

Copied: trunk/reactos/w32api/include/ddk/csq.h (from rev 16273, trunk/reactos/include/ddk/csq.h)

Modified: trunk/reactos/w32api/include/ddk/ntifs.h
--- trunk/reactos/w32api/include/ddk/ntifs.h	2005-06-26 18:04:20 UTC (rev 16297)
+++ trunk/reactos/w32api/include/ddk/ntifs.h	2005-06-26 19:29:12 UTC (rev 16298)
@@ -29,7 +29,7 @@
 #endif
 
 #include "ntddk.h"
-//#include "ntapi.h"
+#include "csq.h"
 
 #ifdef __cplusplus
 extern "C" {