Add missing defintions so RTL can build. Currently a mess so I'm going to clean it up.
Modified: branches/new_headers/reactos/include/ndk/rtlfuncs.h
Modified: branches/new_headers/reactos/include/ndk/rtltypes.h
Modified: branches/new_headers/reactos/include/ndk/umtypes.h
Modified: branches/new_headers/reactos/include/ndk/zwfuncs.h
Modified: branches/new_headers/reactos/include/winnt.h
Modified: branches/new_headers/reactos/lib/rtl/i386/exception.c

Modified: branches/new_headers/reactos/include/ndk/rtlfuncs.h
--- branches/new_headers/reactos/include/ndk/rtlfuncs.h	2005-05-08 16:50:18 UTC (rev 15133)
+++ branches/new_headers/reactos/include/ndk/rtlfuncs.h	2005-05-08 16:51:11 UTC (rev 15134)
@@ -122,9 +122,9 @@
 NTSTATUS
 STDCALL
 RtlAbsoluteToSelfRelativeSD (
-    IN PSECURITY_DESCRIPTOR     AbsoluteSecurityDescriptor,
-    IN OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor,
-    IN PULONG                   BufferLength
+    IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
+    IN OUT PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
+    IN PULONG BufferLength
 );
 
 NTSTATUS
@@ -146,6 +146,20 @@
 
 NTSTATUS
 STDCALL
+RtlAppendUnicodeToString (
+    PUNICODE_STRING Destination,
+    PCWSTR Source
+);
+
+NTSTATUS
+STDCALL
+RtlAppendUnicodeStringToString (
+    PUNICODE_STRING	Destination,
+    PUNICODE_STRING	Source
+);
+
+NTSTATUS
+STDCALL
 RtlAddAtomToAtomTable (
     IN PRTL_ATOM_TABLE AtomTable,
     IN PWSTR AtomName,
@@ -179,6 +193,12 @@
     PULONG RemainingSidAreaSize
 );
 
+SIZE_T 
+STDCALL
+RtlCompareMemory(IN const VOID *Source1,
+                 IN const VOID *Source2,
+                 IN SIZE_T Length);
+                 
 LONG
 STDCALL
 RtlCompareUnicodeString (
@@ -284,6 +304,15 @@
     OUT PULONG  FinalUncompressedSize
 );
 
+NTSTATUS
+STDCALL
+RtlExpandEnvironmentStrings_U (
+    PWSTR Environment,
+    PUNICODE_STRING Source,
+    PUNICODE_STRING Destination,
+    PULONG Length
+);
+
 PRTL_USER_PROCESS_PARAMETERS
 STDCALL
 RtlDeNormalizeProcessParams (
@@ -333,9 +362,115 @@
      PRTL_CRITICAL_SECTION CriticalSection
 );
 
-#ifndef _NTIFS_
 NTSTATUS
 STDCALL
