More NDK fixes (user-mode NDK now works) and guard some stuff in include/ntdll so that ntdll can be build with NDK, but so that other apps not yet using it, but using those headers, can also build
Modified: trunk/reactos/include/csrss/csrss.h
Modified: trunk/reactos/include/ndk/extypes.h
Modified: trunk/reactos/include/ndk/ldrtypes.h
Modified: trunk/reactos/include/ndk/ntndk.h
Modified: trunk/reactos/include/ndk/psfuncs.h
Modified: trunk/reactos/include/ndk/pstypes.h
Modified: trunk/reactos/include/ndk/rtlfuncs.h
Modified: trunk/reactos/include/ndk/umtypes.h
Modified: trunk/reactos/include/ndk/zwtypes.h
Modified: trunk/reactos/include/ntdll/ldr.h
Modified: trunk/reactos/include/ntdll/ntdll.h
Modified: trunk/reactos/include/ntdll/rtl.h
Modified: trunk/reactos/lib/ntdll/inc/ntdll.h

Modified: trunk/reactos/include/csrss/csrss.h
--- trunk/reactos/include/csrss/csrss.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/csrss/csrss.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -3,7 +3,9 @@
 
 #include <windows.h>
 #include <ddk/ntddblue.h>
+#ifndef _NTNDK_
 #include <ntos.h>
+#endif
 
 #define CSR_CSRSS_SECTION_SIZE          (65536)
 

Modified: trunk/reactos/include/ndk/extypes.h
--- trunk/reactos/include/ndk/extypes.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ndk/extypes.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -22,30 +22,6 @@
 
 /* ENUMERATIONS **************************************************************/
 
-typedef enum _HARDERROR_RESPONSE_OPTION 
-{
-    OptionAbortRetryIgnore,
-    OptionOk,
-    OptionOkCancel,
-    OptionRetryCancel,
-    OptionYesNo,
-    OptionYesNoCancel,
-    OptionShutdownSystem
-} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
-
-typedef enum _HARDERROR_RESPONSE 
-{
-    ResponseReturnToCaller,
-    ResponseNotHandled,
-    ResponseAbort,
-    ResponseCancel,
-    ResponseIgnore,
-    ResponseNo,
-    ResponseOk,
-    ResponseRetry,
-    ResponseYes
-} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
-
 /* TYPES *********************************************************************/
 
 typedef struct _EX_QUEUE_WORKER_INFO 

Modified: trunk/reactos/include/ndk/ldrtypes.h
--- trunk/reactos/include/ndk/ldrtypes.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ndk/ldrtypes.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -35,23 +35,7 @@
 } PEB_LDR_DATA, *PPEB_LDR_DATA;
 
 /* FIXME: Update with _LDR_DATA_TABLE_ENTRY and LDR_ flags */
