Add NDK 1.00-pre. Needs some TLC in umtypes.h and a lot of fixes. Not used anywhere yet.

svn path=/trunk/; revision=16066
This commit is contained in:
Alex Ionescu 2005-06-18 23:33:40 +00:00
parent 46f26a073b
commit c09b52bf01
30 changed files with 9261 additions and 0 deletions

View file

@ -0,0 +1,25 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/cctypes.h
* PURPOSE: Definitions for exported Cache Manager Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _CCTYPES_H
#define _CCTYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
extern ULONG NTOSAPI CcFastMdlReadWait;
extern ULONG NTOSAPI CcFastReadNotPossible;
extern ULONG NTOSAPI CcFastReadWait;
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
#endif

View file

@ -0,0 +1,49 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/extypes.h
* PURPOSE: Definitions for exported Executive Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _EXTYPES_H
#define _EXTYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
extern POBJECT_TYPE NTOSAPI ExIoCompletionType;
/* CONSTANTS *****************************************************************/
/* ENUMERATIONS **************************************************************/
typedef enum _HARDERROR_RESPONSE_OPTION
{
OptionAbortRetryIgnore,
OptionOk,
OptionOkCancel,
OptionRetryCancel,
OptionYesNo,
OptionYesNoCancel,
OptionShutdownSystem
} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
typedef enum _HARDERROR_RESPONSE
{
ResponseReturnToCaller,
ResponseNotHandled,
ResponseAbort,
ResponseCancel,
ResponseIgnore,
ResponseNo,
ResponseOk,
ResponseRetry,
ResponseYes
} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
/* TYPES *********************************************************************/
#endif

View file

@ -0,0 +1,149 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/halfuncs.h
* PURPOSE: Prototypes for exported HAL Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _HALFUNCS_H
#define _HALFUNCS_H
/* DEPENDENCIES **************************************************************/
#include "haltypes.h"
/* FUNCTION TYPES ************************************************************/
/* PROTOTYPES ****************************************************************/
VOID
STDCALL
HalAcquireDisplayOwnership(
IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters
);
BOOLEAN
STDCALL
HalAllProcessorsStarted(VOID);
NTSTATUS
STDCALL
HalAllocateAdapterChannel(
IN PADAPTER_OBJECT AdapterObject,
IN PWAIT_CONTEXT_BLOCK WaitContextBlock,
IN ULONG NumberOfMapRegisters,
IN PDRIVER_CONTROL ExecutionRoutine
);
BOOLEAN
STDCALL
HalBeginSystemInterrupt(
ULONG Vector,
KIRQL Irql,
PKIRQL OldIrql
);
BOOLEAN
STDCALL
HalDisableSystemInterrupt(
ULONG Vector,
KIRQL Irql
);
VOID
STDCALL
HalDisplayString (
IN PCHAR String
);
BOOLEAN
STDCALL
HalEnableSystemInterrupt(
ULONG Vector,
KIRQL Irql,
KINTERRUPT_MODE InterruptMode
);
VOID
STDCALL
HalEndSystemInterrupt(
KIRQL Irql,
ULONG Vector
);
BOOLEAN
STDCALL
HalGetEnvironmentVariable(
PCH Name,
PCH Value,
USHORT ValueLength
);
VOID
STDCALL
HalInitializeProcessor(
ULONG ProcessorNumber,
PVOID ProcessorStack
);
BOOLEAN
STDCALL
HalInitSystem(
ULONG BootPhase,
PLOADER_PARAMETER_BLOCK LoaderBlock
);
BOOLEAN
STDCALL
HalQueryDisplayOwnership(VOID);
VOID
STDCALL
HalReportResourceUsage(VOID);
VOID
FASTCALL
HalRequestSoftwareInterrupt(
KIRQL SoftwareInterruptRequested
);
VOID
STDCALL
HalReleaseDisplayOwnership(VOID);
VOID
STDCALL
HalReturnToFirmware(
FIRMWARE_ENTRY Action
);
VOID
STDCALL
HalRequestIpi(
ULONG Unknown
);
BOOLEAN
STDCALL
HalSetEnvironmentVariable(
IN PCH Name,
IN PCH Value
);
BOOLEAN
STDCALL
HalStartNextProcessor(
ULONG Unknown1,
ULONG Unknown2
);
VOID
STDCALL
IoAssignDriveLetters(
struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
PSTRING NtDeviceName,
PUCHAR NtSystemPath,
PSTRING NtSystemPathString
);
#endif

View file

