[NTDDK]
authorAmine Khaldi <amine.khaldi@reactos.org>
Wed, 17 Mar 2010 14:55:23 +0000 (14:55 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Wed, 17 Mar 2010 14:55:23 +0000 (14:55 +0000)
- Fix PIMAGE_NT_HEADERS{32,64} and PCONTEXT redefinitions
- Remove duplicate SINGLE_GROUP_LEGACY_API
[NTIFS]
- Remove several duplicate definitions
[NTIMAGE]
- Fix PIMAGE_NT_HEADERS{32,64} redefinitions
[NDK]
- Fix PPEB redefinition
[XDK]
- Go back to the previous PEPROCESS and PETHREAD definitions
[WDM]
- Update wdm.h (to reflect xdk changes)

svn path=/branches/header-work/; revision=46248

include/ddk/ntddk.h
include/ddk/ntifs.h
include/ddk/ntimage.h
include/ddk/wdm.h
include/ndk/pstypes.h
include/xdk/wdm.template.h

index 59cd287..35c96f8 100644 (file)
@@ -62,6 +62,9 @@ typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT;
 typedef struct _KAFFINITY_EX *PKAFFINITY_EX;
 #endif
 typedef struct _PEB *PPEB;
+
+#ifndef _NTIMAGE_
+
 typedef struct _IMAGE_NT_HEADERS *PIMAGE_NT_HEADERS32;
 typedef struct _IMAGE_NT_HEADERS64 *PIMAGE_NT_HEADERS64;
 
@@ -71,6 +74,8 @@ typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS;
 typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS;
 #endif
 
+#endif /* _NTIMAGE_ */
+
 #define PsGetCurrentProcess IoGetCurrentProcess
 
 #if (NTDDI_VERSION >= NTDDI_VISTA)
@@ -152,7 +157,7 @@ typedef struct _CONTEXT {
   ULONG Esp;
   ULONG SegSs;
   UCHAR ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
-} CONTEXT, *PCONTEXT;
+} CONTEXT;
 #include "poppack.h"
 
 #endif /* _X86_ */
@@ -263,7 +268,7 @@ typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
   ULONG64 LastBranchFromRip;
   ULONG64 LastExceptionToRip;
   ULONG64 LastExceptionFromRip;
-} CONTEXT, *PCONTEXT;
+} CONTEXT;
 
 #endif /* _AMD64_ */
 
@@ -2186,10 +2191,6 @@ typedef enum _CONFIGURATION_TYPE {
 } CONFIGURATION_TYPE, *PCONFIGURATION_TYPE;
 #endif /* !_ARC_DDK_ */
 
-#if (NTDDI_VERSION < NTDDI_WIN7) || defined(_X86_) || !defined(NT_PROCESSOR_GROUPS)
-#define SINGLE_GROUP_LEGACY_API           1
-#endif
-
 #if defined(_X86_) || defined(_AMD64_)
 #define PAUSE_PROCESSOR YieldProcessor();
 #elif defined(_IA64_)
index 608a6f6..51c04b3 100644 (file)
@@ -9020,12 +9020,6 @@ extern PACL                         SeSystemDefaultDacl;
 #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)
 
