Build ntoskrnl with NDK, and don't use rosrtl
Modified: trunk/reactos/include/ntos/ps.h
Modified: trunk/reactos/include/ntos/security.h
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
Modified: trunk/reactos/ntoskrnl/ex/win32k.c
Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/include/internal/port.h
Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/io/arcname.c
Modified: trunk/reactos/ntoskrnl/io/driver.c
Modified: trunk/reactos/ntoskrnl/io/file.c
Modified: trunk/reactos/ntoskrnl/io/iomgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/resource.c
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c
Modified: trunk/reactos/ntoskrnl/ke/i386/kernel.c
Modified: trunk/reactos/ntoskrnl/ldr/init.c
Modified: trunk/reactos/ntoskrnl/ldr/loader.c
Modified: trunk/reactos/ntoskrnl/ldr/sysdll.c
Modified: trunk/reactos/ntoskrnl/lpc/port.c
Modified: trunk/reactos/ntoskrnl/mm/pagefile.c
Modified: trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/ob/wait.c
Modified: trunk/reactos/ntoskrnl/ps/locale.c
Modified: trunk/reactos/ntoskrnl/ps/query.c
Modified: trunk/reactos/ntoskrnl/ps/thread.c
Modified: trunk/reactos/ntoskrnl/rtl/libsupp.c
Modified: trunk/reactos/ntoskrnl/rtl/rangelist.c
Modified: trunk/reactos/ntoskrnl/rtl/sprintf.c
Modified: trunk/reactos/ntoskrnl/rtl/stdlib.c
Modified: trunk/reactos/ntoskrnl/rtl/swprintf.c

Modified: trunk/reactos/include/ntos/ps.h
--- trunk/reactos/include/ntos/ps.h	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/include/ntos/ps.h	2005-06-25 14:04:56 UTC (rev 16266)
@@ -136,7 +136,7 @@
 (STDCALL *PW32_THREAD_CALLBACK)(struct _ETHREAD *Thread,
 			        BOOLEAN Create);
 
-typedef struct _EJOB *PEJOB;
+struct _EJOB;
 
 NTSTATUS STDCALL
 PsCreateSystemProcess (PHANDLE ProcessHandle,
@@ -189,19 +189,19 @@
 
 PVOID
 STDCALL PsGetJobLock(
-    PEJOB	Job
+    struct _EJOB*	Job
 	);
 
 
 PVOID
 STDCALL PsGetJobSessionId(
-    PEJOB	Job
+    struct _EJOB*	Job
 	);
 
 
 ULONG
 STDCALL PsGetJobUIRestrictionsClass(
-   	PEJOB	Job
+   	struct _EJOB*	Job
 	);
 
 
@@ -247,7 +247,7 @@
 	);
 
 
-PEJOB
+struct _EJOB*
 STDCALL PsGetProcessJob(
 	PEPROCESS Process
 	);
@@ -378,7 +378,7 @@
 
 VOID
 STDCALL PsSetJobUIRestrictionsClass(
-    PEJOB	Job,
+    struct _EJOB*	Job,
     ULONG	UIRestrictionsClass	
 	);
 

Modified: trunk/reactos/include/ntos/security.h
--- trunk/reactos/include/ntos/security.h	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/include/ntos/security.h	2005-06-25 14:04:56 UTC (rev 16266)
@@ -4,6 +4,7 @@
 #include <ntos/ntdef.h>
 #include <ntos/types.h>
 
+#ifndef __USE_W32API
 /* Privileges */
 #define SE_MIN_WELL_KNOWN_PRIVILEGE		(2L)
 #define SE_CREATE_TOKEN_PRIVILEGE		(2L)
@@ -31,7 +32,7 @@
 #define SE_CHANGE_NOTIFY_PRIVILEGE		(23L)
 #define SE_REMOTE_SHUTDOWN_PRIVILEGE		(24L)
 #define SE_MAX_WELL_KNOWN_PRIVILEGE		SE_REMOTE_SHUTDOWN_PRIVILEGE
-
+#endif
 /* TOKEN_GROUPS structure */
 #ifndef SE_GROUP_MANDATORY
 #define SE_GROUP_MANDATORY                (0x1L)

Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
--- trunk/reactos/ntoskrnl/ex/sysinfo.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -97,7 +97,7 @@
 
 NTSTATUS STDCALL
 NtQuerySystemEnvironmentValue (IN	PUNICODE_STRING	VariableName,
-			       OUT	PWCHAR		ValueBuffer,
+			       OUT	PWSTR		ValueBuffer,
 			       IN	ULONG		ValueBufferLength,
 			       IN OUT	PULONG		ReturnLength  OPTIONAL)
 {
@@ -353,17 +353,17 @@
 	{
 		return (STATUS_INFO_LENGTH_MISMATCH);
 	}
-	Sbi->Unknown = 0;
-	Sbi->MaximumIncrement = KeMaximumIncrement;
-	Sbi->PhysicalPageSize = PAGE_SIZE;
+	Sbi->Reserved = 0;
+	Sbi->TimerResolution = KeMaximumIncrement;
+	Sbi->PageSize = PAGE_SIZE;
 	Sbi->NumberOfPhysicalPages = MmStats.NrTotalPages;
-	Sbi->LowestPhysicalPage = 0; /* FIXME */
-	Sbi->HighestPhysicalPage = MmStats.NrTotalPages; /* FIXME */
+	Sbi->LowestPhysicalPageNumber = 0; /* FIXME */
+	Sbi->HighestPhysicalPageNumber = MmStats.NrTotalPages; /* FIXME */
 	Sbi->AllocationGranularity = MM_VIRTMEM_GRANULARITY; /* hard coded on Intel? */
-	Sbi->LowestUserAddress = 0x10000; /* Top of 64k */
-	Sbi->HighestUserAddress = (ULONG_PTR)MmHighestUserAddress;
-	Sbi->ActiveProcessors = KeActiveProcessors;
-	Sbi->NumberProcessors = KeNumberProcessors;
+	Sbi->MinimumUserModeAddress = 0x10000; /* Top of 64k */
+	Sbi->MaximumUserModeAddress = (ULONG_PTR)MmHighestUserAddress;
+	Sbi->ActiveProcessorsAffinityMask = KeActiveProcessors;
+	Sbi->NumberOfProcessors = KeNumberProcessors;
 	return (STATUS_SUCCESS);
 }
 
