Add many more structures to NDK which were incorrectly in the w32api IFS

svn path=/trunk/; revision=16269
This commit is contained in:
Alex Ionescu 2005-06-25 18:08:47 +00:00
parent deb7a80fdd
commit c6e139c501
6 changed files with 182 additions and 184 deletions

View file

@ -19,7 +19,11 @@ extern NTOSAPI POBJECT_TYPE ExMutantObjectType;
extern NTOSAPI POBJECT_TYPE ExTimerType; extern NTOSAPI POBJECT_TYPE ExTimerType;
/* CONSTANTS *****************************************************************/ /* CONSTANTS *****************************************************************/
/* FIXME: Win32k uses windows.h! */
#ifndef __WIN32K__
#define INVALID_HANDLE_VALUE (HANDLE)-1 #define INVALID_HANDLE_VALUE (HANDLE)-1
#endif
/* Callback Object Access Rights */ /* Callback Object Access Rights */
#define CALLBACK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x0001) #define CALLBACK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x0001)
@ -31,6 +35,11 @@ extern NTOSAPI POBJECT_TYPE ExTimerType;
/* TYPES *********************************************************************/ /* TYPES *********************************************************************/
/* You'll need the IFS for this, so use an equivalent version */
#ifndef _NTIFS_
typedef PVOID EX_RUNDOWN_REF;
#endif
/* You'll need the IFS for these, so let's not force everyone to have it */ /* You'll need the IFS for these, so let's not force everyone to have it */
#ifdef _NTIFS_ #ifdef _NTIFS_
typedef struct _EX_QUEUE_WORKER_INFO typedef struct _EX_QUEUE_WORKER_INFO
@ -52,6 +61,31 @@ typedef struct _EX_WORK_QUEUE
} EX_WORK_QUEUE, *PEX_WORK_QUEUE; } EX_WORK_QUEUE, *PEX_WORK_QUEUE;
#endif #endif
typedef struct _EX_FAST_REF
{
union
{
PVOID Object;
ULONG RefCnt:3;
ULONG Value;
};
} EX_FAST_REF, *PEX_FAST_REF;
typedef struct _EX_PUSH_LOCK
{
union
{
struct
{
ULONG Waiting:1;
ULONG Exclusive:1;
ULONG Shared:30;
};
ULONG Value;
PVOID Ptr;
};
} EX_PUSH_LOCK, *PEX_PUSH_LOCK;
typedef struct _HANDLE_TABLE_ENTRY_INFO typedef struct _HANDLE_TABLE_ENTRY_INFO
{ {
ULONG AuditMask; ULONG AuditMask;

View file

@ -63,6 +63,18 @@ typedef struct _KDPC_DATA
ULONG DpcCount; ULONG DpcCount;
} KDPC_DATA, *PKDPC_DATA; } KDPC_DATA, *PKDPC_DATA;
/* We don't want to force NTIFS usage only for a single structure */
#ifndef _NTIFS_
typedef struct _KAPC_STATE
{
LIST_ENTRY ApcListHead[2];
PKPROCESS Process;
BOOLEAN KernelApcInProgress;
BOOLEAN KernelApcPending;
BOOLEAN UserApcPending;
} KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE;
#endif
/* FIXME: Most of these should go to i386 directory */ /* FIXME: Most of these should go to i386 directory */
typedef struct _FNSAVE_FORMAT typedef struct _FNSAVE_FORMAT
{ {
@ -153,6 +165,8 @@ typedef struct _KTRAP_FRAME
USHORT Reserved9; USHORT Reserved9;
} KTRAP_FRAME, *PKTRAP_FRAME; } KTRAP_FRAME, *PKTRAP_FRAME;
/* FIXME: Win32k uses windows.h! */
#ifndef __WIN32K__
typedef struct _LDT_ENTRY { typedef struct _LDT_ENTRY {
WORD LimitLow; WORD LimitLow;
WORD BaseLow; WORD BaseLow;
@ -177,6 +191,7 @@ typedef struct _LDT_ENTRY {
} Bits; } Bits;
} HighWord; } HighWord;
} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY; } LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
#endif
typedef struct _KGDTENTRY typedef struct _KGDTENTRY
{ {
@ -661,7 +676,7 @@ typedef struct _KTHREAD
UCHAR NpxIrql; /* DA */ UCHAR NpxIrql; /* DA */
UCHAR Pad[1]; /* DB */ UCHAR Pad[1]; /* DB */
PVOID ServiceTable; /* DC */ PVOID ServiceTable; /* DC */
PKQUEUE Queue; /* E0 */ struct _KQUEUE *Queue; /* E0 */
KSPIN_LOCK ApcQueueLock; /* E4 */ KSPIN_LOCK ApcQueueLock; /* E4 */
KTIMER Timer; /* E8 */ KTIMER Timer; /* E8 */
LIST_ENTRY QueueListEntry; /* 110 */ LIST_ENTRY QueueListEntry; /* 110 */

View file

@ -30,6 +30,17 @@ typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
/* TYPES *********************************************************************/ /* TYPES *********************************************************************/
/* FIXME: Forced to do this for now, because of EPROCESS, will go away before 0.3.0 */
typedef struct _MADDRESS_SPACE
{
PVOID MemoryAreaRoot;
FAST_MUTEX Lock;
PVOID LowestAddress;
struct _EPROCESS* Process;
PUSHORT PageTableRefCountTable;
ULONG PageTableRefCountTableSize;
} MADDRESS_SPACE, *PMADDRESS_SPACE;
typedef struct _PP_LOOKASIDE_LIST typedef struct _PP_LOOKASIDE_LIST
{ {
struct _GENERAL_LOOKASIDE *P; struct _GENERAL_LOOKASIDE *P;
@ -68,4 +79,83 @@ typedef struct _MM_AVL_TABLE
PVOID NodeFreeHint; PVOID NodeFreeHint;
} MM_AVL_TABLE, *PMM_AVL_TABLE; } MM_AVL_TABLE, *PMM_AVL_TABLE;
typedef struct _MMWSLENTRY
{
ULONG Valid:1;
ULONG LockedInWs:1;
ULONG LockedInMemory:1;
ULONG Protection:5;
ULONG Hashed:1;
ULONG Direct:1;
ULONG Age:2;
ULONG VirtualPageNumber:14;
} MMWSLENTRY, *PMMWSLENTRY;
typedef struct _MMWSLE
{
union
{
PVOID VirtualAddress;
ULONG Long;
MMWSLENTRY e1;
};
} MMWSLE, *PMMWSLE;
typedef struct _MMWSLE_HASH
{
PVOID Key;
ULONG Index;
} MMWSLE_HASH, *PMMWSLE_HASH;
typedef struct _MMWSL
{
ULONG FirstFree;
ULONG FirstDynamic;
ULONG LastEntry;
ULONG NextSlot;
PMMWSLE Wsle;
ULONG LastInitializedWsle;
ULONG NonDirectcout;
PMMWSLE_HASH HashTable;
ULONG HashTableSize;
ULONG NumberOfCommittedPageTables;
PVOID HashTableStart;
PVOID HighestPermittedHashAddress;
ULONG NumberOfImageWaiters;
ULONG VadBitMapHint;
USHORT UsedPageTableEntries[768];
ULONG CommittedPageTables[24];
} MMWSL, *PMMWSL;
typedef struct _MMSUPPORT_FLAGS
{
ULONG SessionSpace:1;
ULONG BeingTrimmed:1;
ULONG SessionLeader:1;
ULONG TrimHard:1;
ULONG WorkingSetHard:1;
ULONG AddressSpaceBeingDeleted :1;
ULONG Available:10;
ULONG AllowWorkingSetAdjustment:8;
ULONG MemoryPriority:8;
} MMSUPPORT_FLAGS, *PMMSUPPORT_FLAGS;
typedef struct _MMSUPPORT
{
LARGE_INTEGER LastTrimTime;
MMSUPPORT_FLAGS Flags;
ULONG PageFaultCount;
ULONG PeakWorkingSetSize;
ULONG WorkingSetSize;
ULONG MinimumWorkingSetSize;
ULONG MaximumWorkingSetSize;
PMMWSL MmWorkingSetList;
LIST_ENTRY WorkingSetExpansionLinks;
ULONG Claim;
ULONG NextEstimationSlot;
ULONG NextAgingSlot;
ULONG EstimatedAvailable;
ULONG GrowthSinceLastEstimate;
} MMSUPPORT, *PMMSUPPORT;
#endif #endif

View file

@ -95,8 +95,6 @@ typedef NTSTATUS
/* TYPES *********************************************************************/ /* TYPES *********************************************************************/
struct _ETHREAD; struct _ETHREAD;
typedef struct _W32PROCESS *PW32PROCESS;
typedef struct _W32THREAD *PW32THREAD;
typedef struct _CURDIR typedef struct _CURDIR
{ {
@ -261,7 +259,42 @@ typedef struct _TEB
#ifndef NTOS_MODE_USER #ifndef NTOS_MODE_USER
#include "mmtypes.h" #include "mmtypes.h"
#include <internal/mm.h> /* FIXME: Forced to do this for now */ #include "extypes.h"
#include "setypes.h"
typedef struct _EPROCESS_QUOTA_ENTRY
{
ULONG Usage;
ULONG Limit;
ULONG Peak;
ULONG Return;
} EPROCESS_QUOTA_ENTRY, *PEPROCESS_QUOTA_ENTRY;
typedef struct _EPROCESS_QUOTA_BLOCK
{
EPROCESS_QUOTA_ENTRY QuotaEntry[3];
LIST_ENTRY QuotaList;
ULONG ReferenceCount;
ULONG ProcessCount;
} EPROCESS_QUOTA_BLOCK, *PEPROCESS_QUOTA_BLOCK;
typedef struct _PAGEFAULT_HISTORY
{
ULONG CurrentIndex;
ULONG MapIndex;
KSPIN_LOCK SpinLock;
PVOID Reserved;
PROCESS_WS_WATCH_INFORMATION WatchInfo[1];
} PAGEFAULT_HISTORY, *PPAGEFAULT_HISTORY;
typedef struct _PS_IMPERSONATION_INFORMATION
{
PACCESS_TOKEN Token;
BOOLEAN CopyOnOpen;
BOOLEAN EffectiveOnly;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
} PS_IMPERSONATION_INFORMATION, *PPS_IMPERSONATION_INFORMATION;
#include <pshpack4.h> #include <pshpack4.h>
/* /*
* NAME: ETHREAD * NAME: ETHREAD

View file

@ -88,4 +88,10 @@ typedef struct _AUX_DATA
GENERIC_MAPPING GenericMapping; GENERIC_MAPPING GenericMapping;
ULONG Reserved; ULONG Reserved;
} AUX_DATA, *PAUX_DATA; } AUX_DATA, *PAUX_DATA;
typedef struct _SE_AUDIT_PROCESS_CREATION_INFO
{
POBJECT_NAME_INFORMATION ImageFileName;
} SE_AUDIT_PROCESS_CREATION_INFO, *PSE_AUDIT_PROCESS_CREATION_INFO;
#endif #endif

View file

@ -521,16 +521,12 @@ extern LARGE_INTEGER IoOtherTransferCount;
typedef PVOID OPLOCK, *POPLOCK; typedef PVOID OPLOCK, *POPLOCK;
typedef struct _CACHE_MANAGER_CALLBACKS *PCACHE_MANAGER_CALLBACKS; typedef struct _CACHE_MANAGER_CALLBACKS *PCACHE_MANAGER_CALLBACKS;
typedef struct _EPROCESS_QUOTA_BLOCK *PEPROCESS_QUOTA_BLOCK;
typedef struct _FILE_GET_QUOTA_INFORMATION *PFILE_GET_QUOTA_INFORMATION; typedef struct _FILE_GET_QUOTA_INFORMATION *PFILE_GET_QUOTA_INFORMATION;
typedef struct _HANDLE_TABLE *PHANDLE_TABLE; typedef struct _HANDLE_TABLE *PHANDLE_TABLE;
typedef struct _KPROCESS *PKPROCESS; typedef struct _KPROCESS *PKPROCESS;
typedef struct _KQUEUE *PKQUEUE; typedef struct _KQUEUE *PKQUEUE;
typedef struct _KTRAP_FRAME *PKTRAP_FRAME; typedef struct _KTRAP_FRAME *PKTRAP_FRAME;
typedef struct _MMWSL *PMMWSL;
typedef struct _OBJECT_DIRECTORY *POBJECT_DIRECTORY; typedef struct _OBJECT_DIRECTORY *POBJECT_DIRECTORY;
typedef struct _PAGEFAULT_HISTORY *PPAGEFAULT_HISTORY;
typedef struct _PS_IMPERSONATION_INFORMATION *PPS_IMPERSONATION_INFORMATION;
typedef struct _SECTION_OBJECT *PSECTION_OBJECT; typedef struct _SECTION_OBJECT *PSECTION_OBJECT;
typedef struct _SHARED_CACHE_MAP *PSHARED_CACHE_MAP; typedef struct _SHARED_CACHE_MAP *PSHARED_CACHE_MAP;
typedef struct _VACB *PVACB; typedef struct _VACB *PVACB;
@ -590,89 +586,6 @@ typedef struct _KAPC_STATE {
BOOLEAN UserApcPending; BOOLEAN UserApcPending;
} KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE; } KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE;
#if (VER_PRODUCTBUILD >= 2600)
typedef struct _MMSUPPORT_FLAGS {
ULONG SessionSpace : 1;
ULONG BeingTrimmed : 1;
ULONG SessionLeader : 1;
ULONG TrimHard : 1;
ULONG WorkingSetHard : 1;
ULONG AddressSpaceBeingDeleted : 1;
ULONG Available : 10;
ULONG AllowWorkingSetAdjustment : 8;
ULONG MemoryPriority : 8;
} MMSUPPORT_FLAGS, *PMMSUPPORT_FLAGS;
#else
typedef struct _MMSUPPORT_FLAGS {
ULONG SessionSpace : 1;
ULONG BeingTrimmed : 1;
ULONG ProcessInSession : 1;
ULONG SessionLeader : 1;
ULONG TrimHard : 1;
ULONG WorkingSetHard : 1;
ULONG WriteWatch : 1;
ULONG Filler : 25;
} MMSUPPORT_FLAGS, *PMMSUPPORT_FLAGS;
#endif
#if (VER_PRODUCTBUILD >= 2600)
typedef struct _MMSUPPORT {
LARGE_INTEGER LastTrimTime;
MMSUPPORT_FLAGS Flags;
ULONG PageFaultCount;
ULONG PeakWorkingSetSize;
ULONG WorkingSetSize;
ULONG MinimumWorkingSetSize;
ULONG MaximumWorkingSetSize;
PMMWSL VmWorkingSetList;
LIST_ENTRY WorkingSetExpansionLinks;
ULONG Claim;
ULONG NextEstimationSlot;
ULONG NextAgingSlot;
ULONG EstimatedAvailable;
ULONG GrowthSinceLastEstimate;
} MMSUPPORT, *PMMSUPPORT;
#else
typedef struct _MMSUPPORT {
LARGE_INTEGER LastTrimTime;
ULONG LastTrimFaultCount;
ULONG PageFaultCount;
ULONG PeakWorkingSetSize;
ULONG WorkingSetSize;
ULONG MinimumWorkingSetSize;
ULONG MaximumWorkingSetSize;
PMMWSL VmWorkingSetList;
LIST_ENTRY WorkingSetExpansionLinks;
BOOLEAN AllowWorkingSetAdjustment;
BOOLEAN AddressSpaceBeingDeleted;
UCHAR ForegroundSwitchCount;
UCHAR MemoryPriority;
#if (VER_PRODUCTBUILD >= 2195)
union {
ULONG LongFlags;
MMSUPPORT_FLAGS Flags;
} u;
ULONG Claim;
ULONG NextEstimationSlot;
ULONG NextAgingSlot;
ULONG EstimatedAvailable;
ULONG GrowthSinceLastEstimate;
#endif /* (VER_PRODUCTBUILD >= 2195) */
} MMSUPPORT, *PMMSUPPORT;
#endif
typedef struct _SE_AUDIT_PROCESS_CREATION_INFO {
POBJECT_NAME_INFORMATION ImageFileName;
} SE_AUDIT_PROCESS_CREATION_INFO, *PSE_AUDIT_PROCESS_CREATION_INFO;
typedef struct _BITMAP_RANGE { typedef struct _BITMAP_RANGE {
LIST_ENTRY Links; LIST_ENTRY Links;
LARGE_INTEGER BasePage; LARGE_INTEGER BasePage;
@ -703,28 +616,6 @@ typedef struct _COMPRESSED_DATA_INFO {
ULONG CompressedChunkSizes[ANYSIZE_ARRAY]; ULONG CompressedChunkSizes[ANYSIZE_ARRAY];
} COMPRESSED_DATA_INFO, *PCOMPRESSED_DATA_INFO; } COMPRESSED_DATA_INFO, *PCOMPRESSED_DATA_INFO;
#if (VER_PRODUCTBUILD >= 2600)
typedef struct _EX_FAST_REF {
_ANONYMOUS_UNION union {
PVOID Object;
ULONG RefCnt : 3;
ULONG Value;
} DUMMYUNIONNAME;
} EX_FAST_REF, *PEX_FAST_REF;
typedef struct _EX_PUSH_LOCK {
_ANONYMOUS_UNION union {
_ANONYMOUS_STRUCT struct {
ULONG Waiting : 1;
ULONG Exclusive : 1;
ULONG Shared : 30;
} DUMMYSTRUCTNAME;
ULONG Value;
PVOID Ptr;
} DUMMYUNIONNAME;
} EX_PUSH_LOCK, *PEX_PUSH_LOCK;
#define EX_RUNDOWN_ACTIVE 0x1 #define EX_RUNDOWN_ACTIVE 0x1
#define EX_RUNDOWN_COUNT_SHIFT 0x1 #define EX_RUNDOWN_COUNT_SHIFT 0x1
#define EX_RUNDOWN_COUNT_INC (1 << EX_RUNDOWN_COUNT_SHIFT) #define EX_RUNDOWN_COUNT_INC (1 << EX_RUNDOWN_COUNT_SHIFT)
@ -736,22 +627,6 @@ typedef struct _EX_RUNDOWN_REF {
} DUMMYUNIONNAME; } DUMMYUNIONNAME;
} EX_RUNDOWN_REF, *PEX_RUNDOWN_REF; } EX_RUNDOWN_REF, *PEX_RUNDOWN_REF;
#endif
typedef struct _EPROCESS_QUOTA_ENTRY {
ULONG Usage;
ULONG Limit;
ULONG Peak;
ULONG Return;
} EPROCESS_QUOTA_ENTRY, *PEPROCESS_QUOTA_ENTRY;
typedef struct _EPROCESS_QUOTA_BLOCK {
EPROCESS_QUOTA_ENTRY QuotaEntry[3];
LIST_ENTRY QuotaList;
ULONG ReferenceCount;
ULONG ProcessCount;
} EPROCESS_QUOTA_BLOCK, *PEPROCESS_QUOTA_BLOCK;
typedef struct _FILE_ACCESS_INFORMATION { typedef struct _FILE_ACCESS_INFORMATION {
ACCESS_MASK AccessFlags; ACCESS_MASK AccessFlags;
} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION; } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
@ -1391,13 +1266,6 @@ typedef struct _PRIVATE_CACHE_MAP {
#endif #endif
typedef struct _PS_IMPERSONATION_INFORMATION {
PACCESS_TOKEN Token;
BOOLEAN CopyOnOpen;
BOOLEAN EffectiveOnly;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
} PS_IMPERSONATION_INFORMATION, *PPS_IMPERSONATION_INFORMATION;
typedef struct _PUBLIC_BCB { typedef struct _PUBLIC_BCB {
CSHORT NodeTypeCode; CSHORT NodeTypeCode;
CSHORT NodeByteSize; CSHORT NodeByteSize;
@ -1490,54 +1358,6 @@ typedef struct _SE_EXPORTS {
} SE_EXPORTS, *PSE_EXPORTS; } SE_EXPORTS, *PSE_EXPORTS;
#if (VER_PRODUCTBUILD >= 2600)
typedef struct _SHARED_CACHE_MAP {
CSHORT NodeTypeCode;
CSHORT NodeByteSize;
ULONG OpenCount;
LARGE_INTEGER FileSize;
LIST_ENTRY BcbList;
LARGE_INTEGER SectionSize;
LARGE_INTEGER ValidDataLength;
LARGE_INTEGER ValidDataGoal;
PVACB InitialVacbs[4];
PVACB *Vacbs;
PFILE_OBJECT FileObject;
PVACB ActiveVacb;
PVOID NeedToZero;
ULONG ActivePage;
ULONG NeedToZeroPage;
KSPIN_LOCK ActiveVacbSpinLock;
ULONG VacbActiveCount;
ULONG DirtyPages;
LIST_ENTRY SharedCacheMapLinks;
ULONG Flags;
NTSTATUS Status;
PMBCB Mbcb;
PVOID Section;
PKEVENT CreateEvent;
PKEVENT WaitOnActiveCount;
ULONG PagesToWrite;
LONGLONG BeyondLastFlush;
PCACHE_MANAGER_CALLBACKS Callbacks;
PVOID LazyWriteContext;
LIST_ENTRY PrivateList;
PVOID LogHandle;
PVOID FlushToLsnRoutine;
ULONG DirtyPageThreshold;
ULONG LazyWritePassCount;
PCACHE_UNINITIALIZE_EVENT UninitializeEvent;
PVACB NeedToZeroVacb;
KSPIN_LOCK BcbSpinLock;
PVOID Reserved;
KEVENT Event;
EX_PUSH_LOCK VacbPushLock;
PRIVATE_CACHE_MAP PrivateCacheMap;
} SHARED_CACHE_MAP, *PSHARED_CACHE_MAP;
#endif
typedef struct _STARTING_VCN_INPUT_BUFFER { typedef struct _STARTING_VCN_INPUT_BUFFER {
LARGE_INTEGER StartingVcn; LARGE_INTEGER StartingVcn;
} STARTING_VCN_INPUT_BUFFER, *PSTARTING_VCN_INPUT_BUFFER; } STARTING_VCN_INPUT_BUFFER, *PSTARTING_VCN_INPUT_BUFFER;