Some NDK Fixes, kernel32 almost compiles
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/ndk/pstypes.h
--- trunk/reactos/include/ndk/pstypes.h	2005-06-20 03:42:05 UTC (rev 16130)
+++ trunk/reactos/include/ndk/pstypes.h	2005-06-20 03:55:42 UTC (rev 16131)
@@ -38,7 +38,13 @@
 
 #define USER_SHARED_DATA (0x7FFE0000)
 
-#define PROCESS_PRIORITY_CLASS_NORMAL       (2) /* FIXME */
+/* Process priority classes */
+#define PROCESS_PRIORITY_CLASS_HIGH	(4) /* FIXME */
+#define PROCESS_PRIORITY_CLASS_IDLE	(0) /* FIXME */
+#define PROCESS_PRIORITY_CLASS_NORMAL	(2) /* FIXME */
+#define PROCESS_PRIORITY_CLASS_REALTIME	(5) /* FIXME */
+#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL (1) /* FIXME */
+#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL (3) /* FIXME */
 
 /* Global Flags */
 #define FLG_STOP_ON_EXCEPTION          0x00000001

Modified: trunk/reactos/include/ndk/rtlfuncs.h
--- trunk/reactos/include/ndk/rtlfuncs.h	2005-06-20 03:42:05 UTC (rev 16130)
+++ trunk/reactos/include/ndk/rtlfuncs.h	2005-06-20 03:55:42 UTC (rev 16131)
@@ -12,8 +12,7 @@
 #include <ndk/rtltypes.h>
 #include <ndk/pstypes.h>
 