-//
-// Forwarders
-//
-struct _RTL_AVL_TABLE;
-struct _RTL_GENERIC_TABLE;
-
 typedef enum _FILE_STORAGE_TYPE {
     StorageTypeDefault = 1,
     StorageTypeDirectory,
@@ -9083,49 +9077,6 @@ typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
     WCHAR           FileName[ANYSIZE_ARRAY];
 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION;
 
-typedef struct _FILE_FS_FULL_SIZE_INFORMATION {
-    LARGE_INTEGER   TotalAllocationUnits;
-    LARGE_INTEGER   CallerAvailableAllocationUnits;
-    LARGE_INTEGER   ActualAvailableAllocationUnits;
-    ULONG           SectorsPerAllocationUnit;
-    ULONG           BytesPerSector;
-} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_LABEL_INFORMATION {
-    ULONG VolumeLabelLength;
-    WCHAR VolumeLabel[1];
-} FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-typedef struct _FILE_FS_OBJECT_ID_INFORMATION {
-    UCHAR ObjectId[16];
-    UCHAR ExtendedInfo[48];
-} FILE_FS_OBJECT_ID_INFORMATION, *PFILE_FS_OBJECT_ID_INFORMATION;
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-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_VOLUME_INFORMATION {
-    LARGE_INTEGER   VolumeCreationTime;
-    ULONG           VolumeSerialNumber;
-    ULONG           VolumeLabelLength;
-    BOOLEAN         SupportsObjects;
-    WCHAR           VolumeLabel[1];
-} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
-
-typedef struct _FILE_FS_OBJECTID_INFORMATION
-{
-    UCHAR ObjectId[16];
-    UCHAR ExtendedInfo[48];
-} FILE_FS_OBJECTID_INFORMATION, *PFILE_FS_OBJECTID_INFORMATION;
-
 /* raw internal file lock struct returned from FsRtlGetNextFileLock */
 typedef struct _FILE_SHARED_LOCK_ENTRY {
     PVOID           Unknown1;
@@ -9285,172 +9236,6 @@ typedef struct _OBJECT_ALL_TYPES_INFO {
     OBJECT_TYPE_INFO    ObjectsTypeInfo[1];
 } OBJECT_ALL_TYPES_INFO, *POBJECT_ALL_TYPES_INFO;
 
-typedef enum _RTL_GENERIC_COMPARE_RESULTS
-{
-    GenericLessThan,
-    GenericGreaterThan,
-    GenericEqual
-} RTL_GENERIC_COMPARE_RESULTS;
-
-typedef enum _TABLE_SEARCH_RESULT
-{
-    TableEmptyTree,
-    TableFoundNode,
-    TableInsertAsLeft,
-    TableInsertAsRight
-} TABLE_SEARCH_RESULT;
-
-typedef NTSTATUS
-(NTAPI *PRTL_AVL_MATCH_FUNCTION)(
-    struct _RTL_AVL_TABLE *Table,
-    PVOID UserData,
-    PVOID MatchData
-);
-
-typedef RTL_GENERIC_COMPARE_RESULTS
-(NTAPI *PRTL_AVL_COMPARE_ROUTINE) (
-    struct _RTL_AVL_TABLE *Table,
-    PVOID FirstStruct,
-    PVOID SecondStruct
-);
-
-typedef RTL_GENERIC_COMPARE_RESULTS
-(NTAPI *PRTL_GENERIC_COMPARE_ROUTINE) (
-    struct _RTL_GENERIC_TABLE *Table,
-    PVOID FirstStruct,
-    PVOID SecondStruct
-);
-
-typedef PVOID
-(NTAPI *PRTL_GENERIC_ALLOCATE_ROUTINE) (
-    struct _RTL_GENERIC_TABLE *Table,
-    CLONG ByteSize
-);
-
-typedef VOID
-(NTAPI *PRTL_GENERIC_FREE_ROUTINE) (
-    struct _RTL_GENERIC_TABLE *Table,
-    PVOID Buffer
-);
-
-typedef PVOID
-(NTAPI *PRTL_AVL_ALLOCATE_ROUTINE) (
-    struct _RTL_AVL_TABLE *Table,
-    CLONG ByteSize
-);
-
-typedef VOID
-(NTAPI *PRTL_AVL_FREE_ROUTINE) (
-    struct _RTL_AVL_TABLE *Table,
-    PVOID Buffer
-);
-
-typedef struct _RTL_BALANCED_LINKS
-{
-    struct _RTL_BALANCED_LINKS *Parent;
-    struct _RTL_BALANCED_LINKS *LeftChild;
-    struct _RTL_BALANCED_LINKS *RightChild;
-    CHAR Balance;
-    UCHAR Reserved[3];
-} RTL_BALANCED_LINKS, *PRTL_BALANCED_LINKS;
-
-typedef struct _RTL_GENERIC_TABLE
-{
-    PRTL_SPLAY_LINKS TableRoot;
-    LIST_ENTRY InsertOrderList;
-    PLIST_ENTRY OrderedPointer;
-    ULONG WhichOrderedElement;
-    ULONG NumberGenericTableElements;
-    PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine;
-    PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine;
-    PRTL_GENERIC_FREE_ROUTINE FreeRoutine;
-    PVOID TableContext;
-} RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE;
-
-#undef PRTL_GENERIC_COMPARE_ROUTINE
-#undef PRTL_GENERIC_ALLOCATE_ROUTINE
-#undef PRTL_GENERIC_FREE_ROUTINE
-#undef RTL_GENERIC_TABLE
-#undef PRTL_GENERIC_TABLE
-
-#define PRTL_GENERIC_COMPARE_ROUTINE PRTL_AVL_COMPARE_ROUTINE
-#define PRTL_GENERIC_ALLOCATE_ROUTINE PRTL_AVL_ALLOCATE_ROUTINE
-#define PRTL_GENERIC_FREE_ROUTINE PRTL_AVL_FREE_ROUTINE
-#define RTL_GENERIC_TABLE RTL_AVL_TABLE
-#define PRTL_GENERIC_TABLE PRTL_AVL_TABLE
-
-#define RtlInitializeGenericTable               RtlInitializeGenericTableAvl
-#define RtlInsertElementGenericTable            RtlInsertElementGenericTableAvl
-#define RtlInsertElementGenericTableFull        RtlInsertElementGenericTableFullAvl
-#define RtlDeleteElementGenericTable            RtlDeleteElementGenericTableAvl
-#define RtlLookupElementGenericTable            RtlLookupElementGenericTableAvl
-#define RtlLookupElementGenericTableFull        RtlLookupElementGenericTableFullAvl
-#define RtlEnumerateGenericTable                RtlEnumerateGenericTableAvl
-#define RtlEnumerateGenericTableWithoutSplaying RtlEnumerateGenericTableWithoutSplayingAvl
-#define RtlGetElementGenericTable               RtlGetElementGenericTableAvl
-#define RtlNumberGenericTableElements           RtlNumberGenericTableElementsAvl
-#define RtlIsGenericTableEmpty                  RtlIsGenericTableEmptyAvl
-
-typedef struct _RTL_AVL_TABLE
-{
-    RTL_BALANCED_LINKS BalancedRoot;
-    PVOID OrderedPointer;
-    ULONG WhichOrderedElement;
-    ULONG NumberGenericTableElements;
-    ULONG DepthOfTree;
-    PRTL_BALANCED_LINKS RestartKey;
-    ULONG DeleteCount;
-    PRTL_AVL_COMPARE_ROUTINE CompareRoutine;
-    PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine;
-    PRTL_AVL_FREE_ROUTINE FreeRoutine;
-    PVOID TableContext;
-} RTL_AVL_TABLE, *PRTL_AVL_TABLE;
-
-NTSYSAPI
-VOID
-NTAPI
-RtlInitializeGenericTableAvl(
-    PRTL_AVL_TABLE Table,
-    PRTL_AVL_COMPARE_ROUTINE CompareRoutine,
-    PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine,
-    PRTL_AVL_FREE_ROUTINE FreeRoutine,
-    PVOID TableContext
-);
-
-NTSYSAPI
-PVOID
-NTAPI
-RtlInsertElementGenericTableAvl (
-    PRTL_AVL_TABLE Table,
-    PVOID Buffer,
-    CLONG BufferSize,
-    PBOOLEAN NewElement OPTIONAL
-    );
-    
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlDeleteElementGenericTableAvl (
-    PRTL_AVL_TABLE Table,
-    PVOID Buffer
-    );
-    
-NTSYSAPI
-PVOID
-NTAPI
-RtlLookupElementGenericTableAvl (
-    PRTL_AVL_TABLE Table,
-    PVOID Buffer
-    );
-    
-NTSYSAPI
-PVOID
-NTAPI
-RtlEnumerateGenericTableWithoutSplayingAvl (
-    PRTL_AVL_TABLE Table,
-    PVOID *RestartKey
-    );
-
 #if defined(USE_LPC6432)
 #define LPC_CLIENT_ID CLIENT_ID64
 #define LPC_SIZE_T ULONGLONG
index e008a2d..8df9847 100644 (file)
@@ -394,22 +394,33 @@ typedef struct _IMAGE_NT_HEADERS64 {
     ULONG Signature;
     IMAGE_FILE_HEADER FileHeader;
     IMAGE_OPTIONAL_HEADER64 OptionalHeader;
-} IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64;
+} IMAGE_NT_HEADERS64;
 
 typedef struct _IMAGE_NT_HEADERS {
     ULONG Signature;
     IMAGE_FILE_HEADER FileHeader;
     IMAGE_OPTIONAL_HEADER32 OptionalHeader;
-} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;
+} IMAGE_NT_HEADERS32;
 
 #ifdef _WIN64
 typedef IMAGE_NT_HEADERS64                  IMAGE_NT_HEADERS;
