--- trunk/reactos/w32api/include/winternl.h 2005-08-07 00:26:13 UTC (rev 17131)
+++ trunk/reactos/w32api/include/winternl.h 2005-08-07 01:23:40 UTC (rev 17132)
@@ -18,11 +18,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef __WINE_WINTERNAL_H
-#define __WINE_WINTERNAL_H
+#ifndef __WINE_WINTERNL_H
+#define __WINE_WINTERNL_H
#include <windef.h>
-#include <wine/winnt.h>
#ifdef __cplusplus
extern "C" {
@@ -33,7 +32,7 @@
* Fundamental types and data structures
*/
-typedef LONG NTSTATUS, *PNTSTATUS;
+typedef LONG NTSTATUS;
typedef CONST char *PCSZ;
@@ -62,6 +61,50 @@
typedef const UNICODE_STRING *PCUNICODE_STRING;
+#ifndef _FILETIME_
+#define _FILETIME_
+/* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
+typedef struct _FILETIME
+{
+#ifdef WORDS_BIGENDIAN
+ DWORD dwHighDateTime;
+ DWORD dwLowDateTime;
+#else
+ DWORD dwLowDateTime;
+ DWORD dwHighDateTime;
+#endif
+} FILETIME, *PFILETIME, *LPFILETIME;
+#endif /* _FILETIME_ */
+
+/*
+ * RTL_SYSTEM_TIME and RTL_TIME_ZONE_INFORMATION are the same as
+ * the SYSTEMTIME and TIME_ZONE_INFORMATION structures defined
+ * in winbase.h, however we need to define them seperately so
+ * winternl.h doesn't depend on winbase.h. They are used by
+ * RtlQueryTimeZoneInformation and RtlSetTimeZoneInformation.
+ * The names are guessed; if anybody knows the real names, let me know.
+ */
+typedef struct _RTL_SYSTEM_TIME {
+ WORD wYear;
+ WORD wMonth;
+ WORD wDayOfWeek;
+ WORD wDay;
+ WORD wHour;
+ WORD wMinute;
+ WORD wSecond;
+ WORD wMilliseconds;
+} RTL_SYSTEM_TIME, *PRTL_SYSTEM_TIME;
+
+typedef struct _RTL_TIME_ZONE_INFORMATION {
+ LONG Bias;
+ WCHAR StandardName[32];
+ RTL_SYSTEM_TIME StandardDate;
+ LONG StandardBias;
+ WCHAR DaylightName[32];
+ RTL_SYSTEM_TIME DaylightDate;
+ LONG DaylightBias;
+} RTL_TIME_ZONE_INFORMATION, *PRTL_TIME_ZONE_INFORMATION;
+
typedef struct _CLIENT_ID
{
HANDLE UniqueProcess;
@@ -84,14 +127,14 @@
typedef struct tagRTL_BITMAP {
ULONG SizeOfBitMap; /* Number of bits in the bitmap */
- LPBYTE BitMapBuffer; /* Bitmap data, assumed sized to a DWORD boundary */
+ PULONG Buffer; /* Bitmap data, assumed sized to a DWORD boundary */
} RTL_BITMAP, *PRTL_BITMAP;
typedef const RTL_BITMAP *PCRTL_BITMAP;
typedef struct tagRTL_BITMAP_RUN {
- ULONG StartOfRun; /* Bit position at which run starts - FIXME: Name? */
- ULONG SizeOfRun; /* Size of the run in bits - FIXME: Name? */
+ ULONG StartingIndex; /* Bit position at which run starts */
+ ULONG NumberOfBits; /* Size of the run in bits */
} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
typedef const RTL_BITMAP_RUN *PCRTL_BITMAP_RUN;
@@ -102,13 +145,12 @@
ULONG Size;
ULONG Flags;
ULONG DebugFlags;
- HANDLE hConsole;
- ULONG ProcessGroup;
+ HANDLE ConsoleHandle;
+ ULONG ConsoleFlags;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
- UNICODE_STRING CurrentDirectoryName;
- HANDLE CurrentDirectoryHandle;
+ CURDIR CurrentDirectory;
UNICODE_STRING DllPath;
UNICODE_STRING ImagePathName;
UNICODE_STRING CommandLine;
@@ -142,37 +184,79 @@
LIST_ENTRY InInitializationOrderModuleList;
} PEB_LDR_DATA, *PPEB_LDR_DATA;
+typedef struct _GDI_TEB_BATCH
+{
+ ULONG Offset;
+ HANDLE HDC;
+ ULONG Buffer[0x136];
+} GDI_TEB_BATCH;
+
/***********************************************************************
* PEB data structure
*/
typedef struct _PEB
{
- BYTE Reserved1[2]; /* 00 */
- BYTE BeingDebugged; /* 02 */
- BYTE Reserved2[5]; /* 03 */
- HMODULE ImageBaseAddress; /* 08 */
- PPEB_LDR_DATA LdrData; /* 0c */
- RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 10 */
- PVOID __pad_14; /* 14 */
- HANDLE ProcessHeap; /* 18 */
- BYTE __pad_1c[36]; /* 1c */
- PRTL_BITMAP TlsBitmap; /* 40 */
- ULONG TlsBitmapBits[2]; /* 44 */
- BYTE __pad_4c[104]; /* 4c */
- ULONG ImageSubSystem; /* b4 */
- BYTE __pad_b8[48]; /* b8 */
- PVOID Reserved3[59]; /* e8 */
- ULONG SessionId; /* 1d4 */
+ BOOLEAN InheritedAddressSpace; /* 00 */
+ BOOLEAN ReadImageFileExecOptions; /* 01 */
+ BOOLEAN BeingDebugged; /* 02 */
+ BOOLEAN SpareBool; /* 03 */
+ HANDLE Mutant; /* 04 */
+ HMODULE ImageBaseAddress; /* 08 */
+ PPEB_LDR_DATA LdrData; /* 0c */
+ RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 10 */
+ PVOID SubSystemData; /* 14 */
+ HANDLE ProcessHeap; /* 18 */
+ PRTL_CRITICAL_SECTION FastPebLock; /* 1c */
+ PVOID /*PPEBLOCKROUTINE*/ FastPebLockRoutine; /* 20 */
+ PVOID /*PPEBLOCKROUTINE*/ FastPebUnlockRoutine; /* 24 */
+ ULONG EnvironmentUpdateCount; /* 28 */
+ PVOID KernelCallbackTable; /* 2c */
+ PVOID EventLogSection; /* 30 */
+ PVOID EventLog; /* 34 */
+ PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 38 */
+ ULONG TlsExpansionCounter; /* 3c */
+ PRTL_BITMAP TlsBitmap; /* 40 */
+ ULONG TlsBitmapBits[2]; /* 44 */
+ PVOID ReadOnlySharedMemoryBase; /* 4c */
+ PVOID ReadOnlySharedMemoryHeap; /* 50 */
+ PVOID *ReadOnlyStaticServerData; /* 54 */
+ PVOID AnsiCodePageData; /* 58 */
+ PVOID OemCodePageData; /* 5c */
+ PVOID UnicodeCaseTableData; /* 60 */
+ ULONG NumberOfProcessors; /* 64 */
+ ULONG NtGlobalFlag; /* 68 */
+ BYTE Spare2[4]; /* 6c */
+ LARGE_INTEGER CriticalSectionTimeout; /* 70 */
+ ULONG HeapSegmentReserve; /* 78 */
+ ULONG HeapSegmentCommit; /* 7c */
+ ULONG HeapDeCommitTotalFreeThreshold; /* 80 */
+ ULONG HeapDeCommitFreeBlockThreshold; /* 84 */
+ ULONG NumberOfHeaps; /* 88 */
+ ULONG MaximumNumberOfHeaps; /* 8c */
+ PVOID *ProcessHeaps; /* 90 */
+ PVOID GdiSharedHandleTable; /* 94 */
+ PVOID ProcessStarterHelper; /* 98 */
+ PVOID GdiDCAttributeList; /* 9c */
+ PVOID LoaderLock; /* a0 */
+ ULONG OSMajorVersion; /* a4 */
+ ULONG OSMinorVersion; /* a8 */
+ ULONG OSBuildNumber; /* ac */
+ ULONG OSPlatformId; /* b0 */
+ ULONG ImageSubSystem; /* b4 */
+ ULONG ImageSubSystemMajorVersion; /* b8 */
+ ULONG ImageSubSystemMinorVersion; /* bc */
+ ULONG ImageProcessAffinityMask; /* c0 */
+ ULONG GdiHandleBuffer[34]; /* c4 */
+ ULONG PostProcessInitRoutine; /* 14c */
+ PRTL_BITMAP TlsExpansionBitmap; /* 150 */
+ ULONG TlsExpansionBitmapBits[32]; /* 154 */
+ ULONG SessionId; /* 1d4 */
} PEB, *PPEB;
/***********************************************************************
* TEB data structure
*/
-#if defined(_NTSYSTEM_) || defined(_KERNEL32_) /* hack, should go away */
-# define WINE_NO_TEB
-#endif
-
#ifndef WINE_NO_TEB /* don't define TEB if included from thread.h */
# ifndef WINE_TEB_DEFINED
# define WINE_TEB_DEFINED
@@ -185,19 +269,56 @@
PVOID ThreadLocalStoragePointer; /* 02c */
PPEB Peb; /* 030 */
ULONG LastErrorValue; /* 034 */
- BYTE __pad038[140]; /* 038 */
+ ULONG CountOfOwnedCriticalSections;/* 038 */
+ PVOID CsrClientThread; /* 03c */
+ PVOID Win32ThreadInfo; /* 040 */
+ ULONG Win32ClientInfo[31]; /* 044 used for user32 private data in Wine */
+ PVOID WOW32Reserved; /* 0c0 */
ULONG CurrentLocale; /* 0c4 */
- BYTE __pad0c8[1752]; /* 0c8 */
- PVOID Reserved2[278]; /* 7a0 */
+ ULONG FpSoftwareStatusRegister; /* 0c8 */
+ PVOID SystemReserved1[54]; /* 0cc used for kernel32 private data in Wine */
+ PVOID Spare1; /* 1a4 */
+ LONG ExceptionCode; /* 1a8 */
+ BYTE SpareBytes1[40]; /* 1ac */
+ PVOID SystemReserved2[10]; /* 1d4 used for ntdll private data in Wine */
+ GDI_TEB_BATCH GdiTebBatch; /* 1fc */
+ ULONG gdiRgn; /* 6dc */
+ ULONG gdiPen; /* 6e0 */
+ ULONG gdiBrush; /* 6e4 */
+ CLIENT_ID RealClientId; /* 6e8 */
+ HANDLE GdiCachedProcessHandle; /* 6f0 */
+ ULONG GdiClientPID; /* 6f4 */
+ ULONG GdiClientTID; /* 6f8 */
+ PVOID GdiThreadLocaleInfo; /* 6fc */
+ PVOID UserReserved[5]; /* 700 */
+ PVOID glDispachTable[280]; /* 714 */
+ ULONG glReserved1[26]; /* b74 */
+ PVOID glReserved2; /* bdc */
+ PVOID glSectionInfo; /* be0 */
+ PVOID glSection; /* be4 */
+ PVOID glTable; /* be8 */
+ PVOID glCurrentRC; /* bec */
+ PVOID glContext; /* bf0 */
+ ULONG LastStatusValue; /* bf4 */
UNICODE_STRING StaticUnicodeString; /* bf8 used by advapi32 */
WCHAR StaticUnicodeBuffer[261]; /* c00 used by advapi32 */
PVOID DeallocationStack; /* e0c */
PVOID TlsSlots[64]; /* e10 */
LIST_ENTRY TlsLinks; /* f10 */
- PVOID Reserved4[26]; /* f18 */
- PVOID ReservedForOle; /* f80 Windows 2000 only */
- PVOID Reserved5[4]; /* f84 */
- PVOID TlsExpansionSlots; /* f94 */
+ PVOID Vdm; /* f18 */
+ PVOID ReservedForNtRpc; /* f1c */
+ PVOID DbgSsReserved[2]; /* f20 */
+ ULONG HardErrorDisabled; /* f28 */
+ PVOID Instrumentation[16]; /* f2c */
+ PVOID WinSockData; /* f6c */
+ ULONG GdiBatchCount; /* f70 */
+ ULONG Spare2; /* f74 */
+ ULONG Spare3; /* f78 */
+ ULONG Spare4; /* f7c */
+ PVOID ReservedForOle; /* f80 */
+ ULONG WaitingOnLoaderLock; /* f84 */
+ PVOID Reserved5[3]; /* f88 */
+ PVOID *TlsExpansionSlots; /* f94 */
} TEB, *PTEB;
# endif /* WINE_TEB_DEFINED */
#endif /* WINE_NO_TEB */
@@ -246,7 +367,54 @@
FileMaximumInformation
} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
-#include <pshpack8.h>
+typedef struct _FILE_DIRECTORY_INFORMATION {
+ ULONG NextEntryOffset;
+ ULONG FileIndex;
+ LARGE_INTEGER CreationTime;
+ LARGE_INTEGER LastAccessTime;
+ LARGE_INTEGER LastWriteTime;
+ LARGE_INTEGER ChangeTime;
+ LARGE_INTEGER EndOfFile;
+ LARGE_INTEGER AllocationSize;
+ ULONG FileAttributes;
+ ULONG FileNameLength;
+ WCHAR FileName[ANYSIZE_ARRAY];
+} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
+
+typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
+ ULONG NextEntryOffset;
+ ULONG FileIndex;
+ LARGE_INTEGER CreationTime;
+ LARGE_INTEGER LastAccessTime;
+ LARGE_INTEGER LastWriteTime;
+ LARGE_INTEGER ChangeTime;
+ LARGE_INTEGER EndOfFile;
+ LARGE_INTEGER AllocationSize;
+ ULONG FileAttributes;
+ ULONG FileNameLength;
+ ULONG EaSize;
+ WCHAR FileName[ANYSIZE_ARRAY];
+} FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
+ FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
+
+typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
+ ULONG NextEntryOffset;
+ ULONG FileIndex;
+ LARGE_INTEGER CreationTime;
+ LARGE_INTEGER LastAccessTime;
+ LARGE_INTEGER LastWriteTime;
+ LARGE_INTEGER ChangeTime;
+ LARGE_INTEGER EndOfFile;
+ LARGE_INTEGER AllocationSize;
+ ULONG FileAttributes;
+ ULONG FileNameLength;
+ ULONG EaSize;
+ CHAR ShortNameLength;
+ WCHAR ShortName[12];
+ WCHAR FileName[ANYSIZE_ARRAY];
+} FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
+ FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
+
typedef struct _FILE_BASIC_INFORMATION {
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
@@ -254,7 +422,6 @@
LARGE_INTEGER ChangeTime;
ULONG FileAttributes;
} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
-#include <poppack.h>
typedef struct _FILE_STANDARD_INFORMATION {
LARGE_INTEGER AllocationSize;
@@ -264,6 +431,41 @@
BOOLEAN Directory;
} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
+typedef struct _FILE_INTERNAL_INFORMATION {
+ LARGE_INTEGER IndexNumber;
+} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
+
+typedef struct _FILE_EA_INFORMATION {
+ ULONG EaSize;
+} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
+
+typedef struct _FILE_ACCESS_INFORMATION {
+ ACCESS_MASK AccessFlags;
+} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
+
+typedef struct _FILE_NAME_INFORMATION {
+ ULONG FileNameLength;
+ WCHAR FileName[1];
+} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
+
+typedef struct _FILE_RENAME_INFORMATION {
+ BOOLEAN Replace;
+ HANDLE RootDir;
+ ULONG FileNameLength;
+ WCHAR FileName[1];
+} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
+
+typedef struct _FILE_NAMES_INFORMATION {
+ ULONG NextEntryOffset;
+ ULONG FileIndex;
+ ULONG FileNameLength;
+ WCHAR FileName[1];
+} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
+
+typedef struct _FILE_DISPOSITION_INFORMATION {
+ BOOLEAN DoDeleteFile;
+} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
+
typedef struct _FILE_POSITION_INFORMATION {
LARGE_INTEGER CurrentByteOffset;
} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
@@ -272,6 +474,14 @@
ULONG AlignmentRequirement;
} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
+typedef struct _FILE_ALLOCATION_INFORMATION {
+ LARGE_INTEGER AllocationSize;
+} FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
+
+typedef struct _FILE_END_OF_FILE_INFORMATION {
+ LARGE_INTEGER EndOfFile;
+} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
+
typedef struct _FILE_NETWORK_OPEN_INFORMATION {
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
@@ -290,6 +500,10 @@
CHAR EaName[1];
} FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
+typedef struct _FILE_MODE_INFORMATION {
+ ULONG Mode;
+} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
+
typedef struct _FILE_STREAM_INFORMATION
{
ULONG NextEntryOffset;
@@ -299,12 +513,37 @@
WCHAR StreamName[1];
} FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
-struct _FILE_ATTRIBUTE_TAG_INFORMATION
+typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION
{
ULONG FileAttributes;
ULONG ReparseTag;
} FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
+typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
+ ULONG MaximumMessageSize;
+ ULONG MailslotQuota;
+ ULONG NextMessageSize;
+ ULONG MessagesAvailable;
+ LARGE_INTEGER ReadTimeout;
+} FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
+
+typedef struct _FILE_MAILSLOT_SET_INFORMATION {
+ LARGE_INTEGER ReadTimeout;
+} FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
+
+typedef struct _FILE_ALL_INFORMATION
+{
+ FILE_BASIC_INFORMATION BasicInformation;
+ FILE_STANDARD_INFORMATION StandardInformation;
+ FILE_INTERNAL_INFORMATION InternalInformation;
+ FILE_EA_INFORMATION EaInformation;
+ FILE_ACCESS_INFORMATION AccessInformation;
+ FILE_POSITION_INFORMATION PositionInformation;
+ FILE_MODE_INFORMATION ModeInformation;
+ FILE_ALIGNMENT_INFORMATION AlignmentInformation;
+ FILE_NAME_INFORMATION NameInformation;
+} FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
+
typedef enum _FSINFOCLASS {
FileFsVolumeInformation = 1,
FileFsLabelInformation,
@@ -367,17 +606,23 @@
ProcessSessionInformation = 24,
ProcessForegroundInformation = 25,
ProcessWow64Information = 26,
+ ProcessImageFileName = 27,
+ ProcessLUIDDeviceMapsEnabled = 28,
+ ProcessBreakOnTermination = 29,
+ ProcessDebugObjectHandle = 30,
+ ProcessDebugFlags = 31,
+ ProcessHandleTracing = 32,
MaxProcessInfoClass
-} PROCESSINFOCLASS;
+} PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS;
typedef enum _SECTION_INHERIT {
ViewShare = 1,
ViewUnmap = 2
} SECTION_INHERIT;
-typedef enum SYSTEM_INFORMATION_CLASS {
+typedef enum _SYSTEM_INFORMATION_CLASS {
SystemBasicInformation = 0,
- Unknown1,
+ SystemCpuInformation = 1,
SystemPerformanceInformation = 2,
SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
Unknown4,
@@ -387,22 +632,49 @@
SystemProcessorPerformanceInformation = 8,
Unknown9,
Unknown10,
- SystemDriverInformation,
+ SystemModuleInformation = 11,
Unknown12,
Unknown13,
Unknown14,
Unknown15,
- SystemHandleList,
+ SystemHandleInformation = 16,
Unknown17,
- Unknown18,
+ SystemPageFileInformation = 18,
Unknown19,
Unknown20,
- SystemCacheInformation,
+ SystemCacheInformation = 21,
Unknown22,
SystemInterruptInformation = 23,
+ SystemDpcBehaviourInformation = 24,
+ SystemFullMemoryInformation = 25,
+ SystemNotImplemented6 = 25,
+ SystemLoadImage = 26,
+ SystemUnloadImage = 27,
+ SystemTimeAdjustmentInformation = 28,
+ SystemTimeAdjustment = 28,
+ SystemSummaryMemoryInformation = 29,
+ SystemNotImplemented7 = 29,
+ SystemNextEventIdInformation = 30,
+ SystemNotImplemented8 = 30,
+ SystemEventIdsInformation = 31,
+ SystemCrashDumpInformation = 32,
SystemExceptionInformation = 33,
+ SystemCrashDumpStateInformation = 34,
+ SystemKernelDebuggerInformation = 35,
+ SystemContextSwitchInformation = 36,
SystemRegistryQuotaInformation = 37,
- SystemLookasideInformation = 45
+ SystemCurrentTimeZoneInformation = 44,
+ SystemTimeZoneInformation = 44,
+ SystemLookasideInformation = 45,
+ SystemSetTimeSlipEvent = 46,
+ SystemCreateSession = 47,
+ SystemDeleteSession = 48,
+ SystemInvalidInfoClass4 = 49,
+ SystemRangeStartInformation = 50,
+ SystemVerifierInformation = 51,
+ SystemAddVerifier = 52,
+ SystemSessionProcessesInformation = 53,
+ SystemInformationClassMax
} SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
typedef enum _TIMER_TYPE {
@@ -441,16 +713,47 @@
LONG BasePriority;
} THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
+typedef struct _KERNEL_USER_TIMES {
+ LARGE_INTEGER CreateTime;
+ LARGE_INTEGER ExitTime;
+ LARGE_INTEGER KernelTime;
+ LARGE_INTEGER UserTime;
+} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
typedef enum _WINSTATIONINFOCLASS {
WinStationInformation = 8
} WINSTATIONINFOCLASS;
-typedef enum
-{
- MemoryBasicInformation = 0
+typedef enum _MEMORY_INFORMATION_CLASS {
+ MemoryBasicInformation,
+ MemoryWorkingSetList,
+ MemorySectionName,
+ MemoryBasicVlmInformation
} MEMORY_INFORMATION_CLASS;
+typedef enum _MUTANT_INFORMATION_CLASS
+{
+ MutantBasicInformation
+} MUTANT_INFORMATION_CLASS, *PMUTANT_INFORMATION_CLASS;
+
+typedef struct _MUTANT_BASIC_INFORMATION {
+ LONG CurrentCount;
+ BOOLEAN OwnedByCaller;
+ BOOLEAN AbandonedState;
+} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
+
+typedef enum _TIMER_INFORMATION_CLASS
+{
+ TimerBasicInformation = 0
+} TIMER_INFORMATION_CLASS;
+
+typedef struct _TIMER_BASIC_INFORMATION
+{
+ LARGE_INTEGER RemainingTime;
+ BOOLEAN TimerState;
+} TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
+
+
/* return type of RtlDetermineDosPathNameType_U (FIXME: not the correct names) */
typedef enum
{
@@ -504,8 +807,7 @@
*/
/* This is used by NtQuerySystemInformation */
-/* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */
-typedef struct {
+typedef struct _SYSTEM_THREAD_INFORMATION{
FILETIME ftKernelTime;
FILETIME ftUserTime;
FILETIME ftCreateTime;
@@ -518,22 +820,9 @@
DWORD dwContextSwitches;
DWORD dwThreadState;
DWORD dwWaitReason;
-} THREADINFO, *PTHREADINFO;
+ DWORD dwUnknown;
+} SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
-/* FIXME: Isn't THREAD_INFO and THREADINFO the same structure? */
-typedef struct _THREAD_INFO{
- DWORD Unknown1[6];
- DWORD ThreadID;
- DWORD Unknown2[3];
- DWORD Status;
- DWORD WaitReason;
- DWORD Unknown3[4];
-} THREAD_INFO, PTHREAD_INFO;
-
-/***********************************************************************
- * Types and data structures
- */
-
typedef struct _IO_STATUS_BLOCK {
union {
NTSTATUS Status;
@@ -640,34 +929,6 @@
#endif
} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
-typedef struct _PROCESS_INFO {
- DWORD Offset; /* 00 offset to next PROCESS_INFO ok*/
- DWORD ThreadCount; /* 04 number of ThreadInfo member ok */
- DWORD Unknown1[6];
- FILETIME CreationTime; /* 20 */
- DWORD Unknown2[5];
- PWCHAR ProcessName; /* 3c ok */
- DWORD BasePriority;
- DWORD ProcessID; /* 44 ok*/
- DWORD ParentProcessID;
- DWORD HandleCount;
- DWORD Unknown3[2]; /* 50 */
- ULONG PeakVirtualSize;
- ULONG VirtualSize;
- ULONG PageFaultCount;
- ULONG PeakWorkingSetSize;
- ULONG WorkingSetSize;
- ULONG QuotaPeakPagedPoolUsage;
- ULONG QuotaPagedPoolUsage;
- ULONG QuotaPeakNonPagedPoolUsage;
- ULONG QuotaNonPagedPoolUsage;
- ULONG PagefileUsage;
- ULONG PeakPagefileUsage;
- DWORD PrivateBytes;
- DWORD Unknown6[4];
- THREAD_INFO ati[ANYSIZE_ARRAY]; /* 94 size=0x40*/
-} PROCESS_INFO, PPROCESS_INFO;
-
typedef struct _RTL_HEAP_DEFINITION {
ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
@@ -690,6 +951,7 @@
} RTL_RWLOCK, *LPRTL_RWLOCK;
/* System Information Class 0x00 */
+
typedef struct _SYSTEM_BASIC_INFORMATION {
#ifdef __WINESRC__
DWORD dwUnknown1;
@@ -712,16 +974,117 @@
#endif
} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
+/* System Information Class 0x01 */
+
+typedef struct _SYSTEM_CPU_INFORMATION {
+ WORD Architecture;
+ WORD Level;
+ WORD Revision; /* combination of CPU model and stepping */
+ WORD Reserved; /* always zero */
+ DWORD FeatureSet; /* see bit flags below */
+} SYSTEM_CPU_INFORMATION, *PSYSTEM_CPU_INFORMATION;
+
+/* definitions of bits in the Feature set for the x86 processors */
+#define CPU_FEATURE_VME 0x00000005 /* Virtual 86 Mode Extensions */
+#define CPU_FEATURE_TSC 0x00000002 /* Time Stamp Counter available */
+#define CPU_FEATURE_CMOV 0x00000008 /* Conditional Move instruction*/
+#define CPU_FEATURE_PGE 0x00000014 /* Page table Entry Global bit */
+#define CPU_FEATURE_PSE 0x00000024 /* Page Size Extension */
+#define CPU_FEATURE_MTRR 0x00000040 /* Memory Type Range Registers */
+#define CPU_FEATURE_CX8 0x00000080 /* Compare and eXchange 8 byte instr. */
+#define CPU_FEATURE_MMX 0x00000100 /* Multi Media eXtensions */
+#define CPU_FEATURE_X86 0x00000200 /* seems to be alway ON, on the '86 */
+#define CPU_FEATURE_PAT 0x00000400 /* Page Attribute Table */
+#define CPU_FEATURE_FXSR 0x00000800 /* FXSAVE and FXSTORE instructions */
+#define CPU_FEATURE_SEP 0x00001000 /* SYSENTER and SYSEXIT instructions */
+#define CPU_FEATURE_SSE 0x00002000 /* SSE extenstions (ext. MMX) */
+#define CPU_FEATURE_3DNOW 0x00008000 /* 3DNOW instructions available
+ (FIXME: needs to be confirmed) */
+#define CPU_FEATURE_SSE2 0x00010000 /* SSE2 extensions (XMMI64) */
+#define CPU_FEATURE_DS 0x00020000 /* Debug Store */
+#define CPU_FEATURE_HTT 0x00040000 /* Hyper Threading Technology */
+
+/* System Information Class 0x02 */
+
+typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
+ BYTE Reserved1[312];
+} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
+
+/* System Information Class 0x03 */
+
+typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
+#ifdef __WINESRC__
+ LARGE_INTEGER liKeBootTime;
+ LARGE_INTEGER liKeSystemTime;
+ LARGE_INTEGER liExpTimeZoneBias;
+ ULONG uCurrentTimeZoneId;
+ DWORD dwUnknown1[5];
+#else
+ BYTE Reserved1[48];
+#endif
+} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
+
+/* System Information Class 0x08 */
+
+typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
+#ifdef __WINESRC__
+ LARGE_INTEGER liIdleTime;
+ LARGE_INTEGER liKernelTime;
+ LARGE_INTEGER liUserTime;
+ DWORD dwSpare[5];
+#else
+ LARGE_INTEGER IdleTime;
+ LARGE_INTEGER KernelTime;
+ LARGE_INTEGER UserTime;
+ LARGE_INTEGER Reserved1[2];
+ ULONG Reserved2;
+#endif
+} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
+
+/* System Information Class 0x0b */
+
+typedef struct _SYSTEM_DRIVER_INFORMATION {
+ PVOID pvAddress;
+ DWORD dwUnknown1;
+ DWORD dwUnknown2;
+ DWORD dwEntryIndex;
+ DWORD dwUnknown3;
+ char szName[MAX_PATH + 1];
+} SYSTEM_DRIVER_INFORMATION, *PSYSTEM_DRIVER_INFORMATION;
+
+/* System Information Class 0x10 */
+
+typedef struct _SYSTEM_HANDLE_ENTRY {
+ ULONG OwnerPid;
+ BYTE ObjectType;
+ BYTE HandleFlags;
+ USHORT HandleValue;
+ PVOID ObjectPointer;
+ ULONG AccessMask;
+} SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
+
+typedef struct _SYSTEM_HANDLE_INFORMATION {
+ ULONG Count;
+ SYSTEM_HANDLE_ENTRY Handle[1];
+} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
+
/* System Information Class 0x15 */
-typedef struct {
+
+typedef struct _SYSTEM_CACHE_INFORMATION {
ULONG CurrentSize;
ULONG PeakSize;
ULONG PageFaultCount;
ULONG MinimumWorkingSet;
ULONG MaximumWorkingSet;
ULONG unused[4];
-} SYSTEM_CACHE_INFORMATION;
+} SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
+/* System Information Class 0x17 */
+
+typedef struct _SYSTEM_INTERRUPT_INFORMATION {
+ BYTE Reserved1[24];
+} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
+
typedef struct _SYSTEM_CONFIGURATION_INFO {
union {
ULONG OemId;
@@ -741,16 +1104,6 @@
WORD ProcessorRevision;
} SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
-/* System Information Class 0x0b */
-typedef struct {
- PVOID pvAddress;
- DWORD dwUnknown1;
- DWORD dwUnknown2;
- DWORD dwEntryIndex;
- DWORD dwUnknown3;
- char szName[MAX_PATH + 1];
-} SYSTEM_DRIVER_INFORMATION;
-
typedef struct _SYSTEM_EXCEPTION_INFORMATION {
BYTE Reserved1[16];
} SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
@@ -759,68 +1112,45 @@
BYTE Reserved1[32];
} SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
-typedef struct _SYSTEM_INTERRUPT_INFORMATION {
- BYTE Reserved1[24];
-} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
+typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
+ BOOLEAN DebuggerEnabled;
+ BOOLEAN DebuggerNotPresent;
+} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
-/* System Information Class 0x10 */
-typedef struct {
- USHORT dwPID;
- USHORT dwCreatorBackTraceIndex;
- BYTE bObjectType;
- BYTE bHandleAttributes;
- USHORT usHandleOffset;
- DWORD dwKeObject;
- ULONG ulGrantedAccess;
-} HANDLEINFO, *PHANDLEINFO; /* FIXME: SYSTEM_HANDLE_INFORMATION? */
+/* System Information Class 0x05 */
-typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
- BYTE Reserved1[312];
-} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
+typedef struct _VM_COUNTERS_ {
+ SIZE_T PeakVirtualSize;
+ SIZE_T VirtualSize;
+ ULONG PageFaultCount;
+ SIZE_T PeakWorkingSetSize;
+ SIZE_T WorkingSetSize;
+ SIZE_T QuotaPeakPagedPoolUsage;
+ SIZE_T QuotaPagedPoolUsage;
+ SIZE_T QuotaPeakNonPagedPoolUsage;
+ SIZE_T QuotaNonPagedPoolUsage;
+ SIZE_T PagefileUsage;
+ SIZE_T PeakPagefileUsage;
+} VM_COUNTERS, *PVM_COUNTERS;
-/* System Information Class 0x02 */
-typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
-#ifdef __WINESRC__
- LARGE_INTEGER liIdleTime;
- DWORD dwSpare[10];
-#else
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER Reserved1[2];
- ULONG Reserved2;
-#endif
-} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
-
-/* System Information Class 0x05 */
typedef struct _SYSTEM_PROCESS_INFORMATION {
#ifdef __WINESRC__
DWORD dwOffset;
DWORD dwThreadCount;
DWORD dwUnknown1[6];
FILETIME ftCreationTime;
- DWORD dwUnknown2[5];
- WCHAR *pszProcessName;
+ FILETIME ftUserTime;
+ FILETIME ftKernelTime;
+ UNICODE_STRING ProcessName;
DWORD dwBasePriority;
DWORD dwProcessID;
DWORD dwParentProcessID;
DWORD dwHandleCount;
DWORD dwUnknown3;
DWORD dwUnknown4;
- DWORD dwVirtualBytesPeak;
- DWORD dwVirtualBytes;
- DWORD dwPageFaults;
- DWORD dwWorkingSetPeak;
- DWORD dwWorkingSet;
- DWORD dwUnknown5;
- DWORD dwPagedPool;
- DWORD dwUnknown6;
- DWORD dwNonPagedPool;
- DWORD dwPageFileBytesPeak;
- DWORD dwPrivateBytes;
- DWORD dwPageFileBytes;
- DWORD dwUnknown7[4];
- THREADINFO ti[1];
+ VM_COUNTERS vmCounters;
+ IO_COUNTERS ioCounters;
+ SYSTEM_THREAD_INFORMATION ti[1];
#else
ULONG NextEntryOffset;
BYTE Reserved1[52];
@@ -847,19 +1177,6 @@
BOOLEAN TimeAdjustmentDisabled;
} SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
-/* System Information Class 0x03 */
-typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
-#ifdef __WINESRC__
- LARGE_INTEGER liKeBootTime;
- LARGE_INTEGER liKeSystemTime;
- LARGE_INTEGER liExpTimeZoneBias;
- ULONG uCurrentTimeZoneId;
- DWORD dwReserved;
-#else
- BYTE Reserved1[48];
-#endif
-} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; /* was SYSTEM_TIME_INFORMATION */
-
typedef struct _TIME_FIELDS
{ CSHORT Year;
CSHORT Month;
@@ -877,20 +1194,6 @@
BYTE Reserved3[1140];
} WINSTATIONINFORMATIONW, *PWINSTATIONINFORMATIONW;
-typedef struct _VM_COUNTERS_ {
- ULONG PeakVirtualSize;
- ULONG VirtualSize;
[truncated at 1000 lines; 1024 more skipped]