-typedef struct _LDR_MODULE
-{
-    LIST_ENTRY          InLoadOrderModuleList;
-    LIST_ENTRY          InMemoryOrderModuleList;
-    LIST_ENTRY          InInitializationOrderModuleList;
-    void*               BaseAddress;
-    void*               EntryPoint;
-    ULONG               SizeOfImage;
-    UNICODE_STRING      FullDllName;
-    UNICODE_STRING      BaseDllName;
-    ULONG               Flags;
-    SHORT               LoadCount;
-    SHORT               TlsIndex;
-    HANDLE              SectionHandle;
-    ULONG               CheckSum;
-    ULONG               TimeDateStamp;
-} LDR_MODULE, *PLDR_MODULE;
+//typedef struct _LDR_MODULE
 
 typedef struct _LDR_RESOURCE_INFO 
 {

Modified: trunk/reactos/include/ndk/ntndk.h
--- trunk/reactos/include/ndk/ntndk.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ndk/ntndk.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -6,8 +6,8 @@
  * UPDATE HISTORY:
  *                  Created 06/10/04
  */
-#ifndef _NT_NDK_
-#define _NT_NDK_
+#ifndef _NTNDK_
+#define _NTNDK_
 
 #ifndef NTOS_MODE_USER
     /* Kernel-Mode NDK */

Modified: trunk/reactos/include/ndk/psfuncs.h
--- trunk/reactos/include/ndk/psfuncs.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ndk/psfuncs.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -1,22 +1,3 @@
-/* $Id: pstypes.h,v 1.1.2.1 2004/10/25 01:24:07 ion Exp $
- *
- *  ReactOS Headers
- *  Copyright (C) 1998-2004 ReactOS Team
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
 /*
  * PROJECT:         ReactOS Native Headers
  * FILE:            include/ndk/psfuncs.h
@@ -30,22 +11,6 @@
 
 /* DEPENDENCIES **************************************************************/
 
-/* FUNCTION TYPES ************************************************************/
-typedef VOID (STDCALL *PPEBLOCKROUTINE)(PVOID);
-
-typedef NTSTATUS 
-(STDCALL *PW32_PROCESS_CALLBACK)(
-    struct _EPROCESS *Process,
-    BOOLEAN Create
-);
-
-typedef NTSTATUS
-(STDCALL *PW32_THREAD_CALLBACK)(
-    struct _ETHREAD *Thread,
-    BOOLEAN Create
-);
-
-
 /* PROTOTYPES ****************************************************************/
 
 VOID

Modified: trunk/reactos/include/ndk/pstypes.h
--- trunk/reactos/include/ndk/pstypes.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ndk/pstypes.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -40,9 +40,22 @@
 
 /* ENUMERATIONS **************************************************************/
 
-/* FUNCTION TYPES **********************************************/
-typedef DWORD (*STDCALL PTHREAD_START_ROUTINE) (LPVOID);
+/* FUNCTION TYPES ************************************************************/
+typedef DWORD (STDCALL* PTHREAD_START_ROUTINE) (LPVOID);
+typedef VOID (STDCALL *PPEBLOCKROUTINE)(PVOID);
 
+typedef NTSTATUS 
+(STDCALL *PW32_PROCESS_CALLBACK)(
+    struct _EPROCESS *Process,
+    BOOLEAN Create
+);
+
+typedef NTSTATUS
+(STDCALL *PW32_THREAD_CALLBACK)(
+    struct _ETHREAD *Thread,
+    BOOLEAN Create
+);
+
 /* TYPES *********************************************************************/
 
 struct _ETHREAD;
@@ -90,7 +103,7 @@
     PVOID UnicodeCaseTableData;                      /* 60h */
     ULONG NumberOfProcessors;                        /* 64h */
     ULONG NtGlobalFlag;                              /* 68h */
-    UCHAR Spare2[0x4];                               /* 6Ch */
+    UCHAR _Spare2[0x4];                              /* 6Ch */
     LARGE_INTEGER CriticalSectionTimeout;            /* 70h */
     ULONG HeapSegmentReserve;                        /* 78h */
     ULONG HeapSegmentCommit;                         /* 7Ch */

Modified: trunk/reactos/include/ndk/rtlfuncs.h
--- trunk/reactos/include/ndk/rtlfuncs.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ndk/rtlfuncs.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -680,7 +680,7 @@
 NTSTATUS
 STDCALL
 RtlQueryTimeZoneInformation (
-	IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
+	IN OUT LPTIME_ZONE_INFORMATION TimeZoneInformation
 );
 
 VOID STDCALL RtlRaiseStatus(NTSTATUS Status);

Modified: trunk/reactos/include/ndk/umtypes.h
--- trunk/reactos/include/ndk/umtypes.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ndk/umtypes.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -20,8 +20,9 @@
 
 /* CONSTANTS *****************************************************************/
 
-/* NTAPI Define */
+/* NTAPI/NTOSAPI Define */
 #define NTAPI __stdcall
+#define NTOSAPI
 
 /* Definitions for Object Creation -- winternl.h */
 #define OBJ_INHERIT 2L
@@ -249,6 +250,45 @@
     SynchronizationTimer
 } TIMER_TYPE;
 
