Move Exported functions away from internal/ke.h, move exported data from internal/ex.h, add internal structures to internal/ifs.h, include ntdddisk.h in internal/xhal.h for access to PDRIVE_LAYOUT_INFORMATION, remove DDK function from internal/nls.h, remove KTRAP_FRAME from internal/i386/ke.h, add some more temporary types to krnltypes.h, protect PNP_VETO_TYPE, move EVENT_TRACE_HEADER to DDK, guard disk.h properly, correct DRIVE_LAYOUT_INFORMATION typedef in DDK, add PNP_VETO_TYPE, NLSTABLEINFO, CPTABLEINFO, remove KDPC_DATA, PP_LOOKASIDE_LIST. remove PROCESSOR_POWER_STATE from ntpoapi, remove MAILSLOT_CREATE_PARAMETERS, NAMED_PIPE_CREATE_PARAMETERS, IO_COMPLETION_INFORMATION_CLASS, PAGEFAULT_HISTORY, SECTION_XXX_INFORMATION, RtlSelfRelativeToAbsoluteSD, ZwQuerySection/Object, ZwQuerySystemInformation, ZwSetInformationObject, ZwSetSystemInformation from IFS
Modified: trunk/reactos/w32api/include/ddk/ntifs.h
Modified: trunk/reactos/w32api/include/ddk/ntpoapi.h
Modified: trunk/reactos/w32api/include/ddk/winddk.h

Modified: trunk/reactos/w32api/include/ddk/ntifs.h
--- trunk/reactos/w32api/include/ddk/ntifs.h	2005-06-19 03:55:34 UTC (rev 16072)
+++ trunk/reactos/w32api/include/ddk/ntifs.h	2005-06-19 03:55:48 UTC (rev 16073)
@@ -530,9 +530,7 @@
 typedef struct _KPROCESS                        *PKPROCESS;
 typedef struct _KQUEUE                          *PKQUEUE;
 typedef struct _KTRAP_FRAME                     *PKTRAP_FRAME;
-typedef struct _MAILSLOT_CREATE_PARAMETERS      *PMAILSLOT_CREATE_PARAMETERS;
 typedef struct _MMWSL                           *PMMWSL;
-typedef struct _NAMED_PIPE_CREATE_PARAMETERS    *PNAMED_PIPE_CREATE_PARAMETERS;
 typedef struct _OBJECT_DIRECTORY                *POBJECT_DIRECTORY;
 typedef struct _PAGEFAULT_HISTORY               *PPAGEFAULT_HISTORY;
 typedef struct _PS_IMPERSONATION_INFORMATION    *PPS_IMPERSONATION_INFORMATION;
@@ -573,10 +571,6 @@
     StorageTypeStream
 } FILE_STORAGE_TYPE;
 
-typedef enum _IO_COMPLETION_INFORMATION_CLASS {
-    IoCompletionBasicInformation
-} IO_COMPLETION_INFORMATION_CLASS;
-
 typedef enum _OBJECT_INFO_CLASS {
     ObjectBasicInfo,
     ObjectNameInfo,
@@ -1303,13 +1297,6 @@
     LIST_ENTRY          ThreadListHead;
 } KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE;
 
-typedef struct _MAILSLOT_CREATE_PARAMETERS {
-    ULONG           MailslotQuota;
-    ULONG           MaximumMessageSize;
-    LARGE_INTEGER   ReadTimeout;
-    BOOLEAN         TimeoutSpecified;
-} MAILSLOT_CREATE_PARAMETERS, *PMAILSLOT_CREATE_PARAMETERS;
-
 typedef struct _MBCB {
     CSHORT          NodeTypeCode;
     CSHORT          NodeIsInZone;
@@ -1332,17 +1319,6 @@
      ULONG          Reserved1;
 } MOVEFILE_DESCRIPTOR, *PMOVEFILE_DESCRIPTOR;
 
-typedef struct _NAMED_PIPE_CREATE_PARAMETERS {
-    ULONG           NamedPipeType;
-    ULONG           ReadMode;
-    ULONG           CompletionMode;
-    ULONG           MaximumInstances;
-    ULONG           InboundQuota;
-    ULONG           OutboundQuota;
-    LARGE_INTEGER   DefaultTimeout;
-    BOOLEAN         TimeoutSpecified;
-} NAMED_PIPE_CREATE_PARAMETERS, *PNAMED_PIPE_CREATE_PARAMETERS;
-
 typedef struct _OBJECT_BASIC_INFO {
     ULONG           Attributes;
     ACCESS_MASK     GrantedAccess;
@@ -1383,13 +1359,6 @@
     OBJECT_TYPE_INFO    ObjectsTypeInfo[1];
 } OBJECT_ALL_TYPES_INFO, *POBJECT_ALL_TYPES_INFO;
 
