--- branches/new_headers/reactos/include/ddk/ntapi.h 2005-05-08 17:33:17 UTC (rev 15136)
+++ branches/new_headers/reactos/include/ddk/ntapi.h 2005-05-08 17:34:37 UTC (rev 15137)
@@ -1,2943 +0,0 @@
-/*
- * ntapi.h
- *
- * Windows NT Native API
- *
- * Most structures in this file is obtained from Windows NT/2000 Native API
- * Reference by Gary Nebbett, ISBN 1578701996.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTAPI_H
-#define __NTAPI_H
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdarg.h>
-#include <winbase.h>
-#include "ntddk.h"
-#include "ntpoapi.h"
-
-#pragma pack(push,4)
-
-typedef struct _PEB *PPEB;
-
-/* FIXME: Unknown definitions */
-typedef PVOID POBJECT_TYPE_LIST;
-typedef PVOID PEXECUTION_STATE;
-typedef PVOID PLANGID;
-
-#ifndef NtCurrentProcess
-#define NtCurrentProcess() ( (HANDLE) 0xFFFFFFFF )
-#endif /* NtCurrentProcess */
-#ifndef NtCurrentThread
-#define NtCurrentThread() ( (HANDLE) 0xFFFFFFFE )
-#endif /* NtCurrentThread */
-
-/* System information and control */
-
-typedef enum _SYSTEM_INFORMATION_CLASS {
- SystemInformationClassMin = 0,
- SystemBasicInformation = 0,
- SystemProcessorInformation = 1,
- SystemPerformanceInformation = 2,
- SystemTimeOfDayInformation = 3,
- SystemPathInformation = 4,
- SystemNotImplemented1 = 4,
- SystemProcessInformation = 5,
- SystemProcessesAndThreadsInformation = 5,
- SystemCallCountInfoInformation = 6,
- SystemCallCounts = 6,
- SystemDeviceInformation = 7,
- SystemConfigurationInformation = 7,
- SystemProcessorPerformanceInformation = 8,
- SystemProcessorTimes = 8,
- SystemFlagsInformation = 9,
- SystemGlobalFlag = 9,
- SystemCallTimeInformation = 10,
- SystemNotImplemented2 = 10,
- SystemModuleInformation = 11,
- SystemLocksInformation = 12,
- SystemLockInformation = 12,
- SystemStackTraceInformation = 13,
- SystemNotImplemented3 = 13,
- SystemPagedPoolInformation = 14,
- SystemNotImplemented4 = 14,
- SystemNonPagedPoolInformation = 15,
- SystemNotImplemented5 = 15,
- SystemHandleInformation = 16,
- SystemObjectInformation = 17,
- SystemPageFileInformation = 18,
- SystemPagefileInformation = 18,
- SystemVdmInstemulInformation = 19,
- SystemInstructionEmulationCounts = 19,
- SystemVdmBopInformation = 20,
- SystemInvalidInfoClass1 = 20,
- SystemFileCacheInformation = 21,
- SystemCacheInformation = 21,
- SystemPoolTagInformation = 22,
- SystemInterruptInformation = 23,
- SystemProcessorStatistics = 23,
- SystemDpcBehaviourInformation = 24,
- SystemDpcInformation = 24,
- SystemFullMemoryInformation = 25,
- SystemNotImplemented6 = 25,
- SystemLoadImage = 26,
- SystemUnloadImage = 27,
- SystemTimeAdjustmentInformation = 28,
- SystemTimeAdjustment = 28,
- SystemSummaryMemoryInformation = 29,
- SystemNotImplemented7 = 29,
- SystemNextEventIdInformation = 30,
- SystemNotImplemented8 = 30,
- SystemEventIdsInformation = 31,
- SystemNotImplemented9 = 31,
- SystemCrashDumpInformation = 32,
- SystemExceptionInformation = 33,
- SystemCrashDumpStateInformation = 34,
- SystemKernelDebuggerInformation = 35,
- SystemContextSwitchInformation = 36,
- SystemRegistryQuotaInformation = 37,
- SystemLoadAndCallImage = 38,
- SystemPrioritySeparation = 39,
- SystemPlugPlayBusInformation = 40,
- SystemNotImplemented10 = 40,
- SystemDockInformation = 41,
- SystemNotImplemented11 = 41,
- /* SystemPowerInformation = 42, Conflicts with POWER_INFORMATION_LEVEL 1 */
- SystemInvalidInfoClass2 = 42,
- SystemProcessorSpeedInformation = 43,
- SystemInvalidInfoClass3 = 43,
- 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;
-
-typedef struct _SYSTEM_BASIC_INFORMATION {
- ULONG Unknown;
- ULONG MaximumIncrement;
- ULONG PhysicalPageSize;
- ULONG NumberOfPhysicalPages;
- ULONG LowestPhysicalPage;
- ULONG HighestPhysicalPage;
- ULONG AllocationGranularity;
- ULONG LowestUserAddress;
- ULONG HighestUserAddress;
- ULONG ActiveProcessors;
- UCHAR NumberProcessors;
-} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
-
-typedef struct _SYSTEM_PROCESSOR_INFORMATION {
- USHORT ProcessorArchitecture;
- USHORT ProcessorLevel;
- USHORT ProcessorRevision;
- USHORT Unknown;
- ULONG FeatureBits;
-} SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
-
-typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER ReadTransferCount;
- LARGE_INTEGER WriteTransferCount;
- LARGE_INTEGER OtherTransferCount;
- ULONG ReadOperationCount;
- ULONG WriteOperationCount;
- ULONG OtherOperationCount;
- ULONG AvailablePages;
- ULONG TotalCommittedPages;
- ULONG TotalCommitLimit;
- ULONG PeakCommitment;
- ULONG PageFaults;
- ULONG WriteCopyFaults;
- ULONG TransitionFaults;
- ULONG CacheTransitionFaults;
- ULONG DemandZeroFaults;
- ULONG PagesRead;
- ULONG PageReadIos;
- ULONG CacheReads;
- ULONG CacheIos;
- ULONG PagefilePagesWritten;
- ULONG PagefilePageWriteIos;
- ULONG MappedFilePagesWritten;
- ULONG MappedFilePageWriteIos;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG PagedPoolAllocs;
- ULONG PagedPoolFrees;
- ULONG NonPagedPoolAllocs;
- ULONG NonPagedPoolFrees;
- ULONG TotalFreeSystemPtes;
- ULONG SystemCodePage;
- ULONG TotalSystemDriverPages;
- ULONG TotalSystemCodePages;
- ULONG SmallNonPagedLookasideListAllocateHits;
- ULONG SmallPagedLookasideListAllocateHits;
- ULONG Reserved3;
- ULONG MmSystemCachePage;
- ULONG PagedPoolPage;
- ULONG SystemDriverPage;
- ULONG FastReadNoWait;
- ULONG FastReadWait;
- ULONG FastReadResourceMiss;
- ULONG FastReadNotPossible;
- ULONG FastMdlReadNoWait;
- ULONG FastMdlReadWait;
- ULONG FastMdlReadResourceMiss;
- ULONG FastMdlReadNotPossible;
- ULONG MapDataNoWait;
- ULONG MapDataWait;
- ULONG MapDataNoWaitMiss;
- ULONG MapDataWaitMiss;
- ULONG PinMappedDataCount;
- ULONG PinReadNoWait;
- ULONG PinReadWait;
- ULONG PinReadNoWaitMiss;
- ULONG PinReadWaitMiss;
- ULONG CopyReadNoWait;
- ULONG CopyReadWait;
- ULONG CopyReadNoWaitMiss;
- ULONG CopyReadWaitMiss;
- ULONG MdlReadNoWait;
- ULONG MdlReadWait;
- ULONG MdlReadNoWaitMiss;
- ULONG MdlReadWaitMiss;
- ULONG ReadAheadIos;
- ULONG LazyWriteIos;
- ULONG LazyWritePages;
- ULONG DataFlushes;
- ULONG DataPages;
- ULONG ContextSwitches;
- ULONG FirstLevelTbFills;
- ULONG SecondLevelTbFills;
- ULONG SystemCalls;
-} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
-
-typedef struct _SYSTEM_TIME_OF_DAY_INFORMATION {
- LARGE_INTEGER BootTime;
- LARGE_INTEGER CurrentTime;
- LARGE_INTEGER TimeZoneBias;
- ULONG CurrentTimeZoneId;
-} SYSTEM_TIME_OF_DAY_INFORMATION, *PSYSTEM_TIME_OF_DAY_INFORMATION;
-
-typedef struct _VM_COUNTERS {
- ULONG PeakVirtualSize;
- ULONG VirtualSize;
- ULONG PageFaultCount;
- ULONG PeakWorkingSetSize;
- ULONG WorkingSetSize;
- ULONG QuotaPeakPagedPoolUsage;
- ULONG QuotaPagedPoolUsage;
- ULONG QuotaPeakNonPagedPoolUsage;
- ULONG QuotaNonPagedPoolUsage;
- ULONG PagefileUsage;
- ULONG PeakPagefileUsage;
-} VM_COUNTERS;
-
-typedef enum _THREAD_STATE {
- Initialized,
- Ready,
- Running,
- Standby,
- Terminated,
- Wait,
- Transition,
- DeferredReady
-} THREAD_STATE;
-
-typedef struct _SYSTEM_CALLS_INFORMATION {
- ULONG Size;
- ULONG NumberOfDescriptorTables;
- ULONG NumberOfRoutinesInTable[1];
- ULONG CallCounts[ANYSIZE_ARRAY];
-} SYSTEM_CALLS_INFORMATION, *PSYSTEM_CALLS_INFORMATION;
-
-typedef struct _SYSTEM_CONFIGURATION_INFORMATION {
- ULONG DiskCount;
- ULONG FloppyCount;
- ULONG CdRomCount;
- ULONG TapeCount;
- ULONG SerialCount;
- ULONG ParallelCount;
-} SYSTEM_CONFIGURATION_INFORMATION, *PSYSTEM_CONFIGURATION_INFORMATION;
-
-typedef struct _SYSTEM_PROCESSOR_TIMES {
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER DpcTime;
- LARGE_INTEGER InterruptTime;
- ULONG InterruptCount;
-} SYSTEM_PROCESSOR_TIMES, *PSYSTEM_PROCESSOR_TIMES;
-
-/* SYSTEM_GLOBAL_FLAG.GlobalFlag constants */
-#define FLG_STOP_ON_EXCEPTION 0x00000001
-#define FLG_SHOW_LDR_SNAPS 0x00000002
-#define FLG_DEBUG_INITIAL_COMMAND 0x00000004
-#define FLG_STOP_ON_HUNG_GUI 0x00000008
-#define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
-#define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
-#define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
-#define FLG_HEAP_VALIDATE_ALL 0x00000080
-#define FLG_POOL_ENABLE_TAIL_CHECK 0x00000100
-#define FLG_POOL_ENABLE_FREE_CHECK 0x00000200
-#define FLG_POOL_ENABLE_TAGGING 0x00000400
-#define FLG_HEAP_ENABLE_TAGGING 0x00000800
-#define FLG_USER_STACK_TRACE_DB 0x00001000
-#define FLG_KERNEL_STACK_TRACE_DB 0x00002000
-#define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
-#define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
-#define FLG_IGNORE_DEBUG_PRIV 0x00010000
-#define FLG_ENABLE_CSRDEBUG 0x00020000
-#define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
-#define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
-#define FLG_HEAP_ENABLE_CALL_TRACING 0x00100000
-#define FLG_HEAP_DISABLE_COALESCING 0x00200000
-#define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
-#define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
-#define FLG_ENABLE_DBGPRINT_BUFFERING 0x08000000
-
-typedef struct _SYSTEM_GLOBAL_FLAG {
- ULONG GlobalFlag;
-} SYSTEM_GLOBAL_FLAG, *PSYSTEM_GLOBAL_FLAG;
-
-typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY {
- ULONG Unknown1;
- ULONG Unknown2;
- PVOID Base;
- ULONG Size;
- ULONG Flags;
- USHORT Index;
- /* Length of module name not including the path, this
- field contains valid value only for NTOSKRNL module */
- USHORT NameLength;
- USHORT LoadCount;
- USHORT PathLength;
- CHAR ImageName[256];
-} SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
-
-typedef struct _SYSTEM_MODULE_INFORMATION {
- ULONG Count;
- SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
-} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
-
-typedef struct _SYSTEM_LOCK_INFORMATION {
- PVOID Address;
- USHORT Type;
- USHORT Reserved1;
- ULONG ExclusiveOwnerThreadId;
- ULONG ActiveCount;
- ULONG ContentionCount;
- ULONG Reserved2[2];
- ULONG NumberOfSharedWaiters;
- ULONG NumberOfExclusiveWaiters;
-} SYSTEM_LOCK_INFORMATION, *PSYSTEM_LOCK_INFORMATION;
-
-/*SYSTEM_HANDLE_INFORMATION.Flags cosntants */
-#define PROTECT_FROM_CLOSE 0x01
-#define INHERIT 0x02
-
-typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO {
- USHORT UniqueProcessId;
- USHORT CreatorBackTraceIndex;
- UCHAR ObjectTypeIndex;
- UCHAR HandleAttributes;
- USHORT HandleValue;
- PVOID Object;
- ULONG GrantedAccess;
-} SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;
-
-typedef struct _SYSTEM_HANDLE_INFORMATION {
- ULONG NumberOfHandles;
- SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
-
-} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
-
-typedef struct _SYSTEM_OBJECT_TYPE_INFORMATION {
- ULONG NextEntryOffset;
- ULONG ObjectCount;
- ULONG HandleCount;
- ULONG TypeNumber;
- ULONG InvalidAttributes;
- GENERIC_MAPPING GenericMapping;
- ACCESS_MASK ValidAccessMask;
- POOL_TYPE PoolType;
- UCHAR Unknown;
- UNICODE_STRING Name;
-} SYSTEM_OBJECT_TYPE_INFORMATION, *PSYSTEM_OBJECT_TYPE_INFORMATION;
-
-/* SYSTEM_OBJECT_INFORMATION.Flags constants */
-#define FLG_SYSOBJINFO_SINGLE_HANDLE_ENTRY 0x40
-#define FLG_SYSOBJINFO_DEFAULT_SECURITY_QUOTA 0x20
-#define FLG_SYSOBJINFO_PERMANENT 0x10
-#define FLG_SYSOBJINFO_EXCLUSIVE 0x08
-#define FLG_SYSOBJINFO_CREATOR_INFO 0x04
-#define FLG_SYSOBJINFO_KERNEL_MODE 0x02
-
-typedef struct _SYSTEM_OBJECT_INFORMATION {
- ULONG NextEntryOffset;
- PVOID Object;
- ULONG CreatorProcessId;
- USHORT Unknown;
- USHORT Flags;
- ULONG PointerCount;
- ULONG HandleCount;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG ExclusiveProcessId;
- PSECURITY_DESCRIPTOR SecurityDescriptor;
- UNICODE_STRING Name;
-} SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
-
-typedef struct _SYSTEM_PAGEFILE_INFORMATION {
- ULONG NextEntryOffset;
- ULONG TotalSize;
- ULONG TotalInUse;
- ULONG PeakUsage;
- UNICODE_STRING PageFileName;
-} SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
-
-typedef struct _SYSTEM_INSTRUCTION_EMULATION_INFORMATION {
- ULONG SegmentNotPresent;
- ULONG TwoByteOpcode;
- ULONG ESprefix;
- ULONG CSprefix;
- ULONG SSprefix;
- ULONG DSprefix;
- ULONG FSPrefix;
- ULONG GSprefix;
- ULONG OPER32prefix;
- ULONG ADDR32prefix;
- ULONG INSB;
- ULONG INSW;
- ULONG OUTSB;
- ULONG OUTSW;
- ULONG PUSHFD;
- ULONG POPFD;
- ULONG INTnn;
- ULONG INTO;
- ULONG IRETD;
- ULONG INBimm;
- ULONG INWimm;
- ULONG OUTBimm;
- ULONG OUTWimm;
- ULONG INB;
- ULONG INW;
- ULONG OUTB;
- ULONG OUTW;
- ULONG LOCKprefix;
- ULONG REPNEprefix;
- ULONG REPprefix;
- ULONG HLT;
- ULONG CLI;
- ULONG STI;
- ULONG GenericInvalidOpcode;
-} SYSTEM_INSTRUCTION_EMULATION_INFORMATION, *PSYSTEM_INSTRUCTION_EMULATION_INFORMATION;
-
-typedef struct _SYSTEM_POOL_TAG_INFORMATION {
- CHAR Tag[4];
- ULONG PagedPoolAllocs;
- ULONG PagedPoolFrees;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolAllocs;
- ULONG NonPagedPoolFrees;
- ULONG NonPagedPoolUsage;
-} SYSTEM_POOL_TAG_INFORMATION, *PSYSTEM_POOL_TAG_INFORMATION;
-
-typedef struct _SYSTEM_PROCESSOR_STATISTICS {
- ULONG ContextSwitches;
- ULONG DpcCount;
- ULONG DpcRequestRate;
- ULONG TimeIncrement;
- ULONG DpcBypassCount;
- ULONG ApcBypassCount;
-} SYSTEM_PROCESSOR_STATISTICS, *PSYSTEM_PROCESSOR_STATISTICS;
-
-typedef struct _SYSTEM_DPC_INFORMATION {
- ULONG Reserved;
- ULONG MaximumDpcQueueDepth;
- ULONG MinimumDpcRate;
- ULONG AdjustDpcThreshold;
- ULONG IdealDpcRate;
-} SYSTEM_DPC_INFORMATION, *PSYSTEM_DPC_INFORMATION;
-
-typedef struct _SYSTEM_LOAD_IMAGE {
- UNICODE_STRING ModuleName;
- PVOID ModuleBase;
- PVOID SectionPointer;
- PVOID EntryPoint;
- PVOID ExportDirectory;
-} SYSTEM_LOAD_IMAGE, *PSYSTEM_LOAD_IMAGE;
-
-typedef struct _SYSTEM_UNLOAD_IMAGE {
- PVOID ModuleBase;
-} SYSTEM_UNLOAD_IMAGE, *PSYSTEM_UNLOAD_IMAGE;
-
-typedef struct _SYSTEM_QUERY_TIME_ADJUSTMENT {
- ULONG TimeAdjustment;
- ULONG MaximumIncrement;
- BOOLEAN TimeSynchronization;
-} SYSTEM_QUERY_TIME_ADJUSTMENT, *PSYSTEM_QUERY_TIME_ADJUSTMENT;
-
-typedef struct _SYSTEM_SET_TIME_ADJUSTMENT {
- ULONG TimeAdjustment;
- BOOLEAN TimeSynchronization;
-} SYSTEM_SET_TIME_ADJUSTMENT, *PSYSTEM_SET_TIME_ADJUSTMENT;
-
-typedef struct _SYSTEM_CRASH_DUMP_INFORMATION {
- HANDLE CrashDumpSectionHandle;
- HANDLE Unknown;
-} SYSTEM_CRASH_DUMP_INFORMATION, *PSYSTEM_CRASH_DUMP_INFORMATION;
-
-typedef struct _SYSTEM_EXCEPTION_INFORMATION {
- ULONG AlignmentFixupCount;
- ULONG ExceptionDispatchCount;
- ULONG FloatingEmulationCount;
- ULONG Reserved;
-} SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
-
-typedef struct _SYSTEM_CRASH_DUMP_STATE_INFORMATION {
- ULONG CrashDumpSectionExists;
- ULONG Unknown;
-} SYSTEM_CRASH_DUMP_STATE_INFORMATION, *PSYSTEM_CRASH_DUMP_STATE_INFORMATION;
-
-typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
- BOOLEAN DebuggerEnabled;
- BOOLEAN DebuggerNotPresent;
-} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
-
-typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION {
- ULONG ContextSwitches;
- ULONG ContextSwitchCounters[11];
-} SYSTEM_CONTEXT_SWITCH_INFORMATION, *PSYSTEM_CONTEXT_SWITCH_INFORMATION;
-
-typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
- ULONG RegistryQuotaAllowed;
- ULONG RegistryQuotaUsed;
- PVOID Reserved1;
-} SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
-
-typedef struct _SYSTEM_LOAD_AND_CALL_IMAGE {
- UNICODE_STRING ModuleName;
-} SYSTEM_LOAD_AND_CALL_IMAGE, *PSYSTEM_LOAD_AND_CALL_IMAGE;
-
-typedef struct _SYSTEM_PRIORITY_SEPARATION {
- ULONG PrioritySeparation;
-} SYSTEM_PRIORITY_SEPARATION, *PSYSTEM_PRIORITY_SEPARATION;
-
-typedef struct _SYSTEM_TIME_ZONE_INFORMATION {
- LONG Bias;
- WCHAR StandardName[32];
- LARGE_INTEGER StandardDate;
- LONG StandardBias;
- WCHAR DaylightName[32];
- LARGE_INTEGER DaylightDate;
- LONG DaylightBias;
-} SYSTEM_TIME_ZONE_INFORMATION, *PSYSTEM_TIME_ZONE_INFORMATION;
-
-typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
- USHORT Depth;
- USHORT MaximumDepth;
- ULONG TotalAllocates;
- ULONG AllocateMisses;
- ULONG TotalFrees;
- ULONG FreeMisses;
- POOL_TYPE Type;
- ULONG Tag;
- ULONG Size;
-} SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
-
-typedef struct _SYSTEM_SET_TIME_SLIP_EVENT {
- HANDLE TimeSlipEvent;
-} SYSTEM_SET_TIME_SLIP_EVENT, *PSYSTEM_SET_TIME_SLIP_EVENT;
-
-typedef struct _SYSTEM_CREATE_SESSION {
- ULONG SessionId;
-} SYSTEM_CREATE_SESSION, *PSYSTEM_CREATE_SESSION;
-
-typedef struct _SYSTEM_DELETE_SESSION {
- ULONG SessionId;
-} SYSTEM_DELETE_SESSION, *PSYSTEM_DELETE_SESSION;
-
-typedef struct _SYSTEM_RANGE_START_INFORMATION {
- PVOID SystemRangeStart;
-} SYSTEM_RANGE_START_INFORMATION, *PSYSTEM_RANGE_START_INFORMATION;
-
-typedef struct _SYSTEM_SESSION_PROCESSES_INFORMATION {
- ULONG SessionId;
- ULONG BufferSize;
- PVOID Buffer;
-} SYSTEM_SESSION_PROCESSES_INFORMATION, *PSYSTEM_SESSION_PROCESSES_INFORMATION;
-
-typedef struct _SYSTEM_POOL_BLOCK {
- BOOLEAN Allocated;
- USHORT Unknown;
- ULONG Size;
- CHAR Tag[4];
-} SYSTEM_POOL_BLOCK, *PSYSTEM_POOL_BLOCK;
-
-typedef struct _SYSTEM_POOL_BLOCKS_INFORMATION {
- ULONG PoolSize;
- PVOID PoolBase;
- USHORT Unknown;
- ULONG NumberOfBlocks;
- SYSTEM_POOL_BLOCK PoolBlocks[1];
-} SYSTEM_POOL_BLOCKS_INFORMATION, *PSYSTEM_POOL_BLOCKS_INFORMATION;
-
-typedef struct _SYSTEM_MEMORY_USAGE {
- PVOID Name;
- USHORT Valid;
- USHORT Standby;
- USHORT Modified;
- USHORT PageTables;
-} SYSTEM_MEMORY_USAGE, *PSYSTEM_MEMORY_USAGE;
-
-typedef struct _SYSTEM_MEMORY_USAGE_INFORMATION {
- ULONG Reserved;
- PVOID EndOfData;
- SYSTEM_MEMORY_USAGE MemoryUsage[1];
-} SYSTEM_MEMORY_USAGE_INFORMATION, *PSYSTEM_MEMORY_USAGE_INFORMATION;
-
-// SystemProcessThreadInfo (5)
-typedef struct _SYSTEM_THREAD_INFORMATION
-{
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER CreateTime;
- ULONG WaitTime;
- PVOID StartAddress;
- CLIENT_ID ClientId;
- KPRIORITY Priority;
- LONG BasePriority;
- ULONG ContextSwitches;
- ULONG ThreadState;
- ULONG WaitReason;
-} SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
-
-typedef struct _SYSTEM_PROCESS_INFORMATION
-{
- ULONG NextEntryOffset;
- ULONG NumberOfThreads;
- LARGE_INTEGER SpareLi1;
- LARGE_INTEGER SpareLi2;
- LARGE_INTEGER SpareLi3;
- LARGE_INTEGER CreateTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER KernelTime;
- UNICODE_STRING ImageName;
- KPRIORITY BasePriority;
- HANDLE UniqueProcessId;
- HANDLE InheritedFromUniqueProcessId;
- ULONG HandleCount;
- ULONG SessionId;
- ULONG PageDirectoryFrame;
-
- /*
- * This part corresponds to VM_COUNTERS_EX.
- * NOTE: *NOT* THE SAME AS VM_COUNTERS!
- */
- ULONG PeakVirtualSize;
- ULONG VirtualSize;
- ULONG PageFaultCount;
- ULONG PeakWorkingSetSize;
- ULONG WorkingSetSize;
- ULONG QuotaPeakPagedPoolUsage;
- ULONG QuotaPagedPoolUsage;
- ULONG QuotaPeakNonPagedPoolUsage;
- ULONG QuotaNonPagedPoolUsage;
- ULONG PagefileUsage;
- ULONG PeakPagefileUsage;
- ULONG PrivateUsage;
-
- /* This part corresponds to IO_COUNTERS */
- LARGE_INTEGER ReadOperationCount;
- LARGE_INTEGER WriteOperationCount;
- LARGE_INTEGER OtherOperationCount;
- LARGE_INTEGER ReadTransferCount;
- LARGE_INTEGER WriteTransferCount;
- LARGE_INTEGER OtherTransferCount;
-
- /* Finally, the array of Threads */
- SYSTEM_THREAD_INFORMATION TH[1];
-} SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtQuerySystemInformation(
- IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
- IN OUT PVOID SystemInformation,
- IN ULONG SystemInformationLength,
- OUT PULONG ReturnLength OPTIONAL);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQuerySystemInformation(
- IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
- IN OUT PVOID SystemInformation,
- IN ULONG SystemInformationLength,
- OUT PULONG ReturnLength OPTIONAL);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetSystemInformation(
- IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
- IN OUT PVOID SystemInformation,
- IN ULONG SystemInformationLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQuerySystemEnvironmentValue(
- IN PUNICODE_STRING VariableName,
- OUT PWSTR ValueBuffer,
- IN ULONG ValueBufferLength,
- OUT PULONG ReturnLength OPTIONAL);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetSystemEnvironmentValue(
- IN PUNICODE_STRING VariableName,
- IN PUNICODE_STRING Value);
-
-typedef enum _SHUTDOWN_ACTION {
- ShutdownNoReboot,
- ShutdownReboot,
- ShutdownPowerOff
-} SHUTDOWN_ACTION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtShutdownSystem(
- IN SHUTDOWN_ACTION Action);
-
-typedef enum _DEBUG_CONTROL_CODE {
- DebugGetTraceInformation = 1,
- DebugSetInternalBreakpoint,
- DebugSetSpecialCall,
- DebugClearSpecialCalls,
- DebugQuerySpecialCalls,
- DebugDbgBreakPoint,
- DebugMaximum
-} DEBUG_CONTROL_CODE;
-
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSystemDebugControl(
- IN DEBUG_CONTROL_CODE ControlCode,
- IN PVOID InputBuffer OPTIONAL,
- IN ULONG InputBufferLength,
- OUT PVOID OutputBuffer OPTIONAL,
- IN ULONG OutputBufferLength,
- OUT PULONG ReturnLength OPTIONAL);
-
-
-
-/* Objects, Object directories, and symbolic links */
-
-typedef enum _OBJECT_INFORMATION_CLASS {
- ObjectBasicInformation,
- ObjectNameInformation,
- ObjectTypeInformation,
- ObjectAllTypesInformation,
- ObjectHandleInformation
-} OBJECT_INFORMATION_CLASS;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryObject(
- IN HANDLE ObjectHandle,
- IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
- OUT PVOID ObjectInformation,
- IN ULONG ObjectInformationLength,
- OUT PULONG ReturnLength OPTIONAL);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetInformationObject(
- IN HANDLE ObjectHandle,
- IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
- IN PVOID ObjectInformation,
- IN ULONG ObjectInformationLength);
-
-/* OBJECT_BASIC_INFORMATION.Attributes constants */
-/* also in winbase.h */
-#define HANDLE_FLAG_INHERIT 0x01
-#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x02
-/* end winbase.h */
-#define PERMANENT 0x10
-#define EXCLUSIVE 0x20
-
-typedef struct _OBJECT_BASIC_INFORMATION {
- ULONG Attributes;
- ACCESS_MASK GrantedAccess;
- ULONG HandleCount;
- ULONG PointerCount;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG Reserved[3];
- ULONG NameInformationLength;
- ULONG TypeInformationLength;
- ULONG SecurityDescriptorLength;
- LARGE_INTEGER CreateTime;
-} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
-#if 0
-/* FIXME: Enable later */
-typedef struct _OBJECT_TYPE_INFORMATION {
- UNICODE_STRING Name;
- ULONG ObjectCount;
- ULONG HandleCount;
- ULONG Reserved1[4];
- ULONG PeakObjectCount;
- ULONG PeakHandleCount;
- ULONG Reserved2[4];
- ULONG InvalidAttributes;
- GENERIC_MAPPING GenericMapping;
- ULONG ValidAccess;
- UCHAR Unknown;
- BOOLEAN MaintainHandleDatabase;
- POOL_TYPE PoolType;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
-} OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
-
-typedef struct _OBJECT_ALL_TYPES_INFORMATION {
- ULONG NumberOfTypes;
- OBJECT_TYPE_INFORMATION TypeInformation;
-} OBJECT_ALL_TYPES_INFORMATION, *POBJECT_ALL_TYPES_INFORMATION;
-#endif
-typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFORMATION {
- BOOLEAN Inherit;
- BOOLEAN ProtectFromClose;
-} OBJECT_HANDLE_ATTRIBUTE_INFORMATION, *POBJECT_HANDLE_ATTRIBUTE_INFORMATION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtDuplicateObject(
- IN HANDLE SourceProcessHandle,
- IN HANDLE SourceHandle,
- IN HANDLE TargetProcessHandle,
- OUT PHANDLE TargetHandle OPTIONAL,
- IN ACCESS_MASK DesiredAccess,
- IN ULONG Attributes,
- IN ULONG Options);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwDuplicateObject(
- IN HANDLE SourceProcessHandle,
- IN HANDLE SourceHandle,
- IN HANDLE TargetProcessHandle,
- OUT PHANDLE TargetHandle OPTIONAL,
- IN ACCESS_MASK DesiredAccess,
- IN ULONG Attributes,
- IN ULONG Options);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtQuerySecurityObject(
- IN HANDLE Handle,
- IN SECURITY_INFORMATION SecurityInformation,
- OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN ULONG SecurityDescriptorLength,
- OUT PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQuerySecurityObject(
- IN HANDLE Handle,
- IN SECURITY_INFORMATION SecurityInformation,
- OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN ULONG SecurityDescriptorLength,
- OUT PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtSetSecurityObject(
- IN HANDLE Handle,
- IN SECURITY_INFORMATION SecurityInformation,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetSecurityObject(
- IN HANDLE Handle,
- IN SECURITY_INFORMATION SecurityInformation,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwOpenDirectoryObject(
- OUT PHANDLE DirectoryHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryDirectoryObject(
- IN HANDLE DirectoryHandle,
- OUT PVOID Buffer,
- IN ULONG BufferLength,
- IN BOOLEAN ReturnSingleEntry,
- IN BOOLEAN RestartScan,
- IN OUT PULONG Context,
- OUT PULONG ReturnLength OPTIONAL);
-
-typedef struct _OBJECT_DIRECTORY_INFORMATION {
- UNICODE_STRING ObjectName;
- UNICODE_STRING ObjectTypeName;
-} OBJECT_DIRECTORY_INFORMATION, *POBJECT_DIRECTORY_INFORMATION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateSymbolicLinkObject(
- OUT PHANDLE SymbolicLinkHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PUNICODE_STRING TargetName);
-
-
-
-
-/* Virtual memory */
-
-typedef enum _MEMORY_INFORMATION_CLASS {
-MemoryBasicInformation,
-MemoryWorkingSetList,
-MemorySectionName,
-MemoryBasicVlmInformation
-} MEMORY_INFORMATION_CLASS;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtAllocateVirtualMemory(
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN OUT PULONG AllocationSize,
- IN ULONG AllocationType,
- IN ULONG Protect);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAllocateVirtualMemory(
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN OUT PULONG AllocationSize,
- IN ULONG AllocationType,
- IN ULONG Protect);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtFreeVirtualMemory(
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
- IN OUT PULONG FreeSize,
- IN ULONG FreeType);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwFreeVirtualMemory(
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
- IN OUT PULONG FreeSize,
- IN ULONG FreeType);
[truncated at 1000 lines; 4315 more skipped]