@@ -385,8 +385,8 @@
 	Spi->ProcessorArchitecture = 0; /* Intel Processor */
 	Spi->ProcessorLevel	   = Prcb->CpuType;
 	Spi->ProcessorRevision	   = Prcb->CpuStep;
-	Spi->Unknown 		   = 0;
-	Spi->FeatureBits	   = Prcb->FeatureBits;
+	Spi->Reserved 		   = 0;
+	Spi->ProcessorFeatureBits	   = Prcb->FeatureBits;
 
 	DPRINT("Arch %d Level %d Rev 0x%x\n", Spi->ProcessorArchitecture,
 		Spi->ProcessorLevel, Spi->ProcessorRevision);
@@ -413,21 +413,21 @@
 
 	TheIdleProcess = PsIdleProcess;
 
-	Spi->IdleTime.QuadPart = TheIdleProcess->Pcb.KernelTime * 100000LL;
+	Spi->IdleProcessTime.QuadPart = TheIdleProcess->Pcb.KernelTime * 100000LL;
 
-	Spi->ReadTransferCount = IoReadTransferCount;
-	Spi->WriteTransferCount = IoWriteTransferCount;
-	Spi->OtherTransferCount = IoOtherTransferCount;
-	Spi->ReadOperationCount = IoReadOperationCount;
-	Spi->WriteOperationCount = IoWriteOperationCount;
-	Spi->OtherOperationCount = IoOtherOperationCount;
+	Spi->IoReadTransferCount = IoReadTransferCount;
+	Spi->IoWriteTransferCount = IoWriteTransferCount;
+	Spi->IoOtherTransferCount = IoOtherTransferCount;
+	Spi->IoReadOperationCount = IoReadOperationCount;
+	Spi->IoWriteOperationCount = IoWriteOperationCount;
+	Spi->IoOtherOperationCount = IoOtherOperationCount;
 
 	Spi->AvailablePages = MmStats.NrFreePages;
 /*
         Add up all the used "Commitied" memory + pagefile.
         Not sure this is right. 8^\
  */
-	Spi->TotalCommittedPages = MiMemoryConsumers[MC_PPOOL].PagesUsed +
+	Spi->CommittedPages = MiMemoryConsumers[MC_PPOOL].PagesUsed +
 				   MiMemoryConsumers[MC_NPPOOL].PagesUsed+
                                    MiMemoryConsumers[MC_CACHE].PagesUsed+
 		                   MiMemoryConsumers[MC_USER].PagesUsed+
@@ -437,79 +437,79 @@
 	All this make Taskmgr happy but not sure it is the right numbers.
 	This too, fixes some of GlobalMemoryStatusEx numbers.
 */
-        Spi->TotalCommitLimit = MmStats.NrTotalPages + MiFreeSwapPages +
+        Spi->CommitLimit = MmStats.NrTotalPages + MiFreeSwapPages +
                                 MiUsedSwapPages;
 
 	Spi->PeakCommitment = 0; /* FIXME */
-	Spi->PageFaults = 0; /* FIXME */
-	Spi->WriteCopyFaults = 0; /* FIXME */
-	Spi->TransitionFaults = 0; /* FIXME */
-	Spi->CacheTransitionFaults = 0; /* FIXME */
-	Spi->DemandZeroFaults = 0; /* FIXME */
-	Spi->PagesRead = 0; /* FIXME */
-	Spi->PageReadIos = 0; /* FIXME */
-	Spi->CacheReads = 0; /* FIXME */
-	Spi->CacheIos = 0; /* FIXME */
-	Spi->PagefilePagesWritten = 0; /* FIXME */
-	Spi->PagefilePageWriteIos = 0; /* FIXME */
-	Spi->MappedFilePagesWritten = 0; /* FIXME */
-	Spi->MappedFilePageWriteIos = 0; /* FIXME */
+	Spi->PageFaultCount = 0; /* FIXME */
+	Spi->CopyOnWriteCount = 0; /* FIXME */
+	Spi->TransitionCount = 0; /* FIXME */
+	Spi->CacheTransitionCount = 0; /* FIXME */
+	Spi->DemandZeroCount = 0; /* FIXME */
+	Spi->PageReadCount = 0; /* FIXME */
+	Spi->PageReadIoCount = 0; /* FIXME */
+	Spi->CacheReadCount = 0; /* FIXME */
+	Spi->CacheIoCount = 0; /* FIXME */
+    Spi->DirtyPagesWriteCount = 0; /* FIXME */
+	Spi->DirtyWriteIoCount = 0; /* FIXME */
+	Spi->MappedPagesWriteCount = 0; /* FIXME */
+	Spi->MappedWriteIoCount = 0; /* FIXME */
 
-	Spi->PagedPoolUsage = MiMemoryConsumers[MC_PPOOL].PagesUsed;
+	Spi->PagedPoolPages = MiMemoryConsumers[MC_PPOOL].PagesUsed;
 	Spi->PagedPoolAllocs = 0; /* FIXME */
 	Spi->PagedPoolFrees = 0; /* FIXME */