-typedef struct _PAGEFAULT_HISTORY {
-    ULONG                           CurrentIndex;
-    ULONG                           MaxIndex;
-    KSPIN_LOCK                      SpinLock;
-    PVOID                           Reserved;
-    PROCESS_WS_WATCH_INFORMATION    WatchInfo[1];
-} PAGEFAULT_HISTORY, *PPAGEFAULT_HISTORY;
 
 typedef struct _PATHNAME_BUFFER {
     ULONG PathNameLength;
@@ -1524,28 +1493,6 @@
 
 } SE_EXPORTS, *PSE_EXPORTS;
 
-typedef struct _SECTION_BASIC_INFORMATION {
-    PVOID           BaseAddress;
-    ULONG           Attributes;
-    LARGE_INTEGER   Size;
-} SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
-
-typedef struct _SECTION_IMAGE_INFORMATION {
-    ULONG     EntryPoint;
-    ULONG     Unknown1;
-    ULONG_PTR StackReserve;
-    ULONG_PTR StackCommit;
-    ULONG     Subsystem;
-    USHORT    MinorSubsystemVersion;
-    USHORT    MajorSubsystemVersion;
-    ULONG     Unknown2;
-    ULONG     Characteristics;
-    USHORT    ImageNumber;
-    BOOLEAN   Executable;
-    UCHAR     Unknown3;
-    ULONG     Unknown4[3];
-} SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
-
 #if (VER_PRODUCTBUILD >= 2600)
 
 typedef struct _SHARED_CACHE_MAP {
@@ -3915,30 +3862,9 @@
     OUT PLARGE_INTEGER  Time
 );
 
-#if (VER_PRODUCTBUILD >= 2195)
-
 NTSYSAPI
 NTSTATUS
 NTAPI