@ -0,0 +1,72 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/haltypes.h
* PURPOSE: Definitions for HAL/BLDR types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _HALTYPES_H
#define _HALTYPES_H
/* DEPENDENCIES **************************************************************/
#include <ddk/ntdddisk.h>
/* EXPORTED DATA *************************************************************/
extern ULONG NTOSAPI KdComPortInUse;
/* CONSTANTS *****************************************************************/
/* Boot Flags */
#define MB_FLAGS_MEM_INFO (0x1)
#define MB_FLAGS_BOOT_DEVICE (0x2)
#define MB_FLAGS_COMMAND_LINE (0x4)
#define MB_FLAGS_MODULE_INFO (0x8)
#define MB_FLAGS_AOUT_SYMS (0x10)
#define MB_FLAGS_ELF_SYMS (0x20)
#define MB_FLAGS_MMAP_INFO (0x40)
#define MB_FLAGS_DRIVES_INFO (0x80)
#define MB_FLAGS_CONFIG_TABLE (0x100)
#define MB_FLAGS_BOOT_LOADER_NAME (0x200)
#define MB_FLAGS_APM_TABLE (0x400)
#define MB_FLAGS_GRAPHICS_TABLE (0x800)
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
typedef struct _LOADER_MODULE
{
ULONG ModStart;
ULONG ModEnd;
ULONG String;
ULONG Reserved;
} LOADER_MODULE, *PLOADER_MODULE;
typedef struct _LOADER_PARAMETER_BLOCK
{
ULONG Flags;
ULONG MemLower;
ULONG MemHigher;
ULONG BootDevice;
ULONG CommandLine;
ULONG ModsCount;
ULONG ModsAddr;
UCHAR Syms[12];
ULONG MmapLength;
ULONG MmapAddr;
ULONG DrivesCount;
ULONG DrivesAddr;
ULONG ConfigTable;
ULONG BootLoaderName;
} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
typedef struct _DRIVE_LAYOUT_INFORMATION
{
DWORD PartitionCount;
DWORD Signature;
PARTITION_INFORMATION PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION;
#endif

View file

@ -0,0 +1,11 @@
#ifndef __NAPI_I386_FLOATSAVE_H__
#define __NAPI_I386_FLOATSAVE_H__
#define FLOAT_SAVE_CONTROL (0xFFFF037F)
#define FLOAT_SAVE_STATUS (0xFFFF0000)
#define FLOAT_SAVE_TAG (0xFFFFFFFF)
#define FLOAT_SAVE_DATA (0xFFFF0000)
#endif /* __NAPI_I386_FLOATSAVE_H__ */
/* EOF */

View file

@ -0,0 +1,12 @@
#ifndef _ASM_SEGMENT_H
#define _ASM_SEGMENT_H
#define KERNEL_CS (0x8)
#define KERNEL_DS (0x10)
#define USER_CS (0x18 + 0x3)
#define USER_DS (0x20 + 0x3)
#define RESERVED_FOR_TSS (0x28)
#define PCR_SELECTOR (0x30)
#define TEB_SELECTOR (0x38 + 0x3)
#endif /* _ASM_SEGMENT_H */

View file

@ -0,0 +1,105 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/haltypes.h
* PURPOSE: Prototypes for Boot Video Driver not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _INBVFUNCS_H
#define _INBVFUNCS_H
/* DEPENDENCIES **************************************************************/
/* FUNCTION TYPES ************************************************************/
/* PROTOTYPES ****************************************************************/
VOID
STDCALL
InbvAcquireDisplayOwnership(VOID);
BOOLEAN
STDCALL
InbvCheckDisplayOwnership(VOID);
BOOLEAN
STDCALL
InbvDisplayString(
IN PCHAR String
);
VOID
STDCALL
InbvEnableBootDriver(
IN BOOLEAN Enable
);
BOOLEAN
STDCALL
InbvEnableDisplayString(
IN BOOLEAN Enable
);
VOID
STDCALL
InbvInstallDisplayStringFilter(
IN PVOID Unknown
);
BOOLEAN
STDCALL
InbvIsBootDriverInstalled(VOID);
VOID
STDCALL
InbvNotifyDisplayOwnershipLost(
IN PVOID Callback
);
BOOLEAN
STDCALL
InbvResetDisplay(VOID);
VOID
STDCALL
InbvSetScrollRegion(
IN ULONG Left,
IN ULONG Top,
IN ULONG Width,
IN ULONG Height
);
VOID
STDCALL
InbvSetTextColor(
IN ULONG Color
);
VOID
STDCALL
InbvSolidColorFill(
IN ULONG Left,
IN ULONG Top,
IN ULONG Width,
IN ULONG Height,
IN ULONG Color
);
VOID
STDCALL
VidCleanUp(VOID);
BOOLEAN
STDCALL
VidInitialize(VOID);
BOOLEAN
STDCALL
VidResetDisplay(VOID);
BOOLEAN
STDCALL
VidIsBootDriverInstalled(VOID);
#endif

View file

@ -0,0 +1,20 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/iofuncs.h
* PURPOSE: Definitions for exported I/O Manager Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _IOFUNCS_H
#define _IOFUNCS_H
/* DEPENDENCIES **************************************************************/
/* FUNCTION TYPES ************************************************************/
/* PROTOTYPES ****************************************************************/
#endif

View file

@ -0,0 +1,68 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/iotypes.h
* PURPOSE: Definitions for exported I/O Manager Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _IOTYPES_H
#define _IOTYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
extern POBJECT_TYPE NTOSAPI IoAdapterObjectType;
extern POBJECT_TYPE NTOSAPI IoDeviceHandlerObjectType;
extern POBJECT_TYPE NTOSAPI IoDeviceObjectType;
extern POBJECT_TYPE NTOSAPI IoDriverObjectType;
extern POBJECT_TYPE NTOSAPI IoFileObjectType;
extern ULONG NTOSAPI IoReadOperationCount;
extern ULONGLONG NTOSAPI IoReadTransferCount;
extern ULONG NTOSAPI IoWriteOperationCount;
extern ULONGLONG NTOSAPI IoWriteTransferCount;
extern KSPIN_LOCK NTOSAPI IoStatisticsLock;
/* CONSTANTS *****************************************************************/
/* I/O Types */
#define IO_TYPE_DRIVER 4L
#define IO_TYPE_TIMER 9L
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
typedef struct _MAILSLOT_CREATE_PARAMETERS
{
ULONG MailslotQuota;
ULONG MaximumMessageSize;
LARGE_INTEGER ReadTimeout;
BOOLEAN TimeoutSpecified;
} MAILSLOT_CREATE_PARAMETERS, *PMAILSLOT_CREATE_PARAMETERS;
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 _IO_TIMER
{
USHORT Type;
USHORT TimerEnabled;
LIST_ENTRY IoTimerList;
PIO_TIMER_ROUTINE TimerRoutine;
PVOID Context;
PDEVICE_OBJECT DeviceObject;
} IO_TIMER, *PIO_TIMER;
#endif

View file

@ -0,0 +1,94 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/kdfuncs.h
* PURPOSE: Prototypes for Kernel Debugger Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _KDFUNCS_H
#define _KDFUNCS_H
/* DEPENDENCIES **************************************************************/
#include "kdtypes.h"
/* FUNCTION TYPES ************************************************************/
/* PROTOTYPES ****************************************************************/
BYTE
STDCALL
KdPollBreakIn(VOID);
BOOLEAN
STDCALL
KdPortInitialize(
PKD_PORT_INFORMATION PortInformation,
DWORD Unknown1,
DWORD Unknown2
);
BOOLEAN
STDCALL
KdPortInitializeEx(
PKD_PORT_INFORMATION PortInformation,
DWORD Unknown1,
DWORD Unknown2
);
BOOLEAN
STDCALL
KdPortGetByte(
PUCHAR ByteRecieved
);
BOOLEAN
STDCALL
KdPortGetByteEx(
PKD_PORT_INFORMATION PortInformation,
PUCHAR ByteRecieved
);
BOOLEAN
STDCALL
KdPortPollByte(
PUCHAR ByteRecieved
);
BOOLEAN
STDCALL
KdPortPollByteEx(
PKD_PORT_INFORMATION PortInformation,
PUCHAR ByteRecieved
);
VOID
STDCALL
KdPortPutByte(
UCHAR ByteToSend
);
VOID
STDCALL
KdPortPutByteEx(
PKD_PORT_INFORMATION PortInformation,
UCHAR ByteToSend
);
VOID
STDCALL
KdPortRestore(VOID);
VOID
STDCALL
KdPortSave (VOID);
BOOLEAN
STDCALL
KdPortDisableInterrupts(VOID);
BOOLEAN
STDCALL
KdPortEnableInterrupts(VOID);
#endif

View file

@ -0,0 +1,29 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/kdtypes.h
* PURPOSE: Definitions for Kernel Debugger Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _KDTYPES_H
#define _KDTYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
/* CONSTANTS *****************************************************************/
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
typedef struct _KD_PORT_INFORMATION
{
ULONG ComPort;
ULONG BaudRate;
ULONG BaseAddress;
} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
#endif

View file

@ -0,0 +1,280 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/kefuncs.h
* PURPOSE: Prototypes for Kernel Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _KEFUNCS_H
#define _KEFUNCS_H
/* DEPENDENCIES **************************************************************/
#include "ketypes.h"
/* FUNCTION TYPES ************************************************************/
/* PROTOTYPES ****************************************************************/
VOID
STDCALL
KeInitializeApc(
IN PKAPC Apc,
IN PKTHREAD Thread,
IN KAPC_ENVIRONMENT TargetEnvironment,
IN PKKERNEL_ROUTINE KernelRoutine,
IN PKRUNDOWN_ROUTINE RundownRoutine OPTIONAL,
IN PKNORMAL_ROUTINE NormalRoutine,
IN KPROCESSOR_MODE Mode,
IN PVOID Context
);
VOID
STDCALL
KeEnterKernelDebugger(VOID);
VOID
FASTCALL
KiAcquireSpinLock(
PKSPIN_LOCK SpinLock
);
VOID
FASTCALL
KiReleaseSpinLock(
PKSPIN_LOCK SpinLock
);
VOID
STDCALL
KiDeliverApc(
IN KPROCESSOR_MODE PreviousMode,
IN PVOID Reserved,
IN PKTRAP_FRAME TrapFrame
);
VOID
STDCALL
KiDispatchInterrupt(VOID);
BOOLEAN
STDCALL
KeAreApcsDisabled(
VOID
);
VOID
STDCALL
KeFlushQueuedDpcs(
VOID
);
ULONG
STDCALL
KeGetRecommendedSharedDataAlignment(
VOID
);
ULONG
STDCALL
KeQueryRuntimeThread(
IN PKTHREAD Thread,
OUT PULONG UserTime
);
BOOLEAN
STDCALL
KeSetKernelStackSwapEnable(
IN BOOLEAN Enable
);
BOOLEAN
STDCALL
KeDeregisterBugCheckReasonCallback(
IN PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord
);
BOOLEAN
STDCALL
KeRegisterBugCheckReasonCallback(
IN PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord,
IN PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine,
IN KBUGCHECK_CALLBACK_REASON Reason,
IN PUCHAR Component
);
VOID
STDCALL
KeTerminateThread(
IN KPRIORITY Increment
);
BOOLEAN
STDCALL
KeIsExecutingDpc(
VOID
);
VOID
STDCALL
KeSetEventBoostPriority(
IN PKEVENT Event,
IN PKTHREAD *Thread OPTIONAL
);
PVOID
STDCALL
KeFindConfigurationEntry(
IN PVOID Unknown,
IN ULONG Class,
IN CONFIGURATION_TYPE Type,
IN PULONG RegKey
);
PVOID
STDCALL
KeFindConfigurationNextEntry(
IN PVOID Unknown,
IN ULONG Class,
IN CONFIGURATION_TYPE Type,
IN PULONG RegKey,
IN PVOID *NextLink
);
VOID
STDCALL
KeFlushEntireTb(
IN BOOLEAN Unknown,
IN BOOLEAN CurrentCpuOnly
);
VOID
STDCALL
KeRevertToUserAffinityThread(
VOID
);
VOID
STDCALL
KiCoprocessorError(
VOID
);
VOID
STDCALL
KiUnexpectedInterrupt(
VOID
);
VOID
STDCALL
KeSetDmaIoCoherency(
IN ULONG Coherency
);
VOID
STDCALL
KeSetProfileIrql(
IN KIRQL ProfileIrql
);
NTSTATUS
STDCALL
KeSetAffinityThread(
PKTHREAD Thread,
KAFFINITY Affinity
);
VOID
STDCALL
KeSetSystemAffinityThread(
IN KAFFINITY Affinity
);
NTSTATUS
STDCALL
KeUserModeCallback(
IN ULONG FunctionID,
IN PVOID InputBuffer,
IN ULONG InputLength,
OUT PVOID *OutputBuffer,
OUT PULONG OutputLength
);
VOID
STDCALL
KeSetTimeIncrement(
IN ULONG MaxIncrement,
IN ULONG MinIncrement
);
VOID
STDCALL
KeInitializeInterrupt(
PKINTERRUPT InterruptObject,
PKSERVICE_ROUTINE ServiceRoutine,
PVOID ServiceContext,
PKSPIN_LOCK SpinLock,
ULONG Vector,
KIRQL Irql,
KIRQL SynchronizeIrql,
KINTERRUPT_MODE InterruptMode,
BOOLEAN ShareVector,
CHAR ProcessorNumber,
BOOLEAN FloatingSave
);
BOOLEAN
STDCALL
KeConnectInterrupt(
PKINTERRUPT InterruptObject
);
VOID
STDCALL
KeDisconnectInterrupt(
PKINTERRUPT InterruptObject
);
struct _KPROCESS*
KeGetCurrentProcess(
VOID
);
VOID
KeSetGdtSelector(
ULONG Entry,
ULONG Value1,
ULONG Value2
);
LONG
STDCALL
KeReadStateMutant(
IN PKMUTANT Mutant
);
VOID
STDCALL
KeInitializeMutant(
IN PKMUTANT Mutant,
IN BOOLEAN InitialOwner
);
LONG
STDCALL
KeReleaseMutant(
IN PKMUTANT Mutant,
IN KPRIORITY Increment,
IN BOOLEAN Abandon,
IN BOOLEAN Wait
);
NTSTATUS
STDCALL
KeRaiseUserException(
IN NTSTATUS ExceptionCode
);
#endif

View file

@ -0,0 +1,129 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/ketypes.h
* PURPOSE: Definitions for Kernel Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _KETYPES_H
#define _KETYPES_H
/* DEPENDENCIES **************************************************************/
#include "haltypes.h"
/* EXPORTED DATA *************************************************************/
extern CHAR NTOSAPI KeNumberProcessors;
extern LOADER_PARAMETER_BLOCK NTOSAPI KeLoaderBlock;
extern ULONG NTOSAPI KeDcacheFlushCount;
extern ULONG NTOSAPI KeIcacheFlushCount;
extern KAFFINITY NTOSAPI KeActiveProcessors;
extern ULONG NTOSAPI KiDmaIoCoherency; /* RISC Architectures only */
extern ULONG NTOSAPI KeMaximumIncrement;
extern ULONG NTOSAPI KeMinimumIncrement;
extern SSDT_ENTRY NTOSAPI KeServiceDescriptorTable[SSDT_MAX_ENTRIES];
extern SSDT_ENTRY NTOSAPI KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES];
/* CONSTANTS *****************************************************************/
#define SSDT_MAX_ENTRIES 4
#define PROCESSOR_FEATURE_MAX 64
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
typedef enum _KAPC_ENVIRONMENT
{
OriginalApcEnvironment,
AttachedApcEnvironment,
CurrentApcEnvironment
} KAPC_ENVIRONMENT;
typedef struct _KDPC_DATA
{
LIST_ENTRY DpcListHead;
ULONG DpcLock;
ULONG DpcQueueDepth;
ULONG DpcCount;
} KDPC_DATA, *PKDPC_DATA;
typedef struct _KTRAP_FRAME
{
PVOID DebugEbp;
PVOID DebugEip;
PVOID DebugArgMark;
PVOID DebugPointer;
PVOID TempCs;
PVOID TempEip;
ULONG Dr0;
ULONG Dr1;
ULONG Dr2;
ULONG Dr3;
ULONG Dr6;
ULONG Dr7;
USHORT Gs;
USHORT Reserved1;
USHORT Es;
USHORT Reserved2;
USHORT Ds;
USHORT Reserved3;
ULONG Edx;
ULONG Ecx;
ULONG Eax;
ULONG PreviousMode;
PVOID ExceptionList;
USHORT Fs;
USHORT Reserved4;
ULONG Edi;
ULONG Esi;
ULONG Ebx;
ULONG Ebp;
ULONG ErrorCode;
ULONG Eip;
ULONG Cs;
ULONG Eflags;
ULONG Esp;
USHORT Ss;
USHORT Reserved5;
USHORT V86_Es;
USHORT Reserved6;
USHORT V86_Ds;
USHORT Reserved7;
USHORT V86_Fs;
USHORT Reserved8;
USHORT V86_Gs;
USHORT Reserved9;
} KTRAP_FRAME, *PKTRAP_FRAME;
/* i386 Doesn't have Exception Frames */
typedef struct _KEXCEPTION_FRAME {
} KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
typedef struct _KINTERRUPT
{
CSHORT Type;
CSHORT Size;
LIST_ENTRY InterruptListEntry;
PKSERVICE_ROUTINE ServiceRoutine;
PVOID ServiceContext;
KSPIN_LOCK SpinLock;
ULONG TickCount;
PKSPIN_LOCK ActualLock;
PVOID DispatchAddress;
ULONG Vector;
KIRQL Irql;
KIRQL SynchronizeIrql;
BOOLEAN FloatingSave;
BOOLEAN Connected;
CHAR Number;
UCHAR ShareVector;
KINTERRUPT_MODE Mode;
ULONG ServiceCount;
ULONG DispatchCount;
ULONG DispatchCode[106];
} KINTERRUPT, *PKINTERRUPT;
/* FIXME: Add KOBJECTS Here */
#endif

View file

@ -0,0 +1,37 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/ldrfuncs.h
* PURPOSE: Defintions for Loader Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _LDRFUNCS_H
#define _LDRFUNCS_H
/* DEPENDENCIES **************************************************************/
#include "ldrtypes.h"
/* FUNCTION TYPES ************************************************************/
/* PROTOTYPES ****************************************************************/
NTSTATUS
STDCALL
LdrAccessResource(
IN PVOID BaseAddress,
IN PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry,
OUT PVOID *Resource OPTIONAL,
OUT PULONG Size OPTIONAL
);
NTSTATUS
STDCALL
LdrFindResource_U(
IN PVOID BaseAddress,
IN PLDR_RESOURCE_INFO ResourceInfo,
IN ULONG Level,
OUT PIMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry
);
#endif

View file

@ -0,0 +1,76 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/ldrtypes.h
* PURPOSE: Definitions for Loader Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _LDRTYPES_H
#define _LDRTYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
/* CONSTANTS *****************************************************************/
#define IMAGE_SCN_TYPE_REG 0x00000000
#define IMAGE_SCN_TYPE_DSECT 0x00000001
#define IMAGE_SCN_TYPE_NOLOAD 0x00000002
#define IMAGE_SCN_TYPE_GROUP 0x00000004
#define IMAGE_SCN_TYPE_COPY 0x00000010
#define IMAGE_FILE_MACHINE_ARM 0x000001C0
#define IMAGE_FILE_MACHINE_IA64 0x00000200
#define IMAGE_FILE_MACHINE_ALPHA64 0x00000284
#define IMAGE_FILE_MACHINE_AMD64 0x00008664
#define IMAGE_FILE_MACHINE_M32R 0x00009041
#define IMAGE_FILE_MACHINE_AXP64 IMAGE_FILE_MACHINE_ALPHA64
#define RESOURCE_TYPE_LEVEL 0
#define RESOURCE_NAME_LEVEL 1
#define RESOURCE_LANGUAGE_LEVEL 2
#define RESOURCE_DATA_LEVEL 3
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
/* FIXME: Update with _LDR_DATA_TABLE_ENTRY and LDR_ flags */
typedef struct _PEB_LDR_DATA
{
ULONG Length;
BOOLEAN Initialized;
PVOID SsHandle;
LIST_ENTRY InLoadOrderModuleList;
LIST_ENTRY InMemoryOrderModuleList;
LIST_ENTRY InInitializationOrderModuleList;
PVOID EntryInProgress;
} PEB_LDR_DATA, *PPEB_LDR_DATA;
/* FIXME: Update with _LDR_DATA_TABLE_ENTRY and LDR_ flags */
typedef struct _LDR_MODULE
{
LIST_ENTRY InLoadOrderModuleList;
LIST_ENTRY InMemoryOrderModuleList;
LIST_ENTRY InInitializationOrderModuleList;
void* BaseAddress;
void* EntryPoint;
ULONG SizeOfImage;
UNICODE_STRING FullDllName;
UNICODE_STRING BaseDllName;
ULONG Flags;
SHORT LoadCount;
SHORT TlsIndex;
HANDLE SectionHandle;
ULONG CheckSum;
ULONG TimeDateStamp;
} LDR_MODULE, *PLDR_MODULE;
typedef struct _LDR_RESOURCE_INFO
{
ULONG Type;
ULONG Name;
ULONG Language;
} LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
#endif