-	Spi->NonPagedPoolUsage = MiMemoryConsumers[MC_NPPOOL].PagesUsed;
+	Spi->NonPagedPoolPages = MiMemoryConsumers[MC_NPPOOL].PagesUsed;
 	Spi->NonPagedPoolAllocs = 0; /* FIXME */
 	Spi->NonPagedPoolFrees = 0; /* FIXME */
 
-	Spi->TotalFreeSystemPtes = 0; /* FIXME */
+	Spi->FreeSystemPtes = 0; /* FIXME */
 
-	Spi->SystemCodePage = MmStats.NrSystemPages; /* FIXME */
+	Spi->ResidentSystemCodePage = MmStats.NrSystemPages; /* FIXME */
 
 	Spi->TotalSystemDriverPages = 0; /* FIXME */
 	Spi->TotalSystemCodePages = 0; /* FIXME */
-	Spi->SmallNonPagedLookasideListAllocateHits = 0; /* FIXME */
-	Spi->SmallPagedLookasideListAllocateHits = 0; /* FIXME */
-	Spi->Reserved3 = 0; /* FIXME */
+	Spi->NonPagedPoolLookasideHits = 0; /* FIXME */
+	Spi->PagedPoolLookasideHits = 0; /* FIXME */
+	Spi->Spare3Count = 0; /* FIXME */
 
-	Spi->MmSystemCachePage = MiMemoryConsumers[MC_CACHE].PagesUsed;
-	Spi->PagedPoolPage = MmPagedPoolSize; /* FIXME */
+	Spi->ResidentSystemCachePage = MiMemoryConsumers[MC_CACHE].PagesUsed;
+	Spi->ResidentPagedPoolPage = MmPagedPoolSize; /* FIXME */
 
-	Spi->SystemDriverPage = 0; /* FIXME */
-	Spi->FastReadNoWait = 0; /* FIXME */
-	Spi->FastReadWait = 0; /* FIXME */
-	Spi->FastReadResourceMiss = 0; /* FIXME */
-	Spi->FastReadNotPossible = 0; /* FIXME */
+	Spi->ResidentSystemDriverPage = 0; /* FIXME */
+	Spi->CcFastReadNoWait = 0; /* FIXME */
+	Spi->CcFastReadWait = 0; /* FIXME */
+	Spi->CcFastReadResourceMiss = 0; /* FIXME */
+	Spi->CcFastReadNotPossible = 0; /* FIXME */
 
-	Spi->FastMdlReadNoWait = 0; /* FIXME */
-	Spi->FastMdlReadWait = 0; /* FIXME */
-	Spi->FastMdlReadResourceMiss = 0; /* FIXME */
-	Spi->FastMdlReadNotPossible = 0; /* FIXME */
+	Spi->CcFastMdlReadNoWait = 0; /* FIXME */
+	Spi->CcFastMdlReadWait = 0; /* FIXME */
+	Spi->CcFastMdlReadResourceMiss = 0; /* FIXME */
+	Spi->CcFastMdlReadNotPossible = 0; /* FIXME */
 
-	Spi->MapDataNoWait = 0; /* FIXME */
-	Spi->MapDataWait = 0; /* FIXME */
-	Spi->MapDataNoWaitMiss = 0; /* FIXME */
-	Spi->MapDataWaitMiss = 0; /* FIXME */
+	Spi->CcMapDataNoWait = 0; /* FIXME */
+	Spi->CcMapDataWait = 0; /* FIXME */
+	Spi->CcMapDataNoWaitMiss = 0; /* FIXME */
+	Spi->CcMapDataWaitMiss = 0; /* FIXME */
 
-	Spi->PinMappedDataCount = 0; /* FIXME */
-	Spi->PinReadNoWait = 0; /* FIXME */
-	Spi->PinReadWait = 0; /* FIXME */
-	Spi->PinReadNoWaitMiss = 0; /* FIXME */
-	Spi->PinReadWaitMiss = 0; /* FIXME */
-	Spi->CopyReadNoWait = 0; /* FIXME */
-	Spi->CopyReadWait = 0; /* FIXME */
-	Spi->CopyReadNoWaitMiss = 0; /* FIXME */
-	Spi->CopyReadWaitMiss = 0; /* FIXME */
+	Spi->CcPinMappedDataCount = 0; /* FIXME */
+	Spi->CcPinReadNoWait = 0; /* FIXME */
+	Spi->CcPinReadWait = 0; /* FIXME */
+	Spi->CcPinReadNoWaitMiss = 0; /* FIXME */
+	Spi->CcPinReadWaitMiss = 0; /* FIXME */
+	Spi->CcCopyReadNoWait = 0; /* FIXME */
+	Spi->CcCopyReadWait = 0; /* FIXME */
+	Spi->CcCopyReadNoWaitMiss = 0; /* FIXME */
+	Spi->CcCopyReadWaitMiss = 0; /* FIXME */
 
-	Spi->MdlReadNoWait = 0; /* FIXME */
-	Spi->MdlReadWait = 0; /* FIXME */
-	Spi->MdlReadNoWaitMiss = 0; /* FIXME */
-	Spi->MdlReadWaitMiss = 0; /* FIXME */
-	Spi->ReadAheadIos = 0; /* FIXME */
-	Spi->LazyWriteIos = 0; /* FIXME */
-	Spi->LazyWritePages = 0; /* FIXME */
-	Spi->DataFlushes = 0; /* FIXME */
-	Spi->DataPages = 0; /* FIXME */
+	Spi->CcMdlReadNoWait = 0; /* FIXME */
+	Spi->CcMdlReadWait = 0; /* FIXME */
+	Spi->CcMdlReadNoWaitMiss = 0; /* FIXME */
+	Spi->CcMdlReadWaitMiss = 0; /* FIXME */
+	Spi->CcReadAheadIos = 0; /* FIXME */
+	Spi->CcLazyWriteIos = 0; /* FIXME */
+	Spi->CcLazyWritePages = 0; /* FIXME */
+	Spi->CcDataFlushes = 0; /* FIXME */
+	Spi->CcDataPages = 0; /* FIXME */
 	Spi->ContextSwitches = 0; /* FIXME */
 	Spi->FirstLevelTbFills = 0; /* FIXME */
 	Spi->SecondLevelTbFills = 0; /* FIXME */