-/*FIXME: REORGANIZE THIS */
-/* FIXME: SOME FUNCTIONS MUST BE PROTECTED AGAINST DDK/IFS. */
+/* FIXME: FILE NEEDS TO BE CLEANED UP AT THE END WHEN ALL THE FUNCTIONS HAVE BEEN ADDED */
 
 /*
  * VOID
@@ -675,6 +674,12 @@
 	BOOLEAN		AllocateDestinationString
 	);
     
+ULONG
+STDCALL
+RtlAnsiStringToUnicodeSize (
+	PANSI_STRING	AnsiString
+	);
+
 NTSTATUS
 STDCALL
 RtlUnicodeToMultiByteN (
@@ -905,7 +910,53 @@
     PVOID BaseAddress,
     ULONG Rva
 );
+
+NTSTATUS
+STDCALL
+RtlIntegerToChar (
+	IN	ULONG	Value,
+	IN	ULONG	Base,
+	IN	ULONG	Length,
+	IN OUT	PCHAR	String
+	);
+
+NTSTATUS 
+STDCALL
+RtlIntegerToUnicode(
+	IN ULONG Value,
+	IN ULONG Base  OPTIONAL,
+	IN ULONG Length OPTIONAL,
+	IN OUT LPWSTR String
+	);
+
+NTSTATUS
+STDCALL
+RtlIntegerToUnicodeString (
+	IN	ULONG		Value,
+	IN	ULONG		Base,
+	IN OUT	PUNICODE_STRING	String
+	);
+
+    NTSTATUS
+STDCALL
+RtlCharToInteger (
+	PCSZ	String,
+	ULONG	Base,
+	PULONG	Value
+	);
+
     
+USHORT FASTCALL
+RtlUshortByteSwap (IN USHORT Source);
+
+ULONG
+STDCALL
+RtlIsTextUnicode (
+	PVOID	Buffer,
+	ULONG	Length,
+	ULONG	*Flags
+	);
+        
 NTSTATUS
 STDCALL
 RtlInitializeSid (
@@ -922,6 +973,13 @@
     IN  PUSHORT CaseTableBase,
     OUT PNLSTABLEINFO NlsTable
 );
+
+VOID
+STDCALL
+RtlInitCodePageTable (
+	IN	PUSHORT		TableBase,
+	OUT	PCPTABLEINFO	CodePageTable
+	);
     
 NTSTATUS
 STDCALL
@@ -1110,9 +1168,20 @@
 	IN	PUNICODE_STRING	SourceString,
 	IN	BOOLEAN		AllocateDestinationString
 	);
+    
+NTSTATUS STDCALL
+RtlSetTimeZoneInformation (IN OUT LPTIME_ZONE_INFORMATION TimeZoneInformation);
 
 NTSTATUS
 STDCALL
+RtlUpcaseUnicodeString (
+	IN OUT	PUNICODE_STRING	DestinationString,
+	IN	PCUNICODE_STRING	SourceString,
+	IN	BOOLEAN		AllocateDestinationString
+	);
+
+NTSTATUS
+STDCALL
 RtlUnicodeStringToOemString (
 	IN OUT	POEM_STRING	DestinationString,
 	IN	PUNICODE_STRING	SourceString,
@@ -1137,6 +1206,19 @@
 	IN	ULONG		Length,
 	IN OUT	PCHAR		String
 	);
+    
+    NTSTATUS
+STDCALL
+RtlVerifyVersionInfo(
+	IN PRTL_OSVERSIONINFOEXW VersionInfo,
+	IN ULONG TypeMask,
+	IN ULONGLONG  ConditionMask
+	);
+    
+NTSTATUS
+STDCALL
+RtlGetVersion(
+  IN OUT PRTL_OSVERSIONINFOW  lpVersionInformation);
 	
 BOOLEAN 
 STDCALL
@@ -1187,7 +1269,37 @@
   PEXCEPTION_RECORD ExceptionRecord,
   DWORD EaxValue
 );
-	
+
+HANDLE STDCALL
+RtlDestroyHeap (HANDLE hheap);
+
+PVOID STDCALL
+RtlReAllocateHeap (
+	HANDLE Heap,
+	ULONG Flags,
+	PVOID Ptr,
+	ULONG Size
+	);
+BOOLEAN STDCALL
+RtlLockHeap (IN HANDLE Heap);
+
+BOOLEAN STDCALL
+RtlUnlockHeap (IN HANDLE Heap);
+
+ULONG STDCALL
+RtlSizeHeap(
+	IN PVOID HeapHandle, 
+	IN ULONG Flags, 
+	IN PVOID MemoryPointer
+	); 
+    
+BOOLEAN STDCALL
+RtlValidateHeap (
+	HANDLE Heap,
+	ULONG	Flags,
+	PVOID	pmem
+	);
+    
 BOOLEAN
 STDCALL
 RtlValidSid (

Modified: trunk/reactos/include/ndk/umtypes.h
--- trunk/reactos/include/ndk/umtypes.h	2005-06-20 03:42:05 UTC (rev 16130)
+++ trunk/reactos/include/ndk/umtypes.h	2005-06-20 03:55:42 UTC (rev 16131)
@@ -61,34 +61,6 @@
 #define FSCTL_MAILSLOT_PEEK             \
     CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA)
 
-/* I/O Control Codes for communicating with Network Drivers */
-#define IOCTL_REDIR_QUERY_PATH                  \
-    CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 99, METHOD_NEITHER, FILE_ANY_ACCESS)
-    
-#define FSCTL_NETWORK_SET_CONFIGURATION_INFO    \
-    CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 102, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
-    
-#define FSCTL_NETWORK_GET_CONFIGURATION_INFO    \
-    CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 103, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-    
-#define FSCTL_NETWORK_GET_CONNECTION_INFO       \
-    CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 104, METHOD_NEITHER, FILE_ANY_ACCESS)
-    
-#define FSCTL_NETWORK_ENUMERATE_CONNECTIONS     \
-    CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 105, METHOD_NEITHER, FILE_ANY_ACCESS)
-    
-#define FSCTL_NETWORK_DELETE_CONNECTION         \
-    CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 107, METHOD_BUFFERED, FILE_ANY_ACCESS)
-    
-#define FSCTL_NETWORK_GET_STATISTICS            \
-    CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 116, METHOD_BUFFERED, FILE_ANY_ACCESS)
-    
-#define FSCTL_NETWORK_SET_DOMAIN_NAME           \
-    CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 120, METHOD_BUFFERED, FILE_ANY_ACCESS)
-    
-#define FSCTL_NETWORK_REMOTE_BOOT_INIT_SCRT     \
-    CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 250, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
 /* I/O Control Codes for communicating with Pipes */
 #define FSCTL_PIPE_ASSIGN_EVENT         \
     CTL_CODE(FILE_DEVICE_NAMED_PIPE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
@@ -186,6 +158,7 @@
 
 /* Device Charactertics */
 #define FILE_REMOVABLE_MEDIA            0x00000001
+#define FILE_REMOTE_DEVICE              0x00000010
 
 /* SID Constants */
 #define SID_MAX_SUB_AUTHORITIES     15
@@ -283,6 +256,12 @@
     SynchronizationTimer
 } TIMER_TYPE;
 
+typedef enum _WAIT_TYPE 
+{
+    WaitAll,
+    WaitAny
+} WAIT_TYPE;
+
 typedef enum _INTERFACE_TYPE 
 {
     InterfaceTypeUndefined = -1,
@@ -582,12 +561,12 @@
 typedef UCHAR KIRQL, *PKIRQL;
 typedef ULONG KAFFINITY, *PKAFFINITY;
 typedef ULONG_PTR KSPIN_LOCK, *PKSPIN_LOCK;
-typedef ULONG WAIT_TYPE;
 typedef struct _PEB *PPEB;
 typedef ULONG KPROCESSOR_MODE;
 typedef struct _OBJECT_TYPE *POBJECT_TYPE;
 struct _ETHREAD;
 struct _EVENT_TRACE_HEADER; /* <--- We might want to declare this one */
+typedef ULONG EXECUTION_STATE;
 
 /* Basic NT Types */
 typedef struct _UNICODE_STRING 
@@ -925,13 +904,35 @@
     ULONG Characteristics;
 } FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
 