View file

@ -0,0 +1,78 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/lpctypes.h
* PURPOSE: Definitions for Local Procedure Call Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _LPCTYPES_H
#define _LPCTYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
/* CONSTANTS *****************************************************************/
#define LPC_MESSAGE_BASE_SIZE 4
#define MAX_MESSAGE_DATA (0x130)
/* ENUMERATIONS **************************************************************/
typedef enum _LPC_TYPE
{
LPC_NEW_MESSAGE,
LPC_REQUEST,
LPC_REPLY,
LPC_DATAGRAM,
LPC_LOST_REPLY,
LPC_PORT_CLOSED,
LPC_CLIENT_DIED,
LPC_EXCEPTION,
LPC_DEBUG_EVENT,
LPC_ERROR_EVENT,
LPC_CONNECTION_REQUEST,
LPC_CONNECTION_REFUSED,
LPC_MAXIMUM
} LPC_TYPE;
/* TYPES *********************************************************************/
/* FIXME: USE REAL DEFINITION */
typedef struct _LPC_MESSAGE {
USHORT DataSize;
USHORT MessageSize;
USHORT MessageType;
USHORT VirtualRangesOffset;
CLIENT_ID ClientId;
ULONG MessageId;
ULONG SectionSize;
} LPC_MESSAGE, *PLPC_MESSAGE;
/* FIXME: USE REAL DEFINITION */
typedef struct _LPC_SECTION_WRITE
{
ULONG Length;
HANDLE SectionHandle;
ULONG SectionOffset;
ULONG ViewSize;
PVOID ViewBase;
PVOID TargetViewBase;
} LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
/* FIXME: USE REAL DEFINITION */
typedef struct _LPC_SECTION_READ
{
ULONG Length;
ULONG ViewSize;
PVOID ViewBase;
} LPC_SECTION_READ, *PLPC_SECTION_READ;
/* FIXME: USE REAL DEFINITION */
typedef struct _LPC_MAX_MESSAGE
{
LPC_MESSAGE Header;
BYTE Data[MAX_MESSAGE_DATA];
} LPC_MAX_MESSAGE, *PLPC_MAX_MESSAGE;
#endif

View file

@ -0,0 +1,37 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/mmtypes.h
* PURPOSE: Definitions for Memory Manager Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _MMTYPES_H
#define _MMTYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
/* CONSTANTS *****************************************************************/
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
typedef struct _PP_LOOKASIDE_LIST
{
struct _GENERAL_LOOKASIDE *P;
struct _GENERAL_LOOKASIDE *L;
} PP_LOOKASIDE_LIST, *PPP_LOOKASIDE_LIST;
typedef struct _ADDRESS_RANGE
{
ULONG BaseAddrLow;
ULONG BaseAddrHigh;
ULONG LengthLow;
ULONG LengthHigh;
ULONG Type;
} ADDRESS_RANGE, *PADDRESS_RANGE;
#endif

View file

@ -0,0 +1,49 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/ntndk.h
* PURPOSE: Main Native Development Kit Header file to include all others.
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _NT_NDK_
#define _NT_NDK_
#ifndef NTOS_MODE_USER
/* Kernel-Mode NDK */
#include "kdtypes.h" /* Kernel Debugger Types */
#include "kdfuncs.h" /* Kernel Debugger Functions */
#include "cctypes.h" /* Cache Manager Types */
#include "extypes.h" /* Executive Types */
#include "haltypes.h" /* Hardware Abstraction Layer Types */
#include "halfuncs.h" /* Hardware Abstraction Layer Functions */
#include "inbvfuncs.h" /* Initialization Boot Video Functions */
#include "iotypes.h" /* Input/Output Manager Types */
#include "iofuncs.h" /* Input/Output Manager Functions */
#include "ketypes.h" /* Kernel Types */
#include "kefuncs.h" /* Kernel Functions */
#include "ldrfuncs.h" /* Loader Functions */
#include "lpctypes.h" /* Local Procedure Call Types */
#include "mmtypes.h" /* Memory Manager Types */
#include "obtypes.h" /* Object Manager Types */
#include "obfuncs.h" /* Object Manager Functions */
#include "potypes.h" /* Power Manager Types */
#include "psfuncs.h" /* Process Manager Functions */
#include "setypes.h" /* Security Subsystem Types */
#include "sefuncs.h" /* Security Subsystem Functions */
#else
/* User-Mode NDK */
#include "umtypes.h" /* Native Types in DDK/IFS but not in PSDK */
#endif
/* Shared NDK */
#include "ldrtypes.h" /* Loader Types */
#include "pstypes.h" /* Process Manager Types */
#include "rtltypes.h" /* Runtime Library Types */
#include "rtlfuncs.h" /* Runtime Library Functions */
#include "zwtypes.h" /* Native Types */
#include "zwfuncs.h" /* Native Functions (System Calls) */
#include "i386/floatsave.h" /* Floating Point Save Area Definitions for i386 */
#include "i386/segment.h" /* Kernel CPU Segment Definitions for i386 */
#endif

View file

@ -0,0 +1,96 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/obfuncs.h
* PURPOSE: Protoypes for OBject Manager Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _OBFUNCS_H
#define _OBFUNCS_H
/* DEPENDENCIES **************************************************************/
/* FUNCTION TYPES ************************************************************/
/* PROTOTYPES ****************************************************************/
NTSTATUS
STDCALL
ObCreateObject (
IN KPROCESSOR_MODE ObjectAttributesAccessMode OPTIONAL,
IN POBJECT_TYPE ObjectType,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN KPROCESSOR_MODE AccessMode,
IN OUT PVOID ParseContext OPTIONAL,
IN ULONG ObjectSize,
IN ULONG PagedPoolCharge OPTIONAL,
IN ULONG NonPagedPoolCharge OPTIONAL,
OUT PVOID *Object
);
ULONG
STDCALL
ObGetObjectPointerCount (
IN PVOID Object
);
NTSTATUS
STDCALL
ObInsertObject (
IN PVOID Object,
IN PACCESS_STATE PassedAccessState OPTIONAL,
IN ACCESS_MASK DesiredAccess,
IN ULONG AdditionalReferences,
OUT PVOID *ReferencedObject OPTIONAL,
OUT PHANDLE Handle
);
VOID
STDCALL
ObMakeTemporaryObject (
IN PVOID Object
);
NTSTATUS
STDCALL
ObOpenObjectByPointer (
IN PVOID Object,
IN ULONG HandleAttributes,
IN PACCESS_STATE PassedAccessState OPTIONAL,
IN ACCESS_MASK DesiredAccess OPTIONAL,
IN POBJECT_TYPE ObjectType OPTIONAL,
IN KPROCESSOR_MODE AccessMode,
OUT PHANDLE Handle
);
NTSTATUS
STDCALL
ObQueryNameString (
IN PVOID Object,
OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
IN ULONG Length,
OUT PULONG ReturnLength
);
NTSTATUS
STDCALL
ObQueryObjectAuditingByHandle (
IN HANDLE Handle,
OUT PBOOLEAN GenerateOnClose
);
NTSTATUS
STDCALL
ObReferenceObjectByName (
IN PUNICODE_STRING ObjectName,
IN ULONG Attributes,
IN PACCESS_STATE PassedAccessState OPTIONAL,
IN ACCESS_MASK DesiredAccess OPTIONAL,
IN POBJECT_TYPE ObjectType,
IN KPROCESSOR_MODE AccessMode,
IN OUT PVOID ParseContext OPTIONAL,
OUT PVOID *Object
);
#endif

View file

@ -0,0 +1,50 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/obtypes.h
* PURPOSE: Defintions for Object Manager Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _OBTYPES_H
#define _OBTYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
extern NTOSAPI POBJECT_TYPE ObDirectoryType;
extern NTOSAPI struct DEVICE_MAP* ObSystemDeviceMap;
/* CONSTANTS *****************************************************************/
/* Values for DosDeviceDriveType */
#define DOSDEVICE_DRIVE_UNKNOWN 0
#define DOSDEVICE_DRIVE_CALCULATE 1
#define DOSDEVICE_DRIVE_REMOVABLE 2
#define DOSDEVICE_DRIVE_FIXED 3
#define DOSDEVICE_DRIVE_REMOTE 4
#define DOSDEVICE_DRIVE_CDROM 5
#define DOSDEVICE_DRIVE_RAMDISK 6
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
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;
/* FIXME: Add Object Structures Here */
#endif

View file

@ -0,0 +1,92 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/potypes.h
* PURPOSE: Defintions for Power Manager Types not documented in DDK/IFS.
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _POTYPES_H
#define _POTYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
/* CONSTANTS *****************************************************************/
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
typedef struct _PROCESSOR_IDLE_TIMES
{
ULONGLONG StartTime;
ULONGLONG EndTime;
ULONG IdleHandlerReserved[4];
} PROCESSOR_IDLE_TIMES, *PPROCESSOR_IDLE_TIMES;
typedef struct _PROCESSOR_PERF_STATE
{
UCHAR PercentFrequency;
UCHAR MinCapacity;
USHORT Power;
UCHAR IncreaseLevel;
UCHAR DecreaseLevel;
USHORT Flags;
ULONG IncreaseTime;
ULONG DecreaseTime;
ULONG IncreaseCount;
ULONG DecreaseCount;
ULONGLONG PerformanceTime;
} PROCESSOR_PERF_STATE, *PPROCESSOR_PERF_STATE;
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;
#endif

View file

@ -0,0 +1,69 @@
/* $Id: pstypes.h,v 1.1.2.1 2004/10/25 01:24:07 ion Exp $
*
* ReactOS Headers
* Copyright (C) 1998-2004 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/psfuncs.h
* PURPOSE: Defintions for Process Manager Functions not documented in DDK/IFS.
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _PSFUNCS_H
#define _PSFUNCS_H
/* DEPENDENCIES **************************************************************/
/* FUNCTION TYPES ************************************************************/
typedef VOID (STDCALL *PPEBLOCKROUTINE)(PVOID);
typedef NTSTATUS
(STDCALL *PW32_PROCESS_CALLBACK)(
struct _EPROCESS *Process,
BOOLEAN Create
);
typedef NTSTATUS
(STDCALL *PW32_THREAD_CALLBACK)(
struct _ETHREAD *Thread,
BOOLEAN Create
);
/* PROTOTYPES ****************************************************************/
VOID
STDCALL
PsRevertThreadToSelf(
IN struct _ETHREAD* Thread
);
struct _W32THREAD*
STDCALL
PsGetWin32Thread(
VOID
);
struct _W32PROCESS*
STDCALL
PsGetWin32Process(
VOID
);
#endif

View file