+typedef enum _INTERFACE_TYPE 
+{
+    InterfaceTypeUndefined = -1,
+    Internal,
+    Isa,
+    Eisa,
+    MicroChannel,
+    TurboChannel,
+    PCIBus,
+    VMEBus,
+    NuBus,
+    PCMCIABus,
+    CBus,
+    MPIBus,
+    MPSABus,
+    ProcessorInternal,
+    InternalPowerBus,
+    PNPISABus,
+    PNPBus,
+    MaximumInterfaceType
+}INTERFACE_TYPE, *PINTERFACE_TYPE;
+
+typedef enum _PNP_VETO_TYPE
+{
+    PNP_VetoTypeUnknown,
+    PNP_VetoLegacyDevice,
+    PNP_VetoPendingClose,
+    PNP_VetoWindowsApp,
+    PNP_VetoWindowsService,
+    PNP_VetoOutstandingOpen,
+    PNP_VetoDevice,
+    PNP_VetoDriver,
+    PNP_VetoIllegalDeviceRequest,
+    PNP_VetoInsufficientPower,
+    PNP_VetoNonDisableable,
+    PNP_VetoLegacyDriver,
+    PNP_VetoInsufficientRights
+} PNP_VETO_TYPE, *PPNP_VETO_TYPE;
+
 typedef enum _MODE 
 {
     KernelMode,
@@ -512,8 +552,9 @@
 typedef ULONG WAIT_TYPE;
 typedef struct _PEB *PPEB;
 typedef ULONG KPROCESSOR_MODE;
-typedef PVOID PTHREAD_START_ROUTINE;
 typedef struct _OBJECT_TYPE *POBJECT_TYPE;
+struct _ETHREAD;
+struct _EVENT_TRACE_HEADER; /* <--- We might want to declare this one */
 
 /* Basic NT Types */
 typedef struct _UNICODE_STRING 
@@ -574,6 +615,11 @@
     IN LONG  TimerHighValue);
 
 /* Kernel Types which are returned or used by Native API */
+typedef struct _OBJECT_NAME_INFORMATION
+{
+    UNICODE_STRING Name;                                
+} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;   
+
 typedef struct _CLIENT_ID 
 {
     HANDLE  UniqueProcess;
@@ -685,6 +731,17 @@
     LARGE_INTEGER FileOffset;
     LARGE_INTEGER Length;
 } FILE_ALLOCATED_RANGE_BUFFER, *PFILE_ALLOCATED_RANGE_BUFFER;
+
+typedef struct _FILE_QUOTA_INFORMATION
+{
+    ULONG NextEntryOffset;
+    ULONG SidLength;
+    LARGE_INTEGER ChangeTime;
+    LARGE_INTEGER QuotaUsed;
+    LARGE_INTEGER QuotaThreshold;
+    LARGE_INTEGER QuotaLimit;
+    SID Sid;
+} FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
   
 /*
  * Registry Key Value
@@ -801,6 +858,18 @@
 } KUSER_SHARED_DATA, *PKUSER_SHARED_DATA;
 
 /* Run-Time Library (RTL) Types */