+typedef struct _FILE_FS_ATTRIBUTE_INFORMATION
+{
+    ULONG FileSystemAttributes;
+    ULONG MaximumComponentNameLength;
+    ULONG FileSystemNameLength;
+    WCHAR FileSystemName[1];
+} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
+
+typedef struct _FILE_FS_SIZE_INFORMATION
+{
+    LARGE_INTEGER TotalAllocationUnits;
+    LARGE_INTEGER AvailableAllocationUnits;
+    ULONG SectorsPerAllocationUnit;
+    ULONG BytesPerSector;
+} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
+
+typedef struct _FILE_FS_LABEL_INFORMATION
+{
+    ULONG VolumeLabelLength;
+    WCHAR VolumeLabel[1];
+} FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
+
 typedef struct _FILE_FS_VOLUME_INFORMATION
 {
-    LARGE_INTEGER   VolumeCreationTime;
-    ULONG           VolumeSerialNumber;
-    ULONG           VolumeLabelLength;
-    BOOLEAN         SupportsObjects;
-    WCHAR           VolumeLabel[1];
+    LARGE_INTEGER VolumeCreationTime;
+    ULONG VolumeSerialNumber;
+    ULONG VolumeLabelLength;
+    BOOLEAN SupportsObjects;
+    WCHAR VolumeLabel[1];
 } FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
 
 /*
@@ -941,19 +942,19 @@
 /* Class 0 */
 typedef struct _KEY_VALUE_ENTRY 
 {
-    PUNICODE_STRING  ValueName;
-    ULONG  DataLength;
-    ULONG  DataOffset;
-    ULONG  Type;
+    PUNICODE_STRING ValueName;
+    ULONG DataLength;
+    ULONG DataOffset;
+    ULONG Type;
 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
 
 /* Class 1 */
 typedef struct _KEY_VALUE_PARTIAL_INFORMATION 
 {
-    ULONG  TitleIndex;
-    ULONG  Type;
-    ULONG  DataLength;
-    UCHAR  Data[1];
+    ULONG TitleIndex;
+    ULONG Type;
+    ULONG DataLength;
+    UCHAR Data[1];
 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
 
 /* Class 2 */
@@ -989,21 +990,6 @@
     WCHAR Name[1];
 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
 
-/*
- * Process
- */
-
-/* Class 0 */
-typedef struct _PROCESS_BASIC_INFORMATION
-{
-    NTSTATUS ExitStatus;
-    PPEB PebBaseAddress;
-    KAFFINITY AffinityMask;
-    KPRIORITY BasePriority;
-    ULONG UniqueProcessId;
-    ULONG InheritedFromUniqueProcessId;
-} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
-
 /* File Pipe Structures for the FSCTLs */
 typedef struct _FILE_PIPE_WAIT_FOR_BUFFER
 {

Modified: trunk/reactos/include/ndk/zwtypes.h
--- trunk/reactos/include/ndk/zwtypes.h	2005-06-20 03:42:05 UTC (rev 16130)
+++ trunk/reactos/include/ndk/zwtypes.h	2005-06-20 03:55:42 UTC (rev 16131)
@@ -17,6 +17,9 @@
 /* CONSTANTS *****************************************************************/
 #define MAX_BUS_NAME 24
 
+#define EVENT_READ_ACCESS             1
+#define EVENT_WRITE_ACCESS            2
+
 #define EVENT_PAIR_ALL_ACCESS    (0x1F0000L)
 
 /* ENUMERATIONS **************************************************************/
@@ -381,6 +384,35 @@
 /*
  * Process
  */
+
+/* Class 0 */
+typedef struct _PROCESS_BASIC_INFORMATION
+{
+    NTSTATUS ExitStatus;
+    PPEB PebBaseAddress;
+    KAFFINITY AffinityMask;
+    KPRIORITY BasePriority;
+    ULONG UniqueProcessId;
+    ULONG InheritedFromUniqueProcessId;
+} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
+
+
+/* Class 4 */
+typedef struct _KERNEL_USER_TIMES
+{
+    LARGE_INTEGER CreateTime;
+    LARGE_INTEGER ExitTime;
+    LARGE_INTEGER KernelTime;
+    LARGE_INTEGER UserTime;
+} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
+
+/* Class 16 */
+typedef struct _PROCESS_PRIORITY_CLASS
+{
+    BOOLEAN Foreground;
+    UCHAR   PriorityClass;
+} PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
+
 /* Class 23 */
 typedef struct _PROCESS_DEVICEMAP_INFORMATION
 {
@@ -398,6 +430,12 @@
     };
 } PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
 
+/* Class 24 */
+typedef struct _PROCESS_SESSION_INFORMATION
+{
+    ULONG SessionId;
+} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
+
 /*
  * System
  */