+RtlMultiByteToUnicodeN (
+    PWCHAR UnicodeString,
+    ULONG  UnicodeSize,
+    PULONG ResultSize,
+    const PCHAR  MbString,
+    ULONG  MbSize
+);
+
+NTSTATUS
+STDCALL
+RtlMultiByteToUnicodeSize (
+    PULONG UnicodeSize,
+    PCHAR  MbString,
+    ULONG  MbSize
+);
+
+CHAR STDCALL
+RtlUpperChar (CHAR Source);
+
+WCHAR
+STDCALL
+RtlUpcaseUnicodeChar (
+	WCHAR Source
+	);
+    
+NTSTATUS
+STDCALL
+RtlAnsiStringToUnicodeString (
+	PUNICODE_STRING	DestinationString,
+	PANSI_STRING	SourceString,
+	BOOLEAN		AllocateDestinationString
+	);
+    
+NTSTATUS
+STDCALL
+RtlUnicodeToMultiByteN (
+	PCHAR	MbString,
+	ULONG	MbSize,
+	PULONG	ResultSize,
+	PWCHAR	UnicodeString,
+	ULONG	UnicodeSize
+	);
+    
+ULONG
+STDCALL
+RtlOemStringToUnicodeSize (
+	POEM_STRING	AnsiString
+	);
+    
+WCHAR STDCALL
+RtlDowncaseUnicodeChar(IN WCHAR Source);
+
+NTSTATUS
+STDCALL
+RtlUpcaseUnicodeToMultiByteN (
+	PCHAR	MbString,
+	ULONG	MbSize,
+	PULONG	ResultSize,
+	PWCHAR	UnicodeString,
+	ULONG	UnicodeSize
+	);
+    
+NTSTATUS
+STDCALL
+RtlUnicodeToMultiByteSize (
+	PULONG	MbSize,
+	PWCHAR	UnicodeString,
+	ULONG	UnicodeSize
+	);
+    
+NTSTATUS
+STDCALL
+RtlOemToUnicodeN(
+	PWSTR UnicodeString,
+	ULONG MaxBytesInUnicodeString,
+	PULONG BytesInUnicodeString,
+	IN PCHAR OemString,
+	ULONG BytesInOemString
+	);
+    
+NTSTATUS
+STDCALL
+RtlUnicodeToOemN (
+	PCHAR	OemString,
+	ULONG	OemSize,
+	PULONG	ResultSize,
+	PWCHAR	UnicodeString,
+	ULONG	UnicodeSize
+	);
+
+NTSTATUS
+STDCALL
+RtlUpcaseUnicodeStringToOemString (
+	IN OUT	POEM_STRING	DestinationString,
+	IN	PUNICODE_STRING	SourceString,
+	IN	BOOLEAN		AllocateDestinationString
+	);
+        
+ULONG
+STDCALL
+RtlUnicodeStringToAnsiSize (
+	IN	PUNICODE_STRING	UnicodeString
+	);
+    
+#ifndef _NTIFS_
+BOOLEAN
+STDCALL
 RtlEqualSid (
     IN PSID Sid1,
     IN PSID Sid2
@@ -534,7 +669,7 @@
 NTSTATUS
 STDCALL
 RtlQueryTimeZoneInformation (
-	IN OUT struct _TIME_ZONE_INFORMATION *TimeZoneInformation
+	IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
 );
 
 VOID STDCALL RtlRaiseStatus(NTSTATUS Status);
@@ -644,8 +779,44 @@
 RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
 				  IN PCSZ Source);
 	
+                  
+BOOLEAN 
+STDCALL
+RtlTimeFieldsToTime (
+    PTIME_FIELDS TimeFields,
+    PLARGE_INTEGER Time
+);
+
 VOID
 STDCALL