-RtlSelfRelativeToAbsoluteSD (
-    IN PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSD,
-    OUT PSECURITY_DESCRIPTOR         AbsoluteSD,
-    IN PULONG                        AbsoluteSDSize,
-    IN PACL                          Dacl,
-    IN PULONG                        DaclSize,
-    IN PACL                          Sacl,
-    IN PULONG                        SaclSize,
-    IN PSID                          Owner,
-    IN PULONG                        OwnerSize,
-    IN PSID                          PrimaryGroup,
-    IN PULONG                        PrimaryGroupSize
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
 RtlSetGroupSecurityDescriptor (
     IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
     IN PSID                     Group,
@@ -4703,28 +4629,6 @@
 NTSYSAPI
 NTSTATUS
 NTAPI
-ZwQueryObject (
-    IN HANDLE                      ObjectHandle,
-    IN OBJECT_INFORMATION_CLASS    ObjectInformationClass,
-    OUT PVOID                      ObjectInformation,
-    IN ULONG                       Length,
-    OUT PULONG                     ResultLength
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQuerySection (
-    IN HANDLE                       SectionHandle,
-    IN SECTION_INFORMATION_CLASS    SectionInformationClass,
-    OUT PVOID                       SectionInformation,
-    IN ULONG                        SectionInformationLength,
-    OUT PULONG                      ResultLength OPTIONAL
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
 ZwQuerySecurityObject (
     IN HANDLE                   FileHandle,
     IN SECURITY_INFORMATION     SecurityInformation,
@@ -4736,16 +4640,6 @@
 NTSYSAPI
 NTSTATUS
 NTAPI
-ZwQuerySystemInformation (
-    IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
-    OUT PVOID                   SystemInformation,
-    IN ULONG                    Length,
-    OUT PULONG                  ReturnLength
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
 ZwQueryVolumeInformationFile (
     IN HANDLE               FileHandle,
     OUT PIO_STATUS_BLOCK    IoStatusBlock,
@@ -4832,16 +4726,6 @@
 NTSYSAPI
 NTSTATUS
 NTAPI
-ZwSetInformationObject (
-    IN HANDLE                       ObjectHandle,
-    IN OBJECT_INFORMATION_CLASS    ObjectInformationClass,
-    IN PVOID                        ObjectInformation,
-    IN ULONG                        ObjectInformationLength
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
 ZwSetInformationProcess (
     IN HANDLE           ProcessHandle,
     IN PROCESSINFOCLASS ProcessInformationClass,
@@ -4865,15 +4749,6 @@
 NTSYSAPI
 NTSTATUS
 NTAPI
-ZwSetSystemInformation (
-    IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
-    IN PVOID                    SystemInformation,
-    IN ULONG                    Length
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
 ZwSetSystemTime (
     IN PLARGE_INTEGER   NewTime,
     OUT PLARGE_INTEGER  OldTime OPTIONAL

Modified: trunk/reactos/w32api/include/ddk/ntpoapi.h
--- trunk/reactos/w32api/include/ddk/ntpoapi.h	2005-06-19 03:55:34 UTC (rev 16072)
+++ trunk/reactos/w32api/include/ddk/ntpoapi.h	2005-06-19 03:55:48 UTC (rev 16073)
@@ -155,53 +155,6 @@
 	PROCESSOR_PERF_LEVEL  PerfLevel[1];
 } PROCESSOR_STATE_HANDLER2, *PPROCESSOR_STATE_HANDLER2;
 
-typedef struct _PROCESSOR_POWER_STATE {
-	PVOID IdleFunction;
-	ULONG Idle0KernelTimeLimit;
-	ULONG Idle0LastTime;
-	PVOID IdleHandlers;
-	PVOID IdleState;
-	ULONG IdleHandlersCount;
-	ULONGLONG LastCheck;
-	PROCESSOR_IDLE_TIMES IdleTimes;
-	ULONG IdleTime1;
-	ULONG PromotionCheck;
-	ULONG IdleTime2;
-	UCHAR CurrentThrottle;
-	UCHAR ThermalThrottleLimit;
-	UCHAR CurrentThrottleIndex;
-	UCHAR ThermalThrottleIndex;
-	ULONG LastKernelUserTime;
-	ULONG PerfIdleTime;
-	ULONG DebugDelta;
-	ULONG DebugCount;
-	ULONG LastSysTime;
-	ULONG TotalIdleStateTime[3];
-	ULONG TotalIdleTransitions[3];
-	ULONGLONG PreviousC3StateTime;
-	UCHAR KneeThrottleIndex;
-	UCHAR ThrottleLimitIndex;
-	UCHAR PerfStatesCount;
-	UCHAR ProcessorMinThrottle;
-	UCHAR ProcessorMaxThrottle;
-	UCHAR LastBusyPercentage;
-	UCHAR LastC3Percentage;
-	UCHAR LastAdjustedBusyPercentage;
-	ULONG PromotionCount;
-	ULONG DemotionCount;
-	ULONG ErrorCount;
-	ULONG RetryCount;
-	ULONG Flags;
-	LARGE_INTEGER PerfCounterFrequency;
-	ULONG PerfTickCount;
-	KTIMER PerfTimer;
-	KDPC PerfDpc;
-	PROCESSOR_PERF_STATE *PerfStates;
-	PVOID PerfSetThrottle;
-	ULONG LastC3KernelUserTime;
-	ULONG Spare1[1];
-} PROCESSOR_POWER_STATE, *PPROCESSOR_POWER_STATE;
-
 NTOSAPI
 NTSTATUS
 DDKAPI

Modified: trunk/reactos/w32api/include/ddk/winddk.h
--- trunk/reactos/w32api/include/ddk/winddk.h	2005-06-19 03:55:34 UTC (rev 16072)
+++ trunk/reactos/w32api/include/ddk/winddk.h	2005-06-19 03:55:48 UTC (rev 16073)
@@ -181,7 +181,7 @@
 typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT;
 typedef struct _BUS_HANDLER *PBUS_HANDLER;
 typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT;
-typedef struct _DRIVE_LAYOUT_INFORMATION *PDRIVE_LAYOUT_INFORMATION;
+typedef struct _DRIVE_LAYOUT_INFORMATION;
 typedef struct _DRIVE_LAYOUT_INFORMATION_EX *PDRIVE_LAYOUT_INFORMATION_EX;
 typedef struct _NAMED_PIPE_CREATE_PARAMETERS *PNAMED_PIPE_CREATE_PARAMETERS;
 typedef struct _MAILSLOT_CREATE_PARAMETERS *PMAILSLOT_CREATE_PARAMETERS;
@@ -692,6 +692,23 @@
 #define PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED 0x00000010
 #define PNP_DEVICE_NOT_DISABLEABLE               0x00000020
 
+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 struct _TARGET_DEVICE_CUSTOM_NOTIFICATION {
   USHORT  Version;
   USHORT  Size;
@@ -775,7 +792,46 @@
 (DDKAPI *PDEVICE_CHANGE_COMPLETE_CALLBACK)(
   IN PVOID Context);
 
+/* WMI, should go in a WMI header... */
+typedef struct _EVENT_TRACE_HEADER
+{
+  USHORT           Size;
+  union {
+    USHORT FieldTypeFlags;
+    struct {
+      UCHAR            HeaderType;
+      UCHAR            MarkerFlags;
+    };
+  };
+  union {
+    ULONG         Version;
+    struct {
+      UCHAR     Type;
+      UCHAR     Level;
+      USHORT    Version;
+    } Class;
+  };
+  ULONG ThreadId;
+  ULONG ProcessId;
+  LARGE_INTEGER    TimeStamp;
+  union {
+    GUID      Guid;
+    ULONGLONG GuidPtr;
+  };
+ union {
+    struct {
+      ULONG ClientContext;
+      ULONG Flags;
+    };
+    struct {
+      ULONG KernelTime;
+      ULONG UserTime;
+    };
+    ULONG64 ProcessorTime;
+  };
+} EVENT_TRACE_HEADER, *PEVENT_TRACE_HEADER;
 
+
 /*
 ** System structures
 */
@@ -789,6 +845,33 @@
 #define DUPLICATE_SAME_ATTRIBUTES         0x00000004
 /* end winnt.h */
 
+/* Nls Info (ntnls.h) */
+#define MAXIMUM_LEADBYTES   12
+
+typedef struct _CPTABLEINFO 
+{
+    USHORT CodePage;
+    USHORT MaximumCharacterSize;
+    USHORT DefaultChar;
+    USHORT UniDefaultChar;
+    USHORT TransDefaultChar;
+    USHORT TransUniDefaultChar;
+    USHORT DBCSCodePage;
+    UCHAR  LeadByte[MAXIMUM_LEADBYTES];
+    PUSHORT MultiByteTable;
+    PVOID   WideCharTable;
+    PUSHORT DBCSRanges;
+    PUSHORT DBCSOffsets;
+} CPTABLEINFO, *PCPTABLEINFO;
+
+typedef struct _NLSTABLEINFO 
+{
+    CPTABLEINFO OemTableInfo;
+    CPTABLEINFO AnsiTableInfo;
+    PUSHORT UpperCaseTable;
+    PUSHORT LowerCaseTable;
+} NLSTABLEINFO, *PNLSTABLEINFO;
+
 typedef struct _OBJECT_NAME_INFORMATION {
   UNICODE_STRING  Name;
 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
@@ -905,13 +988,6 @@
   PVOID  DpcData;
 } KDPC, *PKDPC, *RESTRICTED_POINTER PRKDPC;
 
-typedef struct _KDPC_DATA {
-  LIST_ENTRY  DpcListHead;
-  ULONG  DpcLock;
-  ULONG  DpcQueueDepth;
-  ULONG  DpcCount;
-} KDPC_DATA, *PKDPC_DATA;
-
 typedef struct _WAIT_CONTEXT_BLOCK {
   KDEVICE_QUEUE_ENTRY  WaitQueueEntry;
   PDRIVER_CONTROL  DeviceRoutine;
@@ -2224,7 +2300,7 @@
   IN PDEVICE_OBJECT  DeviceObject,
   IN ULONG  SectorSize,
   IN BOOLEAN  ReturnRecognizedPartitions,
-  OUT PDRIVE_LAYOUT_INFORMATION  *PartitionBuffer);
+  OUT struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer);
 
 typedef NTSTATUS
 (DDKFASTAPI *pHalIoSetPartitionInformation)(
@@ -2239,7 +2315,7 @@
   IN ULONG  SectorSize,
   IN ULONG  SectorsPerTrack,
   IN ULONG  NumberOfHeads,
-  IN PDRIVE_LAYOUT_INFORMATION  PartitionBuffer);
+  IN struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer);
 
 typedef PBUS_HANDLER
 (DDKFASTAPI *pHalHandlerForBus)(
@@ -3756,11 +3832,6 @@
   FAST_MUTEX  Obsoleted;
 } PAGED_LOOKASIDE_LIST, *PPAGED_LOOKASIDE_LIST;
 
-typedef struct _PP_LOOKASIDE_LIST {
-   struct _GENERAL_LOOKASIDE *P;
-   struct _GENERAL_LOOKASIDE *L;
-} PP_LOOKASIDE_LIST, *PPP_LOOKASIDE_LIST;
-
 typedef struct _CALLBACK_OBJECT *PCALLBACK_OBJECT;
 
 typedef VOID