-typedef PIMAGE_NT_HEADERS64                 PIMAGE_NT_HEADERS;
 #else
 typedef IMAGE_NT_HEADERS32                  IMAGE_NT_HEADERS;
+#endif
+
+#ifndef _NTDDK_
+
+typedef struct _IMAGE_NT_HEADERS *PIMAGE_NT_HEADERS32;
+typedef struct _IMAGE_NT_HEADERS64 *PIMAGE_NT_HEADERS64;
+
+#ifdef _WIN64
+typedef PIMAGE_NT_HEADERS64                 PIMAGE_NT_HEADERS;
+#else
 typedef PIMAGE_NT_HEADERS32                 PIMAGE_NT_HEADERS;
 #endif
 
+#endif /* _NTDDK_ */
+
 //
 // Retreives the first image section header from the Nt Header
 //
index 8bceb36..b98dc0e 100644 (file)
@@ -125,16 +125,8 @@ typedef struct _HAL_DISPATCH_TABLE *PHAL_DISPATCH_TABLE;
 typedef struct _HAL_PRIVATE_DISPATCH_TABLE *PHAL_PRIVATE_DISPATCH_TABLE;
 typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; 
 typedef struct _CALLBACK_OBJECT *PCALLBACK_OBJECT;
-#if defined(_NTHAL_INCLUDED_)
-typedef struct _KPROCESS *PEPROCESS;
-typedef struct _ETHREAD *PETHREAD;
-#elif defined(_NTIFS_INCLUDED_)
-typedef struct _KPROCESS *PEPROCESS;
-typedef struct _KTHREAD *PETHREAD;
-#else
 typedef struct _EPROCESS *PEPROCESS;
 typedef struct _ETHREAD *PETHREAD;