+typedef struct _RTL_BITMAP
+{
+    ULONG SizeOfBitMap;
+    PULONG Buffer;
+} RTL_BITMAP, *PRTL_BITMAP;
+
+typedef struct _RTL_BITMAP_RUN
+{
+    ULONG StartingIndex;
+    ULONG NumberOfBits;
+} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
+
 typedef struct _COMPRESSED_DATA_INFO 
 {
     USHORT  CompressionFormatAndEngine;

Modified: trunk/reactos/include/ndk/zwtypes.h
--- trunk/reactos/include/ndk/zwtypes.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ndk/zwtypes.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -21,6 +21,31 @@
 
 /* ENUMERATIONS **************************************************************/
 
+
+typedef enum _HARDERROR_RESPONSE_OPTION 
+{
+    OptionAbortRetryIgnore,
+    OptionOk,
+    OptionOkCancel,
+    OptionRetryCancel,
+    OptionYesNo,
+    OptionYesNoCancel,
+    OptionShutdownSystem
+} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
+
+typedef enum _HARDERROR_RESPONSE 
+{
+    ResponseReturnToCaller,
+    ResponseNotHandled,
+    ResponseAbort,
+    ResponseCancel,
+    ResponseIgnore,
+    ResponseNo,
+    ResponseOk,
+    ResponseRetry,
+    ResponseYes
+} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
+
 typedef enum SHUTDOWN_ACTION_TAG 
 {
     ShutdownNoReboot,

Modified: trunk/reactos/include/ntdll/ldr.h
--- trunk/reactos/include/ntdll/ldr.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ntdll/ldr.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -2,7 +2,9 @@
 #define __NTOSKRNL_INCLUDE_INTERNAL_LDR_H
 
 #include <roscfg.h>
+#ifndef _NTNDK_
 #include <napi/teb.h>
+#endif
 #include <reactos/rossym.h>
 
 typedef NTSTATUS (STDCALL *PEPFUNC)(PPEB);

Modified: trunk/reactos/include/ntdll/ntdll.h
--- trunk/reactos/include/ntdll/ntdll.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ntdll/ntdll.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -1,5 +1,7 @@
 
+#ifndef _NTNDK_
 #include <ntos/ntdef.h>
+#endif
 
 #define UNIMPLEMENTED DbgPrint("%s in %s:%d is unimplemented\n",__FUNCTION__,__FILE__,__LINE__);
 

Modified: trunk/reactos/include/ntdll/rtl.h
--- trunk/reactos/include/ntdll/rtl.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/include/ntdll/rtl.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -5,10 +5,12 @@
 #ifndef __INCLUDE_NTDLL_RTL_H
 #define __INCLUDE_NTDLL_RTL_H
 
+#ifndef _NTNDK_
 #include <ddk/ntifs.h>
 #include <ntos/types.h>
 #include <ntos/zwtypes.h>
 #include <napi/teb.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -21,7 +23,7 @@
 #define PAGED_CODE_RTL()
 #endif
 
-#ifndef __USE_W32API
+#if !defined(__USE_W32API) || defined(_NTNDK_)
 
 #define RTL_CONSTANT_STRING(__SOURCE_STRING__) \
 { \
@@ -104,6 +106,9 @@
 	ULONG  NumberOfExclusiveWaiters;
 } DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
 
+#endif
+
+#ifndef __USE_W32API
 typedef struct _CRITICAL_SECTION_DEBUG
 {
   USHORT Type;
@@ -136,6 +141,7 @@
 
 #endif /* !__USE_W32API */
 
+#ifndef _NTNDK_
 typedef struct _RTL_PROCESS_INFO
 {
    ULONG Size;
@@ -144,6 +150,7 @@
    CLIENT_ID ClientId;
    SECTION_IMAGE_INFORMATION ImageInfo;
 } RTL_PROCESS_INFO, *PRTL_PROCESS_INFO;
+#endif
 
 typedef struct _RTL_RESOURCE
 {

Modified: trunk/reactos/lib/ntdll/inc/ntdll.h
--- trunk/reactos/lib/ntdll/inc/ntdll.h	2005-06-19 18:54:02 UTC (rev 16103)
+++ trunk/reactos/lib/ntdll/inc/ntdll.h	2005-06-19 19:15:46 UTC (rev 16104)
@@ -14,7 +14,7 @@
 #include <ddk/ntifs.h> /* FIXME: NDK */
 #include <ntos/ldrtypes.h>  /* FIXME: NDK */
 
-/* NTDLL Public Headers. FIXME: USE NDK */
+/* NTDLL Public Headers. FIXME: Combine/clean these after NDK */
 #include <ntdll/csr.h>
 #include <ntdll/rtl.h>
 #include <ntdll/ldr.h>