@@ -1100,39 +1100,39 @@
 /* Class 26 - Load Image */
 SSI_DEF(SystemLoadImage)
 {
-  PSYSTEM_LOAD_IMAGE Sli = (PSYSTEM_LOAD_IMAGE)Buffer;
+  PSYSTEM_GDI_DRIVER_INFORMATION Sli = (PSYSTEM_GDI_DRIVER_INFORMATION)Buffer;
 
-  if (sizeof(SYSTEM_LOAD_IMAGE) != Size)
+  if (sizeof(SYSTEM_GDI_DRIVER_INFORMATION) != Size)
     {
       return(STATUS_INFO_LENGTH_MISMATCH);
     }
 
-  return(LdrpLoadImage(&Sli->ModuleName,
-		       &Sli->ModuleBase,
+  return(LdrpLoadImage(&Sli->DriverName,
+		       &Sli->ImageAddress,
 		       &Sli->SectionPointer,
 		       &Sli->EntryPoint,
-		       &Sli->ExportDirectory));
+		       (PVOID)&Sli->ExportSectionPointer));
 }
 
 /* Class 27 - Unload Image */
 SSI_DEF(SystemUnloadImage)
 {
-  PSYSTEM_UNLOAD_IMAGE Sui = (PSYSTEM_UNLOAD_IMAGE)Buffer;
+  PVOID Sui = (PVOID)Buffer;
 
-  if (sizeof(SYSTEM_UNLOAD_IMAGE) != Size)
+  if (sizeof(PVOID) != Size)
     {
       return(STATUS_INFO_LENGTH_MISMATCH);
     }
 
-  return(LdrpUnloadImage(Sui->ModuleBase));
+  return(LdrpUnloadImage(Sui));
 }
 
 /* Class 28 - Time Adjustment Information */
 QSI_DEF(SystemTimeAdjustmentInformation)
 {
-	if (sizeof (SYSTEM_SET_TIME_ADJUSTMENT) > Size)
+	if (sizeof (SYSTEM_SET_TIME_ADJUST_INFORMATION) > Size)
 	{
-		* ReqSize = sizeof (SYSTEM_SET_TIME_ADJUSTMENT);
+		* ReqSize = sizeof (SYSTEM_SET_TIME_ADJUST_INFORMATION);
 		return (STATUS_INFO_LENGTH_MISMATCH);
 	}
 	/* FIXME: */
@@ -1142,7 +1142,7 @@
 
 SSI_DEF(SystemTimeAdjustmentInformation)
 {
-	if (sizeof (SYSTEM_SET_TIME_ADJUSTMENT) > Size)
+	if (sizeof (SYSTEM_SET_TIME_ADJUST_INFORMATION) > Size)
 	{
 		return (STATUS_INFO_LENGTH_MISMATCH);
 	}
@@ -1229,7 +1229,7 @@
   DPRINT1("Faking max registry size of 32 MB\n");
   srqi->RegistryQuotaAllowed = 0x2000000;
   srqi->RegistryQuotaUsed = 0x200000;
-  srqi->Reserved1 = (void*)0x200000;
+  srqi->PagedPoolSize = 0x200000;
 
   return STATUS_SUCCESS;
 }
@@ -1244,14 +1244,14 @@
 /* Class 38 - Load And Call Image */
 SSI_DEF(SystemLoadAndCallImage)
 {
-  PSYSTEM_LOAD_AND_CALL_IMAGE Slci = (PSYSTEM_LOAD_AND_CALL_IMAGE)Buffer;
+  PUNICODE_STRING Slci = (PUNICODE_STRING)Buffer;
 
-  if (sizeof(SYSTEM_LOAD_AND_CALL_IMAGE) != Size)
+  if (sizeof(UNICODE_STRING) != Size)
     {
       return(STATUS_INFO_LENGTH_MISMATCH);
     }
 
-  return(LdrpLoadAndCallImage(&Slci->ModuleName));
+  return(LdrpLoadAndCallImage(Slci));
 }
 
 /* Class 39 - Priority Separation */
@@ -1532,7 +1532,7 @@
   /*
    * Check the request is valid.
    */
-  if ((SystemInformationClass >= SystemInformationClassMin) &&
+  if ((SystemInformationClass >= SystemBasicInformation) &&
       (SystemInformationClass < SystemInformationClassMax))
     {
       if (NULL != CallQS [SystemInformationClass].Query)
@@ -1609,7 +1609,7 @@
 	/*
 	 * Check the request is valid.
 	 */
-	if (	(SystemInformationClass >= SystemInformationClassMin)
+	if (	(SystemInformationClass >= SystemBasicInformation)
 		&& (SystemInformationClass < SystemInformationClassMax)
 		)
 	{

Modified: trunk/reactos/ntoskrnl/ex/win32k.c
--- trunk/reactos/ntoskrnl/ex/win32k.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/ex/win32k.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -18,25 +18,20 @@
 POBJECT_TYPE EXPORTED ExWindowStationObjectType = NULL;
 POBJECT_TYPE EXPORTED ExDesktopObjectType = NULL;
 
-static GENERIC_MAPPING ExpWindowStationMapping = {
-
-    STANDARD_RIGHTS_READ     | WINSTA_ENUMDESKTOPS      | WINSTA_ENUMERATE         | WINSTA_READATTRIBUTES | WINSTA_READSCREEN,
-    STANDARD_RIGHTS_WRITE    | WINSTA_ACCESSCLIPBOARD   | WINSTA_CREATEDESKTOP     | WINSTA_WRITEATTRIBUTES,
-    STANDARD_RIGHTS_EXECUTE  | WINSTA_ACCESSGLOBALATOMS | WINSTA_EXITWINDOWS,
-    STANDARD_RIGHTS_REQUIRED | WINSTA_ACCESSCLIPBOARD   | WINSTA_ACCESSGLOBALATOMS | WINSTA_CREATEDESKTOP  |
-                               WINSTA_ENUMDESKTOPS      | WINSTA_ENUMERATE         | WINSTA_EXITWINDOWS    |
-                               WINSTA_READATTRIBUTES    | WINSTA_READSCREEN        | WINSTA_WRITEATTRIBUTES
+static GENERIC_MAPPING ExpWindowStationMapping = 
+{
+    STANDARD_RIGHTS_READ,
+    STANDARD_RIGHTS_WRITE,
+    STANDARD_RIGHTS_EXECUTE,
+    STANDARD_RIGHTS_REQUIRED
 };
 
-static GENERIC_MAPPING ExpDesktopMapping = {
-
-    STANDARD_RIGHTS_READ     | DESKTOP_ENUMERATE       | DESKTOP_READOBJECTS,
-    STANDARD_RIGHTS_WRITE    | DESKTOP_CREATEMENU      | DESKTOP_CREATEWINDOW    | DESKTOP_HOOKCONTROL   |
-                               DESKTOP_JOURNALPLAYBACK | DESKTOP_JOURNALRECORD   | DESKTOP_WRITEOBJECTS,
-    STANDARD_RIGHTS_EXECUTE  | DESKTOP_SWITCHDESKTOP,
-    STANDARD_RIGHTS_REQUIRED | DESKTOP_CREATEMENU      | DESKTOP_CREATEWINDOW    | DESKTOP_ENUMERATE     |
-                               DESKTOP_HOOKCONTROL     | DESKTOP_JOURNALPLAYBACK | DESKTOP_JOURNALRECORD |
-                               DESKTOP_READOBJECTS     | DESKTOP_SWITCHDESKTOP   | DESKTOP_WRITEOBJECTS
+static GENERIC_MAPPING ExpDesktopMapping =
+{
+    STANDARD_RIGHTS_READ,
+    STANDARD_RIGHTS_WRITE,
+    STANDARD_RIGHTS_EXECUTE,
+    STANDARD_RIGHTS_REQUIRED
 };
 
 OB_OPEN_METHOD ExpWindowStationObjectOpen = NULL;

Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
--- trunk/reactos/ntoskrnl/inbv/inbv.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/inbv/inbv.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -37,9 +37,8 @@
     {
       NTSTATUS Status;
       OBJECT_ATTRIBUTES ObjectAttributes;
-      UNICODE_STRING BootVidName;
+      UNICODE_STRING BootVidName = RTL_CONSTANT_STRING(L"\\Device\\BootVid");
 
-      RtlRosInitUnicodeStringFromLiteral(&BootVidName, L"\\Device\\BootVid");
       InitializeObjectAttributes(&ObjectAttributes,
 				 &BootVidName,
 				 0,

Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
--- trunk/reactos/ntoskrnl/include/internal/ke.h	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/include/internal/ke.h	2005-06-25 14:04:56 UTC (rev 16266)
@@ -576,6 +576,18 @@
 STDCALL
 KeFlushCurrentTb(VOID);
 
+/* REACTOS SPECIFIC */
+
+VOID STDCALL
+KeRosDumpStackFrames(
+  PULONG  Frame,
+  ULONG  FrameCount);
+
+ULONG STDCALL
+KeRosGetStackFrames(
+  PULONG  Frames,
+  ULONG  FrameCount);
+  
 VOID
 KiSetSystemTime(PLARGE_INTEGER NewSystemTime);
 

Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
--- trunk/reactos/ntoskrnl/include/internal/mm.h	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h	2005-06-25 14:04:56 UTC (rev 16266)
@@ -85,6 +85,8 @@
 #define MM_LOWEST_USER_ADDRESS (PVOID)0x10000
 #endif
 
+#define TEB_BASE        (0x7FFDE000)
+
 #define MM_VIRTMEM_GRANULARITY (64 * 1024) /* Although Microsoft says this isn't hardcoded anymore,
                                               they won't be able to change it. Stuff depends on it */
 

Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
--- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h	2005-06-25 14:04:56 UTC (rev 16266)
@@ -15,6 +15,40 @@
 #define PAGE_LOCKED_FUNCTION	PLACE_IN_SECTION("pagelk")
 #define PAGE_UNLOCKED_FUNCTION	PLACE_IN_SECTION("pagepo")
 
+#ifdef _NTOSKRNL_
+
+#include "ke.h"
+#include "i386/segment.h"
+#include "i386/mm.h"
+#include "i386/fpu.h"
+#include "module.h"
+#include "pool.h"
+#include "ob.h"
+#include "mm.h"
+#include "ps.h"
+#include "cc.h"
+#include "io.h"
+#include "po.h"
+#include "se.h"
+#include "ldr.h"
+#include "kd.h"
+#include "ex.h"
+#include "xhal.h"
+#include "v86m.h"
+#include "ifs.h"
+#include "port.h"
+#include "nls.h"
+#ifdef KDBG
+#include "kdb.h"
+#endif
+#include "dbgk.h"
+#include "trap.h"
+#include "safe.h"
+#include "tag.h"
+#include "test.h"
+#include "inbv.h"
+
+
 #include <pshpack1.h>
 /*
  * Defines a descriptor as it appears in the processor tables
@@ -62,6 +96,7 @@
    IN PCWSTR  Source,
    IN POOL_TYPE PoolType);
    
+#endif
 #endif /* __ASM__ */
 
 /*

Modified: trunk/reactos/ntoskrnl/include/internal/port.h
--- trunk/reactos/ntoskrnl/include/internal/port.h	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/include/internal/port.h	2005-06-25 14:04:56 UTC (rev 16266)
@@ -95,6 +95,61 @@
   UCHAR		MessageData [MAX_MESSAGE_DATA];
 } QUEUEDMESSAGE,  *PQUEUEDMESSAGE;
 
+typedef struct _LPC_DBG_MESSAGE
+{
+   LPC_MESSAGE Header;
+   ULONG Type;
+   ULONG Status;
+   union
+     {
+	struct
+	  {
+	     EXCEPTION_RECORD ExceptionRecord;
+	     ULONG FirstChance;
+	  } Exception;
+	struct
+	  {
+	     ULONG Reserved;
+	     PVOID StartAddress;
+	  } CreateThread;
+	struct
+	  {
+	     ULONG Reserved;
+	     HANDLE FileHandle;
+	     PVOID Base;
+	     ULONG PointerToSymbolTable;
+	     ULONG NumberOfSymbols;
+	     ULONG Reserved2;
+	     PVOID EntryPoint;
+	  } CreateProcess;
+	struct
+	  {
+	     ULONG ExitCode;
+	  } ExitThread;
+	struct
+	  {
+	     ULONG ExitCode;
+	  } ExitProcess;
+	struct
+	  {
+	     HANDLE FileHandle;
+	     PVOID Base;
+	     ULONG PointerToSymbolTable;
+	     ULONG NumberOfSymbols;
+	  } LoadDll;
+	struct
+	  {
+	     PVOID Base;
+	  } UnloadDll;
+     } Data;
+} LPC_DBG_MESSAGE, *PLPC_DBG_MESSAGE;
+
+typedef struct _LPC_TERMINATION_MESSAGE
+{
+   LPC_MESSAGE Header;
+   LARGE_INTEGER CreationTime;
+} LPC_TERMINATION_MESSAGE, *PLPC_TERMINATION_MESSAGE;
+
 /* Code in ntoskrnl/lpc/close.h */
 
 VOID STDCALL

Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
--- trunk/reactos/ntoskrnl/include/internal/ps.h	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/include/internal/ps.h	2005-06-25 14:04:56 UTC (rev 16266)
@@ -542,7 +542,7 @@
   UINT PeakJobMemoryUsed;
   UINT CurrentJobMemoryUsed;
   FAST_MUTEX MemoryLimitsLock;
-} EJOB;
+} EJOB, *PEJOB;
 #include <poppack.h>
 
 VOID INIT_FUNCTION PsInitJobManagment(VOID);

Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h	2005-06-25 14:04:56 UTC (rev 16266)
@@ -5,76 +5,37 @@
 
 /* include the ntoskrnl config.h file */
 #include "config.h"
-
-#include <roskrnl.h>
+#include <roscfg.h>
+  
+/* DDK/IFS/NDK Headers */
 #include <ddk/ntddk.h>
 #include <ddk/ntifs.h>
 #include <ddk/wdmguid.h>
-
+#include <ndk/ntndk.h>
 #undef IO_TYPE_FILE
 #define IO_TYPE_FILE                    0x0F5L /* Temp Hack */
+  
+/* FIXME: Add to ndk, or at least move somewhere else */
+#include <ntos/ntpnp.h>
+#include <napi/core.h>
 
-#include <roscfg.h>
+/* ReactOS Headers */
 #include <reactos/version.h>
 #include <reactos/resource.h>
 #include <reactos/bugcodes.h>
 #include <reactos/rossym.h>
-#include <limits.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
+
+/* C Headers */
 #include <malloc.h>
 #include <wchar.h>
-#include <ntos/minmax.h>
-#include <ntos/synch.h>
-#include <ntos/keyboard.h>
-#include <ntos/ntdef.h>
-#include <ntos/ldrtypes.h>
-#include <ntos/ntpnp.h>
-#include <ddk/ldrfuncs.h>
-#include <rosrtl/minmax.h>
-#include <rosrtl/string.h>
-#include <ntdll/ldr.h>
+
+/* SEH support with PSEH */
 #include <pseh.h>
-#include <internal/ctype.h>
-#include <internal/ntoskrnl.h>
-#include <internal/ke.h>
-#include <internal/i386/segment.h>
-#include <internal/i386/mm.h>
-#include <internal/i386/fpu.h>
-#include <internal/module.h>
-#include <internal/pool.h>
-#include <internal/ob.h>
-#include <internal/mm.h>
-#include <internal/ps.h>
-#include <internal/cc.h>
-#include <internal/io.h>
-#include <internal/po.h>
-#include <internal/se.h>
-#include <internal/ldr.h>
-#include <internal/kd.h>
-#include <internal/ex.h>
-#include "internal/xhal.h"
-#include <internal/v86m.h>
-#include <internal/ifs.h>
-#include <internal/port.h>
-#include <internal/nls.h>
-#ifdef KDBG
-#include <internal/kdb.h>
-#endif
-#include <internal/dbgk.h>
-#include <internal/trap.h>
-#include <internal/safe.h>
-#include <internal/tag.h>
-#include <internal/test.h>
-#include <internal/inbv.h>
-#include <napi/core.h>
-#include <napi/dbg.h>
-#include <napi/teb.h>
-#include <napi/win32.h>
 
-#ifndef TAG
-#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
-#endif
+/* Helper Header */
+#include <reactos/helper.h>
 
+/* Internal Headers */
+#include "internal/ntoskrnl.h"
+
 #endif /* INCLUDE_NTOSKRNL_H */

Modified: trunk/reactos/ntoskrnl/io/arcname.c
--- trunk/reactos/ntoskrnl/io/arcname.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/io/arcname.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -311,7 +311,7 @@
 {
   OBJECT_ATTRIBUTES ObjectAttributes;
   IO_STATUS_BLOCK IoStatusBlock;
-  UNICODE_STRING LinkName;
+  UNICODE_STRING LinkName = RTL_CONSTANT_STRING(L"\\SystemRoot");
   UNICODE_STRING DeviceName;
   UNICODE_STRING ArcName;
   UNICODE_STRING BootPath;
@@ -445,9 +445,6 @@
   DPRINT("DeviceName: %wZ\n", &DeviceName);
 
   /* create the '\SystemRoot' link */
-  RtlRosInitUnicodeStringFromLiteral(&LinkName,
-		       L"\\SystemRoot");
-
   Status = IoCreateSymbolicLink(&LinkName,
 				&DeviceName);
   ExFreePool(DeviceName.Buffer);

Modified: trunk/reactos/ntoskrnl/io/driver.c
--- trunk/reactos/ntoskrnl/io/driver.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/io/driver.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -72,7 +72,7 @@
 static LIST_ENTRY ServiceListHead  = {NULL, NULL};
 
 static UNICODE_STRING IopHardwareDatabaseKey =
-   ROS_STRING_INITIALIZER(L"\\REGISTRY\\MACHINE\\HARDWARE\\DESCRIPTION\\SYSTEM");
+   RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\HARDWARE\\DESCRIPTION\\SYSTEM");
 
 POBJECT_TYPE EXPORTED IoDriverObjectType = NULL;
 
@@ -1019,7 +1019,7 @@
   RTL_QUERY_REGISTRY_TABLE QueryTable[2];
   PKEY_BASIC_INFORMATION KeyInfo = NULL;
   OBJECT_ATTRIBUTES ObjectAttributes;
-  UNICODE_STRING ServicesKeyName;
+  UNICODE_STRING ServicesKeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Services");
   UNICODE_STRING SubKeyName;
   HANDLE KeyHandle;
   NTSTATUS Status;
@@ -1050,9 +1050,6 @@
     return(Status);
 
   /* Enumerate services and create the service list */
-  RtlRosInitUnicodeStringFromLiteral(&ServicesKeyName,
-		       L"\\Registry\\Machine\\System\\CurrentControlSet\\Services");
-
   InitializeObjectAttributes(&ObjectAttributes,
 			     &ServicesKeyName,
 			     OBJ_CASE_INSENSITIVE,

Modified: trunk/reactos/ntoskrnl/io/file.c
--- trunk/reactos/ntoskrnl/io/file.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/io/file.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -14,9 +14,6 @@
 #define NDEBUG
 #include <internal/debug.h>
 
-/* FIXME: Header mess */
-#undef CreateMailslot
-
 /* GLOBALS *******************************************************************/
 
 extern GENERIC_MAPPING IopFileMapping;
@@ -3004,7 +3001,7 @@
 STDCALL
 NtSetQuotaInformationFile(HANDLE FileHandle,
                           PIO_STATUS_BLOCK IoStatusBlock,
-                          PFILE_USER_QUOTA_INFORMATION Buffer,
+                          PFILE_QUOTA_INFORMATION Buffer,
                           ULONG BufferLength)
 {
     UNIMPLEMENTED;

Modified: trunk/reactos/ntoskrnl/io/iomgr.c
--- trunk/reactos/ntoskrnl/io/iomgr.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/io/iomgr.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -182,7 +182,7 @@
     UNICODE_STRING Name;
     OBJECT_ATTRIBUTES ObjectAttributes;
     UNICODE_STRING DirName;
-    UNICODE_STRING LinkName;
+    UNICODE_STRING LinkName = RTL_CONSTANT_STRING(L"\\DosDevices");
     HANDLE Handle;
 
     IopInitDriverImplementation();
@@ -222,7 +222,7 @@
   /*
    * Create the '\Driver' object directory
    */
-  RtlRosInitUnicodeStringFromLiteral(&DirName, L"\\Driver");
+  RtlInitUnicodeString(&DirName, L"\\Driver");
   InitializeObjectAttributes(&ObjectAttributes,
 			     &DirName,
 			     0,
@@ -235,7 +235,7 @@
   /*
    * Create the '\FileSystem' object directory
    */
-  RtlRosInitUnicodeStringFromLiteral(&DirName,
+  RtlInitUnicodeString(&DirName,
 		       L"\\FileSystem");
   InitializeObjectAttributes(&ObjectAttributes,
 			     &DirName,
@@ -249,7 +249,7 @@
   /*
    * Create the '\Device' directory
    */
-  RtlRosInitUnicodeStringFromLiteral(&DirName,
+  RtlInitUnicodeString(&DirName,
 		       L"\\Device");
   InitializeObjectAttributes(&ObjectAttributes,
 			     &DirName,
@@ -263,7 +263,7 @@
   /*
    * Create the '\??' directory
    */
-  RtlRosInitUnicodeStringFromLiteral(&DirName,
+  RtlInitUnicodeString(&DirName,
 		       L"\\??");
   InitializeObjectAttributes(&ObjectAttributes,
 			     &DirName,
@@ -277,7 +277,7 @@
   /*
    * Create the '\ArcName' directory
    */
-  RtlRosInitUnicodeStringFromLiteral(&DirName,
+  RtlInitUnicodeString(&DirName,
 		       L"\\ArcName");
   InitializeObjectAttributes(&ObjectAttributes,
 			     &DirName,
@@ -304,9 +304,7 @@
   /*
    * Create link from '\DosDevices' to '\??' directory
    */
-  RtlRosInitUnicodeStringFromLiteral(&LinkName,
-		       L"\\DosDevices");
-  RtlRosInitUnicodeStringFromLiteral(&DirName,
+  RtlInitUnicodeString(&DirName,
 		       L"\\??");
   IoCreateSymbolicLink(&LinkName,
 		       &DirName);

Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
--- trunk/reactos/ntoskrnl/io/pnpmgr.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/io/pnpmgr.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -10,14 +10,10 @@
 /* INCLUDES ******************************************************************/
 
 #include <ntoskrnl.h>
-#include <ddk/wdmguid.h>
 
 #define NDEBUG
 #include <internal/debug.h>
 
-/* FIXME: Header mess */
-#undef DeviceCapabilities
-
 /* GLOBALS *******************************************************************/
 
 PDEVICE_NODE IopRootDeviceNode;

Modified: trunk/reactos/ntoskrnl/io/resource.c
--- trunk/reactos/ntoskrnl/io/resource.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/io/resource.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -827,7 +827,7 @@
   HANDLE DescriptionKey;
 
   /* Open/Create 'RESOURCEMAP' key. */
-  RtlRosInitUnicodeStringFromLiteral(&Name,
+  RtlInitUnicodeString(&Name,
 		       L"\\Registry\\Machine\\HARDWARE\\RESOURCEMAP");
   InitializeObjectAttributes(&ObjectAttributes,
 			     &Name,
@@ -845,7 +845,7 @@
     return(Status);
 
   /* Open/Create 'Hardware Abstraction Layer' key */
-  RtlRosInitUnicodeStringFromLiteral(&Name,
+  RtlInitUnicodeString(&Name,
 		       L"Hardware Abstraction Layer");
   InitializeObjectAttributes(&ObjectAttributes,
 			     &Name,
@@ -881,7 +881,7 @@
     return(Status);
 
   /* Add '.Raw' value. */
-  RtlRosInitUnicodeStringFromLiteral(&Name,
+  RtlInitUnicodeString(&Name,
 		       L".Raw");
   Status = ZwSetValueKey(DescriptionKey,
 			 &Name,
@@ -896,7 +896,7 @@
     }
 
   /* Add '.Translated' value. */
-  RtlRosInitUnicodeStringFromLiteral(&Name,
+  RtlInitUnicodeString(&Name,
 		       L".Translated");
   Status = ZwSetValueKey(DescriptionKey,
 			 &Name,

Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c
--- trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -508,7 +508,7 @@
          LdrModule->FullDllName.Length);
   KernelName.Buffer[KernelName.Length / sizeof(WCHAR)] = L'\0';
 
-  KdbpSymLoadModuleSymbols(&KernelName, &LdrModule->RosSymInfo);
+  KdbpSymLoadModuleSymbols(&KernelName, (PROSSYM_INFO*)&LdrModule->RosSymInfo);
 
   ExFreePool(KernelName.Buffer);
 }

Modified: trunk/reactos/ntoskrnl/ke/i386/kernel.c
--- trunk/reactos/ntoskrnl/ke/i386/kernel.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/ke/i386/kernel.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -456,8 +456,9 @@
 {
    PKIPCR Pcr = (PKIPCR)KeGetCurrentKPCR();
    OBJECT_ATTRIBUTES ObjectAttributes;
-   UNICODE_STRING KeyName;
-   UNICODE_STRING ValueName;
+   UNICODE_STRING KeyName =
+   RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Session Manager\\Kernel");
+   UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"FastSystemCallDisable");
    HANDLE KeyHandle;
    ULONG ResultLength;
    KEY_VALUE_PARTIAL_INFORMATION ValueData;
@@ -488,10 +489,6 @@
         /* FIXME: Check for Family == 6, Model < 3 and Stepping < 3 and disable */
 
         /* Make sure it's not disabled in registry */
-        RtlRosInitUnicodeStringFromLiteral(&KeyName,
-                                           L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Session Manager\\Kernel");
-        RtlRosInitUnicodeStringFromLiteral(&ValueName,
-                                           L"FastSystemCallDisable");
         InitializeObjectAttributes(&ObjectAttributes,
                                    &KeyName,
                                    OBJ_CASE_INSENSITIVE,

Modified: trunk/reactos/ntoskrnl/ldr/init.c
--- trunk/reactos/ntoskrnl/ldr/init.c	2005-06-25 14:03:51 UTC (rev 16265)
+++ trunk/reactos/ntoskrnl/ldr/init.c	2005-06-25 14:04:56 UTC (rev 16266)
@@ -17,78 +17,19 @@
 #define NDEBUG
 #include <internal/debug.h>
 
-
-/*
- * HACK! No matter what i did, i couldnt get it working when i put these into ntos\rtl.h
- * (got redefinition problems, since ntdll\rtl.h somehow include ntos\rtl.h).
- * We need to merge ntos\rtl.h and ntdll\rtl.h to get this working. -Gunnar
- */
-typedef struct _RTL_PROCESS_INFO
-{
-   ULONG Size;
-   HANDLE ProcessHandle;
-   HANDLE ThreadHandle;
-   CLIENT_ID ClientId;
-   SECTION_IMAGE_INFORMATION ImageInfo;
-} RTL_PROCESS_INFO, *PRTL_PROCESS_INFO;
-
-NTSTATUS
-STDCALL
-RtlCreateUserProcess (
-   IN PUNICODE_STRING         ImageFileName,
-   IN ULONG          Attributes,
-   IN PRTL_USER_PROCESS_PARAMETERS  ProcessParameters,
-   IN PSECURITY_DESCRIPTOR    ProcessSecutityDescriptor OPTIONAL,
-   IN PSECURITY_DESCRIPTOR    ThreadSecurityDescriptor OPTIONAL,
-   IN HANDLE            ParentProcess OPTIONAL,
-   IN BOOLEAN           CurrentDirectory,
-   IN HANDLE            DebugPort OPTIONAL,
-   IN HANDLE            ExceptionPort OPTIONAL,
-   OUT   PRTL_PROCESS_INFO    ProcessInfo
[truncated at 1000 lines; 419 more skipped]