-#endif
 typedef struct _IO_TIMER *PIO_TIMER;
 typedef struct _KINTERRUPT *PKINTERRUPT;
 typedef struct _KPROCESS *PKPROCESS;
index 45e27f2..6cc8d37 100644 (file)
@@ -731,7 +731,11 @@ typedef struct _PEB
     PVOID WerRegistrationData;
     PVOID WerShipAssertPtr;
 #endif
-} PEB, *PPEB;
+} PEB;
+
+#if !defined(_NTDDK_) && !defined(_NTIFS_INCLUDED_)
+typedef PEB *PPEB;
+#endif
 
 //
 // GDI Batch Descriptor
@@ -925,7 +929,7 @@ typedef struct _PROCESS_BASIC_INFORMATION
     KPRIORITY BasePriority;
     ULONG_PTR UniqueProcessId;
     ULONG_PTR InheritedFromUniqueProcessId;
-} PROCESS_BASIC_INFORMATION,*PPROCESS_BASIC_INFORMATION;
+} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
 
 typedef struct _PROCESS_ACCESS_TOKEN
 {
index 80b6d59..d3cb0c5 100644 (file)
@@ -125,16 +125,8 @@ typedef struct _HAL_DISPATCH_TABLE *PHAL_DISPATCH_TABLE;
 typedef struct _HAL_PRIVATE_DISPATCH_TABLE *PHAL_PRIVATE_DISPATCH_TABLE;
 typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT; 
 typedef struct _CALLBACK_OBJECT *PCALLBACK_OBJECT;
-#if defined(_NTHAL_INCLUDED_)
-typedef struct _KPROCESS *PEPROCESS;
-typedef struct _ETHREAD *PETHREAD;
-#elif defined(_NTIFS_INCLUDED_)
-typedef struct _KPROCESS *PEPROCESS;
-typedef struct _KTHREAD *PETHREAD;
-#else
 typedef struct _EPROCESS *PEPROCESS;
 typedef struct _ETHREAD *PETHREAD;
-#endif
 typedef struct _IO_TIMER *PIO_TIMER;
 typedef struct _KINTERRUPT *PKINTERRUPT;
 typedef struct _KPROCESS *PKPROCESS;