@ -0,0 +1,186 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/pstypes.h
* PURPOSE: Defintions for Process Manager Types not documented in DDK/IFS.
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _PSTYPES_H
#define _PSTYPES_H
/* DEPENDENCIES **************************************************************/
#include "ldrtypes.h"
#include "rtltypes.h"
/* EXPORTED DATA *************************************************************/
extern NTOSAPI struct _EPROCESS* PsInitialSystemProcess;
extern NTOSAPI POBJECT_TYPE PsProcessType;
extern NTOSAPI POBJECT_TYPE PsThreadType;
/* CONSTANTS *****************************************************************/
/* These are not exposed to drivers normally */
#ifndef _NTOS_MODE_USER
#define JOB_OBJECT_ASSIGN_PROCESS (1)
#define JOB_OBJECT_SET_ATTRIBUTES (2)
#define JOB_OBJECT_QUERY (4)
#define JOB_OBJECT_TERMINATE (8)
#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES (16)
#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
#endif
/* FIXME: This was changed in XP... Ask ThomasW about it */
#define PROCESS_SET_PORT 0x800
#define THREAD_ALERT 0x4
#define USER_SHARED_DATA (0x7FFE0000)
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
struct _ETHREAD;
typedef struct _CURDIR
{
UNICODE_STRING DosPath;
PVOID Handle;
} CURDIR, *PCURDIR;
typedef struct _PEB_FREE_BLOCK
{
struct _PEB_FREE_BLOCK* Next;
ULONG Size;
} PEB_FREE_BLOCK, *PPEB_FREE_BLOCK;
typedef struct _PEB
{
UCHAR InheritedAddressSpace; /* 00h */
UCHAR ReadImageFileExecOptions; /* 01h */
UCHAR BeingDebugged; /* 02h */
UCHAR Spare; /* 03h */
PVOID Mutant; /* 04h */
PVOID ImageBaseAddress; /* 08h */
PPEB_LDR_DATA Ldr; /* 0Ch */
PRTL_USER_PROCESS_PARAMETERS ProcessParameters; /* 10h */
PVOID SubSystemData; /* 14h */
PVOID ProcessHeap; /* 18h */
PVOID FastPebLock; /* 1Ch */
PPEBLOCKROUTINE FastPebLockRoutine; /* 20h */
PPEBLOCKROUTINE FastPebUnlockRoutine; /* 24h */
ULONG EnvironmentUpdateCount; /* 28h */
PVOID* KernelCallbackTable; /* 2Ch */
PVOID EventLogSection; /* 30h */
PVOID EventLog; /* 34h */
PPEB_FREE_BLOCK FreeList; /* 38h */
ULONG TlsExpansionCounter; /* 3Ch */
PVOID TlsBitmap; /* 40h */
ULONG TlsBitmapBits[0x2]; /* 44h */
PVOID ReadOnlySharedMemoryBase; /* 4Ch */
PVOID ReadOnlySharedMemoryHeap; /* 50h */
PVOID* ReadOnlyStaticServerData; /* 54h */
PVOID AnsiCodePageData; /* 58h */
PVOID OemCodePageData; /* 5Ch */
PVOID UnicodeCaseTableData; /* 60h */
ULONG NumberOfProcessors; /* 64h */
ULONG NtGlobalFlag; /* 68h */
UCHAR Spare2[0x4]; /* 6Ch */
LARGE_INTEGER CriticalSectionTimeout; /* 70h */
ULONG HeapSegmentReserve; /* 78h */
ULONG HeapSegmentCommit; /* 7Ch */
ULONG HeapDeCommitTotalFreeThreshold; /* 80h */
ULONG HeapDeCommitFreeBlockThreshold; /* 84h */
ULONG NumberOfHeaps; /* 88h */
ULONG MaximumNumberOfHeaps; /* 8Ch */
PVOID** ProcessHeaps; /* 90h */
PVOID GdiSharedHandleTable; /* 94h */
PVOID ProcessStarterHelper; /* 98h */
PVOID GdiDCAttributeList; /* 9Ch */
PVOID LoaderLock; /* A0h */
ULONG OSMajorVersion; /* A4h */
ULONG OSMinorVersion; /* A8h */
USHORT OSBuildNumber; /* ACh */
UCHAR SPMajorVersion; /* AEh */
UCHAR SPMinorVersion; /* AFh */
ULONG OSPlatformId; /* B0h */
ULONG ImageSubSystem; /* B4h */
ULONG ImageSubSystemMajorVersion; /* B8h */
ULONG ImageSubSystemMinorVersion; /* C0h */
ULONG GdiHandleBuffer[0x22]; /* C4h */
} PEB;
typedef struct _GDI_TEB_BATCH
{
ULONG Offset;
ULONG HDC;
ULONG Buffer[0x136];
} GDI_TEB_BATCH, *PGDI_TEB_BATCH;
typedef struct _TEB
{
NT_TIB Tib; /* 00h */
PVOID EnvironmentPointer; /* 1Ch */
CLIENT_ID Cid; /* 20h */
PVOID ActiveRpcInfo; /* 28h */
PVOID ThreadLocalStoragePointer; /* 2Ch */
PPEB Peb; /* 30h */
ULONG LastErrorValue; /* 34h */
ULONG CountOfOwnedCriticalSections; /* 38h */
PVOID CsrClientThread; /* 3Ch */
struct _W32THREAD* Win32ThreadInfo; /* 40h */
ULONG Win32ClientInfo[0x1F]; /* 44h */
PVOID WOW32Reserved; /* C0h */
LCID CurrentLocale; /* C4h */
ULONG FpSoftwareStatusRegister; /* C8h */
PVOID SystemReserved1[0x36]; /* CCh */
PVOID Spare1; /* 1A4h */
LONG ExceptionCode; /* 1A8h */
UCHAR SpareBytes1[0x28]; /* 1ACh */
PVOID SystemReserved2[0xA]; /* 1D4h */
GDI_TEB_BATCH GdiTebBatch; /* 1FCh */
ULONG gdiRgn; /* 6DCh */
ULONG gdiPen; /* 6E0h */
ULONG gdiBrush; /* 6E4h */
CLIENT_ID RealClientId; /* 6E8h */
PVOID GdiCachedProcessHandle; /* 6F0h */
ULONG GdiClientPID; /* 6F4h */
ULONG GdiClientTID; /* 6F8h */
PVOID GdiThreadLocaleInfo; /* 6FCh */
PVOID UserReserved[5]; /* 700h */
PVOID glDispatchTable[0x118]; /* 714h */
ULONG glReserved1[0x1A]; /* B74h */
PVOID glReserved2; /* BDCh */
PVOID glSectionInfo; /* BE0h */
PVOID glSection; /* BE4h */
PVOID glTable; /* BE8h */
PVOID glCurrentRC; /* BECh */
PVOID glContext; /* BF0h */
NTSTATUS LastStatusValue; /* BF4h */
UNICODE_STRING StaticUnicodeString; /* BF8h */
WCHAR StaticUnicodeBuffer[0x105]; /* C00h */
PVOID DeallocationStack; /* E0Ch */
PVOID TlsSlots[0x40]; /* E10h */
LIST_ENTRY TlsLinks; /* F10h */
PVOID Vdm; /* F18h */
PVOID ReservedForNtRpc; /* F1Ch */
PVOID DbgSsReserved[0x2]; /* F20h */
ULONG HardErrorDisabled; /* F28h */
PVOID Instrumentation[0x10]; /* F2Ch */
PVOID WinSockData; /* F6Ch */
ULONG GdiBatchCount; /* F70h */
USHORT Spare2; /* F74h */
BOOLEAN IsFiber; /* F76h */
UCHAR Spare3; /* F77h */
ULONG Spare4; /* F78h */
ULONG Spare5; /* F7Ch */
PVOID ReservedForOle; /* F80h */
ULONG WaitingOnLoaderLock; /* F84h */
ULONG Unknown[11]; /* F88h */
PVOID FlsSlots; /* FB4h */
PVOID WineDebugInfo; /* Needed for WINE DLL's */
} TEB, *PTEB;
#endif

View file

