More NDK Fixes
Modified: trunk/reactos/include/ndk/extypes.h
Modified: trunk/reactos/include/ndk/haltypes.h
Modified: trunk/reactos/include/ndk/kefuncs.h
Modified: trunk/reactos/include/ndk/ketypes.h
Modified: trunk/reactos/include/ndk/rtltypes.h
Modified: trunk/reactos/include/ndk/zwfuncs.h
Modified: trunk/reactos/include/ndk/zwtypes.h

Modified: trunk/reactos/include/ndk/extypes.h
--- trunk/reactos/include/ndk/extypes.h	2005-06-19 04:49:14 UTC (rev 16074)
+++ trunk/reactos/include/ndk/extypes.h	2005-06-19 07:03:18 UTC (rev 16075)
@@ -14,6 +14,8 @@
 
 /* EXPORTED DATA *************************************************************/
 extern POBJECT_TYPE NTOSAPI ExIoCompletionType;
+extern NTOSAPI POBJECT_TYPE ExMutantObjectType;
+extern NTOSAPI POBJECT_TYPE ExTimerType;
 
 /* CONSTANTS *****************************************************************/
 
@@ -45,5 +47,59 @@
 
 /* TYPES *********************************************************************/
 
+typedef struct _EX_QUEUE_WORKER_INFO 
+{
+    UCHAR QueueDisabled:1;
+    UCHAR MakeThreadsAsNecessary:1;
+    UCHAR WaitMode:1;
+    ULONG WorkerCount:29;
+} EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;
+
+typedef struct _EX_WORK_QUEUE 
+{
+    KQUEUE WorkerQueue;
+    ULONG DynamicThreadCount;
+    ULONG WorkItemsProcessed;
+    ULONG WorkItemsProcessedLastPass;
+    ULONG QueueDepthLastPass;
+    EX_QUEUE_WORKER_INFO Info;    
+} EX_WORK_QUEUE, *PEX_WORK_QUEUE;
+
+typedef struct _HANDLE_TABLE_ENTRY_INFO 
+{
+    ULONG AuditMask;
+} HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
+
+typedef struct _HANDLE_TABLE_ENTRY 
+{
+    union 
+    {
+        PVOID Object;
+        ULONG_PTR ObAttributes;
+        PHANDLE_TABLE_ENTRY_INFO InfoTable;
+        ULONG_PTR Value;
+    } u1;
+    union 
+    {
+        ULONG GrantedAccess;
+        USHORT GrantedAccessIndex;
+        LONG NextFreeTableEntry;
+    } u2;
+} HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
+
+typedef struct _HANDLE_TABLE
+{
+    ULONG Flags;
+    LONG HandleCount;
+    PHANDLE_TABLE_ENTRY **Table;
+    PEPROCESS QuotaProcess;
+    HANDLE UniqueProcessId;
+    LONG FirstFreeTableEntry;
+    LONG NextIndexNeedingPool;
+    ERESOURCE HandleTableLock;
+    LIST_ENTRY HandleTableList;
+    KEVENT HandleContentionEvent;
+} HANDLE_TABLE;
+
 #endif
 

Modified: trunk/reactos/include/ndk/haltypes.h
--- trunk/reactos/include/ndk/haltypes.h	2005-06-19 04:49:14 UTC (rev 16074)
+++ trunk/reactos/include/ndk/haltypes.h	2005-06-19 07:03:18 UTC (rev 16075)
@@ -10,7 +10,7 @@
 #define _HALTYPES_H
 
 /* DEPENDENCIES **************************************************************/
-#include <ddk/ntdddisk.h>
+//#include <ddk/ntdddisk.h>
 
 /* EXPORTED DATA *************************************************************/
 extern ULONG NTOSAPI KdComPortInUse;
@@ -48,7 +48,7 @@
    ULONG Reserved;
 } LOADER_MODULE, *PLOADER_MODULE;
 