+RtlTimeToTimeFields (
+    PLARGE_INTEGER Time,
+    PTIME_FIELDS TimeFields
+);
+
+NTSTATUS
+STDCALL
+RtlQueryRegistryValues (
+    IN ULONG RelativeTo,
+    IN PCWSTR Path,
+    IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
+    IN PVOID Context,
+    IN PVOID Environment
+);
+
+NTSTATUS
+STDCALL
+RtlWriteRegistryValue (
+    ULONG RelativeTo,
+    PCWSTR Path,
+    PCWSTR ValueName,
+    ULONG ValueType,
+    PVOID ValueData,
+    ULONG ValueLength
+);
+             
+VOID
+STDCALL
 RtlUnwind (
   PEXCEPTION_REGISTRATION RegistrationFrame,
   PVOID ReturnAddress,

Modified: branches/new_headers/reactos/include/ndk/rtltypes.h
--- branches/new_headers/reactos/include/ndk/rtltypes.h	2005-05-08 16:50:18 UTC (rev 15133)
+++ branches/new_headers/reactos/include/ndk/rtltypes.h	2005-05-08 16:51:11 UTC (rev 15134)
@@ -1,22 +1,3 @@
-/* $Id: rtltypes.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/rtltypes.h
@@ -106,6 +87,7 @@
 	LONG DaylightBias;
 } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
 #endif
+typedef LPTIME_ZONE_INFORMATION PTIME_ZONE_INFORMATION;
 
 #define	EH_NONCONTINUABLE	0x01
 #define	EH_UNWINDING		0x02

Modified: branches/new_headers/reactos/include/ndk/umtypes.h
--- branches/new_headers/reactos/include/ndk/umtypes.h	2005-05-08 16:50:18 UTC (rev 15133)
+++ branches/new_headers/reactos/include/ndk/umtypes.h	2005-05-08 16:51:11 UTC (rev 15134)
@@ -286,6 +286,9 @@
 typedef CONST char *PCSZ;
 typedef ULONG KPROCESSOR_MODE;
 typedef PVOID PTHREAD_START_ROUTINE;
+typedef short CSHORT;
+typedef CSHORT *PCSHORT;
+#define STATIC static
 
 typedef enum _MODE 
 {
@@ -948,5 +951,131 @@
 } RTL_AVL_TABLE;
 typedef RTL_AVL_TABLE *PRTL_AVL_TABLE;
 
+#define RTL_REGISTRY_ABSOLUTE     0
+#define RTL_REGISTRY_SERVICES     1
+#define RTL_REGISTRY_CONTROL      2
+#define RTL_REGISTRY_WINDOWS_NT   3
+#define RTL_REGISTRY_DEVICEMAP    4
+#define RTL_REGISTRY_USER         5
+#define RTL_REGISTRY_MAXIMUM      6
+#define RTL_REGISTRY_HANDLE       0x40000000
+#define RTL_REGISTRY_OPTIONAL     0x80000000
+
+typedef NTSTATUS STDCALL
+(*PRTL_QUERY_REGISTRY_ROUTINE)(
+    IN PWSTR ValueName,
+    IN ULONG ValueType,
+    IN PVOID ValueData,
+    IN ULONG ValueLength,
+    IN PVOID Context,
+    IN PVOID EntryContext
+);
+
+typedef struct _RTL_QUERY_REGISTRY_TABLE 
+{
+    PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
+    ULONG Flags;
+    PWSTR Name;
+    PVOID EntryContext;
+    ULONG DefaultType;
+    PVOID DefaultData;
+    ULONG DefaultLength;
+} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
+
+typedef struct _KEY_VALUE_BASIC_INFORMATION 
+{
+    ULONG TitleIndex;
+    ULONG Type;
+    ULONG NameLength;
+    WCHAR Name[1];
+} KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
+
+typedef struct _KEY_VALUE_FULL_INFORMATION 
+{
+    ULONG TitleIndex;
+    ULONG Type;
+    ULONG DataOffset;
+    ULONG DataLength;
+    ULONG NameLength;
+    WCHAR Name[1];
+} KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
+
+typedef struct _KEY_BASIC_INFORMATION 
+{
+    LARGE_INTEGER LastWriteTime;
+    ULONG TitleIndex;
+    ULONG NameLength;
+    WCHAR Name[1];
+} KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
+
+#define RTL_QUERY_REGISTRY_SUBKEY   0x00000001
+#define RTL_QUERY_REGISTRY_TOPKEY   0x00000002
+#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
+#define RTL_QUERY_REGISTRY_NOVALUE  0x00000008
+#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
+#define RTL_QUERY_REGISTRY_DIRECT   0x00000020
+#define RTL_QUERY_REGISTRY_DELETE   0x00000040
+
+#define SID_MAX_SUB_AUTHORITIES     15
+
+typedef struct _TIME_FIELDS 
+{
+    CSHORT Year;
+    CSHORT Month;
+    CSHORT Day;
+    CSHORT Hour;
+    CSHORT Minute;
+    CSHORT Second;
+    CSHORT Milliseconds;
+    CSHORT Weekday;
+} TIME_FIELDS;
+typedef TIME_FIELDS *PTIME_FIELDS;
+
+typedef struct _UNICODE_PREFIX_TABLE_ENTRY 
+{
+    CSHORT NodeTypeCode;
+    CSHORT NameLength;
+    struct _UNICODE_PREFIX_TABLE_ENTRY *NextPrefixTree;
+    struct _UNICODE_PREFIX_TABLE_ENTRY *CaseMatch;
+    RTL_SPLAY_LINKS Links;
+    PUNICODE_STRING Prefix;
+} UNICODE_PREFIX_TABLE_ENTRY;
+typedef UNICODE_PREFIX_TABLE_ENTRY *PUNICODE_PREFIX_TABLE_ENTRY;
+
+typedef struct _UNICODE_PREFIX_TABLE 
+{
+    CSHORT NodeTypeCode;
+    CSHORT NameLength;
+    PUNICODE_PREFIX_TABLE_ENTRY NextPrefixTree;
+    PUNICODE_PREFIX_TABLE_ENTRY LastNextEntry;
+} UNICODE_PREFIX_TABLE;
+typedef UNICODE_PREFIX_TABLE *PUNICODE_PREFIX_TABLE;
+
+#define VER_MINORVERSION                0x0000001
+#define VER_MAJORVERSION                0x0000002
+#define VER_BUILDNUMBER                 0x0000004
+#define VER_PLATFORMID                  0x0000008
+#define VER_SERVICEPACKMINOR            0x0000010
+#define VER_SERVICEPACKMAJOR            0x0000020
+#define VER_SUITENAME                   0x0000040
+#define VER_PRODUCT_TYPE                0x0000080
+#define VER_PLATFORM_WIN32s             0
+#define VER_PLATFORM_WIN32_WINDOWS      1
+#define VER_PLATFORM_WIN32_NT           2
+#define VER_EQUAL                       1
+#define VER_GREATER                     2
+#define VER_GREATER_EQUAL               3
+#define VER_LESS                        4
+#define VER_LESS_EQUAL                  5
+#define VER_AND                         6
+#define VER_OR                          7
+#define VER_CONDITION_MASK              7
+#define VER_NUM_BITS_PER_CONDITION_MASK 3
+
+typedef LPOSVERSIONINFOW PRTL_OSVERSIONINFOW;
+typedef OSVERSIONINFOEXW RTL_OSVERSIONINFOEXW;
+typedef LPOSVERSIONINFOEXW PRTL_OSVERSIONINFOEXW;
+
+
 #endif
 

Modified: branches/new_headers/reactos/include/ndk/zwfuncs.h
--- branches/new_headers/reactos/include/ndk/zwfuncs.h	2005-05-08 16:50:18 UTC (rev 15133)
+++ branches/new_headers/reactos/include/ndk/zwfuncs.h	2005-05-08 16:51:11 UTC (rev 15134)
@@ -5653,6 +5653,18 @@
 	IN BOOLEAN InheritHandle,
 	IN ULONG Options
 	);
+    
+NTSTATUS
+STDCALL
+ZwDuplicateObject(
+	IN HANDLE SourceProcessHandle,
+	IN HANDLE SourceHandle,
+	IN HANDLE TargetProcessHandle,
+	OUT PHANDLE TargetHandle,
+	IN ACCESS_MASK DesiredAccess,
+	IN BOOLEAN InheritHandle,
+	IN ULONG Options
+	);
 
 /*
  * FUNCTION: Adds an atom to the global atom table

Modified: branches/new_headers/reactos/include/winnt.h
--- branches/new_headers/reactos/include/winnt.h	2005-05-08 16:50:18 UTC (rev 15133)
+++ branches/new_headers/reactos/include/winnt.h	2005-05-08 16:51:11 UTC (rev 15134)
@@ -1120,6 +1120,7 @@
 #define SE_SACL_AUTO_INHERITED 2048
 #define SE_DACL_PROTECTED 4096
 #define SE_SACL_PROTECTED 8192
+#define SE_RM_CONTROL_VALID 0x4000
 #define SE_SELF_RELATIVE 0x8000
 #define SECURITY_DESCRIPTOR_MIN_LENGTH 20
 #define SECURITY_DESCRIPTOR_REVISION 1

Modified: branches/new_headers/reactos/lib/rtl/i386/exception.c
--- branches/new_headers/reactos/lib/rtl/i386/exception.c	2005-05-08 16:50:18 UTC (rev 15133)
+++ branches/new_headers/reactos/lib/rtl/i386/exception.c	2005-05-08 16:51:11 UTC (rev 15134)
@@ -9,9 +9,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <windows.h>
-#include <string.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>