@ -0,0 +1,956 @@
/* $Id: rtlfuncs.h,v 1.1.2.2 2004/10/25 02:57:20 ion Exp $
*
* ReactOS Headers
* Copyright (C) 1998-2004 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/rtlfuncs.h
* PURPOSE: Prototypes for Runtime Library Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _RTLFUNCS_H
#define _RTLFUNCS_H
#include <ndk/rtltypes.h>
/*FIXME: REORGANIZE THIS */
/* FIXME: SOME FUNCTIONS MUST BE PROTECTED AGAINST DDK/IFS. */
typedef NTSTATUS
(*PHEAP_ENUMERATION_ROUTINE)(IN PVOID HeapHandle,
IN PVOID UserParam);
typedef EXCEPTION_DISPOSITION
(*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD*,
PVOID,
struct _CONTEXT*,
PVOID);
#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
{\
PLIST_ENTRY current;\
\
current = (ListHead)->Flink;\
while (current != (ListHead))\
{\
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
(NewEntry)->SortField)\
{\
break;\
}\
current = current->Flink;\
}\
\
InsertTailList(current, &((NewEntry)->ListEntryField));\
}
#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
{\
PLIST_ENTRY current;\
\
current = (ListHead)->Flink;\
while (current != (ListHead))\
{\
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
(NewEntry)->SortField)\
{\
break;\
}\
current = current->Flink;\
}\
\
InsertTailList(current, &((NewEntry)->ListEntryField));\
}
#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
{\
PLIST_ENTRY current;\
\
current = (ListHead)->Flink;\
while (current != (ListHead))\
{\
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
(NewEntry)->SortField)\
{\
break;\
}\
current = current->Flink;\
}\
\
InsertTailList(current, &((NewEntry)->ListEntryField));\
}
#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
{\
PLIST_ENTRY current;\
\
current = (ListHead)->Flink;\
while (current != (ListHead))\
{\
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
(NewEntry)->SortField)\
{\
break;\
}\
current = current->Flink;\
}\
\
InsertTailList(current, &((NewEntry)->ListEntryField));\
}
ULONG
STDCALL
DbgPrint(
IN PCH Format,
IN ...);
VOID
STDCALL
DbgBreakPoint(VOID);
NTSTATUS
STDCALL
RtlAbsoluteToSelfRelativeSD (
IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
IN OUT PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
IN PULONG BufferLength
);
NTSTATUS
STDCALL
RtlAddAccessAllowedAce (
PACL Acl,
ULONG Revision,
ACCESS_MASK AccessMask,
PSID Sid
);
PVOID
STDCALL
RtlAllocateHeap (
IN HANDLE HeapHandle,
IN ULONG Flags,
IN ULONG Size
);
NTSTATUS
STDCALL
RtlAppendUnicodeToString (
PUNICODE_STRING Destination,
PCWSTR Source
);
NTSTATUS
STDCALL
RtlAppendUnicodeStringToString (
PUNICODE_STRING Destination,
PUNICODE_STRING Source
);
NTSTATUS
STDCALL
RtlAddAtomToAtomTable (
IN PRTL_ATOM_TABLE AtomTable,
IN PWSTR AtomName,
OUT PRTL_ATOM Atom
);
VOID
STDCALL
RtlCopyLuid(
IN PLUID LuidDest,
IN PLUID LuidSrc
);
VOID
STDCALL
RtlCopyLuidAndAttributesArray(
ULONG Count,
PLUID_AND_ATTRIBUTES Src,
PLUID_AND_ATTRIBUTES Dest
);
NTSTATUS
STDCALL
RtlCopySidAndAttributesArray(
ULONG Count,
PSID_AND_ATTRIBUTES Src,
ULONG SidAreaSize,
PSID_AND_ATTRIBUTES Dest,
PVOID SidArea,
PVOID* RemainingSidArea,
PULONG RemainingSidAreaSize
);
SIZE_T
STDCALL
RtlCompareMemory(IN const VOID *Source1,
IN const VOID *Source2,
IN SIZE_T Length);
LONG
STDCALL
RtlCompareUnicodeString (
PUNICODE_STRING String1,
PUNICODE_STRING String2,
BOOLEAN CaseInsensitive
);
BOOLEAN
STDCALL
RtlEqualUnicodeString (
PUNICODE_STRING String1,
PUNICODE_STRING String2,
BOOLEAN CaseInsensitive
);
VOID
STDCALL
RtlAcquirePebLock (
VOID
);
VOID
STDCALL
RtlReleasePebLock (
VOID
);
NTSTATUS
STDCALL
RtlCompressBuffer (
IN USHORT CompressionFormatAndEngine,
IN PUCHAR UncompressedBuffer,
IN ULONG UncompressedBufferSize,
OUT PUCHAR CompressedBuffer,
IN ULONG CompressedBufferSize,
IN ULONG UncompressedChunkSize,
OUT PULONG FinalCompressedSize,
IN PVOID WorkSpace
);
NTSTATUS
STDCALL
RtlConvertSidToUnicodeString (
OUT PUNICODE_STRING DestinationString,
IN PSID Sid,
IN BOOLEAN AllocateDestinationString
);
NTSTATUS
STDCALL
RtlCopySid (
IN ULONG Length,
IN PSID Destination,
IN PSID Source
);
NTSTATUS
STDCALL
RtlCreateAcl(
PACL Acl,
ULONG AclSize,
ULONG AclRevision
);
NTSTATUS
STDCALL
RtlCreateAtomTable(
IN ULONG TableSize,
IN OUT PRTL_ATOM_TABLE *AtomTable
);
NTSTATUS
STDCALL
RtlCreateUserThread (
IN HANDLE ProcessHandle,
IN PSECURITY_DESCRIPTOR SecurityDescriptor,
IN BOOLEAN CreateSuspended,
IN LONG StackZeroBits,
IN OUT PULONG StackReserve,
IN OUT PULONG StackCommit,
IN PTHREAD_START_ROUTINE StartAddress,
IN PVOID Parameter,
IN OUT PHANDLE ThreadHandle,
IN OUT PCLIENT_ID ClientId
);
BOOLEAN
STDCALL
RtlCreateUnicodeString(
OUT PUNICODE_STRING DestinationString,
IN PCWSTR SourceString
);
NTSTATUS
STDCALL
RtlDecompressBuffer (
IN USHORT CompressionFormat,
OUT PUCHAR UncompressedBuffer,
IN ULONG UncompressedBufferSize,
IN PUCHAR CompressedBuffer,
IN ULONG CompressedBufferSize,
OUT PULONG FinalUncompressedSize
);
NTSTATUS
STDCALL
RtlExpandEnvironmentStrings_U (
PWSTR Environment,
PUNICODE_STRING Source,
PUNICODE_STRING Destination,
PULONG Length
);
PRTL_USER_PROCESS_PARAMETERS
STDCALL
RtlDeNormalizeProcessParams (
IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
);
PRTL_USER_PROCESS_PARAMETERS
STDCALL
RtlNormalizeProcessParams (
IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
);
NTSTATUS
STDCALL
RtlDeleteAtomFromAtomTable (
IN PRTL_ATOM_TABLE AtomTable,
IN RTL_ATOM Atom
);
NTSTATUS
STDCALL
RtlDeleteCriticalSection (
PRTL_CRITICAL_SECTION CriticalSection
);
NTSTATUS
STDCALL
RtlDestroyAtomTable (
IN PRTL_ATOM_TABLE AtomTable
);
NTSTATUS
STDCALL
RtlEnterCriticalSection (
PRTL_CRITICAL_SECTION CriticalSection
);
NTSTATUS
STDCALL
RtlInitializeCriticalSection (
PRTL_CRITICAL_SECTION CriticalSection
);
NTSTATUS
STDCALL
RtlLeaveCriticalSection (
PRTL_CRITICAL_SECTION CriticalSection
);
VOID
STDCALL
RtlInitializeBitMap(
IN PRTL_BITMAP BitMapHeader,
IN PULONG BitMapBuffer,
IN ULONG SizeOfBitMap);
BOOLEAN
STDCALL
RtlAreBitsClear(
IN PRTL_BITMAP BitMapHeader,
IN ULONG StartingIndex,
IN ULONG Length);
BOOLEAN
STDCALL
RtlAreBitsSet(
IN PRTL_BITMAP BitMapHeader,
IN ULONG StartingIndex,
IN ULONG Length);
NTSTATUS
STDCALL
RtlMultiByteToUnicodeN (
PWCHAR UnicodeString,
ULONG UnicodeSize,
PULONG ResultSize,
const PCHAR MbString,
ULONG MbSize
);
NTSTATUS
STDCALL
RtlMultiByteToUnicodeSize (
PULONG UnicodeSize,
PCHAR MbString,
ULONG MbSize
);
CHAR STDCALL
RtlUpperChar (CHAR Source);
WCHAR
STDCALL
RtlUpcaseUnicodeChar (
WCHAR Source
);
NTSTATUS
STDCALL
RtlAnsiStringToUnicodeString (
PUNICODE_STRING DestinationString,
PANSI_STRING SourceString,
BOOLEAN AllocateDestinationString
);
NTSTATUS
STDCALL
RtlUnicodeToMultiByteN (
PCHAR MbString,
ULONG MbSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
);
ULONG
STDCALL
RtlOemStringToUnicodeSize (
POEM_STRING AnsiString
);
WCHAR STDCALL
RtlDowncaseUnicodeChar(IN WCHAR Source);
NTSTATUS
STDCALL
RtlUpcaseUnicodeToMultiByteN (
PCHAR MbString,
ULONG MbSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
);
NTSTATUS
STDCALL
RtlUnicodeToMultiByteSize (
PULONG MbSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
);
NTSTATUS
STDCALL
RtlOemToUnicodeN(
PWSTR UnicodeString,
ULONG MaxBytesInUnicodeString,
PULONG BytesInUnicodeString,
IN PCHAR OemString,
ULONG BytesInOemString
);
NTSTATUS
STDCALL
RtlUnicodeToOemN (
PCHAR OemString,
ULONG OemSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
);
NTSTATUS
STDCALL
RtlUpcaseUnicodeStringToOemString (
IN OUT POEM_STRING DestinationString,
IN PUNICODE_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
ULONG
STDCALL
RtlUnicodeStringToAnsiSize (
IN PUNICODE_STRING UnicodeString
);
#ifndef _NTIFS_
BOOLEAN
STDCALL
RtlEqualSid (
IN PSID Sid1,
IN PSID Sid2
);
VOID
STDCALL
RtlFillMemoryUlong (
IN PVOID Destination,
IN ULONG Length,
IN ULONG Fill
);
#endif
NTSTATUS
STDCALL
RtlFindMessage (
IN PVOID BaseAddress,
IN ULONG Type,
IN ULONG Language,
IN ULONG MessageId,
OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry
);
BOOLEAN
STDCALL
RtlFreeHeap (
IN HANDLE HeapHandle,
IN ULONG Flags,
IN PVOID P
);
VOID
STDCALL
RtlFreeUnicodeString(
IN PUNICODE_STRING UnicodeString);
VOID
STDCALL
RtlFreeOemString(
IN POEM_STRING OemString
);
NTSTATUS
STDCALL
RtlGetCompressionWorkSpaceSize (
IN USHORT CompressionFormatAndEngine,
OUT PULONG CompressBufferWorkSpaceSize,
OUT PULONG CompressFragmentWorkSpaceSize
);
NTSTATUS
STDCALL
RtlGetDaclSecurityDescriptor (
IN PSECURITY_DESCRIPTOR SecurityDescriptor,
OUT PBOOLEAN DaclPresent,
OUT PACL *Dacl,
OUT PBOOLEAN DaclDefaulted
);
NTSTATUS
STDCALL
RtlGetGroupSecurityDescriptor (
IN PSECURITY_DESCRIPTOR SecurityDescriptor,
OUT PSID *Group,
OUT PBOOLEAN GroupDefaulted
);
NTSTATUS
STDCALL
RtlGetOwnerSecurityDescriptor (
IN PSECURITY_DESCRIPTOR SecurityDescriptor,
OUT PSID *Owner,
OUT PBOOLEAN OwnerDefaulted
);
ULONG
STDCALL
RtlImageRvaToVa (
PIMAGE_NT_HEADERS NtHeader,
PVOID BaseAddress,
ULONG Rva,
PIMAGE_SECTION_HEADER *SectionHeader
);
PIMAGE_NT_HEADERS
STDCALL
RtlImageNtHeader (
IN PVOID BaseAddress
);
PIMAGE_SECTION_HEADER
STDCALL
RtlImageRvaToSection (
PIMAGE_NT_HEADERS NtHeader,
PVOID BaseAddress,
ULONG Rva
);
NTSTATUS
STDCALL
RtlInitializeSid (
IN OUT PSID Sid,
IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
IN UCHAR SubAuthorityCount
);
VOID
STDCALL
RtlInitNlsTables (
IN PUSHORT AnsiTableBase,
IN PUSHORT OemTableBase,
IN PUSHORT CaseTableBase,
OUT PNLSTABLEINFO NlsTable
);
NTSTATUS
STDCALL
RtlGetSaclSecurityDescriptor (
PSECURITY_DESCRIPTOR SecurityDescriptor,
PBOOLEAN SaclPresent,
PACL* Sacl,
PBOOLEAN SaclDefaulted
);
NTSTATUS
STDCALL
RtlQueryAtomInAtomTable (
IN PRTL_ATOM_TABLE AtomTable,
IN RTL_ATOM Atom,
IN OUT PULONG RefCount OPTIONAL,
IN OUT PULONG PinCount OPTIONAL,
IN OUT PWSTR AtomName OPTIONAL,
IN OUT PULONG NameLength OPTIONAL
);
NTSTATUS
STDCALL
RtlLookupAtomInAtomTable (
IN PRTL_ATOM_TABLE AtomTable,
IN PWSTR AtomName,
OUT PRTL_ATOM Atom
);
VOID
STDCALL
RtlResetRtlTranslations (
IN PNLSTABLEINFO NlsTable
);
VOID
STDCALL
RtlRaiseException (
IN PEXCEPTION_RECORD ExceptionRecord
);
VOID
STDCALL
RtlInitUnicodeString(
IN OUT PUNICODE_STRING DestinationString,
IN PCWSTR SourceString);
BOOLEAN
STDCALL
RtlIsNameLegalDOS8Dot3 (
IN PUNICODE_STRING UnicodeName,
IN PANSI_STRING AnsiName,
PBOOLEAN Unknown
);
ULONG
STDCALL
RtlLengthRequiredSid (
IN UCHAR SubAuthorityCount
);
ULONG
STDCALL
RtlLengthSid (
IN PSID Sid
);
ULONG
STDCALL
RtlNtStatusToDosError (
IN NTSTATUS Status
);
NTSTATUS STDCALL
RtlFormatCurrentUserKeyPath (IN OUT PUNICODE_STRING KeyPath);
NTSTATUS
STDCALL
RtlQueryEnvironmentVariable_U (
PWSTR Environment,
PUNICODE_STRING Name,
PUNICODE_STRING Value
);
NTSTATUS
STDCALL
RtlQueryTimeZoneInformation (
IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
);
VOID STDCALL RtlRaiseStatus(NTSTATUS Status);
VOID
STDCALL
RtlSecondsSince1970ToTime (
IN ULONG SecondsSince1970,
OUT PLARGE_INTEGER Time
);
VOID
STDCALL
RtlSetBits (
PRTL_BITMAP BitMapHeader,
ULONG StartingIndex,
ULONG NumberToSet
);
#if (VER_PRODUCTBUILD >= 2195)
NTSTATUS
STDCALL
RtlSelfRelativeToAbsoluteSD (
IN PSECURITY_DESCRIPTOR 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) */
NTSTATUS
STDCALL
RtlSetGroupSecurityDescriptor (
IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
IN PSID Group,
IN BOOLEAN GroupDefaulted
);
NTSTATUS
STDCALL
RtlSetOwnerSecurityDescriptor (
IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
IN PSID Owner,
IN BOOLEAN OwnerDefaulted
);
NTSTATUS
STDCALL
RtlSetSaclSecurityDescriptor (
IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
IN BOOLEAN SaclPresent,
IN PACL Sacl,
IN BOOLEAN SaclDefaulted
);
PUCHAR
STDCALL
RtlSubAuthorityCountSid (
IN PSID Sid
);
PULONG
STDCALL
RtlSubAuthoritySid (
IN PSID Sid,
IN ULONG SubAuthority
);
NTSTATUS
STDCALL
RtlUpcaseUnicodeStringToCountedOemString (
IN OUT POEM_STRING DestinationString,
IN PUNICODE_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
NTSTATUS
STDCALL
RtlUnicodeStringToOemString (
IN OUT POEM_STRING DestinationString,
IN PUNICODE_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
NTSTATUS
STDCALL
RtlUpcaseUnicodeToOemN (
PCHAR OemString,
ULONG OemSize,
PULONG ResultSize,
PWCHAR UnicodeString,
ULONG UnicodeSize
);
NTSTATUS STDCALL
RtlLargeIntegerToChar (
IN PLARGE_INTEGER Value,
IN ULONG Base,
IN ULONG Length,
IN OUT PCHAR String
);
BOOLEAN
STDCALL
RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
IN PCSZ Source);
BOOLEAN
STDCALL
RtlTimeFieldsToTime (
PTIME_FIELDS TimeFields,
PLARGE_INTEGER Time
);
VOID
STDCALL
RtlTimeToTimeFields (
PLARGE_INTEGER Time,
PTIME_FIELDS TimeFields
);
NTSTATUS
STDCALL
RtlQueryRegistryValues (
IN ULONG RelativeTo,
IN PCWSTR Path,
IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
IN PVOID Context,
IN PVOID Environment
);
NTSTATUS
STDCALL
RtlWriteRegistryValue (
ULONG RelativeTo,
PCWSTR Path,
PCWSTR ValueName,
ULONG ValueType,
PVOID ValueData,
ULONG ValueLength
);
VOID
STDCALL
RtlUnwind (
PEXCEPTION_REGISTRATION RegistrationFrame,
PVOID ReturnAddress,
PEXCEPTION_RECORD ExceptionRecord,
DWORD EaxValue
);
BOOLEAN
STDCALL
RtlValidSid (
IN PSID Sid
);
BOOLEAN
STDCALL
RtlValidAcl (
PACL Acl
);
/* functions exported from NTOSKRNL.EXE which are considered RTL */
char *_itoa (int value, char *string, int radix);
wchar_t *_itow (int value, wchar_t *string, int radix);
int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
int _snwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, ...);
int _stricmp(const char *s1, const char *s2);
char * _strlwr(char *x);
int _strnicmp(const char *s1, const char *s2, size_t n);
char * _strnset(char* szToFill, int szFill, size_t sizeMaxFill);
char * _strrev(char *s);
char * _strset(char* szToFill, int szFill);
char * _strupr(char *x);
int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args);
int _wcsicmp (const wchar_t* cs, const wchar_t* ct);
wchar_t * _wcslwr (wchar_t *x);
int _wcsnicmp (const wchar_t * cs,const wchar_t * ct,size_t count);
wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
wchar_t * _wcsrev(wchar_t *s);
wchar_t *_wcsupr(wchar_t *x);
int atoi(const char *str);
long atol(const char *str);
int isdigit(int c);
int islower(int c);
int isprint(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count);
int mbtowc (wchar_t *wchar, const char *mbchar, size_t count);
void * memchr(const void *s, int c, size_t n);
void * memcpy(void *to, const void *from, size_t count);
void * memmove(void *dest,const void *src, size_t count);
void * memset(void *src, int val, size_t count);
int rand(void);
int sprintf(char * buf, const char *fmt, ...);
void srand(unsigned seed);
char * strcat(char *s, const char *append);
char * strchr(const char *s, int c);
int strcmp(const char *s1, const char *s2);
char * strcpy(char *to, const char *from);
size_t strlen(const char *str);
char * strncat(char *dst, const char *src, size_t n);
int strncmp(const char *s1, const char *s2, size_t n);
char *strncpy(char *dst, const char *src, size_t n);
char *strrchr(const char *s, int c);
size_t strspn(const char *s1, const char *s2);
char *strstr(const char *s, const char *find);
int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
int tolower(int c);
int toupper(int c);
wchar_t towlower(wchar_t c);
wchar_t towupper(wchar_t c);
int vsprintf(char *buf, const char *fmt, va_list args);
wchar_t * wcscat(wchar_t *dest, const wchar_t *src);
wchar_t * wcschr(const wchar_t *str, wchar_t ch);
int wcscmp(const wchar_t *cs, const wchar_t *ct);
wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2);
size_t wcscspn(const wchar_t *str,const wchar_t *reject);
size_t wcslen(const wchar_t *s);
wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t count);
int wcsncmp(const wchar_t *cs, const wchar_t *ct, size_t count);
wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
wchar_t * wcsrchr(const wchar_t *str, wchar_t ch);
size_t wcsspn(const wchar_t *str,const wchar_t *accept);
wchar_t *wcsstr(const wchar_t *s,const wchar_t *b);
size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count);
int wctomb (char *mbchar, wchar_t wchar);
#endif