-typedef struct _LOADER_PARAMETER_BLOCK 
+typedef struct _LOADER_PARAMETER_BLOCK
 {
    ULONG Flags;
    ULONG MemLower;
@@ -64,6 +64,9 @@
    ULONG DrivesAddr;
    ULONG ConfigTable;
    ULONG BootLoaderName;
+   ULONG PageDirectoryStart;
+   ULONG PageDirectoryEnd;
+   ULONG KernelBase;
 } LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
 
 #endif

Modified: trunk/reactos/include/ndk/kefuncs.h
--- trunk/reactos/include/ndk/kefuncs.h	2005-06-19 04:49:14 UTC (rev 16074)
+++ trunk/reactos/include/ndk/kefuncs.h	2005-06-19 07:03:18 UTC (rev 16075)
@@ -123,23 +123,23 @@
     IN PKTHREAD *Thread OPTIONAL
 );
 
-PVOID
+PCONFIGURATION_COMPONENT_DATA 
 STDCALL
-KeFindConfigurationEntry(
-    IN PVOID Unknown,
-    IN ULONG Class,
+KeFindConfigurationNextEntry(
+    IN PCONFIGURATION_COMPONENT_DATA Child,
+    IN CONFIGURATION_CLASS Class,
     IN CONFIGURATION_TYPE Type,
-    IN PULONG RegKey
+    IN PULONG ComponentKey OPTIONAL,
+    IN PCONFIGURATION_COMPONENT_DATA *NextLink
 );
-
-PVOID
+                             
+PCONFIGURATION_COMPONENT_DATA 
 STDCALL
-KeFindConfigurationNextEntry(
-    IN PVOID Unknown,
-    IN ULONG Class,
+KeFindConfigurationEntry(
+    IN PCONFIGURATION_COMPONENT_DATA Child,
+    IN CONFIGURATION_CLASS Class,
     IN CONFIGURATION_TYPE Type,
-    IN PULONG RegKey,
-    IN PVOID *NextLink
+    IN PULONG ComponentKey OPTIONAL
 );
 
 VOID

Modified: trunk/reactos/include/ndk/ketypes.h
--- trunk/reactos/include/ndk/ketypes.h	2005-06-19 04:49:14 UTC (rev 16074)
+++ trunk/reactos/include/ndk/ketypes.h	2005-06-19 07:03:18 UTC (rev 16075)
@@ -11,11 +11,22 @@
 
 /* DEPENDENCIES **************************************************************/
 #include "haltypes.h"
+#include <arc/arc.h>
 
 /* CONSTANTS *****************************************************************/
 #define SSDT_MAX_ENTRIES 4
 #define PROCESSOR_FEATURE_MAX 64
 
+#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
+
+#define THREAD_WAIT_OBJECTS 4
+
+/* FIXME: Create an ASM Offset File */
+#define KTSS_ESP0      (0x4)
+#define KTSS_CR3       (0x1C)
+#define KTSS_EFLAGS    (0x24)
+#define KTSS_IOMAPBASE (0x66)
+
 /* EXPORTED DATA *************************************************************/
 extern CHAR NTOSAPI KeNumberProcessors;
 extern LOADER_PARAMETER_BLOCK NTOSAPI KeLoaderBlock;
@@ -32,6 +43,15 @@
 
 /* TYPES *********************************************************************/
 
+typedef struct _CONFIGURATION_COMPONENT_DATA 
+{
+  struct _CONFIGURATION_COMPONENT_DATA *Parent;
+  struct _CONFIGURATION_COMPONENT_DATA *Child;
+  struct _CONFIGURATION_COMPONENT_DATA *Sibling;
+  CONFIGURATION_COMPONENT Component;
+} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA;
+
+
 typedef enum _KAPC_ENVIRONMENT 
 {
     OriginalApcEnvironment,
@@ -120,6 +140,99 @@
   } HighWord;
 } LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
 
+
+#include <pshpack1.h>
+
+typedef struct _KTSSNOIOPM
+{
+    USHORT PreviousTask;
+    USHORT Reserved1;
+    ULONG  Esp0;
+    USHORT Ss0;
+    USHORT Reserved2;
+    ULONG  Esp1;
+    USHORT Ss1;
+    USHORT Reserved3;
+    ULONG  Esp2;
+    USHORT Ss2;
+    USHORT Reserved4;
+    ULONG  Cr3;
+    ULONG  Eip;
+    ULONG  Eflags;
+    ULONG  Eax;
+    ULONG  Ecx;
+    ULONG  Edx;
+    ULONG  Ebx;
+    ULONG  Esp;
+    ULONG  Ebp;
+    ULONG  Esi;
+    ULONG  Edi;
+    USHORT Es;
+    USHORT Reserved5;
+    USHORT Cs;
+    USHORT Reserved6;
+    USHORT Ss;
+    USHORT Reserved7;
+    USHORT Ds;
+    USHORT Reserved8;
+    USHORT Fs;
+    USHORT Reserved9;
+    USHORT Gs;
+    USHORT Reserved10;
+    USHORT Ldt;
+    USHORT Reserved11;
+    USHORT Trap;
+    USHORT IoMapBase;
+    /* no interrupt redirection map */
+    UCHAR IoBitmap[1];
+} KTSSNOIOPM;
+
+typedef struct _KTSS
+{
+    USHORT PreviousTask;
+    USHORT Reserved1;
+    ULONG  Esp0;
+    USHORT Ss0;
+    USHORT Reserved2;
+    ULONG  Esp1;
+    USHORT Ss1;
+    USHORT Reserved3;
+    ULONG  Esp2;
+    USHORT Ss2;
+    USHORT Reserved4;
+    ULONG  Cr3;
+    ULONG  Eip;
+    ULONG  Eflags;
+    ULONG  Eax;
+    ULONG  Ecx;
+    ULONG  Edx;
+    ULONG  Ebx;
+    ULONG  Esp;
+    ULONG  Ebp;
+    ULONG  Esi;
+    ULONG  Edi;
+    USHORT Es;
+    USHORT Reserved5;
+    USHORT Cs;
+    USHORT Reserved6;
+    USHORT Ss;
+    USHORT Reserved7;
+    USHORT Ds;
+    USHORT Reserved8;
+    USHORT Fs;
+    USHORT Reserved9;
+    USHORT Gs;
+    USHORT Reserved10;
+    USHORT Ldt;
+    USHORT Reserved11;
+    USHORT Trap;
+    USHORT IoMapBase;
+    /* no interrupt redirection map */
+    UCHAR  IoBitmap[8193];
+} KTSS;
+
+#include <poppack.h>
+
 /* i386 Doesn't have Exception Frames */
 typedef struct _KEXCEPTION_FRAME {
 
@@ -157,6 +270,43 @@
     KEVENT HighEvent;
 } KEVENT_PAIR, *PKEVENT_PAIR;
 
-/* FIXME: Add KOBJECTS Here */
+typedef enum _KOBJECTS {
+   EventNotificationObject = 0,
+   EventSynchronizationObject = 1,
+   MutantObject = 2,
+   ProcessObject = 3,
+   QueueObject = 4,
+   SemaphoreObject = 5,
+   ThreadObject = 6,
+   GateObject = 7,
+   TimerNotificationObject = 8,
+   TimerSynchronizationObject = 9,
+   Spare2Object = 10,
+   Spare3Object = 11,
+   Spare4Object = 12,
+   Spare5Object = 13,
+   Spare6Object = 14,
+   Spare7Object = 15,
+   Spare8Object = 16,
+   Spare9Object = 17,
+   ApcObject = 18,
+   DpcObject = 19,
+   DeviceQueueObject = 20,
+   EventPairObject = 21,
+   InterruptObject = 22,
+   ProfileObject = 23,
+   ThreadedDpcObject = 24,
+   MaximumKernelObject = 25
+} KOBJECTS;
 
+typedef enum _KTHREAD_STATE {
+    Initialized,
+    Ready,
+    Running,
+    Standby,
+    Terminated,
+    Waiting,
+    Transition,
+    DeferredReady,
+} KTHREAD_STATE, *PKTHREAD_STATE;
 #endif

Modified: trunk/reactos/include/ndk/rtltypes.h
--- trunk/reactos/include/ndk/rtltypes.h	2005-06-19 04:49:14 UTC (rev 16074)
+++ trunk/reactos/include/ndk/rtltypes.h	2005-06-19 07:03:18 UTC (rev 16075)
@@ -21,6 +21,9 @@
 
 #define PEB_BASE        (0x7FFDF000)
 
+#define EXCEPTION_CONTINUE_SEARCH     0
+#define EXCEPTION_EXECUTE_HANDLER     1
+
 #define EXCEPTION_UNWINDING 0x02
 #define EXCEPTION_EXIT_UNWIND 0x04
 #define EXCEPTION_STACK_INVALID 0x8
@@ -93,7 +96,7 @@
 {
     USHORT Length;
     USHORT Flags;
-    UCHAR Text[1];
+    CHAR Text[1];
 } RTL_MESSAGE_RESOURCE_ENTRY, *PRTL_MESSAGE_RESOURCE_ENTRY;
 
 typedef struct _RTL_MESSAGE_RESOURCE_BLOCK 

Modified: trunk/reactos/include/ndk/zwfuncs.h
--- trunk/reactos/include/ndk/zwfuncs.h	2005-06-19 04:49:14 UTC (rev 16074)
+++ trunk/reactos/include/ndk/zwfuncs.h	2005-06-19 07:03:18 UTC (rev 16075)
@@ -2494,6 +2494,18 @@
 
 NTSTATUS
 STDCALL
+NtResumeProcess(
+    IN HANDLE ProcessHandle
+);
+
+NTSTATUS
+STDCALL
+ZwResumeProcess(
+    IN HANDLE ProcessHandle
+);
+    
+NTSTATUS
+STDCALL
 NtSaveKey(
     IN HANDLE KeyHandle,
     IN HANDLE FileHandle
@@ -3246,6 +3258,18 @@
     IN PULONG PreviousSuspendCount 
 );
 
+NTSTATUS
+STDCALL
+NtSuspendProcess(
+    IN HANDLE ProcessHandle
+);
+
+NTSTATUS
+STDCALL
+ZwSuspendProcess(
+    IN HANDLE ProcessHandle
+);
+
 NTSTATUS 
 STDCALL 
 NtTerminateThread(
@@ -3482,7 +3506,7 @@
 NTSTATUS
 STDCALL
 NtDelayExecution(
-    IN ULONG Alertable,
+    IN BOOLEAN Alertable,
     IN LARGE_INTEGER *Interval
 );
 
@@ -3603,12 +3627,12 @@
 NTSTATUS
 STDCALL
 NtRaiseHardError(
-    IN NTSTATUS Status,
-    ULONG Unknown2,
-    ULONG Unknown3,
-    ULONG Unknown4,
-    ULONG Unknown5,
-    ULONG Unknown6
+    IN NTSTATUS ErrorStatus,
+    IN ULONG NumberOfParameters,
+    IN PUNICODE_STRING UnicodeStringParameterMask  OPTIONAL,
+    IN PVOID *Parameters,
+    IN HARDERROR_RESPONSE_OPTION ResponseOption,
+    OUT PHARDERROR_RESPONSE Response
 );
 
 NTSTATUS

Modified: trunk/reactos/include/ndk/zwtypes.h
--- trunk/reactos/include/ndk/zwtypes.h	2005-06-19 04:49:14 UTC (rev 16074)
+++ trunk/reactos/include/ndk/zwtypes.h	2005-06-19 07:03:18 UTC (rev 16075)
@@ -17,6 +17,8 @@
 /* CONSTANTS *****************************************************************/
 #define MAX_BUS_NAME 24
 
+#define EVENT_PAIR_ALL_ACCESS    (0x1F0000L)
+
 /* ENUMERATIONS **************************************************************/
 
 typedef enum _PLUGPLAY_BUS_CLASS