View file

@ -0,0 +1,208 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/rtltypes.h
* PURPOSE: Defintions for Runtime Library Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _RTLTYPES_H
#define _RTLTYPES_H
/* DEPENDENCIES **************************************************************/
#include "zwtypes.h"
/* EXPORTED DATA *************************************************************/
/* CONSTANTS *****************************************************************/
#define MAXIMUM_LEADBYTES 12
#define PPF_NORMALIZED (1)
#define PEB_BASE (0x7FFDF000)
#define EXCEPTION_UNWINDING 0x02
#define EXCEPTION_EXIT_UNWIND 0x04
#define EXCEPTION_STACK_INVALID 0x8
#define EXCEPTION_NESTED_CALL 0x10
#define EXCEPTION_TARGET_UNWIND 0x20
#define EXCEPTION_COLLIDED_UNWIND 0x20
#define EH_NONCONTINUABLE 0x01
#define EH_UNWINDING 0x02
#define EH_EXIT_UNWIND 0x04
#define EH_STACK_INVALID 0x08
#define EH_NESTED_CALL 0x10
/* ENUMERATIONS **************************************************************/
typedef enum
{
ExceptionContinueExecution,
ExceptionContinueSearch,
ExceptionNestedException,
ExceptionCollidedUnwind
} EXCEPTION_DISPOSITION;
/* TYPES *********************************************************************/
typedef unsigned short RTL_ATOM;
typedef unsigned short *PRTL_ATOM;
typedef struct _ACE
{
ACE_HEADER Header;
ACCESS_MASK AccessMask;
} ACE, *PACE;
typedef struct _EXCEPTION_REGISTRATION
{
struct _EXCEPTION_REGISTRATION* prev;
PEXCEPTION_HANDLER handler;
} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
typedef struct RTL_DRIVE_LETTER_CURDIR
{
USHORT Flags;
USHORT Length;
ULONG TimeStamp;
UNICODE_STRING DosPath;
} RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
typedef struct _RTL_HEAP_DEFINITION
{
ULONG Length;
ULONG Unknown[11];
} RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
typedef struct _RTL_MESSAGE_RESOURCE_ENTRY
{
USHORT Length;
USHORT Flags;
UCHAR Text[1];
} RTL_MESSAGE_RESOURCE_ENTRY, *PRTL_MESSAGE_RESOURCE_ENTRY;
typedef struct _RTL_MESSAGE_RESOURCE_BLOCK
{
ULONG LowId;
ULONG HighId;
ULONG OffsetToEntries;
} RTL_MESSAGE_RESOURCE_BLOCK, *PRTL_MESSAGE_RESOURCE_BLOCK;
typedef struct _RTL_MESSAGE_RESOURCE_DATA
{
ULONG NumberOfBlocks;
RTL_MESSAGE_RESOURCE_BLOCK Blocks[1];
} RTL_MESSAGE_RESOURCE_DATA, *PRTL_MESSAGE_RESOURCE_DATA;
typedef struct _NLS_FILE_HEADER
{
USHORT HeaderSize;
USHORT CodePage;
USHORT MaximumCharacterSize; /* SBCS = 1, DBCS = 2 */
USHORT DefaultChar;
USHORT UniDefaultChar;
USHORT TransDefaultChar;
USHORT TransUniDefaultChar;
USHORT DBCSCodePage;
UCHAR LeadByte[MAXIMUM_LEADBYTES];
} NLS_FILE_HEADER, *PNLS_FILE_HEADER;
typedef struct _RTL_USER_PROCESS_PARAMETERS
{
ULONG AllocationSize;
ULONG Size;
ULONG Flags;
ULONG DebugFlags;
HANDLE hConsole;
ULONG ProcessGroup;
HANDLE hStdInput;
HANDLE hStdOutput;
HANDLE hStdError;
UNICODE_STRING CurrentDirectoryName;
HANDLE CurrentDirectoryHandle;
UNICODE_STRING DllPath;
UNICODE_STRING ImagePathName;
UNICODE_STRING CommandLine;
PWSTR Environment;
ULONG dwX;
ULONG dwY;
ULONG dwXSize;
ULONG dwYSize;
ULONG dwXCountChars;
ULONG dwYCountChars;
ULONG dwFillAttribute;
ULONG dwFlags;
ULONG wShowWindow;
UNICODE_STRING WindowTitle;
UNICODE_STRING DesktopInfo;
UNICODE_STRING ShellInfo;
UNICODE_STRING RuntimeInfo;
} RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
typedef struct _RTL_PROCESS_INFO
{
ULONG Size;
HANDLE ProcessHandle;
HANDLE ThreadHandle;
CLIENT_ID ClientId;
SECTION_IMAGE_INFORMATION ImageInfo;
} RTL_PROCESS_INFO, *PRTL_PROCESS_INFO;
typedef struct _RTL_BITMAP
{
ULONG SizeOfBitMap;
PULONG Buffer;
} RTL_BITMAP;
typedef RTL_BITMAP *PRTL_BITMAP;
typedef struct _RTL_BITMAP_RUN
{
ULONG StartingIndex;
ULONG NumberOfBits;
} RTL_BITMAP_RUN;
typedef RTL_BITMAP_RUN *PRTL_BITMAP_RUN;
/* FIXME: This is a Windows Type which which we are not implementing properly
The type below however is our own implementation. We will eventually use Windows' */
typedef struct _RTL_ATOM_TABLE
{
ULONG TableSize;
ULONG NumberOfAtoms;
PVOID Lock; /* fast mutex (kernel mode)/ critical section (user mode) */
PVOID HandleTable;
LIST_ENTRY Slot[0];
} RTL_ATOM_TABLE, *PRTL_ATOM_TABLE;
/* Let Kernel Drivers use this */
#ifndef _WINBASE_H
typedef struct _SYSTEMTIME
{
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
typedef struct _TIME_ZONE_INFORMATION
{
LONG Bias;
WCHAR StandardName[32];
SYSTEMTIME StandardDate;
LONG StandardBias;
WCHAR DaylightName[32];
SYSTEMTIME DaylightDate;
LONG DaylightBias;
} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
#endif
typedef LPTIME_ZONE_INFORMATION PTIME_ZONE_INFORMATION;
#endif

View file

@ -0,0 +1,24 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/sefuncs.h
* PURPOSE: Defintions for Security Subsystem Functions not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _SEFUNCS_H
#define _SEFUNCS_H
/* DEPENDENCIES **************************************************************/
/* FUNCTION TYPES ************************************************************/
/* PROTOTYPES ****************************************************************/
SECURITY_IMPERSONATION_LEVEL
STDCALL
SeTokenImpersonationLevel(
IN PACCESS_TOKEN Token
);
#endif

View file

@ -0,0 +1,86 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/setypes.h
* PURPOSE: Defintions for Security Subsystem Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _SETYPES_H
#define _SETYPES_H
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
/* CONSTANTS *****************************************************************/
/* ENUMERATIONS **************************************************************/
/* TYPES *********************************************************************/
typedef struct _SEP_AUDIT_POLICY_CATEGORIES
{
UCHAR System:4;
UCHAR Logon:4;
UCHAR ObjectAccess:4;
UCHAR PrivilegeUse:4;
UCHAR DetailedTracking:4;
UCHAR PolicyChange:4;
UCHAR AccountManagement:4;
UCHAR DirectoryServiceAccess:4;
UCHAR AccountLogon:4;
} SEP_AUDIT_POLICY_CATEGORIES, *PSEP_AUDIT_POLICY_CATEGORIES;
typedef struct _SEP_AUDIT_POLICY_OVERLAY
{
ULONGLONG PolicyBits:36;
UCHAR SetBit:1;
} SEP_AUDIT_POLICY_OVERLAY, *PSEP_AUDIT_POLICY_OVERLAY;
typedef struct _SEP_AUDIT_POLICY
{
union
{
SEP_AUDIT_POLICY_CATEGORIES PolicyElements;
SEP_AUDIT_POLICY_OVERLAY PolicyOverlay;
ULONGLONG Overlay;
};
} SEP_AUDIT_POLICY, *PSEP_AUDIT_POLICY;
typedef struct _TOKEN
{
TOKEN_SOURCE TokenSource; /* 0x00 */
LUID TokenId; /* 0x10 */
LUID AuthenticationId; /* 0x18 */
LUID ParentTokenId; /* 0x20 */
LARGE_INTEGER ExpirationTime; /* 0x28 */
struct _ERESOURCE *TokenLock; /* 0x30 */
ULONG Padding; /* 0x34 */
SEP_AUDIT_POLICY AuditPolicy; /* 0x38 */
LUID ModifiedId; /* 0x40 */
ULONG SessionId; /* 0x48 */
ULONG UserAndGroupCount; /* 0x4C */
ULONG RestrictedSidCount; /* 0x50 */
ULONG PrivilegeCount; /* 0x54 */
ULONG VariableLength; /* 0x58 */
ULONG DynamicCharged; /* 0x5C */
ULONG DynamicAvailable; /* 0x60 */
ULONG DefaultOwnerIndex; /* 0x64 */
PSID_AND_ATTRIBUTES UserAndGroups; /* 0x68 */
PSID_AND_ATTRIBUTES RestrictedSids; /* 0x6C */
PSID PrimaryGroup; /* 0x70 */
PLUID_AND_ATTRIBUTES Privileges; /* 0x74 */
PULONG DynamicPart; /* 0x78 */
PACL DefaultDacl; /* 0x7C */
TOKEN_TYPE TokenType; /* 0x80 */
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; /* 0x84 */
ULONG TokenFlags; /* 0x88 */
ULONG TokenInUse; /* 0x8C */
PVOID ProxyData; /* 0x90 */
PVOID AuditData; /* 0x94 */
LUID OriginatingLogonSession; /* 0x98 */
UCHAR VariablePart[1]; /* 0xA0 */
} TOKEN, *PTOKEN;
#endif

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,983 @@
/*
* PROJECT: ReactOS Native Headers
* FILE: include/ndk/zwtypes.h
* PURPOSE: Defintions for Native Types not defined in DDK/IFS
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 06/10/04
*/
#ifndef _ZWTYPES_H
#define _ZWTYPES_H
/* DEPENDENCIES **************************************************************/
#include "rtltypes.h"
/* EXPORTED DATA *************************************************************/
/* CONSTANTS *****************************************************************/
/* ENUMERATIONS **************************************************************/
typedef enum _PLUGPLAY_BUS_CLASS
{
SystemBus,
PlugPlayVirtualBus,
MaxPlugPlayBusClass
} PLUGPLAY_BUS_CLASS, *PPLUGPLAY_BUS_CLASS;
typedef enum _PLUGPLAY_VIRTUAL_BUS_TYPE
{
Root,
MaxPlugPlayVirtualBusType
} PLUGPLAY_VIRTUAL_BUS_TYPE, *PPLUGPLAY_VIRTUAL_BUS_TYPE;
/**** Information Classes ****/
/*
* System
*/
typedef enum _SYSTEM_INFORMATION_CLASS
{
SystemBasicInformation,
SystemProcessorInformation,
SystemPerformanceInformation,
SystemTimeOfDayInformation,
SystemPathInformation, /* OBSOLETE: USE KUSER_SHARED_DATA */
SystemProcessInformation,
SystemCallCountInformation,
SystemDeviceInformation,
SystemProcessorPerformanceInformation,
SystemFlagsInformation,
SystemCallTimeInformation,
SystemModuleInformation,
SystemLocksInformation,
SystemStackTraceInformation,
SystemPagedPoolInformation,
SystemNonPagedPoolInformation,
SystemHandleInformation,
SystemObjectInformation,
SystemPageFileInformation,
SystemVdmInstemulInformation,
SystemVdmBopInformation,
SystemFileCacheInformation,
SystemPoolTagInformation,
SystemInterruptInformation,
SystemDpcBehaviorInformation,
SystemFullMemoryInformation,
SystemLoadGdiDriverInformation,
SystemUnloadGdiDriverInformation,
SystemTimeAdjustmentInformation,
SystemSummaryMemoryInformation,
SystemNextEventIdInformation,
SystemEventIdsInformation,
SystemCrashDumpInformation,
SystemExceptionInformation,
SystemCrashDumpStateInformation,
SystemKernelDebuggerInformation,
SystemContextSwitchInformation,
SystemRegistryQuotaInformation,
SystemExtendServiceTableInformation,
SystemPrioritySeperation,
SystemPlugPlayBusInformation,
SystemDockInformation,
SystemPowerInformation,
SystemProcessorSpeedInformation,
SystemCurrentTimeZoneInformation,
SystemLookasideInformation,
SystemTimeSlipNotification,
SystemSessionCreate,
SystemSessionDetach,
SystemSessionInformation,
SystemRangeStartInformation,
SystemVerifierInformation,
SystemAddVerifier,
SystemSessionProcessesInformation,
SystemInformationClassMax
} SYSTEM_INFORMATION_CLASS;
/*
* Object
*/
typedef enum _OBJECT_INFORMATION_CLASS
{
ObjectBasicInformation,
ObjectNameInformation,
ObjectTypeInformation,
ObjectAllTypesInformation,
ObjectHandleInformation
} OBJECT_INFORMATION_CLASS;
/*
* Memory
*/
typedef enum _MEMORY_INFORMATION_CLASS
{
MemoryBasicInformation,
MemoryWorkingSetList,
MemorySectionName,
MemoryBasicVlmInformation
} MEMORY_INFORMATION_CLASS;
/*
* Mutant
*/
typedef enum _MUTANT_INFORMATION_CLASS
{
MutantBasicInformation
} MUTANT_INFORMATION_CLASS;
/*
* Atom
*/
typedef enum _ATOM_INFORMATION_CLASS
{
AtomBasicInformation,
AtomTableInformation,
} ATOM_INFORMATION_CLASS;
/*
* Section
*/
typedef enum _SECTION_INFORMATION_CLASS
{
SectionBasicInformation,
SectionImageInformation,
} SECTION_INFORMATION_CLASS;
/*
* Timer
*/
typedef enum _TIMER_INFORMATION_CLASS {
TimerBasicInformation
} TIMER_INFORMATION_CLASS;
/*
* Semaphore
*/
typedef enum _SEMAPHORE_INFORMATION_CLASS
{
SemaphoreBasicInformation
} SEMAPHORE_INFORMATION_CLASS;
/*
* Event
*/
typedef enum _EVENT_INFORMATION_CLASS
{
EventBasicInformation
} EVENT_INFORMATION_CLASS;
/*
* I/O Completion
*/
typedef enum _IO_COMPLETION_INFORMATION_CLASS
{
IoCompletionBasicInformation
} IO_COMPLETION_INFORMATION_CLASS;
/* TYPES *********************************************************************/
typedef unsigned short LANGID;
typedef LANGID *PLANGID;
/**** Information Structures ****/
/*
* Mutant
*/
/* Class 0 */
typedef struct _MUTANT_BASIC_INFORMATION
{
LONG CurrentCount;
BOOLEAN OwnedbyCalled;
BOOLEAN AbandonedState;
} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
/*
* Thread
*/
/* Class 0 */
typedef struct _THREAD_BASIC_INFORMATION
{
NTSTATUS ExitStatus;
PVOID TebBaseAddress;
CLIENT_ID ClientId;
KAFFINITY AffinityMask;
KPRIORITY Priority;
KPRIORITY BasePriority;
} THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
/*
* Atom
*/
/* Class 0 */
typedef struct _ATOM_BASIC_INFORMATION {
USHORT UsageCount;
USHORT Flags;
USHORT NameLength;
WCHAR Name[1];
} ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
/* Class 1 */
typedef struct _ATOM_TABLE_INFORMATION
{
ULONG NumberOfAtoms;
USHORT Atoms[1];
} ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
/*
* Memory
*/
/* Class 1 */
typedef struct _MEMORY_WORKING_SET_LIST
{
ULONG NumberOfPages;
ULONG WorkingSetList[1];
} MEMORY_WORKING_SET_LIST, *PMEMORY_WORKING_SET_LIST;
/* Class 2 */
typedef struct {
UNICODE_STRING SectionFileName;
WCHAR NameBuffer[ANYSIZE_ARRAY];
} MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
/*
* Section
*/
/* Class 0 */
typedef struct _SECTION_BASIC_INFORMATION
{
PVOID BaseAddress;
ULONG Attributes;
LARGE_INTEGER Size;
} SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
/* Class 1 */
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;
/*
* Object
*/
/* Class 4 */
typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFORMATION
{
BOOLEAN Inherit;
BOOLEAN ProtectFromClose;
} OBJECT_HANDLE_ATTRIBUTE_INFORMATION, *POBJECT_HANDLE_ATTRIBUTE_INFORMATION;
/*
* Timer
*/
/* Class 0 */
typedef struct _TIMER_BASIC_INFORMATION
{
LARGE_INTEGER TimeRemaining;
BOOLEAN SignalState;
} TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
/*
* Semaphore
*/
/* Class 0 */
typedef struct _SEMAPHORE_BASIC_INFORMATION {
LONG CurrentCount;
LONG MaximumCount;
} SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
/*
* Event
*
/* Class 0 */
typedef struct _EVENT_BASIC_INFORMATION
{
EVENT_TYPE EventType;
LONG EventState;
} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
/*
* System
*/
/* Class 0 */
typedef struct _SYSTEM_BASIC_INFORMATION
{
ULONG Reserved;
ULONG TimerResolution;
ULONG PageSize;
ULONG NumberOfPhysicalPages;
ULONG LowestPhysicalPageNumber;
ULONG HighestPhysicalPageNumber;
ULONG AllocationGranularity;
ULONG MinimumUserModeAddress;
ULONG MaximumUserModeAddress;
KAFFINITY ActiveProcessorsAffinityMask;
CCHAR NumberOfProcessors;
} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
/* Class 1 */
typedef struct _SYSTEM_PROCESSOR_INFORMATION {
USHORT ProcessorArchitecture;
USHORT ProcessorLevel;
USHORT ProcessorRevision;
USHORT Reserved;
ULONG ProcessorFeatureBits;
} SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
/* Class 2 */
typedef struct _SYSTEM_PERFORMANCE_INFORMATION
{
LARGE_INTEGER IdleProcessTime;
LARGE_INTEGER IoReadTransferCount;
LARGE_INTEGER IoWriteTransferCount;
LARGE_INTEGER IoOtherTransferCount;
ULONG IoReadOperationCount;
ULONG IoWriteOperationCount;
ULONG IoOtherOperationCount;
ULONG AvailablePages;
ULONG CommittedPages;
ULONG CommitLimit;
ULONG PeakCommitment;
ULONG PageFaultCount;
ULONG CopyOnWriteCount;
ULONG TransitionCount;
ULONG CacheTransitionCount;
ULONG DemandZeroCount;
ULONG PageReadCount;
ULONG PageReadIoCount;
ULONG CacheReadCount;
ULONG CacheIoCount;
ULONG DirtyPagesWriteCount;
ULONG DirtyWriteIoCount;
ULONG MappedPagesWriteCount;
ULONG MappedWriteIoCount;
ULONG PagedPoolPages;
ULONG NonPagedPoolPages;
ULONG PagedPoolAllocs;
ULONG PagedPoolFrees;
ULONG NonPagedPoolAllocs;
ULONG NonPagedPoolFrees;
ULONG FreeSystemPtes;
ULONG ResidentSystemCodePage;
ULONG TotalSystemDriverPages;
ULONG TotalSystemCodePages;
ULONG NonPagedPoolLookasideHits;
ULONG PagedPoolLookasideHits;
ULONG Spare3Count;
ULONG ResidentSystemCachePage;
ULONG ResidentPagedPoolPage;
ULONG ResidentSystemDriverPage;
ULONG CcFastReadNoWait;
ULONG CcFastReadWait;
ULONG CcFastReadResourceMiss;
ULONG CcFastReadNotPossible;
ULONG CcFastMdlReadNoWait;
ULONG CcFastMdlReadWait;
ULONG CcFastMdlReadResourceMiss;
ULONG CcFastMdlReadNotPossible;
ULONG CcMapDataNoWait;
ULONG CcMapDataWait;
ULONG CcMapDataNoWaitMiss;
ULONG CcMapDataWaitMiss;
ULONG CcPinMappedDataCount;
ULONG CcPinReadNoWait;
ULONG CcPinReadWait;
ULONG CcPinReadNoWaitMiss;
ULONG CcPinReadWaitMiss;
ULONG CcCopyReadNoWait;
ULONG CcCopyReadWait;
ULONG CcCopyReadNoWaitMiss;
ULONG CcCopyReadWaitMiss;
ULONG CcMdlReadNoWait;
ULONG CcMdlReadWait;
ULONG CcMdlReadNoWaitMiss;
ULONG CcMdlReadWaitMiss;
ULONG CcReadAheadIos;
ULONG CcLazyWriteIos;
ULONG CcLazyWritePages;
ULONG CcDataFlushes;
ULONG CcDataPages;
ULONG ContextSwitches;
ULONG FirstLevelTbFills;
ULONG SecondLevelTbFills;
ULONG SystemCalls;
} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
/* Class 3 */
typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
LARGE_INTEGER BootTime;
LARGE_INTEGER CurrentTime;
LARGE_INTEGER TimeZoneBias;
ULONG TimeZoneId;
ULONG Reserved;
} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
/* Class 4 */
/* This class is obsoleted, please use KUSER_SHARED_DATA instead */
/* Class 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;
/* Class 6 */
typedef struct _SYSTEM_CALL_COUNT_INFORMATION
{
ULONG Length;
ULONG NumberOfTables;
} SYSTEM_CALL_COUNT_INFORMATION, *PSYSTEM_CALL_COUNT_INFORMATION;
/* Class 7 */
typedef struct _SYSTEM_DEVICE_INFORMATION {
ULONG NumberOfDisks;
ULONG NumberOfFloppies;
ULONG NumberOfCdRoms;
ULONG NumberOfTapes;
ULONG NumberOfSerialPorts;
ULONG NumberOfParallelPorts;
} SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
/* Class 8 */
typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
{
LARGE_INTEGER IdleTime;
LARGE_INTEGER KernelTime;
LARGE_INTEGER UserTime;
LARGE_INTEGER DpcTime;
LARGE_INTEGER InterruptTime;
ULONG InterruptCount;
} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION,
/* Class 9 */
typedef struct _SYSTEM_FLAGS_INFORMATION
{
ULONG Flags;
} SYSTEM_FLAGS_INFORMATION, *PSYSTEM_FLAGS_INFORMATION;
/* Class 10 */
typedef struct _SYSTEM_CALL_TIME_INFORMATION
{
ULONG Length;
ULONG TotalCalls;
LARGE_INTEGER TimeOfCalls[1];
} SYSTEM_CALL_TIME_INFORMATION, *PSYSTEM_CALL_TIME_INFORMATION;
/* Class 11 */
typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY
{
ULONG Unknown1;
ULONG Unknown2;
PVOID Base;
ULONG Size;
ULONG Flags;
USHORT Index;
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;
/* Class 12 */
typedef struct _SYSTEM_RESOURCE_LOCK_ENTRY
{
ULONG ResourceAddress;
ULONG Always1;
ULONG Unknown;
ULONG ActiveCount;
ULONG ContentionCount;
ULONG Unused[2];
ULONG NumberOfSharedWaiters;
ULONG NumberOfExclusiveWaiters;
} SYSTEM_RESOURCE_LOCK_ENTRY, *PSYSTEM_RESOURCE_LOCK_ENTRY;
typedef struct _SYSTEM_RESOURCE_LOCK_INFO
{
ULONG Count;
SYSTEM_RESOURCE_LOCK_ENTRY Lock[1];
} SYSTEM_RESOURCE_LOCK_INFO, *PSYSTEM_RESOURCE_LOCK_INFO;
/* Class 13 */
typedef struct _SYSTEM_BACKTRACE_INFORMATION_ENTRY
{
/* FIXME */
} SYSTEM_BACKTRACE_INFORMATION_ENTRY, *PSYSTEM_BACKTRACE_INFORMATION_ENTRY;
typedef struct _SYSTEM_BACKTRACE_INFORMATION
{
/* FIXME */
ULONG Unknown[4]
ULONG Count;
SYSTEM_BACKTRACE_INFORMATION_ENTRY Trace[1];
} SYSTEM_BACKTRACE_INFORMATION, *PSYSTEM_BACKTRACE_INFORMATION;
/* Class 14 - 15 */
typedef struct _SYSTEM_POOL_ENTRY
{
BOOLEAN Allocated;
BOOLEAN Spare0;
USHORT AllocatorBackTraceIndex;
ULONG Size;
union {
UCHAR Tag[4];
ULONG TagUlong;
PVOID ProcessChargedQuota;
};
} SYSTEM_POOL_ENTRY, *PSYSTEM_POOL_ENTRY;
typedef struct _SYSTEM_POOL_INFORMATION
{
ULONG TotalSize;
PVOID FirstEntry;
USHORT EntryOverhead;
BOOLEAN PoolTagPresent;
BOOLEAN Spare0;
ULONG NumberOfEntries;
SYSTEM_POOL_ENTRY Entries[1];
} SYSTEM_POOL_INFORMATION, *PSYSTEM_POOL_INFORMATION;
/* Class 16 */
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;
/* Class 17 */
typedef struct _SYSTEM_OBJECTTYPE_INFORMATION
{
ULONG NextEntryOffset;
ULONG NumberOfObjects;
ULONG NumberOfHandles;
ULONG TypeIndex;
ULONG InvalidAttributes;
GENERIC_MAPPING GenericMapping;
ULONG ValidAccessMask;
ULONG PoolType;
BOOLEAN SecurityRequired;
BOOLEAN WaitableObject;
UNICODE_STRING TypeName;
} SYSTEM_OBJECTTYPE_INFORMATION, *PSYSTEM_OBJECTTYPE_INFORMATION;
typedef struct _SYSTEM_OBJECT_INFORMATION
{
ULONG NextEntryOffset;
PVOID Object;
HANDLE CreatorUniqueProcess;
USHORT CreatorBackTraceIndex;
USHORT Flags;
LONG PointerCount;
LONG HandleCount;
ULONG PagedPoolCharge;
ULONG NonPagedPoolCharge;
HANDLE ExclusiveProcessId;
PVOID SecurityDescriptor;
OBJECT_NAME_INFORMATION NameInfo;
} SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
/* Class 18 */
typedef struct _SYSTEM_PAGEFILE_INFORMATION
{
ULONG NextEntryOffset;
ULONG TotalSize;
ULONG TotalInUse;
ULONG PeakUsage;
UNICODE_STRING PageFileName;
} SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
/* Class 19 */
typedef struct _SYSTEM_VDM_INSTEMUL_INFO
{
ULONG SegmentNotPresent;
ULONG VdmOpcode0F;
ULONG OpcodeESPrefix;
ULONG OpcodeCSPrefix;
ULONG OpcodeSSPrefix;
ULONG OpcodeDSPrefix;
ULONG OpcodeFSPrefix;
ULONG OpcodeGSPrefix;
ULONG OpcodeOPER32Prefix;
ULONG OpcodeADDR32Prefix;
ULONG OpcodeINSB;
ULONG OpcodeINSW;
ULONG OpcodeOUTSB;
ULONG OpcodeOUTSW;
ULONG OpcodePUSHF;
ULONG OpcodePOPF;
ULONG OpcodeINTnn;
ULONG OpcodeINTO;
ULONG OpcodeIRET;
ULONG OpcodeINBimm;
ULONG OpcodeINWimm;
ULONG OpcodeOUTBimm;
ULONG OpcodeOUTWimm ;
ULONG OpcodeINB;
ULONG OpcodeINW;
ULONG OpcodeOUTB;
ULONG OpcodeOUTW;
ULONG OpcodeLOCKPrefix;
ULONG OpcodeREPNEPrefix;
ULONG OpcodeREPPrefix;
ULONG OpcodeHLT;
ULONG OpcodeCLI;
ULONG OpcodeSTI;
ULONG BopCount;
} SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
/* Class 20 */
typedef struct _SYSTEM_VDM_BOP_INFO
{
/* FIXME */
}
/* Class 21 */
typedef struct _SYSTEM_CACHE_INFORMATION
{
ULONG CurrentSize;
ULONG PeakSize;
ULONG PageFaultCount;
ULONG MinimumWorkingSet;
ULONG MaximumWorkingSet;
ULONG CurrentSizeIncludingTransitionInPages;
ULONG PeakSizeIncludingTransitionInPages;
ULONG Unused[2];
} SYSTEM_CACHE_INFORMATION;
/* Class 22 */
typedef struct _SYSTEM_POOLTAG
{
union
{
UCHAR Tag[4];
ULONG TagUlong;
};
ULONG PagedAllocs;
ULONG PagedFrees;
ULONG PagedUsed;
ULONG NonPagedAllocs;
ULONG NonPagedFrees;
ULONG NonPagedUsed;
} SYSTEM_POOLTAG, *PSYSTEM_POOLTAG;
typedef struct _SYSTEM_POOLTAG_INFORMATION
{
ULONG Count;
SYSTEM_POOLTAG TagInfo[1];
} SYSTEM_POOLTAG_INFORMATION, *PSYSTEM_POOLTAG_INFORMATION;
/* Class 23 */
typedef struct _SYSTEM_INTERRUPT_INFORMATION
{
ULONG ContextSwitches;
ULONG DpcCount;
ULONG DpcRate;
ULONG TimeIncrement;
ULONG DpcBypassCount;
ULONG ApcBypassCount;
} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
/* Class 24 */
typedef struct _SYSTEM_DPC_BEHAVIOR_INFORMATION
{
ULONG Spare;
ULONG DpcQueueDepth;
ULONG MinimumDpcRate;
ULONG AdjustDpcThreshold;
ULONG IdealDpcRate;
} SYSTEM_DPC_BEHAVIOR_INFORMATION, *PSYSTEM_DPC_BEHAVIOR_INFORMATION;
/* Class 25 */
typedef struct _SYSTEM_MEMORY_INFO
{
PUCHAR StringOffset;
USHORT ValidCount;
USHORT TransitionCount;
USHORT ModifiedCount;
USHORT PageTableCount;
} SYSTEM_MEMORY_INFO, *PSYSTEM_MEMORY_INFO;
typedef struct _SYSTEM_MEMORY_INFORMATION
{
ULONG InfoSize;
ULONG StringStart;
SYSTEM_MEMORY_INFO Memory[1];
} SYSTEM_MEMORY_INFORMATION, *PSYSTEM_MEMORY_INFORMATION;
/* Class 26 */
typedef struct _SYSTEM_GDI_DRIVER_INFORMATION {
UNICODE_STRING DriverName;
PVOID ImageAddress;
PVOID SectionPointer;
PVOID EntryPoint;
PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
} SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
/* Class 27 */
/* Not an actuall class, simply a PVOID to the ImageAddress */
/* Class 28 */
typedef struct _SYSTEM_QUERY_TIME_ADJUST_INFORMATION
{
ULONG TimeAdjustment;
ULONG TimeIncrement;
BOOLEAN Enable;
} SYSTEM_QUERY_TIME_ADJUST_INFORMATION, *PSYSTEM_QUERY_TIME_ADJUST_INFORMATION;
typedef struct _SYSTEM_SET_TIME_ADJUST_INFORMATION
{
ULONG TimeAdjustment;
BOOLEAN Enable;
} SYSTEM_SET_TIME_ADJUST_INFORMATION, *PSYSTEM_SET_TIME_ADJUST_INFORMATION;
/* Class 29 - Same as 25 */
/* Class 30 - 31 */
/* FIXME */
/* Class 32 */
typedef struct _SYSTEM_CRASH_DUMP_INFORMATION
{
HANDLE CrashDumpSection;
} SYSTEM_CRASH_DUMP_INFORMATION, *PSYSTEM_CRASH_DUMP_INFORMATION;
/* Class 33 */
typedef struct _SYSTEM_EXCEPTION_INFORMATION
{
ULONG AlignmentFixupCount;
ULONG ExceptionDispatchCount;
ULONG FloatingEmulationCount;
ULONG ByteWordEmulationCount;
} SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
/* Class 34 */
typedef struct _SYSTEM_CRASH_STATE_INFORMATION
{
ULONG ValidCrashDump;
} SYSTEM_CRASH_STATE_INFORMATION, *PSYSTEM_CRASH_STATE_INFORMATION;
/* Class 35 */
typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
{
BOOLEAN KernelDebuggerEnabled;
BOOLEAN KernelDebuggerNotPresent;
} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
/* Class 36 */
typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION {
ULONG ContextSwitches;
ULONG FindAny;
ULONG FindLast;
ULONG FindIdeal;
ULONG IdleAny;
ULONG IdleCurrent;
ULONG IdleLast;
ULONG IdleIdeal;
ULONG PreemptAny;
ULONG PreemptCurrent;
ULONG PreemptLast;
ULONG SwitchToIdle;
} SYSTEM_CONTEXT_SWITCH_INFORMATION, *PSYSTEM_CONTEXT_SWITCH_INFORMATION;
/* Class 37 */
typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
{
ULONG RegistryQuotaAllowed;
ULONG RegistryQuotaUsed;
ULONG PagedPoolSize;
} SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
/* Class 38 */
/* Not a structure, simply send the UNICODE_STRING */
/* Class 39 */
/* Not a structure, simply send a ULONG containing the new separation */
/* Class 40 */
typedef struct _PLUGPLAY_BUS_TYPE
{
PLUGPLAY_BUS_CLASS BusClass;
union
{
INTERFACE_TYPE SystemBusType;
PLUGPLAY_VIRTUAL_BUS_TYPE PlugPlayVirtualBusType;
};
} PLUGPLAY_BUS_TYPE, *PPLUGPLAY_BUS_TYPE;
typedef struct _PLUGPLAY_BUS_INSTANCE
{
PLUGPLAY_BUS_TYPE BusType;
ULONG BusNumber;
WCHAR BusName[MAX_BUS_NAME];
} PLUGPLAY_BUS_INSTANCE, *PPLUGPLAY_BUS_INSTANCE;
typedef struct _SYSTEM_PLUGPLAY_BUS_INFORMATION
{
ULONG BusCount;
PLUGPLAY_BUS_INSTANCE BusInstance[1];
} SYSTEM_PLUGPLAY_BUS_INFORMATION, *PSYSTEM_PLUGPLAY_BUS_INFORMATION;
/* Class 41 */
typedef struct _SYSTEM_DOCK_INFORMATION
{
SYSTEM_DOCK_STATE DockState;
INTERFACE_TYPE DeviceBusType;
ULONG DeviceBusNumber;
ULONG SlotNumber;
} SYSTEM_DOCK_INFORMATION, *PSYSTEM_DOCK_INFORMATION;
/* Class 42 */
typedef struct _SYSTEM_POWER_INFORMATION
{
BOOLEAN SystemSuspendSupported;
BOOLEAN SystemHibernateSupported;
BOOLEAN ResumeTimerSupportsSuspend;
BOOLEAN ResumeTimerSupportsHibernate;
BOOLEAN LidSupported;
BOOLEAN TurboSettingSupported;
BOOLEAN TurboMode;
BOOLEAN SystemAcOrDc;
BOOLEAN PowerDownDisabled;
LARGE_INTEGER SpindownDrives;
} SYSTEM_POWER_INFORMATION, *PSYSTEM_POWER_INFORMATION;
/* Class 43 */
typedef struct _SYSTEM_LEGACY_DRIVER_INFORMATION
{
PNP_VETO_TYPE VetoType;
UNCODE_STRING VetoDriver;
/* Buffer Follows */
} SYSTEM_PROCESSOR_SPEED_INFORMATION, *PSYSTEM_PROCESSOR_SPEED_INFORMATION;
/* Class 44 */
typedef TIME_ZONE_INFORMATION RTL_TIME_ZONE_INFORMATION;
/* Class 45 */
typedef struct _SYSTEM_LOOKASIDE_INFORMATION
{
USHORT CurrentDepth;
USHORT MaximumDepth;
ULONG TotalAllocates;
ULONG AllocateMisses;
ULONG TotalFrees;
ULONG FreeMisses;
ULONG Type;
ULONG Tag;
ULONG Size;
} SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
/* Class 46 */
/* Not a structure. Only a HANDLE for the SlipEvent;
/* Class 47 */
/* Not a structure. Only a ULONG for the SessionId;
/* Class 48 */
/* Not a structure. Only a ULONG for the SessionId;
/* Class 49 */
/* FIXME */
/* Class 50 */
/* Not a structure. Only a ULONG_PTR for the SystemRangeStart */
/* Class 51 */
/* FIXME. Based on MM_DRIVER_VERIFIER_DATA */
/* Class 52 */
/* FIXME */
/* Class 53 */
typedef struct _SYSTEM_SESSION_PROCESSES_INFORMATION
{
ULONG SessionId;
ULONG BufferSize;
PVOID Buffer; /* same format as in SystemProcessInformation */
} SYSTEM_SESSION_PROCESSES_INFORMATION, * PSYSTEM_SESSION_PROCESSES_INFORMATION;
/* Class 54-81 */
/* FIXME */
#endif