mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- Define DECLSPEC_ADDRSAFE and FORCEINLINE for gcc in winnt.h
- Remove FASTCALL define from windef.h and add it to winddk.h - Move EXCEPTION_ defines to crt/except.h - Remove public GUIDs from sysguid.h and move from NDK to public umpnpmgr lib headers (since no other component but it + kernel uses them) - Make include/ndk an include path. The NDK is now used like the DDK, so including ndk/foo.h should be replaced by include foo.h just like for PSDK or DDK. - Don't include misc.h in usermode. - Protect some stuff in helper.h against multiple definitions. - Sync with NDK 1.00 Beta 1 to prepare for public NDK release. svn path=/trunk/; revision=19450
This commit is contained in:
parent
779147bf80
commit
f355909c07
56 changed files with 3831 additions and 2482 deletions
|
@ -35,6 +35,7 @@
|
|||
<include>include/libs</include>
|
||||
<include>include/drivers</include>
|
||||
<include>include/subsys</include>
|
||||
<include>include/ndk</include>
|
||||
<include>w32api/include</include>
|
||||
<include>w32api/include/crt</include>
|
||||
<include>w32api/include/ddk</include>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ndk/i386/segment.h>
|
||||
#include <ndk/asm.h>
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/sysguid.h
|
||||
* PURPOSE: GUIDs not defined in DDK/IFS
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 06/10/04
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS UserMode PnP
|
||||
* FILE: ntoskrnl/rtl/libsupp.c
|
||||
* PURPOSE: GUIDs shared between umpnpmgr and the Kernel PnP Manager
|
||||
* PROGRAMMERS: Eric Kohl
|
||||
*/
|
||||
|
||||
#ifndef _SYSGUID_H
|
||||
|
@ -14,16 +13,10 @@ DEFINE_GUID(GUID_DEVICE_STANDBY_VETOED,
|
|||
0x03B21C13, 0x18D6, 0x11D3, 0x97, 0xDB, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
|
||||
DEFINE_GUID(GUID_DEVICE_KERNEL_INITIATED_EJECT,
|
||||
0x14689B54, 0x0703, 0x11D3, 0x97, 0xD2, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
|
||||
DEFINE_GUID(GUID_DEVICE_THERMAL_ZONE,
|
||||
0x4AFA3D51, 0x74A7, 0x11D0, 0xBE, 0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
|
||||
DEFINE_GUID(GUID_DEVICE_SYS_BUTTON,
|
||||
0x4AFA3D53, 0x74A7, 0x11D0, 0xBE, 0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
|
||||
DEFINE_GUID(GUID_DEVICE_REMOVAL_VETOED,
|
||||
0x60DBD5FA, 0xDDD2, 0x11D2, 0x97, 0xB8, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
|
||||
DEFINE_GUID(GUID_DEVICE_HIBERNATE_VETOED,
|
||||
0x61173AD9, 0x194F, 0x11D3, 0x97, 0xDC, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
|
||||
DEFINE_GUID(GUID_DEVICE_BATTERY,
|
||||
0x72631E54, 0x78A4, 0x11D0, 0xBC, 0xF7, 0x00, 0xAA, 0x00, 0xB7, 0xB3, 0x2A);
|
||||
DEFINE_GUID(GUID_DEVICE_SAFE_REMOVAL,
|
||||
0x8FBEF967, 0xD6C5, 0x11D2, 0x97, 0xB5, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
|
||||
|
|
@ -1,15 +1,27 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/arch/ketypes.h
|
||||
* PURPOSE: Architecture-specific definitions for Kernel Types
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 06/10/04
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
ketypes.h (ARCH)
|
||||
|
||||
Abstract:
|
||||
|
||||
Portability file to choose the correct Architecture-specific file.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _ARCH_KETYPES_H
|
||||
#define _ARCH_KETYPES_H
|
||||
|
||||
/* Shared structures needed by Arch-specific headers */
|
||||
//
|
||||
// FIXME: Find a solution to take these out of here!
|
||||
//
|
||||
typedef struct _KDPC_DATA
|
||||
{
|
||||
LIST_ENTRY DpcListHead;
|
||||
|
@ -24,8 +36,11 @@ typedef struct _PP_LOOKASIDE_LIST
|
|||
struct _GENERAL_LOOKASIDE *L;
|
||||
} PP_LOOKASIDE_LIST, *PPP_LOOKASIDE_LIST;
|
||||
|
||||
//
|
||||
// Include the right file for this architecture.
|
||||
//
|
||||
#ifdef _M_IX86
|
||||
#include <ndk/i386/ketypes.h>
|
||||
#include <i386/ketypes.h>
|
||||
#else
|
||||
#error "Unknown processor"
|
||||
#endif
|
||||
|
|
|
@ -1,16 +1,29 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/arch/mmtypes.h
|
||||
* PURPOSE: Architecture-specific definitions for Memory Manager Types
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 06/10/04
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
mmtypes.h (ARCH)
|
||||
|
||||
Abstract:
|
||||
|
||||
Portability file to choose the correct Architecture-specific file.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _ARCH_MMTYPES_H
|
||||
#define _ARCH_MMTYPES_H
|
||||
|
||||
//
|
||||
// Include the right file for this architecture.
|
||||
//
|
||||
#ifdef _M_IX86
|
||||
#include "./../i386/mmtypes.h"
|
||||
#include <i386/mmtypes.h>
|
||||
#else
|
||||
#error "Unknown processor"
|
||||
#endif
|
||||
|
|
|
@ -1,217 +1,259 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/asm.h
|
||||
* PURPOSE: Defintions for Structures used in Assembly Code
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 07/19/05
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
asm.h
|
||||
|
||||
Abstract:
|
||||
|
||||
ASM Offsets for dealing with de-referencing structures in registers.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _ASM_H
|
||||
#define _ASM_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// FIXME: Use real names.
|
||||
//
|
||||
#define KERNEL_CS (0x8)
|
||||
#define KERNEL_DS (0x10)
|
||||
#define USER_CS (0x18 + 0x3)
|
||||
#define USER_DS (0x20 + 0x3)
|
||||
#define TSS_SELECTOR (0x28)
|
||||
#define PCR_SELECTOR (0x30)
|
||||
#define TEB_SELECTOR (0x38 + 0x3)
|
||||
#define LDT_SELECTOR (0x48)
|
||||
#define TRAP_TSS_SELECTOR (0x50)
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
//
|
||||
// KV86M_REGISTERS Offsets
|
||||
//
|
||||
#define KV86M_REGISTERS_EBP 0x0
|
||||
#define KV86M_REGISTERS_EDI 0x4
|
||||
#define KV86M_REGISTERS_ESI 0x8
|
||||
#define KV86M_REGISTERS_EDX 0xC
|
||||
#define KV86M_REGISTERS_ECX 0x10
|
||||
#define KV86M_REGISTERS_EBX 0x14
|
||||
#define KV86M_REGISTERS_EAX 0x18
|
||||
#define KV86M_REGISTERS_DS 0x1C
|
||||
#define KV86M_REGISTERS_ES 0x20
|
||||
#define KV86M_REGISTERS_FS 0x24
|
||||
#define KV86M_REGISTERS_GS 0x28
|
||||
#define KV86M_REGISTERS_EIP 0x2C
|
||||
#define KV86M_REGISTERS_CS 0x30
|
||||
#define KV86M_REGISTERS_EFLAGS 0x34
|
||||
#define KV86M_REGISTERS_ESP 0x38
|
||||
#define KV86M_REGISTERS_SS 0x3C
|
||||
#define TF_SAVED_EXCEPTION_STACK 0x8C
|
||||
#define TF_REGS 0x90
|
||||
#define TF_ORIG_EBP 0x94
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
//
|
||||
// TSS Offsets
|
||||
//
|
||||
#define KTSS_ESP0 0x4
|
||||
#define KTSS_CR3 0x1C
|
||||
#define KTSS_EFLAGS 0x24
|
||||
#define KTSS_IOMAPBASE 0x66
|
||||
|
||||
/*
|
||||
* Definitions for the offsets of members in the KV86M_REGISTERS
|
||||
*/
|
||||
#define KV86M_REGISTERS_EBP 0x0
|
||||
#define KV86M_REGISTERS_EDI 0x4
|
||||
#define KV86M_REGISTERS_ESI 0x8
|
||||
#define KV86M_REGISTERS_EDX 0xC
|
||||
#define KV86M_REGISTERS_ECX 0x10
|
||||
#define KV86M_REGISTERS_EBX 0x14
|
||||
#define KV86M_REGISTERS_EAX 0x18
|
||||
#define KV86M_REGISTERS_DS 0x1C
|
||||
#define KV86M_REGISTERS_ES 0x20
|
||||
#define KV86M_REGISTERS_FS 0x24
|
||||
#define KV86M_REGISTERS_GS 0x28
|
||||
#define KV86M_REGISTERS_EIP 0x2C
|
||||
#define KV86M_REGISTERS_CS 0x30
|
||||
#define KV86M_REGISTERS_EFLAGS 0x34
|
||||
#define KV86M_REGISTERS_ESP 0x38
|
||||
#define KV86M_REGISTERS_SS 0x3C
|
||||
//
|
||||
// KTHREAD Offsets
|
||||
//
|
||||
#define KTHREAD_DEBUG_ACTIVE 0x03
|
||||
#define KTHREAD_INITIAL_STACK 0x18
|
||||
#define KTHREAD_STACK_LIMIT 0x1C
|
||||
#define KTHREAD_TEB 0x74
|
||||
#define KTHREAD_KERNEL_STACK 0x20
|
||||
#define KTHREAD_NPX_STATE 0x4D
|
||||
#define KTHREAD_STATE 0x4C
|
||||
#define KTHREAD_ALERTED 0x5E
|
||||
#define KTHREAD_APCSTATE_PROCESS 0x28 + 0x10
|
||||
#define KTHREAD_PENDING_USER_APC 0x28 + 0x16
|
||||
#define KTHREAD_PENDING_KERNEL_APC 0x28 + 0x15
|
||||
#define KTHREAD_CONTEXT_SWITCHES 0x48
|
||||
#define KTHREAD_WAIT_IRQL 0x4E
|
||||
#define KTHREAD_SERVICE_TABLE 0x118
|
||||
#define KTHREAD_PREVIOUS_MODE 0xD7
|
||||
#define KTHREAD_TRAP_FRAME 0x110
|
||||
#define KTHREAD_CALLBACK_STACK 0x114
|
||||
|
||||
#define TF_SAVED_EXCEPTION_STACK 0x8C
|
||||
#define TF_REGS 0x90
|
||||
#define TF_ORIG_EBP 0x94
|
||||
//
|
||||
// KPROCESS Offsets
|
||||
//
|
||||
#define KPROCESS_DIRECTORY_TABLE_BASE 0x18
|
||||
#define KPROCESS_LDT_DESCRIPTOR0 0x20
|
||||
#define KPROCESS_LDT_DESCRIPTOR1 0x24
|
||||
#define KPROCESS_IOPM_OFFSET 0x30
|
||||
|
||||
/* TSS Offsets */
|
||||
#define KTSS_ESP0 0x4
|
||||
#define KTSS_CR3 0x1C
|
||||
#define KTSS_EFLAGS 0x24
|
||||
#define KTSS_IOMAPBASE 0x66
|
||||
//
|
||||
// KPCR Offsets
|
||||
//
|
||||
#define KPCR_EXCEPTION_LIST 0x0
|
||||
#define KPCR_INITIAL_STACK 0x4
|
||||
#define KPCR_STACK_LIMIT 0x8
|
||||
#define KPCR_TEB 0x18
|
||||
#define KPCR_SELF 0x1C
|
||||
#define KPCR_GDT 0x3C
|
||||
#define KPCR_TSS 0x40
|
||||
#define KPCR_CURRENT_THREAD 0x124
|
||||
#define KPCR_NPX_THREAD 0x2F4
|
||||
|
||||
/*
|
||||
* Defines for accessing KPCR and KTHREAD structure members
|
||||
*/
|
||||
#define KTHREAD_DEBUG_ACTIVE 0x03
|
||||
#define KTHREAD_INITIAL_STACK 0x18
|
||||
#define KTHREAD_STACK_LIMIT 0x1C
|
||||
#define KTHREAD_TEB 0x74
|
||||
#define KTHREAD_KERNEL_STACK 0x20
|
||||
#define KTHREAD_NPX_STATE 0x4D
|
||||
#define KTHREAD_STATE 0x4C
|
||||
#define KTHREAD_ALERTED 0x5E
|
||||
#define KTHREAD_APCSTATE_PROCESS 0x28 + 0x10
|
||||
#define KTHREAD_PENDING_USER_APC 0x28 + 0x16
|
||||
#define KTHREAD_PENDING_KERNEL_APC 0x28 + 0x15
|
||||
#define KTHREAD_CONTEXT_SWITCHES 0x48
|
||||
#define KTHREAD_WAIT_IRQL 0x4E
|
||||
#define KTHREAD_SERVICE_TABLE 0x118
|
||||
#define KTHREAD_PREVIOUS_MODE 0xD7
|
||||
#define KTHREAD_TRAP_FRAME 0x110
|
||||
#define KTHREAD_CALLBACK_STACK 0x114
|
||||
//
|
||||
// FPU Save Area Offsets
|
||||
//
|
||||
#define FN_CONTROL_WORD 0x0
|
||||
#define FN_STATUS_WORD 0x4
|
||||
#define FN_TAG_WORD 0x8
|
||||
#define FN_DATA_SELECTOR 0x18
|
||||
#define FN_CR0_NPX_STATE 0x20C
|
||||
#define SIZEOF_FX_SAVE_AREA 528
|
||||
|
||||
#define KPROCESS_DIRECTORY_TABLE_BASE 0x18
|
||||
#define KPROCESS_LDT_DESCRIPTOR0 0x20
|
||||
#define KPROCESS_LDT_DESCRIPTOR1 0x24
|
||||
#define KPROCESS_IOPM_OFFSET 0x30
|
||||
//
|
||||
// Trap Frame Offsets
|
||||
//
|
||||
#define KTRAP_FRAME_DEBUGEBP 0x0
|
||||
#define KTRAP_FRAME_DEBUGEIP 0x4
|
||||
#define KTRAP_FRAME_DEBUGARGMARK 0x8
|
||||
#define KTRAP_FRAME_DEBUGPOINTER 0xC
|
||||
#define KTRAP_FRAME_TEMPCS 0x10
|
||||
#define KTRAP_FRAME_TEMPESP 0x14
|
||||
#define KTRAP_FRAME_DR0 0x18
|
||||
#define KTRAP_FRAME_DR1 0x1C
|
||||
#define KTRAP_FRAME_DR2 0x20
|
||||
#define KTRAP_FRAME_DR3 0x24
|
||||
#define KTRAP_FRAME_DR6 0x28
|
||||
#define KTRAP_FRAME_DR7 0x2C
|
||||
#define KTRAP_FRAME_GS 0x30
|
||||
#define KTRAP_FRAME_RESERVED1 0x32
|
||||
#define KTRAP_FRAME_ES 0x34
|
||||
#define KTRAP_FRAME_RESERVED2 0x36
|
||||
#define KTRAP_FRAME_DS 0x38
|
||||
#define KTRAP_FRAME_RESERVED3 0x3A
|
||||
#define KTRAP_FRAME_EDX 0x3C
|
||||
#define KTRAP_FRAME_ECX 0x40
|
||||
#define KTRAP_FRAME_EAX 0x44
|
||||
#define KTRAP_FRAME_PREVIOUS_MODE 0x48
|
||||
#define KTRAP_FRAME_EXCEPTION_LIST 0x4C
|
||||
#define KTRAP_FRAME_FS 0x50
|
||||
#define KTRAP_FRAME_RESERVED4 0x52
|
||||
#define KTRAP_FRAME_EDI 0x54
|
||||
#define KTRAP_FRAME_ESI 0x58
|
||||
#define KTRAP_FRAME_EBX 0x5C
|
||||
#define KTRAP_FRAME_EBP 0x60
|
||||
#define KTRAP_FRAME_ERROR_CODE 0x64
|
||||
#define KTRAP_FRAME_EIP 0x68
|
||||
#define KTRAP_FRAME_CS 0x6C
|
||||
#define KTRAP_FRAME_EFLAGS 0x70
|
||||
#define KTRAP_FRAME_ESP 0x74
|
||||
#define KTRAP_FRAME_SS 0x78
|
||||
#define KTRAP_FRAME_RESERVED5 0x7A
|
||||
#define KTRAP_FRAME_V86_ES 0x7C
|
||||
#define KTRAP_FRAME_RESERVED6 0x7E
|
||||
#define KTRAP_FRAME_V86_DS 0x80
|
||||
#define KTRAP_FRAME_RESERVED7 0x82
|
||||
#define KTRAP_FRAME_V86_FS 0x84
|
||||
#define KTRAP_FRAME_RESERVED8 0x86
|
||||
#define KTRAP_FRAME_V86_GS 0x88
|
||||
#define KTRAP_FRAME_RESERVED9 0x8A
|
||||
#define KTRAP_FRAME_SIZE 0x8C
|
||||
|
||||
#define KPCR_EXCEPTION_LIST 0x0
|
||||
#define KPCR_INITIAL_STACK 0x4
|
||||
#define KPCR_STACK_LIMIT 0x8
|
||||
#define KPCR_TEB 0x18
|
||||
#define KPCR_SELF 0x1C
|
||||
#define KPCR_GDT 0x3C
|
||||
#define KPCR_TSS 0x40
|
||||
#define KPCR_CURRENT_THREAD 0x124
|
||||
#define KPCR_NPX_THREAD 0x2F4
|
||||
//
|
||||
// KUSER_SHARED_DATA Offsets
|
||||
//
|
||||
#define KERNEL_USER_SHARED_DATA 0x7FFE0000
|
||||
#define KUSER_SHARED_PROCESSOR_FEATURES KERNEL_USER_SHARED_DATA + 0x274
|
||||
#define KUSER_SHARED_SYSCALL KERNEL_USER_SHARED_DATA + 0x300
|
||||
#define KUSER_SHARED_SYSCALL_RET KERNEL_USER_SHARED_DATA + 0x304
|
||||
#define PROCESSOR_FEATURE_FXSR KUSER_SHARED_PROCESSOR_FEATURES + 0x4
|
||||
|
||||
/* FPU Save Area Offsets */
|
||||
#define FN_CONTROL_WORD 0x0
|
||||
#define FN_STATUS_WORD 0x4
|
||||
#define FN_TAG_WORD 0x8
|
||||
#define FN_DATA_SELECTOR 0x18
|
||||
#define FN_CR0_NPX_STATE 0x20C
|
||||
#define SIZEOF_FX_SAVE_AREA 528
|
||||
|
||||
/* Trap Frame Offsets */
|
||||
#define KTRAP_FRAME_DEBUGEBP 0x0
|
||||
#define KTRAP_FRAME_DEBUGEIP 0x4
|
||||
#define KTRAP_FRAME_DEBUGARGMARK 0x8
|
||||
#define KTRAP_FRAME_DEBUGPOINTER 0xC
|
||||
#define KTRAP_FRAME_TEMPCS 0x10
|
||||
#define KTRAP_FRAME_TEMPESP 0x14
|
||||
#define KTRAP_FRAME_DR0 0x18
|
||||
#define KTRAP_FRAME_DR1 0x1C
|
||||
#define KTRAP_FRAME_DR2 0x20
|
||||
#define KTRAP_FRAME_DR3 0x24
|
||||
#define KTRAP_FRAME_DR6 0x28
|
||||
#define KTRAP_FRAME_DR7 0x2C
|
||||
#define KTRAP_FRAME_GS 0x30
|
||||
#define KTRAP_FRAME_RESERVED1 0x32
|
||||
#define KTRAP_FRAME_ES 0x34
|
||||
#define KTRAP_FRAME_RESERVED2 0x36
|
||||
#define KTRAP_FRAME_DS 0x38
|
||||
#define KTRAP_FRAME_RESERVED3 0x3A
|
||||
#define KTRAP_FRAME_EDX 0x3C
|
||||
#define KTRAP_FRAME_ECX 0x40
|
||||
#define KTRAP_FRAME_EAX 0x44
|
||||
#define KTRAP_FRAME_PREVIOUS_MODE 0x48
|
||||
#define KTRAP_FRAME_EXCEPTION_LIST 0x4C
|
||||
#define KTRAP_FRAME_FS 0x50
|
||||
#define KTRAP_FRAME_RESERVED4 0x52
|
||||
#define KTRAP_FRAME_EDI 0x54
|
||||
#define KTRAP_FRAME_ESI 0x58
|
||||
#define KTRAP_FRAME_EBX 0x5C
|
||||
#define KTRAP_FRAME_EBP 0x60
|
||||
#define KTRAP_FRAME_ERROR_CODE 0x64
|
||||
#define KTRAP_FRAME_EIP 0x68
|
||||
#define KTRAP_FRAME_CS 0x6C
|
||||
#define KTRAP_FRAME_EFLAGS 0x70
|
||||
#define KTRAP_FRAME_ESP 0x74
|
||||
#define KTRAP_FRAME_SS 0x78
|
||||
#define KTRAP_FRAME_RESERVED5 0x7A
|
||||
#define KTRAP_FRAME_V86_ES 0x7C
|
||||
#define KTRAP_FRAME_RESERVED6 0x7E
|
||||
#define KTRAP_FRAME_V86_DS 0x80
|
||||
#define KTRAP_FRAME_RESERVED7 0x82
|
||||
#define KTRAP_FRAME_V86_FS 0x84
|
||||
#define KTRAP_FRAME_RESERVED8 0x86
|
||||
#define KTRAP_FRAME_V86_GS 0x88
|
||||
#define KTRAP_FRAME_RESERVED9 0x8A
|
||||
#define KTRAP_FRAME_SIZE 0x8C
|
||||
//
|
||||
// CONTEXT Offsets
|
||||
//
|
||||
#define CONTEXT_FLAGS 0x0
|
||||
#define CONTEXT_DR6 0x14
|
||||
#define CONTEXT_FLOAT_SAVE 0x1C
|
||||
#define CONTEXT_SEGGS 0x8C
|
||||
#define CONTEXT_SEGFS 0x90
|
||||
#define CONTEXT_SEGES 0x94
|
||||
#define CONTEXT_SEGDS 0x98
|
||||
#define CONTEXT_EDI 0x9C
|
||||
#define CONTEXT_ESI 0xA0
|
||||
#define CONTEXT_EBX 0xA4
|
||||
#define CONTEXT_EDX 0xA8
|
||||
#define CONTEXT_ECX 0xAC
|
||||
#define CONTEXT_EAX 0xB0
|
||||
#define CONTEXT_EBP 0xB4
|
||||
#define CONTEXT_EIP 0xB8
|
||||
#define CONTEXT_SEGCS 0xBC
|
||||
#define CONTEXT_EFLAGS 0xC0
|
||||
#define CONTEXT_ESP 0xC4
|
||||
#define CONTEXT_SEGSS 0xC8
|
||||
#define CONTEXT_FLOAT_SAVE_CONTROL_WORD CONTEXT_FLOAT_SAVE + FN_CONTROL_WORD
|
||||
#define CONTEXT_FLOAT_SAVE_STATUS_WORD CONTEXT_FLOAT_SAVE + FN_STATUS_WORD
|
||||
#define CONTEXT_FLOAT_SAVE_TAG_WORD CONTEXT_FLOAT_SAVE + FN_TAG_WORD
|
||||
|
||||
/* User Shared Data */
|
||||
#define KERNEL_USER_SHARED_DATA 0x7FFE0000
|
||||
#define KUSER_SHARED_PROCESSOR_FEATURES KERNEL_USER_SHARED_DATA + 0x274
|
||||
#define KUSER_SHARED_SYSCALL KERNEL_USER_SHARED_DATA + 0x300
|
||||
#define KUSER_SHARED_SYSCALL_RET KERNEL_USER_SHARED_DATA + 0x304
|
||||
#define PROCESSOR_FEATURE_FXSR KUSER_SHARED_PROCESSOR_FEATURES + 0x4
|
||||
//
|
||||
// EXCEPTION_RECORD Offsets
|
||||
//
|
||||
#define EXCEPTION_RECORD_EXCEPTION_CODE 0x0
|
||||
#define EXCEPTION_RECORD_EXCEPTION_FLAGS 0x4
|
||||
#define EXCEPTION_RECORD_EXCEPTION_RECORD 0x8
|
||||
#define EXCEPTION_RECORD_EXCEPTION_ADDRESS 0xC
|
||||
#define EXCEPTION_RECORD_NUMBER_PARAMETERS 0x10
|
||||
#define SIZEOF_EXCEPTION_RECORD 0x14
|
||||
|
||||
/* CONTEXT CONSTANTS */
|
||||
#define CONTEXT_FLAGS 0x0
|
||||
#define CONTEXT_DR6 0x14
|
||||
#define CONTEXT_FLOAT_SAVE 0x1C
|
||||
#define CONTEXT_SEGGS 0x8C
|
||||
#define CONTEXT_SEGFS 0x90
|
||||
#define CONTEXT_SEGES 0x94
|
||||
#define CONTEXT_SEGDS 0x98
|
||||
#define CONTEXT_EDI 0x9C
|
||||
#define CONTEXT_ESI 0xA0
|
||||
#define CONTEXT_EBX 0xA4
|
||||
#define CONTEXT_EDX 0xA8
|
||||
#define CONTEXT_ECX 0xAC
|
||||
#define CONTEXT_EAX 0xB0
|
||||
#define CONTEXT_EBP 0xB4
|
||||
#define CONTEXT_EIP 0xB8
|
||||
#define CONTEXT_SEGCS 0xBC
|
||||
#define CONTEXT_EFLAGS 0xC0
|
||||
#define CONTEXT_ESP 0xC4
|
||||
#define CONTEXT_SEGSS 0xC8
|
||||
#define CONTEXT_FLOAT_SAVE_CONTROL_WORD CONTEXT_FLOAT_SAVE + FN_CONTROL_WORD
|
||||
#define CONTEXT_FLOAT_SAVE_STATUS_WORD CONTEXT_FLOAT_SAVE + FN_STATUS_WORD
|
||||
#define CONTEXT_FLOAT_SAVE_TAG_WORD CONTEXT_FLOAT_SAVE + FN_TAG_WORD
|
||||
//
|
||||
// TEB Offsets
|
||||
//
|
||||
#define TEB_EXCEPTION_LIST 0x0
|
||||
#define TEB_STACK_BASE 0x4
|
||||
#define TEB_STACK_LIMIT 0x8
|
||||
#define TEB_FIBER_DATA 0x10
|
||||
#define TEB_PEB 0x30
|
||||
#define TEB_EXCEPTION_CODE 0x1A4
|
||||
#define TEB_ACTIVATION_CONTEXT_STACK_POINTER 0x1A8
|
||||
#define TEB_DEALLOCATION_STACK 0xE0C
|
||||
#define TEB_GUARANTEED_STACK_BYTES 0xF78
|
||||
#define TEB_FLS_DATA 0xFB4
|
||||
|
||||
/* EXCEPTION_RECORD Constants */
|
||||
#define EXCEPTION_RECORD_EXCEPTION_CODE 0x0
|
||||
#define EXCEPTION_RECORD_EXCEPTION_FLAGS 0x4
|
||||
#define EXCEPTION_RECORD_EXCEPTION_RECORD 0x8
|
||||
#define EXCEPTION_RECORD_EXCEPTION_ADDRESS 0xC
|
||||
#define EXCEPTION_RECORD_NUMBER_PARAMETERS 0x10
|
||||
#define SIZEOF_EXCEPTION_RECORD 0x14
|
||||
//
|
||||
// PEB Offsets
|
||||
//
|
||||
#define PEB_KERNEL_CALLBACK_TABLE 0x2C
|
||||
|
||||
/* TEB CONSTANTS */
|
||||
#define TEB_EXCEPTION_LIST 0x0
|
||||
#define TEB_STACK_BASE 0x4
|
||||
#define TEB_STACK_LIMIT 0x8
|
||||
#define TEB_FIBER_DATA 0x10
|
||||
#define TEB_PEB 0x30
|
||||
#define TEB_EXCEPTION_CODE 0x1A4
|
||||
#define TEB_ACTIVATION_CONTEXT_STACK_POINTER 0x1A8
|
||||
#define TEB_DEALLOCATION_STACK 0xE0C
|
||||
#define TEB_GUARANTEED_STACK_BYTES 0xF78
|
||||
#define TEB_FLS_DATA 0xFB4
|
||||
|
||||
/* PEB CONSTANTS */
|
||||
#define PEB_KERNEL_CALLBACK_TABLE 0x2C
|
||||
|
||||
/* FIBER CONSTANTS */
|
||||
#define FIBER_PARAMETER 0x0
|
||||
#define FIBER_EXCEPTION_LIST 0x4
|
||||
#define FIBER_STACK_BASE 0x8
|
||||
#define FIBER_STACK_LIMIT 0xC
|
||||
#define FIBER_DEALLOCATION_STACK 0x10
|
||||
#define FIBER_CONTEXT 0x14
|
||||
#define FIBER_GUARANTEED_STACK_BYTES 0x2E0
|
||||
#define FIBER_FLS_DATA 0x2E4
|
||||
#define FIBER_ACTIVATION_CONTEXT_STACK 0x2E8
|
||||
#define FIBER_CONTEXT_FLAGS FIBER_CONTEXT + CONTEXT_FLAGS
|
||||
#define FIBER_CONTEXT_EAX FIBER_CONTEXT + CONTEXT_EAX
|
||||
#define FIBER_CONTEXT_EBX FIBER_CONTEXT + CONTEXT_EBX
|
||||
#define FIBER_CONTEXT_ECX FIBER_CONTEXT + CONTEXT_ECX
|
||||
#define FIBER_CONTEXT_EDX FIBER_CONTEXT + CONTEXT_EDX
|
||||
#define FIBER_CONTEXT_ESI FIBER_CONTEXT + CONTEXT_ESI
|
||||
#define FIBER_CONTEXT_EDI FIBER_CONTEXT + CONTEXT_EDI
|
||||
#define FIBER_CONTEXT_EBP FIBER_CONTEXT + CONTEXT_EBP
|
||||
#define FIBER_CONTEXT_ESP FIBER_CONTEXT + CONTEXT_ESP
|
||||
#define FIBER_CONTEXT_DR6 FIBER_CONTEXT + CONTEXT_DR6
|
||||
#define FIBER_CONTEXT_FLOAT_SAVE_STATUS_WORD FIBER_CONTEXT + CONTEXT_FLOAT_SAVE_STATUS_WORD
|
||||
//
|
||||
// FIBER Offsets
|
||||
//
|
||||
#define FIBER_PARAMETER 0x0
|
||||
#define FIBER_EXCEPTION_LIST 0x4
|
||||
#define FIBER_STACK_BASE 0x8
|
||||
#define FIBER_STACK_LIMIT 0xC
|
||||
#define FIBER_DEALLOCATION_STACK 0x10
|
||||
#define FIBER_CONTEXT 0x14
|
||||
#define FIBER_GUARANTEED_STACK_BYTES 0x2E0
|
||||
#define FIBER_FLS_DATA 0x2E4
|
||||
#define FIBER_ACTIVATION_CONTEXT_STACK 0x2E8
|
||||
#define FIBER_CONTEXT_FLAGS FIBER_CONTEXT + CONTEXT_FLAGS
|
||||
#define FIBER_CONTEXT_EAX FIBER_CONTEXT + CONTEXT_EAX
|
||||
#define FIBER_CONTEXT_EBX FIBER_CONTEXT + CONTEXT_EBX
|
||||
#define FIBER_CONTEXT_ECX FIBER_CONTEXT + CONTEXT_ECX
|
||||
#define FIBER_CONTEXT_EDX FIBER_CONTEXT + CONTEXT_EDX
|
||||
#define FIBER_CONTEXT_ESI FIBER_CONTEXT + CONTEXT_ESI
|
||||
#define FIBER_CONTEXT_EDI FIBER_CONTEXT + CONTEXT_EDI
|
||||
#define FIBER_CONTEXT_EBP FIBER_CONTEXT + CONTEXT_EBP
|
||||
#define FIBER_CONTEXT_ESP FIBER_CONTEXT + CONTEXT_ESP
|
||||
#define FIBER_CONTEXT_DR6 FIBER_CONTEXT + CONTEXT_DR6
|
||||
#define FIBER_CONTEXT_FLOAT_SAVE_STATUS_WORD FIBER_CONTEXT + CONTEXT_FLOAT_SAVE_STATUS_WORD
|
||||
#define FIBER_CONTEXT_FLOAT_SAVE_CONTROL_WORD FIBER_CONTEXT + CONTEXT_FLOAT_SAVE_CONTROL_WORD
|
||||
#define FIBER_CONTEXT_FLOAT_SAVE_TAG_WORD FIBER_CONTEXT + CONTEXT_FLOAT_SAVE_TAG_WORD
|
||||
#endif
|
||||
|
||||
#endif // !_ASM_H
|
||||
|
||||
|
|
|
@ -1,24 +1,33 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
cctypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Cache Controller.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _CCTYPES_H
|
||||
#define _CCTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
//
|
||||
// Kernel Exported CcData
|
||||
//
|
||||
extern ULONG NTSYSAPI CcFastReadNotPossible;
|
||||
extern ULONG NTSYSAPI CcFastReadWait;
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#endif
|
||||
#endif // _CCTYPES_H
|
||||
|
||||
|
|
|
@ -1,37 +1,124 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/cmtypes.h
|
||||
* PURPOSE: Definitions for Config Manager Types not defined in DDK/IFS
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 06/10/04
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
cmtypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Configuration Manager.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _CMTYPES_H
|
||||
#define _CMTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include <cfg.h>
|
||||
#include "iotypes.h"
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
#define MAX_BUS_NAME 24
|
||||
|
||||
/* PLUGPLAY_CONTROL_RELATED_DEVICE_DATA.Relation values */
|
||||
#define PNP_GET_PARENT_DEVICE 1
|
||||
#define PNP_GET_CHILD_DEVICE 2
|
||||
#define PNP_GET_SIBLING_DEVICE 3
|
||||
//
|
||||
// PLUGPLAY_CONTROL_RELATED_DEVICE_DATA.Relations
|
||||
//
|
||||
#define PNP_GET_PARENT_DEVICE 1
|
||||
#define PNP_GET_CHILD_DEVICE 2
|
||||
#define PNP_GET_SIBLING_DEVICE 3
|
||||
|
||||
/* PLUGPLAY_CONTROL_STATUS_DATA.Operation values */
|
||||
#define PNP_GET_DEVICE_STATUS 0
|
||||
#define PNP_SET_DEVICE_STATUS 1
|
||||
#define PNP_CLEAR_DEVICE_STATUS 2
|
||||
//
|
||||
// PLUGPLAY_CONTROL_STATUS_DATA Operations
|
||||
//
|
||||
#define PNP_GET_DEVICE_STATUS 0
|
||||
#define PNP_SET_DEVICE_STATUS 1
|
||||
#define PNP_CLEAR_DEVICE_STATUS 2
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// Resource Type
|
||||
//
|
||||
#define CmResourceTypeNull 0
|
||||
#define CmResourceTypePort 1
|
||||
#define CmResourceTypeInterrupt 2
|
||||
#define CmResourceTypeMemory 3
|
||||
#define CmResourceTypeDma 4
|
||||
#define CmResourceTypeDeviceSpecific 5
|
||||
#define CmResourceTypeBusNumber 6
|
||||
#define CmResourceTypeMaximum 7
|
||||
#define CmResourceTypeNonArbitrated 128
|
||||
#define CmResourceTypeConfigData 128
|
||||
#define CmResourceTypeDevicePrivate 129
|
||||
#define CmResourceTypePcCardConfig 130
|
||||
#define CmResourceTypeMfCardConfig 131
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Resource Descriptor Share Dispositions
|
||||
//
|
||||
typedef enum _CM_SHARE_DISPOSITION
|
||||
{
|
||||
CmResourceShareUndetermined,
|
||||
CmResourceShareDeviceExclusive,
|
||||
CmResourceShareDriverExclusive,
|
||||
CmResourceShareShared
|
||||
} CM_SHARE_DISPOSITION;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Port Resource Descriptor Flags
|
||||
//
|
||||
#define CM_RESOURCE_PORT_MEMORY 0x0000
|
||||
#define CM_RESOURCE_PORT_IO 0x0001
|
||||
#define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004
|
||||
#define CM_RESOURCE_PORT_12_BIT_DECODE 0x0008
|
||||
#define CM_RESOURCE_PORT_16_BIT_DECODE 0x0010
|
||||
#define CM_RESOURCE_PORT_POSITIVE_DECODE 0x0020
|
||||
#define CM_RESOURCE_PORT_PASSIVE_DECODE 0x0040
|
||||
#define CM_RESOURCE_PORT_WINDOW_DECODE 0x0080
|
||||
|
||||
//
|
||||
// Interrupt Resource Descriptor Flags
|
||||
//
|
||||
#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000
|
||||
#define CM_RESOURCE_INTERRUPT_LATCHED 0x0001
|
||||
|
||||
//
|
||||
// Memory Resource Descriptor Flags
|
||||
//
|
||||
#define CM_RESOURCE_MEMORY_READ_WRITE 0x0000
|
||||
#define CM_RESOURCE_MEMORY_READ_ONLY 0x0001
|
||||
#define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002
|
||||
#define CM_RESOURCE_MEMORY_PREFETCHABLE 0x0004
|
||||
#define CM_RESOURCE_MEMORY_COMBINEDWRITE 0x0008
|
||||
#define CM_RESOURCE_MEMORY_24 0x0010
|
||||
#define CM_RESOURCE_MEMORY_CACHEABLE 0x0020
|
||||
|
||||
//
|
||||
// DMA Resource Descriptor Flags
|
||||
//
|
||||
#define CM_RESOURCE_DMA_8 0x0000
|
||||
#define CM_RESOURCE_DMA_16 0x0001
|
||||
#define CM_RESOURCE_DMA_32 0x0002
|
||||
#define CM_RESOURCE_DMA_8_AND_16 0x0004
|
||||
#define CM_RESOURCE_DMA_BUS_MASTER 0x0008
|
||||
#define CM_RESOURCE_DMA_TYPE_A 0x0010
|
||||
#define CM_RESOURCE_DMA_TYPE_B 0x0020
|
||||
#define CM_RESOURCE_DMA_TYPE_F 0x0040
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Information Classes for NtQueryKey
|
||||
//
|
||||
typedef enum _KEY_INFORMATION_CLASS
|
||||
{
|
||||
KeyBasicInformation,
|
||||
|
@ -57,8 +144,12 @@ typedef enum _KEY_SET_INFORMATION_CLASS
|
|||
KeyUserFlagsInformation,
|
||||
MaxKeySetInfoClass
|
||||
} KEY_SET_INFORMATION_CLASS;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Plag and Play Classes
|
||||
//
|
||||
typedef enum _PLUGPLAY_CONTROL_CLASS
|
||||
{
|
||||
PlugPlayControlUserResponse = 0x07,
|
||||
|
@ -76,12 +167,18 @@ typedef enum _PLUGPLAY_BUS_CLASS
|
|||
MaxPlugPlayBusClass
|
||||
} PLUGPLAY_BUS_CLASS, *PPLUGPLAY_BUS_CLASS;
|
||||
|
||||
//
|
||||
// Plag and Play Bus Types
|
||||
//
|
||||
typedef enum _PLUGPLAY_VIRTUAL_BUS_TYPE
|
||||
{
|
||||
Root,
|
||||
MaxPlugPlayVirtualBusType
|
||||
} PLUGPLAY_VIRTUAL_BUS_TYPE, *PPLUGPLAY_VIRTUAL_BUS_TYPE;
|
||||
|
||||
//
|
||||
// Plag and Play Event Categories
|
||||
//
|
||||
typedef enum _PLUGPLAY_EVENT_CATEGORY
|
||||
{
|
||||
HardwareProfileChangeEvent,
|
||||
|
@ -95,9 +192,12 @@ typedef enum _PLUGPLAY_EVENT_CATEGORY
|
|||
BlockedDriverEvent,
|
||||
MaxPlugEventCategory
|
||||
} PLUGPLAY_EVENT_CATEGORY;
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Information Structures for NtQueryKeyInformation
|
||||
//
|
||||
typedef struct _KEY_WRITE_TIME_INFORMATION
|
||||
{
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
|
@ -177,6 +277,9 @@ typedef struct _KEY_BASIC_INFORMATION
|
|||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Plug and Play Event Block
|
||||
//
|
||||
typedef struct _PLUGPLAY_EVENT_BLOCK
|
||||
{
|
||||
GUID EventGuid;
|
||||
|
@ -226,7 +329,11 @@ typedef struct _PLUGPLAY_EVENT_BLOCK
|
|||
};
|
||||
} PLUGPLAY_EVENT_BLOCK, *PPLUGPLAY_EVENT_BLOCK;
|
||||
|
||||
/* Class 0x0A */
|
||||
//
|
||||
// Plug and Play Control Classes
|
||||
//
|
||||
|
||||
//Class 0x0A
|
||||
typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
|
@ -235,36 +342,39 @@ typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA
|
|||
ULONG BufferSize;
|
||||
} PLUGPLAY_CONTROL_PROPERTY_DATA, *PPLUGPLAY_CONTROL_PROPERTY_DATA;
|
||||
|
||||
/* Class 0x0C */
|
||||
// Class 0x0C
|
||||
typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
|
||||
{
|
||||
UNICODE_STRING TargetDeviceInstance;
|
||||
ULONG Relation; /* 1: Parent 2: Child 3: Sibling */
|
||||
ULONG Relation;
|
||||
UNICODE_STRING RelatedDeviceInstance;
|
||||
} PLUGPLAY_CONTROL_RELATED_DEVICE_DATA, *PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA;
|
||||
|
||||
/* Class 0x0E */
|
||||
// Class 0x0E
|
||||
typedef struct _PLUGPLAY_CONTOL_STATUS_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
ULONG Operation; /* 0: Get 1: Set 2: Clear */
|
||||
ULONG DeviceStatus; /* DN_ see cfg.h */
|
||||
ULONG DeviceProblem; /* CM_PROB_ see cfg.h */
|
||||
ULONG Operation;
|
||||
ULONG DeviceStatus;
|
||||
ULONG DeviceProblem;
|
||||
} PLUGPLAY_CONTROL_STATUS_DATA, *PPLUGPLAY_CONTROL_STATUS_DATA;
|
||||
|
||||
/* Class 0x0F */
|
||||
// Class 0x0F
|
||||
typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
ULONG Depth;
|
||||
} PLUGPLAY_CONTROL_DEPTH_DATA, *PPLUGPLAY_CONTROL_DEPTH_DATA;
|
||||
|
||||
/* Class 0x14 */
|
||||
// Class 0x14
|
||||
typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
} PLUGPLAY_CONTROL_RESET_DEVICE_DATA, *PPLUGPLAY_CONTROL_RESET_DEVICE_DATA;
|
||||
|
||||
//
|
||||
// Plug and Play Bus Type Definition
|
||||
//
|
||||
typedef struct _PLUGPLAY_BUS_TYPE
|
||||
{
|
||||
PLUGPLAY_BUS_CLASS BusClass;
|
||||
|
@ -275,6 +385,9 @@ typedef struct _PLUGPLAY_BUS_TYPE
|
|||
};
|
||||
} PLUGPLAY_BUS_TYPE, *PPLUGPLAY_BUS_TYPE;
|
||||
|
||||
//
|
||||
// Plug and Play Bus Instance Definition
|
||||
//
|
||||
typedef struct _PLUGPLAY_BUS_INSTANCE
|
||||
{
|
||||
PLUGPLAY_BUS_TYPE BusType;
|
||||
|
@ -284,149 +397,110 @@ typedef struct _PLUGPLAY_BUS_INSTANCE
|
|||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Partial Resource Descriptor and List for Hardware
|
||||
//
|
||||
#include <pshpack1.h>
|
||||
typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
|
||||
UCHAR Type;
|
||||
UCHAR ShareDisposition;
|
||||
USHORT Flags;
|
||||
union {
|
||||
struct {
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length;
|
||||
} Generic;
|
||||
struct {
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length;
|
||||
} Port;
|
||||
struct {
|
||||
ULONG Level;
|
||||
ULONG Vector;
|
||||
ULONG Affinity;
|
||||
} Interrupt;
|
||||
struct {
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length;
|
||||
} Memory;
|
||||
struct {
|
||||
ULONG Channel;
|
||||
ULONG Port;
|
||||
ULONG Reserved1;
|
||||
} Dma;
|
||||
struct {
|
||||
ULONG Data[3];
|
||||
} DevicePrivate;
|
||||
struct {
|
||||
ULONG Start;
|
||||
ULONG Length;
|
||||
ULONG Reserved;
|
||||
} BusNumber;
|
||||
struct {
|
||||
ULONG DataSize;
|
||||
ULONG Reserved1;
|
||||
ULONG Reserved2;
|
||||
} DeviceSpecificData;
|
||||
} u;
|
||||
typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR
|
||||
{
|
||||
UCHAR Type;
|
||||
UCHAR ShareDisposition;
|
||||
USHORT Flags;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length;
|
||||
} Generic;
|
||||
struct
|
||||
{
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length;
|
||||
} Port;
|
||||
struct
|
||||
{
|
||||
ULONG Level;
|
||||
ULONG Vector;
|
||||
ULONG Affinity;
|
||||
} Interrupt;
|
||||
struct
|
||||
{
|
||||
PHYSICAL_ADDRESS Start;
|
||||
ULONG Length;
|
||||
} Memory;
|
||||
struct
|
||||
{
|
||||
ULONG Channel;
|
||||
ULONG Port;
|
||||
ULONG Reserved1;
|
||||
} Dma;
|
||||
struct
|
||||
{
|
||||
ULONG Data[3];
|
||||
} DevicePrivate;
|
||||
struct
|
||||
{
|
||||
ULONG Start;
|
||||
ULONG Length;
|
||||
ULONG Reserved;
|
||||
} BusNumber;
|
||||
struct
|
||||
{
|
||||
ULONG DataSize;
|
||||
ULONG Reserved1;
|
||||
ULONG Reserved2;
|
||||
} DeviceSpecificData;
|
||||
} u;
|
||||
} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
|
||||
|
||||
/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Type */
|
||||
|
||||
#define CmResourceTypeNull 0
|
||||
#define CmResourceTypePort 1
|
||||
#define CmResourceTypeInterrupt 2
|
||||
#define CmResourceTypeMemory 3
|
||||
#define CmResourceTypeDma 4
|
||||
#define CmResourceTypeDeviceSpecific 5
|
||||
#define CmResourceTypeBusNumber 6
|
||||
#define CmResourceTypeMaximum 7
|
||||
#define CmResourceTypeNonArbitrated 128
|
||||
#define CmResourceTypeConfigData 128
|
||||
#define CmResourceTypeDevicePrivate 129
|
||||
#define CmResourceTypePcCardConfig 130
|
||||
#define CmResourceTypeMfCardConfig 131
|
||||
|
||||
/* CM_PARTIAL_RESOURCE_DESCRIPTOR.ShareDisposition */
|
||||
|
||||
typedef enum _CM_SHARE_DISPOSITION {
|
||||
CmResourceShareUndetermined,
|
||||
CmResourceShareDeviceExclusive,
|
||||
CmResourceShareDriverExclusive,
|
||||
CmResourceShareShared
|
||||
} CM_SHARE_DISPOSITION;
|
||||
|
||||
/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypePort */
|
||||
|
||||
#define CM_RESOURCE_PORT_MEMORY 0x0000
|
||||
#define CM_RESOURCE_PORT_IO 0x0001
|
||||
#define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004
|
||||
#define CM_RESOURCE_PORT_12_BIT_DECODE 0x0008
|
||||
#define CM_RESOURCE_PORT_16_BIT_DECODE 0x0010
|
||||
#define CM_RESOURCE_PORT_POSITIVE_DECODE 0x0020
|
||||
#define CM_RESOURCE_PORT_PASSIVE_DECODE 0x0040
|
||||
#define CM_RESOURCE_PORT_WINDOW_DECODE 0x0080
|
||||
|
||||
/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypeInterrupt */
|
||||
|
||||
#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000
|
||||
#define CM_RESOURCE_INTERRUPT_LATCHED 0x0001
|
||||
|
||||
/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypeMemory */
|
||||
|
||||
#define CM_RESOURCE_MEMORY_READ_WRITE 0x0000
|
||||
#define CM_RESOURCE_MEMORY_READ_ONLY 0x0001
|
||||
#define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002
|
||||
#define CM_RESOURCE_MEMORY_PREFETCHABLE 0x0004
|
||||
#define CM_RESOURCE_MEMORY_COMBINEDWRITE 0x0008
|
||||
#define CM_RESOURCE_MEMORY_24 0x0010
|
||||
#define CM_RESOURCE_MEMORY_CACHEABLE 0x0020
|
||||
|
||||
/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypeDma */
|
||||
|
||||
#define CM_RESOURCE_DMA_8 0x0000
|
||||
#define CM_RESOURCE_DMA_16 0x0001
|
||||
#define CM_RESOURCE_DMA_32 0x0002
|
||||
#define CM_RESOURCE_DMA_8_AND_16 0x0004
|
||||
#define CM_RESOURCE_DMA_BUS_MASTER 0x0008
|
||||
#define CM_RESOURCE_DMA_TYPE_A 0x0010
|
||||
#define CM_RESOURCE_DMA_TYPE_B 0x0020
|
||||
#define CM_RESOURCE_DMA_TYPE_F 0x0040
|
||||
|
||||
typedef struct _CM_PARTIAL_RESOURCE_LIST {
|
||||
USHORT Version;
|
||||
USHORT Revision;
|
||||
ULONG Count;
|
||||
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
|
||||
typedef struct _CM_PARTIAL_RESOURCE_LIST
|
||||
{
|
||||
USHORT Version;
|
||||
USHORT Revision;
|
||||
ULONG Count;
|
||||
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
|
||||
} CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
|
||||
|
||||
typedef struct _CM_FULL_RESOURCE_DESCRIPTOR {
|
||||
INTERFACE_TYPE InterfaceType;
|
||||
ULONG BusNumber;
|
||||
CM_PARTIAL_RESOURCE_LIST PartialResourceList;
|
||||
//
|
||||
// Full Resource Descriptor and List for Hardware
|
||||
//
|
||||
typedef struct _CM_FULL_RESOURCE_DESCRIPTOR
|
||||
{
|
||||
INTERFACE_TYPE InterfaceType;
|
||||
ULONG BusNumber;
|
||||
CM_PARTIAL_RESOURCE_LIST PartialResourceList;
|
||||
} CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
|
||||
|
||||
typedef struct _CM_RESOURCE_LIST {
|
||||
ULONG Count;
|
||||
CM_FULL_RESOURCE_DESCRIPTOR List[1];
|
||||
typedef struct _CM_RESOURCE_LIST
|
||||
{
|
||||
ULONG Count;
|
||||
CM_FULL_RESOURCE_DESCRIPTOR List[1];
|
||||
} CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
|
||||
|
||||
typedef struct _CM_INT13_DRIVE_PARAMETER {
|
||||
USHORT DriveSelect;
|
||||
ULONG MaxCylinders;
|
||||
USHORT SectorsPerTrack;
|
||||
USHORT MaxHeads;
|
||||
USHORT NumberDrives;
|
||||
//
|
||||
// Disk/INT13 Structures
|
||||
//
|
||||
typedef struct _CM_INT13_DRIVE_PARAMETER
|
||||
{
|
||||
USHORT DriveSelect;
|
||||
ULONG MaxCylinders;
|
||||
USHORT SectorsPerTrack;
|
||||
USHORT MaxHeads;
|
||||
USHORT NumberDrives;
|
||||
} CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER;
|
||||
|
||||
typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA
|
||||
{
|
||||
ULONG BytesPerSector;
|
||||
ULONG NumberOfCylinders;
|
||||
ULONG SectorsPerTrack;
|
||||
ULONG NumberOfHeads;
|
||||
ULONG BytesPerSector;
|
||||
ULONG NumberOfCylinders;
|
||||
ULONG SectorsPerTrack;
|
||||
ULONG NumberOfHeads;
|
||||
} CM_DISK_GEOMETRY_DEVICE_DATA, *PCM_DISK_GEOMETRY_DEVICE_DATA;
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
#endif
|
||||
#endif // _!NTOS_MODE_USER
|
||||
|
||||
#endif
|
||||
#endif // _CMTYPES_H
|
||||
|
||||
|
|
|
@ -1,41 +1,57 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/dbgktypes.h
|
||||
* PURPOSE: Definitions for User-Mode Kernel Debugging not in DDK/IFS
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 25/06/05
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
dbgktypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Debug Subsystem.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DBGKTYPES_H
|
||||
#define _DBGKTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
#define DEBUG_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x0F)
|
||||
#define DEBUG_OBJECT_WAIT_STATE_CHANGE 0x0001
|
||||
#define DEBUG_OBJECT_ADD_REMOVE_PROCESS 0x0002
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// Debug Object Access Masks
|
||||
//
|
||||
#define DEBUG_OBJECT_WAIT_STATE_CHANGE 0x0001
|
||||
#define DEBUG_OBJECT_ADD_REMOVE_PROCESS 0x0002
|
||||
#define DEBUG_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x0F)
|
||||
|
||||
//
|
||||
// Debug Object Information Classes for NtQueryDebugObject
|
||||
//
|
||||
typedef enum _DEBUGOBJECTINFOCLASS
|
||||
{
|
||||
DebugObjectUnusedInformation,
|
||||
DebugObjectKillProcessOnExitInformation
|
||||
} DEBUGOBJECTINFOCLASS, *PDEBUGOBJECTINFOCLASS;
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
//
|
||||
// Debug Object Information Structures
|
||||
//
|
||||
typedef struct _DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION
|
||||
{
|
||||
ULONG KillProcessOnExit;
|
||||
} DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION, *
|
||||
PDEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION;
|
||||
} DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION, *PDEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Debug Object
|
||||
//
|
||||
typedef struct _DBGK_DEBUG_OBJECT
|
||||
{
|
||||
KEVENT Event;
|
||||
|
@ -51,8 +67,12 @@ typedef struct _DBGK_DEBUG_OBJECT
|
|||
};
|
||||
};
|
||||
} DBGK_DEBUG_OBJECT, *PDBGK_DEBUG_OBJECT;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Debug States
|
||||
//
|
||||
typedef enum _DBG_STATE
|
||||
{
|
||||
DbgIdle,
|
||||
|
@ -68,6 +88,9 @@ typedef enum _DBG_STATE
|
|||
DbgUnloadDllStateChange
|
||||
} DBG_STATE, *PDBG_STATE;
|
||||
|
||||
//
|
||||
// Debug Message Structures
|
||||
//
|
||||
typedef struct _DBGKM_EXCEPTION
|
||||
{
|
||||
EXCEPTION_RECORD ExceptionRecord;
|
||||
|
@ -113,6 +136,9 @@ typedef struct _DBGKM_UNLOAD_DLL
|
|||
PVOID BaseAddress;
|
||||
} DBGKM_UNLOAD_DLL, *PDBGKM_UNLOAD_DLL;
|
||||
|
||||
//
|
||||
// User-Mode Debug State Change Structure
|
||||
//
|
||||
typedef struct _DBGUI_WAIT_STATE_CHANGE
|
||||
{
|
||||
DBG_STATE NewState;
|
||||
|
@ -138,6 +164,9 @@ typedef struct _DBGUI_WAIT_STATE_CHANGE
|
|||
} StateInfo;
|
||||
} DBGUI_WAIT_STATE_CHANGE, *PDBGUI_WAIT_STATE_CHANGE;
|
||||
|
||||
//
|
||||
// LPC Debug Message
|
||||
//
|
||||
typedef struct _DBGKM_MSG
|
||||
{
|
||||
PORT_MESSAGE h;
|
||||
|
@ -145,12 +174,12 @@ typedef struct _DBGKM_MSG
|
|||
ULONG Status;
|
||||
union
|
||||
{
|
||||
DBGKM_EXCEPTION Exception;
|
||||
DBGKM_EXCEPTION Exception;
|
||||
DBGKM_CREATE_THREAD CreateThread;
|
||||
DBGKM_CREATE_PROCESS CreateProcess;
|
||||
DBGKM_EXIT_THREAD ExitThread;
|
||||
DBGKM_EXIT_THREAD ExitThread;
|
||||
DBGKM_EXIT_PROCESS ExitProcess;
|
||||
DBGKM_LOAD_DLL LoadDll;
|
||||
DBGKM_LOAD_DLL LoadDll;
|
||||
DBGKM_UNLOAD_DLL UnloadDll;
|
||||
};
|
||||
} DBGKM_MSG, *PDBGKM_MSG;
|
||||
|
|
|
@ -1,20 +1,31 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/exfuncs.h
|
||||
* PURPOSE: Prototypes for exported Executive Functions not defined in DDK/IFS
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 06/10/04
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
exfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for the Executive.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EXFUNCS_H
|
||||
#define _EXFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
//
|
||||
// Fast Mutex functions
|
||||
//
|
||||
VOID
|
||||
FASTCALL
|
||||
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex);
|
||||
|
|
|
@ -1,16 +1,27 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
extypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Executive.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EXTYPES_H
|
||||
#define _EXTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include <cfg.h>
|
||||
#if defined(_MSC_VER) && !defined(NTOS_MODE_USER)
|
||||
#include <ntimage.h>
|
||||
|
@ -20,38 +31,71 @@
|
|||
#include "pstypes.h"
|
||||
#include "potypes.h"
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
//
|
||||
// Atom and Language IDs
|
||||
//
|
||||
typedef USHORT LANGID, *PLANGID;
|
||||
typedef USHORT RTL_ATOM, *PRTL_ATOM;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Kernel Exported Object Types
|
||||
//
|
||||
extern POBJECT_TYPE NTSYSAPI ExIoCompletionType;
|
||||
extern POBJECT_TYPE NTSYSAPI ExMutantObjectType;
|
||||
extern POBJECT_TYPE NTSYSAPI ExTimerType;
|
||||
|
||||
//
|
||||
// Invalid Handle Value Constant
|
||||
//
|
||||
#define INVALID_HANDLE_VALUE (HANDLE)-1
|
||||
|
||||
#endif
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
#ifndef NTOS_MODE_USER
|
||||
#define INVALID_HANDLE_VALUE (HANDLE)-1
|
||||
#endif
|
||||
//
|
||||
// Increments
|
||||
//
|
||||
#define MUTANT_INCREMENT 1
|
||||
|
||||
/* Increments */
|
||||
#define MUTANT_INCREMENT 1
|
||||
//
|
||||
// Callback Object Access Mask
|
||||
//
|
||||
#define CALLBACK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x0001)
|
||||
#define CALLBACK_EXECUTE (STANDARD_RIGHTS_EXECUTE|SYNCHRONIZE|0x0001)
|
||||
#define CALLBACK_WRITE (STANDARD_RIGHTS_WRITE|SYNCHRONIZE|0x0001)
|
||||
#define CALLBACK_READ (STANDARD_RIGHTS_READ|SYNCHRONIZE|0x0001)
|
||||
|
||||
/* Executive Object Access Rights */
|
||||
#define CALLBACK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x0001)
|
||||
#define CALLBACK_EXECUTE (STANDARD_RIGHTS_EXECUTE|SYNCHRONIZE|0x0001)
|
||||
#define CALLBACK_WRITE (STANDARD_RIGHTS_WRITE|SYNCHRONIZE|0x0001)
|
||||
#define CALLBACK_READ (STANDARD_RIGHTS_READ|SYNCHRONIZE|0x0001)
|
||||
#define EVENT_READ_ACCESS 1
|
||||
#define EVENT_WRITE_ACCESS 2
|
||||
#define PORT_ALL_ACCESS 0x1
|
||||
#define EVENT_PAIR_ALL_ACCESS 0x1F0000L
|
||||
//
|
||||
// Event Object Access Masks
|
||||
//
|
||||
#ifdef NTOS_MODE_USER
|
||||
#define EVENT_QUERY_STATE 0x0001
|
||||
#define SEMAPHORE_QUERY_STATE 0x0001
|
||||
#define EVENT_QUERY_STATE 0x0001
|
||||
|
||||
//
|
||||
// Semaphore Object Acess Masks
|
||||
//
|
||||
#define SEMAPHORE_QUERY_STATE 0x0001
|
||||
#endif
|
||||
|
||||
#define MAXIMUM_HARDERROR_PARAMETERS 4
|
||||
//
|
||||
// Port Object Access Masks (FIXME: lpctypes.h?)
|
||||
//
|
||||
#define PORT_ALL_ACCESS 0x1
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// Event Pair Access Masks
|
||||
//
|
||||
#define EVENT_PAIR_ALL_ACCESS 0x1F0000L
|
||||
|
||||
//
|
||||
// Maximum Parameters for NtRaiseHardError
|
||||
//
|
||||
#define MAXIMUM_HARDERROR_PARAMETERS 4
|
||||
|
||||
//
|
||||
// Shutdown types for NtShutdownSystem
|
||||
//
|
||||
typedef enum _SHUTDOWN_ACTION
|
||||
{
|
||||
ShutdownNoReboot,
|
||||
|
@ -59,6 +103,9 @@ typedef enum _SHUTDOWN_ACTION
|
|||
ShutdownPowerOff
|
||||
} SHUTDOWN_ACTION;
|
||||
|
||||
//
|
||||
// Responses for NtRaiseHardError
|
||||
//
|
||||
typedef enum _HARDERROR_RESPONSE_OPTION
|
||||
{
|
||||
OptionAbortRetryIgnore,
|
||||
|
@ -83,13 +130,16 @@ typedef enum _HARDERROR_RESPONSE
|
|||
ResponseYes
|
||||
} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
|
||||
|
||||
//
|
||||
// System Information Classes for NtQuerySystemInformation
|
||||
//
|
||||
typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
{
|
||||
SystemBasicInformation,
|
||||
SystemProcessorInformation,
|
||||
SystemPerformanceInformation,
|
||||
SystemTimeOfDayInformation,
|
||||
SystemPathInformation, /* OBSOLETE: USE KUSER_SHARED_DATA */
|
||||
SystemPathInformation, /// Obsolete: Use KUSER_SHARED_DATA
|
||||
SystemProcessInformation,
|
||||
SystemCallCountInformation,
|
||||
SystemDeviceInformation,
|
||||
|
@ -127,7 +177,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
|||
SystemPrioritySeperation,
|
||||
SystemPlugPlayBusInformation,
|
||||
SystemDockInformation,
|
||||
_SystemPowerInformation, /* FIXME */
|
||||
_SystemPowerInformation, // FIXME
|
||||
SystemProcessorSpeedInformation,
|
||||
SystemCurrentTimeZoneInformation,
|
||||
SystemLookasideInformation,
|
||||
|
@ -142,38 +192,52 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
|||
SystemInformationClassMax
|
||||
} SYSTEM_INFORMATION_CLASS;
|
||||
|
||||
//
|
||||
// System Information Classes for NtQueryMutant
|
||||
//
|
||||
typedef enum _MUTANT_INFORMATION_CLASS
|
||||
{
|
||||
MutantBasicInformation
|
||||
} MUTANT_INFORMATION_CLASS;
|
||||
|
||||
//
|
||||
// System Information Classes for NtQueryAtom
|
||||
//
|
||||
typedef enum _ATOM_INFORMATION_CLASS
|
||||
{
|
||||
AtomBasicInformation,
|
||||
AtomTableInformation,
|
||||
} ATOM_INFORMATION_CLASS;
|
||||
|
||||
//
|
||||
// System Information Classes for NtQueryTimer
|
||||
//
|
||||
typedef enum _TIMER_INFORMATION_CLASS
|
||||
{
|
||||
TimerBasicInformation
|
||||
} TIMER_INFORMATION_CLASS;
|
||||
|
||||
//
|
||||
// System Information Classes for NtQuerySemaphore
|
||||
//
|
||||
typedef enum _SEMAPHORE_INFORMATION_CLASS
|
||||
{
|
||||
SemaphoreBasicInformation
|
||||
} SEMAPHORE_INFORMATION_CLASS;
|
||||
|
||||
//
|
||||
// System Information Classes for NtQueryEvent
|
||||
//
|
||||
typedef enum _EVENT_INFORMATION_CLASS
|
||||
{
|
||||
EventBasicInformation
|
||||
} EVENT_INFORMATION_CLASS;
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
typedef USHORT LANGID, *PLANGID;
|
||||
typedef USHORT RTL_ATOM, *PRTL_ATOM;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Executive Work Queue Structures
|
||||
//
|
||||
typedef struct _EX_QUEUE_WORKER_INFO
|
||||
{
|
||||
ULONG QueueDisabled:1;
|
||||
|
@ -192,6 +256,9 @@ typedef struct _EX_WORK_QUEUE
|
|||
EX_QUEUE_WORKER_INFO Info;
|
||||
} EX_WORK_QUEUE, *PEX_WORK_QUEUE;
|
||||
|
||||
//
|
||||
// Executive Fast Reference Structure
|
||||
//
|
||||
typedef struct _EX_FAST_REF
|
||||
{
|
||||
union
|
||||
|
@ -202,17 +269,18 @@ typedef struct _EX_FAST_REF
|
|||
};
|
||||
} EX_FAST_REF, *PEX_FAST_REF;
|
||||
|
||||
typedef struct _HANDLE_TABLE_ENTRY_INFO
|
||||
{
|
||||
ULONG AuditMask;
|
||||
} HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
|
||||
|
||||
//
|
||||
// FIXME
|
||||
//
|
||||
typedef struct _RUNDOWN_DESCRIPTOR
|
||||
{
|
||||
ULONG_PTR References;
|
||||
KEVENT RundownEvent;
|
||||
} RUNDOWN_DESCRIPTOR, *PRUNDOWN_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// Callback Object
|
||||
//
|
||||
typedef struct _CALLBACK_OBJECT
|
||||
{
|
||||
ULONG Name;
|
||||
|
@ -221,6 +289,14 @@ typedef struct _CALLBACK_OBJECT
|
|||
ULONG AllowMultipleCallbacks;
|
||||
} CALLBACK_OBJECT , *PCALLBACK_OBJECT;
|
||||
|
||||
//
|
||||
// Handle Table Structures
|
||||
//
|
||||
typedef struct _HANDLE_TABLE_ENTRY_INFO
|
||||
{
|
||||
ULONG AuditMask;
|
||||
} HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
|
||||
|
||||
typedef struct _HANDLE_TABLE_ENTRY
|
||||
{
|
||||
union
|
||||
|
@ -254,6 +330,9 @@ typedef struct _HANDLE_TABLE
|
|||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Information Structures for NtQueryMutant
|
||||
//
|
||||
typedef struct _MUTANT_BASIC_INFORMATION
|
||||
{
|
||||
LONG CurrentCount;
|
||||
|
@ -261,6 +340,9 @@ typedef struct _MUTANT_BASIC_INFORMATION
|
|||
BOOLEAN AbandonedState;
|
||||
} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
|
||||
|
||||
//
|
||||
// Information Structures for NtQueryAtom
|
||||
//
|
||||
typedef struct _ATOM_BASIC_INFORMATION
|
||||
{
|
||||
USHORT UsageCount;
|
||||
|
@ -275,25 +357,36 @@ typedef struct _ATOM_TABLE_INFORMATION
|
|||
USHORT Atoms[1];
|
||||
} ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
|
||||
|
||||
//
|
||||
// Information Structures for NtQueryTimer
|
||||
//
|
||||
typedef struct _TIMER_BASIC_INFORMATION
|
||||
{
|
||||
LARGE_INTEGER TimeRemaining;
|
||||
BOOLEAN SignalState;
|
||||
} TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
|
||||
|
||||
//
|
||||
// Information Structures for NtQuerySemaphore
|
||||
//
|
||||
typedef struct _SEMAPHORE_BASIC_INFORMATION
|
||||
{
|
||||
LONG CurrentCount;
|
||||
LONG MaximumCount;
|
||||
} SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
|
||||
|
||||
//
|
||||
// Information Structures for NtQueryEvent
|
||||
//
|
||||
typedef struct _EVENT_BASIC_INFORMATION
|
||||
{
|
||||
EVENT_TYPE EventType;
|
||||
LONG EventState;
|
||||
} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
|
||||
|
||||
/* Class 0 */
|
||||
//
|
||||
// Information Structures for NtQuerySystemInformation
|
||||
//
|
||||
typedef struct _SYSTEM_BASIC_INFORMATION
|
||||
{
|
||||
ULONG Reserved;
|
||||
|
@ -309,7 +402,7 @@ typedef struct _SYSTEM_BASIC_INFORMATION
|
|||
CCHAR NumberOfProcessors;
|
||||
} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
|
||||
|
||||
/* Class 1 */
|
||||
// Class 1
|
||||
typedef struct _SYSTEM_PROCESSOR_INFORMATION
|
||||
{
|
||||
USHORT ProcessorArchitecture;
|
||||
|
@ -319,7 +412,7 @@ typedef struct _SYSTEM_PROCESSOR_INFORMATION
|
|||
ULONG ProcessorFeatureBits;
|
||||
} SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
|
||||
|
||||
/* Class 2 */
|
||||
// Class 2
|
||||
typedef struct _SYSTEM_PERFORMANCE_INFORMATION
|
||||
{
|
||||
LARGE_INTEGER IdleProcessTime;
|
||||
|
@ -398,7 +491,7 @@ typedef struct _SYSTEM_PERFORMANCE_INFORMATION
|
|||
ULONG SystemCalls;
|
||||
} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
|
||||
|
||||
/* Class 3 */
|
||||
// Class 3
|
||||
typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
|
||||
{
|
||||
LARGE_INTEGER BootTime;
|
||||
|
@ -408,10 +501,10 @@ typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
|
|||
ULONG Reserved;
|
||||
} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
|
||||
|
||||
/* Class 4 */
|
||||
/* This class is obsoleted, please use KUSER_SHARED_DATA instead */
|
||||
// Class 4
|
||||
// This class is obsolete, please use KUSER_SHARED_DATA instead
|
||||
|
||||
/* Class 5 */
|
||||
// Class 5
|
||||
typedef struct _SYSTEM_THREAD_INFORMATION
|
||||
{
|
||||
LARGE_INTEGER KernelTime;
|
||||
|
@ -445,10 +538,10 @@ typedef struct _SYSTEM_PROCESS_INFORMATION
|
|||
ULONG SessionId;
|
||||
ULONG PageDirectoryFrame;
|
||||
|
||||
/*
|
||||
* This part corresponds to VM_COUNTERS_EX.
|
||||
* NOTE: *NOT* THE SAME AS VM_COUNTERS!
|
||||
*/
|
||||
//
|
||||
// This part corresponds to VM_COUNTERS_EX.
|
||||
// NOTE: *NOT* THE SAME AS VM_COUNTERS!
|
||||
//
|
||||
ULONG PeakVirtualSize;
|
||||
ULONG VirtualSize;
|
||||
ULONG PageFaultCount;
|
||||
|
@ -462,7 +555,9 @@ typedef struct _SYSTEM_PROCESS_INFORMATION
|
|||
ULONG PeakPagefileUsage;
|
||||
ULONG PrivateUsage;
|
||||
|
||||
/* This part corresponds to IO_COUNTERS */
|
||||
//
|
||||
// This part corresponds to IO_COUNTERS
|
||||
//
|
||||
LARGE_INTEGER ReadOperationCount;
|
||||
LARGE_INTEGER WriteOperationCount;
|
||||
LARGE_INTEGER OtherOperationCount;
|
||||
|
@ -470,18 +565,17 @@ typedef struct _SYSTEM_PROCESS_INFORMATION
|
|||
LARGE_INTEGER WriteTransferCount;
|
||||
LARGE_INTEGER OtherTransferCount;
|
||||
|
||||
/* Finally, the array of Threads */
|
||||
SYSTEM_THREAD_INFORMATION TH[1];
|
||||
} SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
|
||||
|
||||
/* Class 6 */
|
||||
// Class 6
|
||||
typedef struct _SYSTEM_CALL_COUNT_INFORMATION
|
||||
{
|
||||
ULONG Length;
|
||||
ULONG NumberOfTables;
|
||||
} SYSTEM_CALL_COUNT_INFORMATION, *PSYSTEM_CALL_COUNT_INFORMATION;
|
||||
|
||||
/* Class 7 */
|
||||
// Class 7
|
||||
typedef struct _SYSTEM_DEVICE_INFORMATION
|
||||
{
|
||||
ULONG NumberOfDisks;
|
||||
|
@ -492,7 +586,7 @@ typedef struct _SYSTEM_DEVICE_INFORMATION
|
|||
ULONG NumberOfParallelPorts;
|
||||
} SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
|
||||
|
||||
/* Class 8 */
|
||||
// Class 8
|
||||
typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
|
||||
{
|
||||
LARGE_INTEGER IdleTime;
|
||||
|
@ -503,13 +597,13 @@ typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
|
|||
ULONG InterruptCount;
|
||||
} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
|
||||
|
||||
/* Class 9 */
|
||||
// Class 9
|
||||
typedef struct _SYSTEM_FLAGS_INFORMATION
|
||||
{
|
||||
ULONG Flags;
|
||||
} SYSTEM_FLAGS_INFORMATION, *PSYSTEM_FLAGS_INFORMATION;
|
||||
|
||||
/* Class 10 */
|
||||
// Class 10
|
||||
typedef struct _SYSTEM_CALL_TIME_INFORMATION
|
||||
{
|
||||
ULONG Length;
|
||||
|
@ -517,7 +611,7 @@ typedef struct _SYSTEM_CALL_TIME_INFORMATION
|
|||
LARGE_INTEGER TimeOfCalls[1];
|
||||
} SYSTEM_CALL_TIME_INFORMATION, *PSYSTEM_CALL_TIME_INFORMATION;
|
||||
|
||||
/* Class 11 */
|
||||
// Class 11
|
||||
typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY
|
||||
{
|
||||
ULONG Unknown1;
|
||||
|
@ -537,7 +631,7 @@ typedef struct _SYSTEM_MODULE_INFORMATION
|
|||
SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
|
||||
} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
|
||||
|
||||
/* Class 12 */
|
||||
// Class 12
|
||||
typedef struct _SYSTEM_RESOURCE_LOCK_ENTRY
|
||||
{
|
||||
ULONG ResourceAddress;
|
||||
|
@ -556,22 +650,20 @@ typedef struct _SYSTEM_RESOURCE_LOCK_INFO
|
|||
SYSTEM_RESOURCE_LOCK_ENTRY Lock[1];
|
||||
} SYSTEM_RESOURCE_LOCK_INFO, *PSYSTEM_RESOURCE_LOCK_INFO;
|
||||
|
||||
/* Class 13 */
|
||||
// FIXME: Class 13
|
||||
typedef struct _SYSTEM_BACKTRACE_INFORMATION_ENTRY
|
||||
{
|
||||
ULONG Dummy;
|
||||
/* 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 */
|
||||
// Class 14 - 15
|
||||
typedef struct _SYSTEM_POOL_ENTRY
|
||||
{
|
||||
BOOLEAN Allocated;
|
||||
|
@ -597,7 +689,7 @@ typedef struct _SYSTEM_POOL_INFORMATION
|
|||
SYSTEM_POOL_ENTRY Entries[1];
|
||||
} SYSTEM_POOL_INFORMATION, *PSYSTEM_POOL_INFORMATION;
|
||||
|
||||
/* Class 16 */
|
||||
// Class 16
|
||||
typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
|
||||
{
|
||||
USHORT UniqueProcessId;
|
||||
|
@ -615,7 +707,7 @@ typedef struct _SYSTEM_HANDLE_INFORMATION
|
|||
SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
|
||||
} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
|
||||
|
||||
/* Class 17 */
|
||||
// Class 17
|
||||
typedef struct _SYSTEM_OBJECTTYPE_INFORMATION
|
||||
{
|
||||
ULONG NextEntryOffset;
|
||||
|
@ -647,7 +739,7 @@ typedef struct _SYSTEM_OBJECT_INFORMATION
|
|||
OBJECT_NAME_INFORMATION NameInfo;
|
||||
} SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
|
||||
|
||||
/* Class 18 */
|
||||
// Class 18
|
||||
typedef struct _SYSTEM_PAGEFILE_INFORMATION
|
||||
{
|
||||
ULONG NextEntryOffset;
|
||||
|
@ -657,7 +749,7 @@ typedef struct _SYSTEM_PAGEFILE_INFORMATION
|
|||
UNICODE_STRING PageFileName;
|
||||
} SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
|
||||
|
||||
/* Class 19 */
|
||||
// Class 19
|
||||
typedef struct _SYSTEM_VDM_INSTEMUL_INFO
|
||||
{
|
||||
ULONG SegmentNotPresent;
|
||||
|
@ -696,14 +788,13 @@ typedef struct _SYSTEM_VDM_INSTEMUL_INFO
|
|||
ULONG BopCount;
|
||||
} SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
|
||||
|
||||
/* Class 20 */
|
||||
// FIXME: Class 20
|
||||
typedef struct _SYSTEM_VDM_BOP_INFO
|
||||
{
|
||||
/* FIXME */
|
||||
PVOID Dummy;
|
||||
} SYSTEM_VDM_BOP_INFO, *PSYSTEM_VDM_BOP_INFO;
|
||||
|
||||
/* Class 21 */
|
||||
// Class 21
|
||||
typedef struct _SYSTEM_CACHE_INFORMATION
|
||||
{
|
||||
ULONG CurrentSize;
|
||||
|
@ -716,7 +807,7 @@ typedef struct _SYSTEM_CACHE_INFORMATION
|
|||
ULONG Unused[2];
|
||||
} SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
|
||||
|
||||
/* Class 22 */
|
||||
// Class 22
|
||||
typedef struct _SYSTEM_POOLTAG
|
||||
{
|
||||
union
|
||||
|
@ -737,7 +828,7 @@ typedef struct _SYSTEM_POOLTAG_INFORMATION
|
|||
SYSTEM_POOLTAG TagInfo[1];
|
||||
} SYSTEM_POOLTAG_INFORMATION, *PSYSTEM_POOLTAG_INFORMATION;
|
||||
|
||||
/* Class 23 */
|
||||
// Class 23
|
||||
typedef struct _SYSTEM_INTERRUPT_INFORMATION
|
||||
{
|
||||
ULONG ContextSwitches;
|
||||
|
@ -748,7 +839,7 @@ typedef struct _SYSTEM_INTERRUPT_INFORMATION
|
|||
ULONG ApcBypassCount;
|
||||
} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
|
||||
|
||||
/* Class 24 */
|
||||
// Class 24
|
||||
typedef struct _SYSTEM_DPC_BEHAVIOR_INFORMATION
|
||||
{
|
||||
ULONG Spare;
|
||||
|
@ -758,7 +849,7 @@ typedef struct _SYSTEM_DPC_BEHAVIOR_INFORMATION
|
|||
ULONG IdealDpcRate;
|
||||
} SYSTEM_DPC_BEHAVIOR_INFORMATION, *PSYSTEM_DPC_BEHAVIOR_INFORMATION;
|
||||
|
||||
/* Class 25 */
|
||||
// Class 25
|
||||
typedef struct _SYSTEM_MEMORY_INFO
|
||||
{
|
||||
PUCHAR StringOffset;
|
||||
|
@ -774,7 +865,7 @@ typedef struct _SYSTEM_MEMORY_INFORMATION
|
|||
SYSTEM_MEMORY_INFO Memory[1];
|
||||
} SYSTEM_MEMORY_INFORMATION, *PSYSTEM_MEMORY_INFORMATION;
|
||||
|
||||
/* Class 26 */
|
||||
// Class 26
|
||||
typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
|
||||
{
|
||||
UNICODE_STRING DriverName;
|
||||
|
@ -784,10 +875,10 @@ typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
|
|||
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 27
|
||||
// Not an actually class, simply a PVOID to the ImageAddress
|
||||
|
||||
/* Class 28 */
|
||||
// Class 28
|
||||
typedef struct _SYSTEM_QUERY_TIME_ADJUST_INFORMATION
|
||||
{
|
||||
ULONG TimeAdjustment;
|
||||
|
@ -801,18 +892,17 @@ typedef struct _SYSTEM_SET_TIME_ADJUST_INFORMATION
|
|||
BOOLEAN Enable;
|
||||
} SYSTEM_SET_TIME_ADJUST_INFORMATION, *PSYSTEM_SET_TIME_ADJUST_INFORMATION;
|
||||
|
||||
/* Class 29 - Same as 25 */
|
||||
// Class 29 - Same as 25
|
||||
|
||||
/* Class 30 - 31 */
|
||||
/* FIXME */
|
||||
// FIXME: Class 30 - 31
|
||||
|
||||
/* Class 32 */
|
||||
// Class 32
|
||||
typedef struct _SYSTEM_CRASH_DUMP_INFORMATION
|
||||
{
|
||||
HANDLE CrashDumpSection;
|
||||
} SYSTEM_CRASH_DUMP_INFORMATION, *PSYSTEM_CRASH_DUMP_INFORMATION;
|
||||
|
||||
/* Class 33 */
|
||||
// Class 33
|
||||
typedef struct _SYSTEM_EXCEPTION_INFORMATION
|
||||
{
|
||||
ULONG AlignmentFixupCount;
|
||||
|
@ -821,20 +911,20 @@ typedef struct _SYSTEM_EXCEPTION_INFORMATION
|
|||
ULONG ByteWordEmulationCount;
|
||||
} SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
|
||||
|
||||
/* Class 34 */
|
||||
// Class 34
|
||||
typedef struct _SYSTEM_CRASH_STATE_INFORMATION
|
||||
{
|
||||
ULONG ValidCrashDump;
|
||||
} SYSTEM_CRASH_STATE_INFORMATION, *PSYSTEM_CRASH_STATE_INFORMATION;
|
||||
|
||||
/* Class 35 */
|
||||
// Class 35
|
||||
typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
|
||||
{
|
||||
BOOLEAN KernelDebuggerEnabled;
|
||||
BOOLEAN KernelDebuggerNotPresent;
|
||||
} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
|
||||
|
||||
/* Class 36 */
|
||||
// Class 36
|
||||
typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION
|
||||
{
|
||||
ULONG ContextSwitches;
|
||||
|
@ -851,7 +941,7 @@ typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION
|
|||
ULONG SwitchToIdle;
|
||||
} SYSTEM_CONTEXT_SWITCH_INFORMATION, *PSYSTEM_CONTEXT_SWITCH_INFORMATION;
|
||||
|
||||
/* Class 37 */
|
||||
// Class 37
|
||||
typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
|
||||
{
|
||||
ULONG RegistryQuotaAllowed;
|
||||
|
@ -859,20 +949,20 @@ typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
|
|||
ULONG PagedPoolSize;
|
||||
} SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
|
||||
|
||||
/* Class 38 */
|
||||
/* Not a structure, simply send the UNICODE_STRING */
|
||||
// Class 38
|
||||
// Not a structure, simply send the UNICODE_STRING
|
||||
|
||||
/* Class 39 */
|
||||
/* Not a structure, simply send a ULONG containing the new separation */
|
||||
// Class 39
|
||||
// Not a structure, simply send a ULONG containing the new separation
|
||||
|
||||
/* Class 40 */
|
||||
// Class 40
|
||||
typedef struct _SYSTEM_PLUGPLAY_BUS_INFORMATION
|
||||
{
|
||||
ULONG BusCount;
|
||||
PLUGPLAY_BUS_INSTANCE BusInstance[1];
|
||||
} SYSTEM_PLUGPLAY_BUS_INFORMATION, *PSYSTEM_PLUGPLAY_BUS_INFORMATION;
|
||||
|
||||
/* Class 41 */
|
||||
// Class 41
|
||||
typedef struct _SYSTEM_DOCK_INFORMATION
|
||||
{
|
||||
SYSTEM_DOCK_STATE DockState;
|
||||
|
@ -881,8 +971,8 @@ typedef struct _SYSTEM_DOCK_INFORMATION
|
|||
ULONG SlotNumber;
|
||||
} SYSTEM_DOCK_INFORMATION, *PSYSTEM_DOCK_INFORMATION;
|
||||
|
||||
/* Class 42 */
|
||||
/* FIXME: Conflict with WINNT.H */
|
||||
// Class 42
|
||||
// FIXME: Conflict with WINNT.H
|
||||
typedef struct __SYSTEM_POWER_INFORMATION
|
||||
{
|
||||
BOOLEAN SystemSuspendSupported;
|
||||
|
@ -897,18 +987,18 @@ typedef struct __SYSTEM_POWER_INFORMATION
|
|||
LARGE_INTEGER SpindownDrives;
|
||||
} _SYSTEM_POWER_INFORMATION, *P_SYSTEM_POWER_INFORMATION;
|
||||
|
||||
/* Class 43 */
|
||||
// Class 43
|
||||
typedef struct _SYSTEM_LEGACY_DRIVER_INFORMATION
|
||||
{
|
||||
PNP_VETO_TYPE VetoType;
|
||||
UNICODE_STRING VetoDriver;
|
||||
/* Buffer Follows */
|
||||
// CHAR Buffer[0];
|
||||
} SYSTEM_LEGACY_DRIVER_INFORMATION, *PSYSTEM_LEGACY_DRIVER_INFORMATION;
|
||||
|
||||
/* Class 44 */
|
||||
// Class 44
|
||||
typedef struct _TIME_ZONE_INFORMATION RTL_TIME_ZONE_INFORMATION;
|
||||
|
||||
/* Class 45 */
|
||||
// Class 45
|
||||
typedef struct _SYSTEM_LOOKASIDE_INFORMATION
|
||||
{
|
||||
USHORT CurrentDepth;
|
||||
|
@ -922,34 +1012,30 @@ typedef struct _SYSTEM_LOOKASIDE_INFORMATION
|
|||
ULONG Size;
|
||||
} SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
|
||||
|
||||
/* Class 46 */
|
||||
/* Not a structure. Only a HANDLE for the SlipEvent; */
|
||||
// Class 46
|
||||
// Not a structure. Only a HANDLE for the SlipEvent;
|
||||
|
||||
/* Class 47 */
|
||||
/* Not a structure. Only a ULONG for the SessionId; */
|
||||
// Class 47
|
||||
// Not a structure. Only a ULONG for the SessionId;
|
||||
|
||||
/* Class 48 */
|
||||
/* Not a structure. Only a ULONG for the SessionId; */
|
||||
// Class 48
|
||||
// Not a structure. Only a ULONG for the SessionId;
|
||||
|
||||
/* Class 49 */
|
||||
/* FIXME */
|
||||
// FIXME: Class 49
|
||||
|
||||
/* Class 50 */
|
||||
/* Not a structure. Only a ULONG_PTR for the SystemRangeStart */
|
||||
// Class 50
|
||||
// Not a structure. Only a ULONG_PTR for the SystemRangeStart
|
||||
|
||||
/* Class 51 */
|
||||
/* FIXME. Based on MM_DRIVER_VERIFIER_DATA */
|
||||
// FIXME: Class 51 (Based on MM_DRIVER_VERIFIER_DATA)
|
||||
|
||||
/* Class 52 */
|
||||
/* FIXME */
|
||||
// FIXME: Class 52
|
||||
|
||||
/* Class 53 */
|
||||
// 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;
|
||||
ULONG SessionId;
|
||||
ULONG BufferSize;
|
||||
PVOID Buffer; // Same format as in SystemProcessInformation
|
||||
} SYSTEM_SESSION_PROCESSES_INFORMATION, *PSYSTEM_SESSION_PROCESSES_INFORMATION;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,42 +1,8 @@
|
|||
NDK FIXMES
|
||||
-----------
|
||||
Complete list of NDK Fixmes before 1.0 Release (Nov 25th 2005)
|
||||
--------------------------------------------------------------
|
||||
|
||||
Order:
|
||||
* Priority 1 = Most important to fix.
|
||||
* Priority 5 = Least important to fix.
|
||||
|
||||
Format:
|
||||
<Priority Level>
|
||||
- FIXME Description (Assigned Fixer) [FIXME location(s)]
|
||||
List of ReactOS Applications compiling with the NDK
|
||||
--------------------------------------------------------------
|
||||
|
||||
List:
|
||||
Priority 1:
|
||||
- FIXED: LDR_DATA_TABLE_ENTRY has a ROSSYM Hack (Alex) [ldrtypes.h]
|
||||
- FIXED: LDR_FLAGS are not correct (Alex) [ldrtypes.h]
|
||||
- FIXED: Remove extra Process Info classes from ddk (Alex) [zwtypes.h]
|
||||
- FIXED: PsEstablishWin32Callouts + Parameters don't match NT (Alex) [obtypes.h]
|
||||
- FIXED: PROCESS_SET_PORT was removed, ThomasW did a patch about this? (Thomas) [pstypes.h]
|
||||
- FIXED: Some files need cleanup (Alex + Eric) [zwfuncs.h, rtlfuncs.h, rtltypes.h]
|
||||
|
||||
Priority 2:
|
||||
- FIXED: DEVICE_NODE has 2 fields not part of NT's defintion (Alex) [iotypes.h]
|
||||
- Object Callbacks don't match NT's (Alex) [obtypes.h]
|
||||
- Remove Create Callback Hack (Alex) [obtypes.h]
|
||||
- Object header doesn't match NT (Alex) [obtypes.h] blocks on ->
|
||||
- Object Directory + implementation doesn't match NT (Alex) [obtypes.h]
|
||||
|
||||
Priority 3:
|
||||
- FIXED: Some RTL Structures need review (Alex) [rtltypes.h]
|
||||
- Pushlock support is needed to fix EPROCESS (Alex) [pstypes.h]
|
||||
- MADDRESS_SPACE must be converted into the NT Type (Alex) [pstypes.h, mmtypes.h]
|
||||
|
||||
Priority 4:
|
||||
- FIXED: Kernel and Memory Types are not architecture-specific (Eric) [ketypes.h, mmtypes.h]
|
||||
- FIXED: Win32K Builds with windows.h (Filip) [extypes.h, ketypes.h]
|
||||
- FIXED: Modify design of NDK so that all the types are in their respective files (Alex) [*.h]
|
||||
|
||||
Priority 5:
|
||||
- FIXED: LPC Types are totally wrong. (Alex) [lpctypes.h]
|
||||
- Missing System Info Classes [zwtypes.h]
|
||||
- FIXED: Process Priority Classes are messed up (Alex) [pstypes.h]
|
||||
|
||||
|
|
|
@ -1,29 +1,96 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
halfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for the HAL.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _HALFUNCS_H
|
||||
#define _HALFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
#include "haltypes.h"
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
//
|
||||
// Display Functions
|
||||
//
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalQueryDisplayOwnership(
|
||||
VOID
|
||||
);
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
VOID
|
||||
NTAPI
|
||||
HalDisplayString(
|
||||
IN PCHAR String
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalQueryDisplayOwnership(VOID);
|
||||
HalQueryDisplayOwnership(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalReleaseDisplayOwnership(
|
||||
VOID
|
||||
);
|
||||
|
||||
//
|
||||
// Initialization Functions
|
||||
//
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalAllProcessorsStarted(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalInitializeProcessor(
|
||||
ULONG ProcessorNumber,
|
||||
PVOID ProcessorStack
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalAllProcessorsStarted(VOID);
|
||||
HalInitSystem(
|
||||
ULONG BootPhase,
|
||||
PLOADER_PARAMETER_BLOCK LoaderBlock
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalReturnToFirmware(
|
||||
FIRMWARE_REENTRY Action
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalStartNextProcessor(
|
||||
ULONG Unknown1,
|
||||
ULONG Unknown2
|
||||
);
|
||||
|
||||
//
|
||||
// Interrupt Functions
|
||||
//
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalBeginSystemInterrupt(
|
||||
|
@ -39,12 +106,6 @@ HalDisableSystemInterrupt(
|
|||
KIRQL Irql
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalDisplayString (
|
||||
IN PCHAR String
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalEnableSystemInterrupt(
|
||||
|
@ -70,62 +131,25 @@ HalGetEnvironmentVariable(
|
|||
|
||||
VOID
|
||||
NTAPI
|
||||
HalInitializeProcessor(
|
||||
ULONG ProcessorNumber,
|
||||
PVOID ProcessorStack
|
||||
HalReportResourceUsage(
|
||||
VOID
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalInitSystem(
|
||||
ULONG BootPhase,
|
||||
PLOADER_PARAMETER_BLOCK LoaderBlock
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalQueryDisplayOwnership(VOID);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalReportResourceUsage(VOID);
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
HalRequestSoftwareInterrupt(
|
||||
KIRQL SoftwareInterruptRequested
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalReleaseDisplayOwnership(VOID);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalReturnToFirmware(
|
||||
FIRMWARE_REENTRY Action
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalRequestIpi(
|
||||
ULONG Unknown
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalSetEnvironmentVariable(
|
||||
IN PCH Name,
|
||||
IN PCH Value
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalStartNextProcessor(
|
||||
ULONG Unknown1,
|
||||
ULONG Unknown2
|
||||
);
|
||||
|
||||
//
|
||||
// I/O Functions
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
IoAssignDriveLetters(
|
||||
|
@ -135,4 +159,15 @@ IoAssignDriveLetters(
|
|||
PSTRING NtSystemPathString
|
||||
);
|
||||
|
||||
//
|
||||
// Environment Functions
|
||||
//
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
HalSetEnvironmentVariable(
|
||||
IN PCH Name,
|
||||
IN PCH Value
|
||||
);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,37 +1,48 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
haltypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the HAL.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _HALTYPES_H
|
||||
#define _HALTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
extern ULONG NTSYSAPI KdComPortInUse;
|
||||
//
|
||||
// Multi-Boot Flags (FIXME)
|
||||
//
|
||||
#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)
|
||||
#define MB_FLAGS_ACPI_TABLE (0x1000)
|
||||
|
||||
/* 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)
|
||||
#define MB_FLAGS_ACPI_TABLE (0x1000)
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// HalShutdownSystem Types
|
||||
//
|
||||
typedef enum _FIRMWARE_ENTRY
|
||||
{
|
||||
HalHaltRoutine,
|
||||
|
@ -42,21 +53,18 @@ typedef enum _FIRMWARE_ENTRY
|
|||
HalMaximumRoutine
|
||||
} FIRMWARE_REENTRY, *PFIRMWARE_REENTRY;
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
//
|
||||
// Hal Private dispatch Table
|
||||
//
|
||||
#define HAL_PRIVATE_DISPATCH_VERSION 1
|
||||
typedef struct _HAL_PRIVATE_DISPATCH
|
||||
{
|
||||
ULONG Version;
|
||||
} HAL_PRIVATE_DISPATCH, *PHAL_PRIVATE_DISPATCH;
|
||||
|
||||
#ifdef __NTOSKRNL__
|
||||
extern HAL_PRIVATE_DISPATCH NTSYSAPI HalPrivateDispatchTable;
|
||||
#else
|
||||
extern PHAL_PRIVATE_DISPATCH NTSYSAPI HalPrivateDispatchTable;
|
||||
#endif
|
||||
|
||||
#define HAL_PRIVATE_DISPATCH_VERSION 1
|
||||
|
||||
//
|
||||
// Loader Parameter Block Structures (FIXME)
|
||||
//
|
||||
typedef struct _LOADER_MODULE
|
||||
{
|
||||
ULONG ModStart;
|
||||
|
@ -86,5 +94,15 @@ typedef struct _LOADER_PARAMETER_BLOCK
|
|||
ULONG KernelBase;
|
||||
} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
|
||||
|
||||
//
|
||||
// Kernel Exports
|
||||
//
|
||||
#ifdef __NTOSKRNL__
|
||||
extern HAL_PRIVATE_DISPATCH NTSYSAPI HalPrivateDispatchTable;
|
||||
#else
|
||||
extern PHAL_PRIVATE_DISPATCH NTSYSAPI HalPrivateDispatchTable;
|
||||
#endif
|
||||
extern ULONG NTSYSAPI KdComPortInUse;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef _FLOATSAVE_H_
|
||||
#define _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 */
|
|
@ -1,37 +1,49 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/i386/ketypes.h
|
||||
* PURPOSE: I386-specific definitions for Kernel Types not defined in DDK/IFS
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 06/10/04
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
ketypes.h (X86)
|
||||
|
||||
Abstract:
|
||||
|
||||
i386 Type definitions for the Kernel services.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _I386_KETYPES_H
|
||||
#define _I386_KETYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
|
||||
/* X86 80386 Segment Types */
|
||||
#define I386_TSS 0x9
|
||||
#define I386_ACTIVE_TSS 0xB
|
||||
#define I386_CALL_GATE 0xC
|
||||
#define I386_INTERRUPT_GATE 0xE
|
||||
#define I386_TRAP_GATE 0xF
|
||||
//
|
||||
// X86 80386 Segment Types
|
||||
//
|
||||
#define I386_TSS 0x9
|
||||
#define I386_ACTIVE_TSS 0xB
|
||||
#define I386_CALL_GATE 0xC
|
||||
#define I386_INTERRUPT_GATE 0xE
|
||||
#define I386_TRAP_GATE 0xF
|
||||
|
||||
//
|
||||
// IPI Types
|
||||
//
|
||||
#define IPI_APC 1
|
||||
#define IPI_DPC 2
|
||||
#define IPI_FREEZE 3
|
||||
#define IPI_PACKET_READY 4
|
||||
#define IPI_SYNCH_REQUEST 10
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
//
|
||||
// FN/FX (FPU) Save Area Structures
|
||||
//
|
||||
typedef struct _FNSAVE_FORMAT
|
||||
{
|
||||
ULONG ControlWord;
|
||||
|
@ -73,7 +85,9 @@ typedef struct _FX_SAVE_AREA
|
|||
ULONG Cr0NpxState;
|
||||
} FX_SAVE_AREA, *PFX_SAVE_AREA;
|
||||
|
||||
/* FIXME: The names need to be fixed! */
|
||||
//
|
||||
// FIXME: Trap Frame Definition
|
||||
//
|
||||
typedef struct _KTRAP_FRAME
|
||||
{
|
||||
ULONG DebugEbp;
|
||||
|
@ -113,6 +127,9 @@ typedef struct _KTRAP_FRAME
|
|||
ULONG V86_Gs;
|
||||
} KTRAP_FRAME, *PKTRAP_FRAME;
|
||||
|
||||
//
|
||||
// LDT Entry Definition
|
||||
//
|
||||
typedef struct _LDT_ENTRY
|
||||
{
|
||||
USHORT LimitLow;
|
||||
|
@ -142,6 +159,9 @@ typedef struct _LDT_ENTRY
|
|||
} HighWord;
|
||||
} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
|
||||
|
||||
//
|
||||
// GDT Entry Definition
|
||||
//
|
||||
typedef struct _KGDTENTRY
|
||||
{
|
||||
USHORT LimitLow;
|
||||
|
@ -171,6 +191,9 @@ typedef struct _KGDTENTRY
|
|||
} HighWord;
|
||||
} KGDTENTRY, *PKGDTENTRY;
|
||||
|
||||
//
|
||||
// IDT Entry Access Definition
|
||||
//
|
||||
typedef struct _KIDT_ACCESS
|
||||
{
|
||||
union
|
||||
|
@ -187,6 +210,9 @@ typedef struct _KIDT_ACCESS
|
|||
};
|
||||
} KIDT_ACCESS, *PKIDT_ACCESS;
|
||||
|
||||
//
|
||||
// IDT Entry Definition
|
||||
//
|
||||
typedef struct _KIDTENTRY
|
||||
{
|
||||
USHORT Offset;
|
||||
|
@ -195,6 +221,9 @@ typedef struct _KIDTENTRY
|
|||
USHORT ExtendedOffset;
|
||||
} KIDTENTRY, *PKIDTENTRY;
|
||||
|
||||
//
|
||||
// Page Table Entry Definition
|
||||
//
|
||||
typedef struct _HARDWARE_PTE_X86
|
||||
{
|
||||
ULONG Valid : 1;
|
||||
|
@ -219,6 +248,9 @@ typedef struct _DESCRIPTOR
|
|||
ULONG Base;
|
||||
} KDESCRIPTOR, *PKDESCRIPTOR;
|
||||
|
||||
//
|
||||
// Special Registers Structure (outside of CONTEXT)
|
||||
//
|
||||
typedef struct _KSPECIAL_REGISTERS
|
||||
{
|
||||
ULONG Cr0;
|
||||
|
@ -238,15 +270,19 @@ typedef struct _KSPECIAL_REGISTERS
|
|||
ULONG Reserved[6];
|
||||
} KSPECIAL_REGISTERS, *PKSPECIAL_REGISTERS;
|
||||
|
||||
//
|
||||
// Processor State Data
|
||||
//
|
||||
#pragma pack(push,4)
|
||||
|
||||
typedef struct _KPROCESSOR_STATE
|
||||
{
|
||||
PCONTEXT ContextFrame;
|
||||
KSPECIAL_REGISTERS SpecialRegisters;
|
||||
} KPROCESSOR_STATE;
|
||||
|
||||
/* Processor Control Block */
|
||||
//
|
||||
// Processor Region Control Block
|
||||
//
|
||||
typedef struct _KPRCB
|
||||
{
|
||||
USHORT MinorVersion;
|
||||
|
@ -377,9 +413,9 @@ typedef struct _KPRCB
|
|||
PROCESSOR_POWER_STATE PowerState;
|
||||
} KPRCB, *PKPRCB;
|
||||
|
||||
/*
|
||||
* This is the complete, internal KPCR structure
|
||||
*/
|
||||
//
|
||||
// Processor Control Region
|
||||
//
|
||||
typedef struct _KIPCR
|
||||
{
|
||||
union
|
||||
|
@ -422,11 +458,12 @@ typedef struct _KIPCR
|
|||
UCHAR KernelReserved2[0x48]; /* D8 */
|
||||
KPRCB PrcbData; /* 120 */
|
||||
} KIPCR, *PKIPCR;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
//
|
||||
// FIXME: TSS without I/O Privilege Map
|
||||
//
|
||||
#include <pshpack1.h>
|
||||
|
||||
typedef struct _KTSSNOIOPM
|
||||
{
|
||||
USHORT PreviousTask;
|
||||
|
@ -471,30 +508,33 @@ typedef struct _KTSSNOIOPM
|
|||
UCHAR IoBitmap[1];
|
||||
} KTSSNOIOPM;
|
||||
|
||||
//
|
||||
// TSS Definition
|
||||
//
|
||||
typedef struct _KTSS
|
||||
{
|
||||
USHORT PreviousTask;
|
||||
USHORT Reserved1;
|
||||
ULONG Esp0;
|
||||
ULONG Esp0;
|
||||
USHORT Ss0;
|
||||
USHORT Reserved2;
|
||||
ULONG Esp1;
|
||||
ULONG Esp1;
|
||||
USHORT Ss1;
|
||||
USHORT Reserved3;
|
||||
ULONG Esp2;
|
||||
ULONG Esp2;
|
||||
USHORT Ss2;
|
||||
USHORT Reserved4;
|
||||
ULONG Cr3;
|
||||
ULONG Eip;
|
||||
ULONG Eflags;
|
||||
ULONG Eax;
|
||||
ULONG Ecx;
|
||||
ULONG Edx;
|
||||
ULONG Ebx;
|
||||
ULONG Esp;
|
||||
ULONG Ebp;
|
||||
ULONG Esi;
|
||||
ULONG Edi;
|
||||
ULONG Cr3;
|
||||
ULONG Eip;
|
||||
ULONG Eflags;
|
||||
ULONG Eax;
|
||||
ULONG Ecx;
|
||||
ULONG Edx;
|
||||
ULONG Ebx;
|
||||
ULONG Esp;
|
||||
ULONG Ebp;
|
||||
ULONG Esi;
|
||||
ULONG Edi;
|
||||
USHORT Es;
|
||||
USHORT Reserved5;
|
||||
USHORT Cs;
|
||||
|
@ -512,12 +552,13 @@ typedef struct _KTSS
|
|||
USHORT Trap;
|
||||
USHORT IoMapBase;
|
||||
/* no interrupt redirection map */
|
||||
UCHAR IoBitmap[8193];
|
||||
UCHAR IoBitmap[8193];
|
||||
} KTSS;
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
/* i386 Doesn't have Exception Frames */
|
||||
//
|
||||
// i386 CPUs don't have exception frames
|
||||
//
|
||||
typedef struct _KEXCEPTION_FRAME KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,25 +1,32 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/i386/mmtypes.h
|
||||
* PURPOSE: I386-specific definitions for Memory Manager Types not defined in DDK/IFS
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 06/10/04
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
mmtypes.h (X86)
|
||||
|
||||
Abstract:
|
||||
|
||||
i386 Type definitions for the Memory Manager
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _I386_MMTYPES_H
|
||||
#define _I386_MMTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
//
|
||||
// Page-related Macros
|
||||
//
|
||||
#define PAGE_SIZE 0x1000
|
||||
#define PAGE_SHIFT 12L
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
#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 TSS_SELECTOR (0x28)
|
||||
#define PCR_SELECTOR (0x30)
|
||||
#define TEB_SELECTOR (0x38 + 0x3)
|
||||
#define LDT_SELECTOR (0x48)
|
||||
#define TRAP_TSS_SELECTOR (0x50)
|
||||
|
||||
#endif /* _ASM_SEGMENT_H */
|
|
@ -1,22 +1,24 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/ifssupp.h
|
||||
* PURPOSE: Defintions present in IFS, required for NDK usage.
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 08/16/05
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
ifssupp.h
|
||||
|
||||
Abstract:
|
||||
|
||||
NDK Support for usage without the IFS. Will be deprecated at WDK Release.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _NTIFS_
|
||||
#define _NTIFS_
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
typedef PVOID PRTL_HEAP_PARAMETERS;
|
||||
|
||||
typedef struct _RTL_SPLAY_LINKS
|
||||
|
@ -126,5 +128,4 @@ typedef enum _RTL_GENERIC_COMPARE_RESULTS
|
|||
GenericEqual
|
||||
} RTL_GENERIC_COMPARE_RESULTS;
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _NTIFS_
|
||||
|
|
|
@ -1,20 +1,31 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
inbvfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for the Boot Video Driver.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _INBVFUNCS_H
|
||||
#define _INBVFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
//
|
||||
// Ownership Functions
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
InbvAcquireDisplayOwnership(VOID);
|
||||
|
@ -23,24 +34,21 @@ BOOLEAN
|
|||
NTAPI
|
||||
InbvCheckDisplayOwnership(VOID);
|
||||
|
||||
BOOLEAN
|
||||
VOID
|
||||
NTAPI
|
||||
InbvDisplayString(
|
||||
IN PCHAR String
|
||||
InbvNotifyDisplayOwnershipLost(
|
||||
IN PVOID Callback
|
||||
);
|
||||
|
||||
//
|
||||
// Installation Functions
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
InbvEnableBootDriver(
|
||||
IN BOOLEAN Enable
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
InbvEnableDisplayString(
|
||||
IN BOOLEAN Enable
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
InbvInstallDisplayStringFilter(
|
||||
|
@ -51,10 +59,19 @@ BOOLEAN
|
|||
NTAPI
|
||||
InbvIsBootDriverInstalled(VOID);
|
||||
|
||||
VOID
|
||||
//
|
||||
// Display Functions
|
||||
//
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
InbvNotifyDisplayOwnershipLost(
|
||||
IN PVOID Callback
|
||||
InbvDisplayString(
|
||||
IN PCHAR String
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
InbvEnableDisplayString(
|
||||
IN BOOLEAN Enable
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
|
@ -86,16 +103,4 @@ InbvSolidColorFill(
|
|||
IN ULONG Color
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
VidCleanUp(VOID);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
VidResetDisplay(VOID);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
VidIsBootDriverInstalled(VOID);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,20 +1,28 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
iofuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for the I/O Manager.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _IOFUNCS_H
|
||||
#define _IOFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,110 +1,131 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
iotypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the I/O Manager.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _IOTYPES_H
|
||||
#define _IOTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Kernel Exported Object Types
|
||||
//
|
||||
extern POBJECT_TYPE NTSYSAPI IoAdapterObjectType;
|
||||
extern POBJECT_TYPE NTSYSAPI IoDeviceHandlerObjectType;
|
||||
extern POBJECT_TYPE NTSYSAPI IoDeviceObjectType;
|
||||
extern POBJECT_TYPE NTSYSAPI IoDriverObjectType;
|
||||
|
||||
#else
|
||||
|
||||
//
|
||||
// Symbolic Link Access Rights
|
||||
//
|
||||
#define SYMBOLIC_LINK_QUERY 0x0001
|
||||
#define SYMBOLIC_LINK_ALL_ACCESS STANDARD_RIGHTS_REQUIRED | 0x0001
|
||||
#endif
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
//
|
||||
// NtCreateFile Result Flags
|
||||
//
|
||||
#define FILE_SUPERSEDED 0x00000000
|
||||
#define FILE_OPENED 0x00000001
|
||||
#define FILE_CREATED 0x00000002
|
||||
#define FILE_OVERWRITTEN 0x00000003
|
||||
#define FILE_EXISTS 0x00000004
|
||||
#define FILE_DOES_NOT_EXIST 0x00000005
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
/* Object Access Rights */
|
||||
#define SYMBOLIC_LINK_QUERY 0x0001
|
||||
#define SYMBOLIC_LINK_ALL_ACCESS STANDARD_RIGHTS_REQUIRED | 0x0001
|
||||
#endif
|
||||
//
|
||||
// Pipe Flags
|
||||
//
|
||||
#define FILE_PIPE_BYTE_STREAM_TYPE 0x00000000
|
||||
#define FILE_PIPE_MESSAGE_TYPE 0x00000001
|
||||
#define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
|
||||
#define FILE_PIPE_MESSAGE_MODE 0x00000001
|
||||
#define FILE_PIPE_QUEUE_OPERATION 0x00000000
|
||||
#define FILE_PIPE_COMPLETE_OPERATION 0x00000001
|
||||
#define FILE_PIPE_INBOUND 0x00000000
|
||||
#define FILE_PIPE_OUTBOUND 0x00000001
|
||||
#define FILE_PIPE_FULL_DUPLEX 0x00000002
|
||||
#define FILE_PIPE_CLIENT_END 0x00000000
|
||||
#define FILE_PIPE_SERVER_END 0x00000001
|
||||
|
||||
/* File Result Flags */
|
||||
#define FILE_SUPERSEDED 0x00000000
|
||||
#define FILE_OPENED 0x00000001
|
||||
#define FILE_CREATED 0x00000002
|
||||
#define FILE_OVERWRITTEN 0x00000003
|
||||
#define FILE_EXISTS 0x00000004
|
||||
#define FILE_DOES_NOT_EXIST 0x00000005
|
||||
//
|
||||
// NtCreateFile Attributes
|
||||
//
|
||||
#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
|
||||
#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
|
||||
|
||||
/* Pipe Flags */
|
||||
#define FILE_PIPE_BYTE_STREAM_TYPE 0x00000000
|
||||
#define FILE_PIPE_MESSAGE_TYPE 0x00000001
|
||||
#define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
|
||||
#define FILE_PIPE_MESSAGE_MODE 0x00000001
|
||||
#define FILE_PIPE_QUEUE_OPERATION 0x00000000
|
||||
#define FILE_PIPE_COMPLETE_OPERATION 0x00000001
|
||||
#define FILE_PIPE_INBOUND 0x00000000
|
||||
#define FILE_PIPE_OUTBOUND 0x00000001
|
||||
#define FILE_PIPE_FULL_DUPLEX 0x00000002
|
||||
#define FILE_PIPE_CLIENT_END 0x00000000
|
||||
#define FILE_PIPE_SERVER_END 0x00000001
|
||||
//
|
||||
// NtCreateFile OpenType Flags
|
||||
//
|
||||
#define FILE_SUPERSEDE 0x00000000
|
||||
#define FILE_OPEN 0x00000001
|
||||
#define FILE_CREATE 0x00000002
|
||||
#define FILE_OPEN_IF 0x00000003
|
||||
#define FILE_OVERWRITE 0x00000004
|
||||
#define FILE_OVERWRITE_IF 0x00000005
|
||||
#define FILE_MAXIMUM_DISPOSITION 0x00000005
|
||||
|
||||
/* File Attributes */
|
||||
#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
|
||||
#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
|
||||
//
|
||||
// NtCreateFile Flags
|
||||
//
|
||||
#define FILE_DIRECTORY_FILE 0x00000001
|
||||
#define FILE_WRITE_THROUGH 0x00000002
|
||||
#define FILE_SEQUENTIAL_ONLY 0x00000004
|
||||
#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
|
||||
#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
|
||||
#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
|
||||
#define FILE_NON_DIRECTORY_FILE 0x00000040
|
||||
#define FILE_CREATE_TREE_CONNECTION 0x00000080
|
||||
#define FILE_COMPLETE_IF_OPLOCKED 0x00000100
|
||||
#define FILE_NO_EA_KNOWLEDGE 0x00000200
|
||||
#define FILE_OPEN_FOR_RECOVERY 0x00000400
|
||||
#define FILE_RANDOM_ACCESS 0x00000800
|
||||
#define FILE_DELETE_ON_CLOSE 0x00001000
|
||||
#define FILE_OPEN_BY_FILE_ID 0x00002000
|
||||
#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
|
||||
#define FILE_NO_COMPRESSION 0x00008000
|
||||
#define FILE_RESERVE_OPFILTER 0x00100000
|
||||
#define FILE_OPEN_REPARSE_POINT 0x00200000
|
||||
#define FILE_OPEN_NO_RECALL 0x00400000
|
||||
#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
|
||||
|
||||
/* File Flags */
|
||||
#define FILE_SUPERSEDE 0x00000000
|
||||
#define FILE_OPEN 0x00000001
|
||||
#define FILE_CREATE 0x00000002
|
||||
#define FILE_OPEN_IF 0x00000003
|
||||
#define FILE_OVERWRITE 0x00000004
|
||||
#define FILE_OVERWRITE_IF 0x00000005
|
||||
#define FILE_MAXIMUM_DISPOSITION 0x00000005
|
||||
//
|
||||
// Device Charactertics
|
||||
//
|
||||
#define FILE_REMOVABLE_MEDIA 0x00000001
|
||||
#define FILE_REMOTE_DEVICE 0x00000010
|
||||
|
||||
/* File Types */
|
||||
#define FILE_DIRECTORY_FILE 0x00000001
|
||||
#define FILE_WRITE_THROUGH 0x00000002
|
||||
#define FILE_SEQUENTIAL_ONLY 0x00000004
|
||||
#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
|
||||
#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
|
||||
#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
|
||||
#define FILE_NON_DIRECTORY_FILE 0x00000040
|
||||
#define FILE_CREATE_TREE_CONNECTION 0x00000080
|
||||
#define FILE_COMPLETE_IF_OPLOCKED 0x00000100
|
||||
#define FILE_NO_EA_KNOWLEDGE 0x00000200
|
||||
#define FILE_OPEN_FOR_RECOVERY 0x00000400
|
||||
#define FILE_RANDOM_ACCESS 0x00000800
|
||||
#define FILE_DELETE_ON_CLOSE 0x00001000
|
||||
#define FILE_OPEN_BY_FILE_ID 0x00002000
|
||||
#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
|
||||
#define FILE_NO_COMPRESSION 0x00008000
|
||||
#define FILE_RESERVE_OPFILTER 0x00100000
|
||||
#define FILE_OPEN_REPARSE_POINT 0x00200000
|
||||
#define FILE_OPEN_NO_RECALL 0x00400000
|
||||
#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
|
||||
//
|
||||
// Device Object Extension Flags
|
||||
//
|
||||
#define DOE_UNLOAD_PENDING 0x1
|
||||
#define DOE_DELETE_PENDING 0x2
|
||||
#define DOE_REMOVE_PENDING 0x4
|
||||
#define DOE_REMOVE_PROCESSED 0x8
|
||||
#define DOE_START_PENDING 0x10
|
||||
|
||||
/* For DeviceMap DosDevice Type */
|
||||
#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
|
||||
|
||||
/* Device Charactertics */
|
||||
#define FILE_REMOVABLE_MEDIA 0x00000001
|
||||
#define FILE_REMOTE_DEVICE 0x00000010
|
||||
|
||||
/* Device Object Extension Flags */
|
||||
#define DOE_UNLOAD_PENDING 0x1
|
||||
#define DOE_DELETE_PENDING 0x2
|
||||
#define DOE_REMOVE_PENDING 0x4
|
||||
#define DOE_REMOVE_PROCESSED 0x8
|
||||
#define DOE_START_PENDING 0x10
|
||||
|
||||
/* Device Node Flags */
|
||||
//
|
||||
// Device Node Flags
|
||||
//
|
||||
#define DNF_PROCESSED 0x00000001
|
||||
#define DNF_STARTED 0x00000002
|
||||
#define DNF_START_FAILED 0x00000004
|
||||
|
@ -137,18 +158,26 @@ extern POBJECT_TYPE NTSYSAPI IoDriverObjectType;
|
|||
#define DNF_HAS_BOOT_CONFIG 0x20000000
|
||||
#define DNF_BOOT_CONFIG_RESERVED 0x40000000
|
||||
#define DNF_HAS_PROBLEM 0x80000000 // ???
|
||||
/* For UserFlags field */
|
||||
#define DNUF_DONT_SHOW_IN_UI 0x0002
|
||||
#define DNUF_NOT_DISABLEABLE 0x0008
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// Device Node User Flags
|
||||
//
|
||||
#define DNUF_DONT_SHOW_IN_UI 0x0002
|
||||
#define DNUF_NOT_DISABLEABLE 0x0008
|
||||
|
||||
//
|
||||
// I/O Completion Information Class for NtQueryIoCompletionInformation
|
||||
//
|
||||
typedef enum _IO_COMPLETION_INFORMATION_CLASS
|
||||
{
|
||||
IoCompletionBasicInformation
|
||||
} IO_COMPLETION_INFORMATION_CLASS;
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Hardware Interface Type
|
||||
//
|
||||
typedef enum _INTERFACE_TYPE
|
||||
{
|
||||
InterfaceTypeUndefined = -1,
|
||||
|
@ -171,6 +200,9 @@ typedef enum _INTERFACE_TYPE
|
|||
MaximumInterfaceType
|
||||
}INTERFACE_TYPE, *PINTERFACE_TYPE;
|
||||
|
||||
//
|
||||
// File Information Classes for NtQueryInformationFile
|
||||
//
|
||||
typedef enum _FILE_INFORMATION_CLASS
|
||||
{
|
||||
FileDirectoryInformation = 1,
|
||||
|
@ -216,6 +248,9 @@ typedef enum _FILE_INFORMATION_CLASS
|
|||
FileMaximumInformation
|
||||
} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
|
||||
|
||||
//
|
||||
// File Information Classes for NtQueryInformationFileSystem
|
||||
//
|
||||
typedef enum _FSINFOCLASS
|
||||
{
|
||||
FileFsVolumeInformation = 1,
|
||||
|
@ -229,8 +264,12 @@ typedef enum _FSINFOCLASS
|
|||
FileFsDriverPathInformation,
|
||||
FileFsMaximumInformation
|
||||
} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Device Node States
|
||||
//
|
||||
typedef enum _PNP_DEVNODE_STATE
|
||||
{
|
||||
DeviceNodeUnspecified = 0x300,
|
||||
|
@ -257,9 +296,11 @@ typedef enum _PNP_DEVNODE_STATE
|
|||
MaxDeviceNodeState = 0x315,
|
||||
} PNP_DEVNODE_STATE;
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// File Information structures for NtQueryInformationFile
|
||||
//
|
||||
typedef struct _FILE_BASIC_INFORMATION
|
||||
{
|
||||
LARGE_INTEGER CreationTime;
|
||||
|
@ -440,6 +481,9 @@ typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION
|
|||
LARGE_INTEGER ValidDataLength;
|
||||
} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
|
||||
|
||||
//
|
||||
// File System Information structures for NtQueryInformationFile
|
||||
//
|
||||
typedef struct _FILE_FS_DEVICE_INFORMATION
|
||||
{
|
||||
DEVICE_TYPE DeviceType;
|
||||
|
@ -477,6 +521,9 @@ typedef struct _FILE_FS_VOLUME_INFORMATION
|
|||
WCHAR VolumeLabel[1];
|
||||
} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
|
||||
|
||||
//
|
||||
// Pipe Structures for IOCTL_PIPE_XXX
|
||||
//
|
||||
typedef struct _FILE_PIPE_WAIT_FOR_BUFFER
|
||||
{
|
||||
LARGE_INTEGER Timeout;
|
||||
|
@ -494,6 +541,9 @@ typedef struct _FILE_PIPE_PEEK_BUFFER
|
|||
CHAR Data[1];
|
||||
} FILE_PIPE_PEEK_BUFFER, *PFILE_PIPE_PEEK_BUFFER;
|
||||
|
||||
//
|
||||
// I/O Status Block
|
||||
//
|
||||
typedef struct _IO_STATUS_BLOCK
|
||||
{
|
||||
union
|
||||
|
@ -504,6 +554,9 @@ typedef struct _IO_STATUS_BLOCK
|
|||
ULONG_PTR Information;
|
||||
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
|
||||
|
||||
//
|
||||
// I/O Error Log Structures
|
||||
//
|
||||
typedef struct _IO_ERROR_LOG_PACKET
|
||||
{
|
||||
UCHAR MajorFunctionCode;
|
||||
|
@ -530,29 +583,37 @@ typedef struct _IO_ERROR_LOG_MESSAGE
|
|||
ULONG DriverNameOffset;
|
||||
IO_ERROR_LOG_PACKET EntryData;
|
||||
} IO_ERROR_LOG_MESSAGE, *PIO_ERROR_LOG_MESSAGE;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Parameters for NtCreateMailslotFile/NtCreateNamedPipeFile
|
||||
//
|
||||
typedef struct _MAILSLOT_CREATE_PARAMETERS
|
||||
{
|
||||
ULONG MailslotQuota;
|
||||
ULONG MaximumMessageSize;
|
||||
LARGE_INTEGER ReadTimeout;
|
||||
BOOLEAN TimeoutSpecified;
|
||||
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;
|
||||
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;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// I/O Timer Object
|
||||
//
|
||||
typedef struct _IO_TIMER
|
||||
{
|
||||
USHORT Type;
|
||||
|
@ -563,6 +624,9 @@ typedef struct _IO_TIMER
|
|||
PDEVICE_OBJECT DeviceObject;
|
||||
} IO_TIMER, *PIO_TIMER;
|
||||
|
||||
//
|
||||
// Device Node
|
||||
//
|
||||
typedef struct _DEVICE_NODE
|
||||
{
|
||||
struct _DEVICE_NODE *Parent;
|
||||
|
@ -626,6 +690,9 @@ typedef struct _DEVICE_NODE
|
|||
ULONG DeletedChidren;
|
||||
} DEVICE_NODE, *PDEVICE_NODE;
|
||||
|
||||
//
|
||||
// Resource Aribtrer Entry
|
||||
//
|
||||
typedef struct _PI_RESOURCE_ARBITER_ENTRY
|
||||
{
|
||||
LIST_ENTRY DeviceArbiterList;
|
||||
|
@ -639,7 +706,10 @@ typedef struct _PI_RESOURCE_ARBITER_ENTRY
|
|||
UCHAR State;
|
||||
UCHAR ResourcesChanged;
|
||||
} PI_RESOURCE_ARBITER_ENTRY, *PPI_RESOURCE_ARBITER_ENTRY;
|
||||
|
||||
|
||||
//
|
||||
// Extended Device Object Extension Structure
|
||||
//
|
||||
typedef struct _EXTENDED_DEVOBJ_EXTENSION
|
||||
{
|
||||
CSHORT Type;
|
||||
|
@ -656,6 +726,9 @@ typedef struct _EXTENDED_DEVOBJ_EXTENSION
|
|||
struct _VPB *Vpb;
|
||||
} EXTENDED_DEVOBJ_EXTENSION, *PEXTENDED_DEVOBJ_EXTENSION;
|
||||
|
||||
//
|
||||
// Private Driver Extension Descriptor
|
||||
//
|
||||
typedef struct _PRIVATE_DRIVER_EXTENSIONS
|
||||
{
|
||||
struct _PRIVATE_DRIVER_EXTENSIONS *Link;
|
||||
|
@ -663,6 +736,9 @@ typedef struct _PRIVATE_DRIVER_EXTENSIONS
|
|||
CHAR Extension[1];
|
||||
} PRIVATE_DRIVER_EXTENSIONS, *PPRIVATE_DRIVER_EXTENSIONS;
|
||||
|
||||
//
|
||||
// Extended I/O Stack Location Structure
|
||||
//
|
||||
#if !defined(_ALPHA_)
|
||||
#include <pshpack4.h>
|
||||
#endif
|
||||
|
@ -910,22 +986,26 @@ typedef struct _EXTENDED_IO_STACK_LOCATION
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
//
|
||||
// APC Callback for NtCreateFile
|
||||
//
|
||||
typedef VOID
|
||||
(NTAPI *PIO_APC_ROUTINE)(
|
||||
IN PVOID ApcContext,
|
||||
IN PIO_STATUS_BLOCK IoStatusBlock,
|
||||
IN ULONG Reserved);
|
||||
|
||||
/* I/O CONTROL CODES *********************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
/* Mailslots */
|
||||
|
||||
//
|
||||
// Mailslot IOCTL Codes
|
||||
//
|
||||
#define FSCTL_MAILSLOT_PEEK \
|
||||
CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA)
|
||||
|
||||
/* Pipes */
|
||||
//
|
||||
// Pipe IOCTL Codes
|
||||
//
|
||||
#define FSCTL_PIPE_ASSIGN_EVENT \
|
||||
CTL_CODE(FILE_DEVICE_NAMED_PIPE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define FSCTL_PIPE_DISCONNECT \
|
||||
|
@ -955,7 +1035,9 @@ typedef VOID
|
|||
#define FSCTL_PIPE_INTERNAL_READ_OVFLOW \
|
||||
CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2048, METHOD_BUFFERED, FILE_READ_DATA)
|
||||
|
||||
/* Tapes */
|
||||
//
|
||||
// Tape IOCTL Codes
|
||||
//
|
||||
#define IOCTL_TAPE_ERASE \
|
||||
CTL_CODE(FILE_DEVICE_TAPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
#define IOCTL_TAPE_PREPARE \
|
||||
|
@ -979,6 +1061,6 @@ typedef VOID
|
|||
#define IOCTL_TAPE_CREATE_PARTITION \
|
||||
CTL_CODE(FILE_DEVICE_TAPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif // NTOS_MODE_USER
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,19 +1,32 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
kdfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for the Kernel Debugger.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _KDFUNCS_H
|
||||
#define _KDFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include "kdtypes.h"
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
|
||||
//
|
||||
// Port Functions
|
||||
//
|
||||
UCHAR
|
||||
NTAPI
|
||||
KdPollBreakIn(VOID);
|
||||
|
|
|
@ -1,25 +1,40 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
kdtypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Kernel Debugger.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _KDTYPES_H
|
||||
#define _KDTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
//
|
||||
// Debug Filter Levels
|
||||
//
|
||||
#define DPFLTR_ERROR_LEVEL 0
|
||||
#define DPFLTR_WARNING_LEVEL 1
|
||||
#define DPFLTR_TRACE_LEVEL 2
|
||||
#define DPFLTR_INFO_LEVEL 3
|
||||
#define DPFLTR_MASK 0x80000000
|
||||
|
||||
//
|
||||
// Debug Status Codes
|
||||
//
|
||||
#define DBG_STATUS_CONTROL_C 1
|
||||
#define DBG_STATUS_SYSRQ 2
|
||||
#define DBG_STATUS_BUGCHECK_FIRST 3
|
||||
|
@ -28,10 +43,15 @@
|
|||
#define DBG_STATUS_DEBUG_CONTROL 6
|
||||
#define DBG_STATUS_WORKER 7
|
||||
|
||||
//
|
||||
// DebugService Control Types
|
||||
//
|
||||
#define BREAKPOINT_PRINT 1
|
||||
#define BREAKPOINT_PROMPT 2
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
//
|
||||
// Debug Control Codes for NtSystemDebugcontrol
|
||||
//
|
||||
typedef enum _DEBUG_CONTROL_CODE
|
||||
{
|
||||
DebugGetTraceInformation = 1,
|
||||
|
@ -43,8 +63,9 @@ typedef enum _DEBUG_CONTROL_CODE
|
|||
DebugDbgLoadSymbols
|
||||
} DEBUG_CONTROL_CODE;
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
//
|
||||
// Kernel Debugger Port Definition
|
||||
//
|
||||
typedef struct _KD_PORT_INFORMATION
|
||||
{
|
||||
ULONG ComPort;
|
||||
|
@ -52,4 +73,4 @@ typedef struct _KD_PORT_INFORMATION
|
|||
ULONG BaseAddress;
|
||||
} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
|
||||
|
||||
#endif
|
||||
#endif // _KDTYPES_H
|
||||
|
|
|
@ -1,18 +1,87 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
kefuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Functions definitions for the Kernel services.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _KEFUNCS_H
|
||||
#define _KEFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include "ketypes.h"
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
//
|
||||
// APC Functions
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
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
|
||||
NTAPI
|
||||
KiDeliverApc(
|
||||
IN KPROCESSOR_MODE PreviousMode,
|
||||
IN PVOID Reserved,
|
||||
IN PKTRAP_FRAME TrapFrame
|
||||
);
|
||||
|
||||
//
|
||||
// Process/Thread Functions
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
KeTerminateThread(
|
||||
IN KPRIORITY Increment
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
KeIsAttachedProcess(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeSetEventBoostPriority(
|
||||
IN PKEVENT Event,
|
||||
IN PKTHREAD *Thread OPTIONAL
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KeSetAffinityThread(
|
||||
PKTHREAD Thread,
|
||||
KAFFINITY Affinity
|
||||
);
|
||||
|
||||
PKPROCESS
|
||||
NTAPI
|
||||
KeGetCurrentProcess(
|
||||
VOID
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
|
@ -24,23 +93,9 @@ KeAddSystemServiceTable(
|
|||
ULONG Index
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
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
|
||||
NTAPI
|
||||
KeEnterKernelDebugger(VOID);
|
||||
|
||||
//
|
||||
// Spinlock Functions
|
||||
//
|
||||
VOID
|
||||
FASTCALL
|
||||
KiAcquireSpinLock(
|
||||
|
@ -53,115 +108,9 @@ KiReleaseSpinLock(
|
|||
PKSPIN_LOCK SpinLock
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KiDeliverApc(
|
||||
IN KPROCESSOR_MODE PreviousMode,
|
||||
IN PVOID Reserved,
|
||||
IN PKTRAP_FRAME TrapFrame
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KiDispatchInterrupt(VOID);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeTerminateThread(
|
||||
IN KPRIORITY Increment
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
KeIsAttachedProcess(VOID);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
KeIsExecutingDpc(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeSetEventBoostPriority(
|
||||
IN PKEVENT Event,
|
||||
IN PKTHREAD *Thread OPTIONAL
|
||||
);
|
||||
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
NTAPI
|
||||
KeFindConfigurationNextEntry(
|
||||
IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG ComponentKey OPTIONAL,
|
||||
IN PCONFIGURATION_COMPONENT_DATA *NextLink
|
||||
);
|
||||
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
NTAPI
|
||||
KeFindConfigurationEntry(
|
||||
IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG ComponentKey OPTIONAL
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeFlushEntireTb(
|
||||
IN BOOLEAN Unknown,
|
||||
IN BOOLEAN CurrentCpuOnly
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KiCoprocessorError(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KiUnexpectedInterrupt(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeSetDmaIoCoherency(
|
||||
IN ULONG Coherency
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeSetProfileIrql(
|
||||
IN KIRQL ProfileIrql
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KeSetAffinityThread(
|
||||
PKTHREAD Thread,
|
||||
KAFFINITY Affinity
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KeUserModeCallback(
|
||||
IN ULONG FunctionID,
|
||||
IN PVOID InputBuffer,
|
||||
IN ULONG InputLength,
|
||||
OUT PVOID *OutputBuffer,
|
||||
OUT PULONG OutputLength
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeSetTimeIncrement(
|
||||
IN ULONG MaxIncrement,
|
||||
IN ULONG MinIncrement
|
||||
);
|
||||
|
||||
//
|
||||
// Interrupt Functions
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
KeInitializeInterrupt(
|
||||
|
@ -190,12 +139,74 @@ KeDisconnectInterrupt(
|
|||
PKINTERRUPT InterruptObject
|
||||
);
|
||||
|
||||
PKPROCESS
|
||||
VOID
|
||||
NTAPI
|
||||
KeGetCurrentProcess(
|
||||
KiDispatchInterrupt(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KiCoprocessorError(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KiUnexpectedInterrupt(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeEnterKernelDebugger(
|
||||
VOID
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
KeIsExecutingDpc(
|
||||
VOID
|
||||
);
|
||||
|
||||
//
|
||||
// ARC Configuration Functions
|
||||
//
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
NTAPI
|
||||
KeFindConfigurationNextEntry(
|
||||
IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG ComponentKey OPTIONAL,
|
||||
IN PCONFIGURATION_COMPONENT_DATA *NextLink
|
||||
);
|
||||
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
NTAPI
|
||||
KeFindConfigurationEntry(
|
||||
IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG ComponentKey OPTIONAL
|
||||
);
|
||||
|
||||
//
|
||||
// Low-level Hardware/CPU Control Functions
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
KeFlushEntireTb(
|
||||
IN BOOLEAN Unknown,
|
||||
IN BOOLEAN CurrentCpuOnly
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeSetDmaIoCoherency(
|
||||
IN ULONG Coherency
|
||||
);
|
||||
|
||||
VOID
|
||||
KeSetGdtSelector(
|
||||
ULONG Entry,
|
||||
|
@ -203,10 +214,36 @@ KeSetGdtSelector(
|
|||
ULONG Value2
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeSetProfileIrql(
|
||||
IN KIRQL ProfileIrql
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KeSetTimeIncrement(
|
||||
IN ULONG MaxIncrement,
|
||||
IN ULONG MinIncrement
|
||||
);
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KeUserModeCallback(
|
||||
IN ULONG FunctionID,
|
||||
IN PVOID InputBuffer,
|
||||
IN ULONG InputLength,
|
||||
OUT PVOID *OutputBuffer,
|
||||
OUT PULONG OutputLength
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KeRaiseUserException(
|
||||
IN NTSTATUS ExceptionCode
|
||||
);
|
||||
);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,51 +1,94 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
lpctypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Loader.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _KETYPES_H
|
||||
#define _KETYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#ifndef NTOS_MODE_USER
|
||||
#include <arc/arc.h>
|
||||
#include "arch/ketypes.h"
|
||||
#endif
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
#define SSDT_MAX_ENTRIES 4
|
||||
#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
|
||||
//
|
||||
// Context Record Flags
|
||||
//
|
||||
#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
|
||||
|
||||
//
|
||||
// Maximum System Descriptor Table Entries
|
||||
//
|
||||
#define SSDT_MAX_ENTRIES 4
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
#define SharedUserData ((KUSER_SHARED_DATA * CONST) USER_SHARED_DATA)
|
||||
#define MAX_WOW64_SHARED_ENTRIES 16
|
||||
#define PROCESSOR_FEATURE_MAX 64
|
||||
#endif
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// KPROCESSOR_MODE Type
|
||||
//
|
||||
typedef CCHAR KPROCESSOR_MODE;
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
//
|
||||
// Dereferencable pointer to KUSER_SHARED_DATA in User-Mode
|
||||
//
|
||||
#define SharedUserData ((KUSER_SHARED_DATA *CONST)USER_SHARED_DATA)
|
||||
|
||||
//
|
||||
// Maximum WOW64 Entries in KUSER_SHARED_DATA
|
||||
//
|
||||
#define MAX_WOW64_SHARED_ENTRIES 16
|
||||
|
||||
//
|
||||
// Maximum Processor Features supported in KUSER_SHARED_DATA
|
||||
//
|
||||
#define PROCESSOR_FEATURE_MAX 64
|
||||
|
||||
//
|
||||
// Event Types
|
||||
//
|
||||
typedef enum _EVENT_TYPE
|
||||
{
|
||||
NotificationEvent,
|
||||
SynchronizationEvent
|
||||
} EVENT_TYPE;
|
||||
|
||||
//
|
||||
// Timer Types
|
||||
//
|
||||
typedef enum _TIMER_TYPE
|
||||
{
|
||||
NotificationTimer,
|
||||
SynchronizationTimer
|
||||
} TIMER_TYPE;
|
||||
|
||||
//
|
||||
// Wait Types
|
||||
//
|
||||
typedef enum _WAIT_TYPE
|
||||
{
|
||||
WaitAll,
|
||||
WaitAny
|
||||
} WAIT_TYPE;
|
||||
|
||||
//
|
||||
// Processor Execution Modes
|
||||
//
|
||||
typedef enum _MODE
|
||||
{
|
||||
KernelMode,
|
||||
|
@ -53,6 +96,9 @@ typedef enum _MODE
|
|||
MaximumMode
|
||||
} MODE;
|
||||
|
||||
//
|
||||
// Wait Reasons
|
||||
//
|
||||
typedef enum _KWAIT_REASON
|
||||
{
|
||||
Executive,
|
||||
|
@ -92,6 +138,9 @@ typedef enum _KWAIT_REASON
|
|||
MaximumWaitReason
|
||||
} KWAIT_REASON;
|
||||
|
||||
//
|
||||
// Profiling Sources
|
||||
//
|
||||
typedef enum _KPROFILE_SOURCE
|
||||
{
|
||||
ProfileTime,
|
||||
|
@ -121,6 +170,9 @@ typedef enum _KPROFILE_SOURCE
|
|||
ProfileMaximum
|
||||
} KPROFILE_SOURCE;
|
||||
|
||||
//
|
||||
// NT Product and Architecture Types
|
||||
//
|
||||
typedef enum _NT_PRODUCT_TYPE
|
||||
{
|
||||
NtProductWinNt = 1,
|
||||
|
@ -134,8 +186,12 @@ typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE
|
|||
NEC98x86,
|
||||
EndAlternatives
|
||||
} ALTERNATIVE_ARCHITECTURE_TYPE;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Thread States
|
||||
//
|
||||
typedef enum _KTHREAD_STATE
|
||||
{
|
||||
Initialized,
|
||||
|
@ -148,6 +204,9 @@ typedef enum _KTHREAD_STATE
|
|||
DeferredReady,
|
||||
} KTHREAD_STATE, *PKTHREAD_STATE;
|
||||
|
||||
//
|
||||
// Process States
|
||||
//
|
||||
typedef enum _KPROCESS_STATE
|
||||
{
|
||||
ProcessInMemory,
|
||||
|
@ -155,27 +214,31 @@ typedef enum _KPROCESS_STATE
|
|||
ProcessInTransition,
|
||||
} KPROCESS_STATE, *PKPROCESS_STATE;
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// APC Normal Routine
|
||||
//
|
||||
typedef VOID
|
||||
(NTAPI *PKNORMAL_ROUTINE)(
|
||||
IN PVOID NormalContext,
|
||||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2);
|
||||
IN PVOID NormalContext,
|
||||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2
|
||||
);
|
||||
|
||||
//
|
||||
// Timer Routine
|
||||
//
|
||||
typedef VOID
|
||||
(NTAPI *PTIMER_APC_ROUTINE)(
|
||||
IN PVOID TimerContext,
|
||||
IN ULONG TimerLowValue,
|
||||
IN LONG TimerHighValue);
|
||||
#endif
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
typedef CCHAR KPROCESSOR_MODE;
|
||||
IN PVOID TimerContext,
|
||||
IN ULONG TimerLowValue,
|
||||
IN LONG TimerHighValue
|
||||
);
|
||||
|
||||
//
|
||||
// System Time Structure
|
||||
//
|
||||
typedef struct _KSYSTEM_TIME
|
||||
{
|
||||
ULONG LowPart;
|
||||
|
@ -183,6 +246,9 @@ typedef struct _KSYSTEM_TIME
|
|||
LONG High2Time;
|
||||
} KSYSTEM_TIME, *PKSYSTEM_TIME;
|
||||
|
||||
//
|
||||
// Shared Kernel User Data
|
||||
//
|
||||
typedef struct _KUSER_SHARED_DATA
|
||||
{
|
||||
ULONG TickCountLowDeprecated;
|
||||
|
@ -231,9 +297,12 @@ typedef struct _KUSER_SHARED_DATA
|
|||
ULONG Wow64SharedInformation[MAX_WOW64_SHARED_ENTRIES];
|
||||
ULONG UserModeGlobalLogging;
|
||||
} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA;
|
||||
#endif
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
#else
|
||||
|
||||
//
|
||||
// ARC Component Data
|
||||
//
|
||||
typedef struct _CONFIGURATION_COMPONENT_DATA
|
||||
{
|
||||
struct _CONFIGURATION_COMPONENT_DATA *Parent;
|
||||
|
@ -242,6 +311,9 @@ typedef struct _CONFIGURATION_COMPONENT_DATA
|
|||
CONFIGURATION_COMPONENT Component;
|
||||
} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA;
|
||||
|
||||
//
|
||||
// APC Environment Types
|
||||
//
|
||||
typedef enum _KAPC_ENVIRONMENT
|
||||
{
|
||||
OriginalApcEnvironment,
|
||||
|
@ -249,20 +321,26 @@ typedef enum _KAPC_ENVIRONMENT
|
|||
CurrentApcEnvironment
|
||||
} KAPC_ENVIRONMENT;
|
||||
|
||||
//
|
||||
// Kernel Memory Node (FIXME: mmtypes?
|
||||
//
|
||||
typedef struct _KNODE
|
||||
{
|
||||
SLIST_HEADER DeadStackList;
|
||||
SLIST_HEADER PfnDereferenceSListHead;
|
||||
ULONG ProcessorMask;
|
||||
ULONG Color;
|
||||
UCHAR Seed;
|
||||
UCHAR NodeNumber;
|
||||
ULONG Flags;
|
||||
ULONG MmShiftedColor;
|
||||
ULONG FreeCount[2];
|
||||
struct _SINGLE_LIST_ENTRY *PfnDeferredList;
|
||||
SLIST_HEADER DeadStackList;
|
||||
SLIST_HEADER PfnDereferenceSListHead;
|
||||
ULONG ProcessorMask;
|
||||
ULONG Color;
|
||||
UCHAR Seed;
|
||||
UCHAR NodeNumber;
|
||||
ULONG Flags;
|
||||
ULONG MmShiftedColor;
|
||||
ULONG FreeCount[2];
|
||||
struct _SINGLE_LIST_ENTRY *PfnDeferredList;
|
||||
} KNODE, *PKNODE;
|
||||
|
||||
//
|
||||
// Kernel Profile Object (FIXME: Fix with new defs)
|
||||
//
|
||||
typedef struct _KPROFILE
|
||||
{
|
||||
CSHORT Type;
|
||||
|
@ -278,6 +356,9 @@ typedef struct _KPROFILE
|
|||
struct _KPROCESS *Process;
|
||||
} KPROFILE, *PKPROFILE;
|
||||
|
||||
//
|
||||
// Kernel Interrupt Object (FIXME: Verify)
|
||||
//
|
||||
typedef struct _KINTERRUPT
|
||||
{
|
||||
CSHORT Type;
|
||||
|
@ -302,6 +383,9 @@ typedef struct _KINTERRUPT
|
|||
ULONG DispatchCode[106];
|
||||
} KINTERRUPT, *PKINTERRUPT;
|
||||
|
||||
//
|
||||
// Kernel Event Pair Object
|
||||
//
|
||||
typedef struct _KEVENT_PAIR
|
||||
{
|
||||
CSHORT Type;
|
||||
|
@ -310,6 +394,9 @@ typedef struct _KEVENT_PAIR
|
|||
KEVENT HighEvent;
|
||||
} KEVENT_PAIR, *PKEVENT_PAIR;
|
||||
|
||||
//
|
||||
// Kernel No Execute Options
|
||||
//
|
||||
typedef struct _KEXECUTE_OPTIONS
|
||||
{
|
||||
UCHAR ExecuteDisable:1;
|
||||
|
@ -321,6 +408,9 @@ typedef struct _KEXECUTE_OPTIONS
|
|||
UCHAR Spare:2;
|
||||
} KEXECUTE_OPTIONS, *PKEXECUTE_OPTIONS;
|
||||
|
||||
//
|
||||
// Kernel Object Types
|
||||
//
|
||||
typedef enum _KOBJECTS
|
||||
{
|
||||
EventNotificationObject = 0,
|
||||
|
@ -351,8 +441,10 @@ typedef enum _KOBJECTS
|
|||
MaximumKernelObject = 25
|
||||
} KOBJECTS;
|
||||
|
||||
//
|
||||
// Kernel Thread (KTHREAD)
|
||||
//
|
||||
#include <pshpack1.h>
|
||||
|
||||
typedef struct _KTHREAD
|
||||
{
|
||||
DISPATCHER_HEADER DispatcherHeader; /* 00 */
|
||||
|
@ -528,9 +620,11 @@ typedef struct _KTHREAD
|
|||
LIST_ENTRY ThreadListEntry; /* 1A8 */
|
||||
PVOID SListFaultAddress; /* 1B0 */
|
||||
} KTHREAD; /* sizeof: 1B4 */
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
//
|
||||
// Kernel Process (KPROCESS)
|
||||
//
|
||||
typedef struct _KPROCESS
|
||||
{
|
||||
DISPATCHER_HEADER Header; /* 000 */
|
||||
|
@ -575,6 +669,9 @@ typedef struct _KPROCESS
|
|||
LIST_ENTRY ProcessListEntry; /* 070 */
|
||||
} KPROCESS;
|
||||
|
||||
//
|
||||
// System Service Table Descriptor
|
||||
//
|
||||
typedef struct _KSERVICE_TABLE_DESCRIPTOR
|
||||
{
|
||||
PULONG_PTR Base;
|
||||
|
@ -585,21 +682,34 @@ typedef struct _KSERVICE_TABLE_DESCRIPTOR
|
|||
#endif
|
||||
PUCHAR Number;
|
||||
} KSERVICE_TABLE_DESCRIPTOR, *PKSERVICE_TABLE_DESCRIPTOR;
|
||||
#endif /* !NTOS_MODE_USER */
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
#ifndef NTOS_MODE_USER
|
||||
extern CHAR NTSYSAPI KeNumberProcessors;
|
||||
//
|
||||
// Exported Loader Parameter Block
|
||||
//
|
||||
extern LOADER_PARAMETER_BLOCK NTSYSAPI KeLoaderBlock;
|
||||
extern ULONG NTSYSAPI KeDcacheFlushCount;
|
||||
extern ULONG NTSYSAPI KeIcacheFlushCount;
|
||||
|
||||
//
|
||||
// Exported Hardware Data
|
||||
//
|
||||
extern KAFFINITY NTSYSAPI KeActiveProcessors;
|
||||
extern ULONG NTSYSAPI KiDmaIoCoherency; /* RISC Architectures only */
|
||||
extern CHAR NTSYSAPI KeNumberProcessors;
|
||||
extern ULONG NTSYSAPI KiDmaIoCoherency;
|
||||
extern ULONG NTSYSAPI KeMaximumIncrement;
|
||||
extern ULONG NTSYSAPI KeMinimumIncrement;
|
||||
extern ULONG NTSYSAPI KeDcacheFlushCount;
|
||||
extern ULONG NTSYSAPI KeIcacheFlushCount;
|
||||
|
||||
//
|
||||
// Exported NT Build Number (FIXME: move?)
|
||||
//
|
||||
extern ULONG NTSYSAPI NtBuildNumber;
|
||||
|
||||
//
|
||||
// Exported System Service Descriptor Tables
|
||||
//
|
||||
extern KSERVICE_TABLE_DESCRIPTOR NTSYSAPI KeServiceDescriptorTable[SSDT_MAX_ENTRIES];
|
||||
extern KSERVICE_TABLE_DESCRIPTOR NTSYSAPI KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES];
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // !NTOS_MODE_USER
|
||||
|
||||
#endif // _KETYPES_H
|
||||
|
|
|
@ -1,30 +1,40 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
ldrfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Functions definitions for the Loader.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _LDRFUNCS_H
|
||||
#define _LDRFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include "ldrtypes.h"
|
||||
/* FIXME: this needs be implemented in the w32api ddk */
|
||||
#if defined(_MSC_VER) && !defined(NTOS_MODE_USER)
|
||||
#include <ntimage.h>
|
||||
#endif
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
|
||||
//
|
||||
// Resource Functions
|
||||
//
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
LdrAccessResource(
|
||||
IN PVOID BaseAddress,
|
||||
IN PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry,
|
||||
IN PVOID BaseAddress,
|
||||
IN PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry,
|
||||
OUT PVOID *Resource OPTIONAL,
|
||||
OUT PULONG Size OPTIONAL
|
||||
);
|
||||
|
@ -32,9 +42,9 @@ LdrAccessResource(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
LdrFindResource_U(
|
||||
IN PVOID BaseAddress,
|
||||
IN PLDR_RESOURCE_INFO ResourceInfo,
|
||||
IN ULONG Level,
|
||||
IN PVOID BaseAddress,
|
||||
IN PLDR_RESOURCE_INFO ResourceInfo,
|
||||
IN ULONG Level,
|
||||
OUT PIMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry
|
||||
);
|
||||
|
||||
|
@ -47,6 +57,9 @@ LdrFindResourceDirectory_U(
|
|||
OUT PIMAGE_RESOURCE_DIRECTORY *ResourceDirectory
|
||||
);
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
LdrGetProcedureAddress(
|
||||
|
|
|
@ -1,55 +1,72 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
ldrtypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Loader.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _LDRTYPES_H
|
||||
#define _LDRTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
//
|
||||
// Resource Type Levels
|
||||
//
|
||||
#define RESOURCE_TYPE_LEVEL 0
|
||||
#define RESOURCE_NAME_LEVEL 1
|
||||
#define RESOURCE_LANGUAGE_LEVEL 2
|
||||
#define RESOURCE_DATA_LEVEL 3
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
#define RESOURCE_TYPE_LEVEL 0
|
||||
#define RESOURCE_NAME_LEVEL 1
|
||||
#define RESOURCE_LANGUAGE_LEVEL 2
|
||||
#define RESOURCE_DATA_LEVEL 3
|
||||
//
|
||||
// Loader Data Table Entry Flags
|
||||
//
|
||||
#define LDRP_STATIC_LINK 0x00000002
|
||||
#define LDRP_IMAGE_DLL 0x00000004
|
||||
#define LDRP_LOAD_IN_PROGRESS 0x00001000
|
||||
#define LDRP_UNLOAD_IN_PROGRESS 0x00002000
|
||||
#define LDRP_ENTRY_PROCESSED 0x00004000
|
||||
#define LDRP_ENTRY_INSERTED 0x00008000
|
||||
#define LDRP_CURRENT_LOAD 0x00010000
|
||||
#define LDRP_FAILED_BUILTIN_LOAD 0x00020000
|
||||
#define LDRP_DONT_CALL_FOR_THREADS 0x00040000
|
||||
#define LDRP_PROCESS_ATTACH_CALLED 0x00080000
|
||||
#define LDRP_DEBUG_SYMBOLS_LOADED 0x00100000
|
||||
#define LDRP_IMAGE_NOT_AT_BASE 0x00200000
|
||||
#define LDRP_COR_IMAGE 0x00400000
|
||||
#define LDR_COR_OWNS_UNMAP 0x00800000
|
||||
#define LDRP_REDIRECTED 0x10000000
|
||||
|
||||
/* LDR_DATA_TABLE_ENTRY Flags */
|
||||
#define LDRP_STATIC_LINK 0x00000002
|
||||
#define LDRP_IMAGE_DLL 0x00000004
|
||||
#define LDRP_LOAD_IN_PROGRESS 0x00001000
|
||||
#define LDRP_UNLOAD_IN_PROGRESS 0x00002000
|
||||
#define LDRP_ENTRY_PROCESSED 0x00004000
|
||||
#define LDRP_ENTRY_INSERTED 0x00008000
|
||||
#define LDRP_CURRENT_LOAD 0x00010000
|
||||
#define LDRP_FAILED_BUILTIN_LOAD 0x00020000
|
||||
#define LDRP_DONT_CALL_FOR_THREADS 0x00040000
|
||||
#define LDRP_PROCESS_ATTACH_CALLED 0x00080000
|
||||
#define LDRP_DEBUG_SYMBOLS_LOADED 0x00100000
|
||||
#define LDRP_IMAGE_NOT_AT_BASE 0x00200000
|
||||
#define LDRP_COR_IMAGE 0x00400000
|
||||
#define LDR_COR_OWNS_UNMAP 0x00800000
|
||||
#define LDRP_REDIRECTED 0x10000000
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
//
|
||||
// Loader Data stored in the PEB
|
||||
//
|
||||
typedef struct _PEB_LDR_DATA
|
||||
{
|
||||
ULONG Length;
|
||||
BOOLEAN Initialized;
|
||||
PVOID SsHandle;
|
||||
LIST_ENTRY InLoadOrderModuleList;
|
||||
LIST_ENTRY InMemoryOrderModuleList;
|
||||
LIST_ENTRY InInitializationOrderModuleList;
|
||||
PVOID EntryInProgress;
|
||||
ULONG Length;
|
||||
BOOLEAN Initialized;
|
||||
PVOID SsHandle;
|
||||
LIST_ENTRY InLoadOrderModuleList;
|
||||
LIST_ENTRY InMemoryOrderModuleList;
|
||||
LIST_ENTRY InInitializationOrderModuleList;
|
||||
PVOID EntryInProgress;
|
||||
} PEB_LDR_DATA, *PPEB_LDR_DATA;
|
||||
|
||||
//
|
||||
// Loader Data Table Entry
|
||||
//
|
||||
typedef struct _LDR_DATA_TABLE_ENTRY
|
||||
{
|
||||
LIST_ENTRY InLoadOrderModuleList;
|
||||
|
@ -78,6 +95,9 @@ typedef struct _LDR_DATA_TABLE_ENTRY
|
|||
PVOID PatchInformation;
|
||||
} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
|
||||
|
||||
//
|
||||
// Loader Resource Information
|
||||
//
|
||||
typedef struct _LDR_RESOURCE_INFO
|
||||
{
|
||||
ULONG Type;
|
||||
|
|
|
@ -1,20 +1,36 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
lpctypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Loader.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _LPCTYPES_H
|
||||
#define _LPCTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// Maximum message size that can be sent through an LPC Port without a section
|
||||
//
|
||||
#define PORT_MAXIMUM_MESSAGE_LENGTH 256
|
||||
|
||||
//
|
||||
// LPC Message Types
|
||||
//
|
||||
typedef enum _LPC_TYPE
|
||||
{
|
||||
LPC_NEW_MESSAGE,
|
||||
|
@ -32,16 +48,20 @@ typedef enum _LPC_TYPE
|
|||
LPC_MAXIMUM
|
||||
} LPC_TYPE;
|
||||
|
||||
//
|
||||
// Information Classes for NtQueryInformationPort
|
||||
//
|
||||
typedef enum _PORT_INFORMATION_CLASS
|
||||
{
|
||||
PortNoInformation
|
||||
} PORT_INFORMATION_CLASS;
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
#if defined(USE_LPC6432)
|
||||
//
|
||||
// Portable LPC Types for 32/64-bit compatibility
|
||||
//
|
||||
#ifdef USE_LPC6432
|
||||
#define LPC_CLIENT_ID CLIENT_ID64
|
||||
#define LPC_SIZE_T ULONGLONG
|
||||
#define LPC_PVOID ULONGLONG
|
||||
|
@ -53,6 +73,9 @@ typedef enum _PORT_INFORMATION_CLASS
|
|||
#define LPC_HANDLE HANDLE
|
||||
#endif
|
||||
|
||||
//
|
||||
// LPC Port Message
|
||||
//
|
||||
typedef struct _PORT_MESSAGE
|
||||
{
|
||||
union
|
||||
|
@ -86,6 +109,9 @@ typedef struct _PORT_MESSAGE
|
|||
};
|
||||
} PORT_MESSAGE, *PPORT_MESSAGE;
|
||||
|
||||
//
|
||||
// Local and Remove Port Views
|
||||
//
|
||||
typedef struct _PORT_VIEW
|
||||
{
|
||||
ULONG Length;
|
||||
|
@ -103,6 +129,9 @@ typedef struct _REMOTE_PORT_VIEW
|
|||
LPC_PVOID ViewBase;
|
||||
} REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW;
|
||||
|
||||
//
|
||||
// LPC Kernel-Mode Message Structures defined for size only
|
||||
//
|
||||
typedef struct _LPCP_MESSAGE
|
||||
{
|
||||
UCHAR Data[0x14];
|
||||
|
@ -114,9 +143,11 @@ typedef struct _LPCP_CONNECTION_MESSAGE
|
|||
UCHAR Data[0x2C];
|
||||
} LPCP_CONNECTION_MESSAGE;
|
||||
|
||||
/* Kernel-Mode Structures */
|
||||
#else
|
||||
|
||||
//
|
||||
// LPC Paged and Non-Paged Port Queues
|
||||
//
|
||||
typedef struct _LPCP_NONPAGED_PORT_QUEUE
|
||||
{
|
||||
KSEMAPHORE Semaphore;
|
||||
|
@ -130,6 +161,9 @@ typedef struct _LPCP_PORT_QUEUE
|
|||
LIST_ENTRY ReceiveHead;
|
||||
} LPCP_PORT_QUEUE, *PLPCP_PORT_QUEUE;
|
||||
|
||||
//
|
||||
// LPC Port Object
|
||||
//
|
||||
typedef struct _LPCP_PORT_OBJECT
|
||||
{
|
||||
ULONG Length;
|
||||
|
@ -150,6 +184,9 @@ typedef struct _LPCP_PORT_OBJECT
|
|||
LIST_ENTRY LpcDataInfoChainHead;
|
||||
} LPCP_PORT_OBJECT, *PLPCP_PORT_OBJECT;
|
||||
|
||||
//
|
||||
// LPC Kernel-Mode Message Structures
|
||||
//
|
||||
typedef struct _LPCP_MESSAGE
|
||||
{
|
||||
union
|
||||
|
@ -174,8 +211,12 @@ typedef struct _LPCP_CONNECTION_MESSAGE
|
|||
PVOID SectionToMap;
|
||||
REMOTE_PORT_VIEW ServerView;
|
||||
} LPCP_CONNECTION_MESSAGE, *PLPCP_CONNECTION_MESSAGE;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Hard Error LPC Message (FIXME: should go in extypes.h?)
|
||||
//
|
||||
typedef struct _HARDERROR_MSG
|
||||
{
|
||||
PORT_MESSAGE h;
|
||||
|
@ -188,28 +229,36 @@ typedef struct _HARDERROR_MSG
|
|||
ULONG Parameters[MAXIMUM_HARDERROR_PARAMETERS];
|
||||
} HARDERROR_MSG, *PHARDERROR_MSG;
|
||||
|
||||
//
|
||||
// Client Died LPC Message (FIXME: should go in pstypes.h?)
|
||||
//
|
||||
typedef struct _CLIENT_DIED_MSG
|
||||
{
|
||||
PORT_MESSAGE h;
|
||||
LARGE_INTEGER CreateTime;
|
||||
} CLIENT_DIED_MSG, *PCLIENT_DIED_MSG;
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
|
||||
#define PORT_MAXIMUM_MESSAGE_LENGTH 256
|
||||
|
||||
//
|
||||
// Maximum total Kernel-Mode LPC Message Structure Size
|
||||
//
|
||||
#define LPCP_MAX_MESSAGE_SIZE \
|
||||
ROUND_UP(PORT_MAXIMUM_MESSAGE_LENGTH + \
|
||||
sizeof(LPCP_MESSAGE) + \
|
||||
sizeof(LPCP_CONNECTION_MESSAGE), 16)
|
||||
|
||||
//
|
||||
// Maximum actual LPC Message Length
|
||||
//
|
||||
#define LPC_MAX_MESSAGE_LENGTH \
|
||||
(LPCP_MAX_MESSAGE_SIZE - \
|
||||
FIELD_OFFSET(LPCP_MESSAGE, Request))
|
||||
|
||||
//
|
||||
// Maximum actual size of LPC Message Data
|
||||
//
|
||||
#define LPC_MAX_DATA_LENGTH \
|
||||
(LPC_MAX_MESSAGE_LENGTH - \
|
||||
sizeof(PORT_MESSAGE) - \
|
||||
sizeof(LPCP_CONNECTION_MESSAGE))
|
||||
|
||||
#endif
|
||||
#endif // _LPCTYPES_H
|
||||
|
|
|
@ -1,18 +1,31 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
mmfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Functions definitions for the Memory Manager.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _MMFUNCS_H
|
||||
#define _MMFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
//
|
||||
// Section Functions
|
||||
//
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
MmUnmapViewOfSection(
|
||||
|
|
|
@ -1,34 +1,61 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
mmtypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Memory Manager
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _MMTYPES_H
|
||||
#define _MMTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
#include "arch/mmtypes.h"
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include <arch/mmtypes.h>
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
//
|
||||
// Page-Rounding Macros
|
||||
//
|
||||
#define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~(PAGE_SIZE-1)))
|
||||
#define PAGE_ROUND_UP(x) \
|
||||
( (((ULONG)x)%PAGE_SIZE) ? ((((ULONG)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG)x) )
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
#ifdef NTOS_MODE_USER
|
||||
#define SEC_BASED 0x00200000
|
||||
#define SEC_NO_CHANGE 0x00400000
|
||||
#endif
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// Macro for generating pool tags
|
||||
//
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Section Flags for NtCreateSection
|
||||
//
|
||||
#define SEC_BASED 0x00200000
|
||||
#define SEC_NO_CHANGE 0x00400000
|
||||
|
||||
//
|
||||
// Section Inherit Flags for NtCreateSection
|
||||
//
|
||||
typedef enum _SECTION_INHERIT
|
||||
{
|
||||
ViewShare = 1,
|
||||
ViewUnmap = 2
|
||||
} SECTION_INHERIT;
|
||||
|
||||
//
|
||||
// Pool Types
|
||||
//
|
||||
typedef enum _POOL_TYPE
|
||||
{
|
||||
NonPagedPool,
|
||||
|
@ -49,6 +76,9 @@ typedef enum _POOL_TYPE
|
|||
} POOL_TYPE;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Per Processor Non Paged Lookaside List IDs
|
||||
//
|
||||
typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
|
||||
{
|
||||
LookasideSmallIrpList = 0,
|
||||
|
@ -61,6 +91,9 @@ typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
|
|||
LookasideMaximumList = 7
|
||||
} PP_NPAGED_LOOKASIDE_NUMBER;
|
||||
|
||||
//
|
||||
// Memory Information Classes for NtQueryVirtualMemory
|
||||
//
|
||||
typedef enum _MEMORY_INFORMATION_CLASS
|
||||
{
|
||||
MemoryBasicInformation,
|
||||
|
@ -69,15 +102,20 @@ typedef enum _MEMORY_INFORMATION_CLASS
|
|||
MemoryBasicVlmInformation
|
||||
} MEMORY_INFORMATION_CLASS;
|
||||
|
||||
//
|
||||
// Section Information Clasess for NtQuerySection
|
||||
//
|
||||
typedef enum _SECTION_INFORMATION_CLASS
|
||||
{
|
||||
SectionBasicInformation,
|
||||
SectionImageInformation,
|
||||
} SECTION_INFORMATION_CLASS;
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Virtual Memory Counters
|
||||
//
|
||||
typedef struct _VM_COUNTERS
|
||||
{
|
||||
SIZE_T PeakVirtualSize;
|
||||
|
@ -110,18 +148,27 @@ typedef struct _VM_COUNTERS_EX
|
|||
} VM_COUNTERS_EX, *PVM_COUNTERS_EX;
|
||||
#endif
|
||||
|
||||
//
|
||||
// List of Working Sets
|
||||
//
|
||||
typedef struct _MEMORY_WORKING_SET_LIST
|
||||
{
|
||||
ULONG NumberOfPages;
|
||||
ULONG WorkingSetList[1];
|
||||
} MEMORY_WORKING_SET_LIST, *PMEMORY_WORKING_SET_LIST;
|
||||
|
||||
//
|
||||
// Memory Information Structures for NtQueryVirtualMemory
|
||||
//
|
||||
typedef struct
|
||||
{
|
||||
UNICODE_STRING SectionFileName;
|
||||
WCHAR NameBuffer[ANYSIZE_ARRAY];
|
||||
WCHAR NameBuffer[ANYSIZE_ARRAY];
|
||||
} MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
|
||||
|
||||
//
|
||||
// Section Information Structures for NtQuerySection
|
||||
//
|
||||
typedef struct _SECTION_BASIC_INFORMATION
|
||||
{
|
||||
PVOID BaseAddress;
|
||||
|
@ -150,7 +197,10 @@ typedef struct _SECTION_IMAGE_INFORMATION
|
|||
} SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
/* FIXME: Forced to do this for now, because of EPROCESS, will go away before 0.3.0 */
|
||||
|
||||
//
|
||||
// FIXME: REACTOS SPECIFIC HACK IN EPROCESS
|
||||
//
|
||||
typedef struct _MADDRESS_SPACE
|
||||
{
|
||||
struct _MEMORY_AREA *MemoryAreaRoot;
|
||||
|
@ -161,6 +211,9 @@ typedef struct _MADDRESS_SPACE
|
|||
ULONG PageTableRefCountTableSize;
|
||||
} MADDRESS_SPACE, *PMADDRESS_SPACE;
|
||||
|
||||
//
|
||||
// Generic Address Range Structure
|
||||
//
|
||||
typedef struct _ADDRESS_RANGE
|
||||
{
|
||||
ULONG BaseAddrLow;
|
||||
|
@ -170,6 +223,9 @@ typedef struct _ADDRESS_RANGE
|
|||
ULONG Type;
|
||||
} ADDRESS_RANGE, *PADDRESS_RANGE;
|
||||
|
||||
//
|
||||
// Node in Memory Manager's AVL Table
|
||||
//
|
||||
typedef struct _MMADDRESS_NODE
|
||||
{
|
||||
union
|
||||
|
@ -183,6 +239,9 @@ typedef struct _MMADDRESS_NODE
|
|||
ULONG EndingVpn;
|
||||
} MMADDRESS_NODE, *PMMADDRESS_NODE;
|
||||
|
||||
//
|
||||
// Memory Manager AVL Table for VADs and other descriptors
|
||||
//
|
||||
typedef struct _MM_AVL_TABLE
|
||||
{
|
||||
MMADDRESS_NODE BalancedRoot;
|
||||
|
@ -193,6 +252,9 @@ typedef struct _MM_AVL_TABLE
|
|||
PVOID NodeFreeHint;
|
||||
} MM_AVL_TABLE, *PMM_AVL_TABLE;
|
||||
|
||||
//
|
||||
// Memory Manager Working Set Structures
|
||||
//
|
||||
typedef struct _MMWSLENTRY
|
||||
{
|
||||
ULONG Valid:1;
|
||||
|
@ -241,6 +303,9 @@ typedef struct _MMWSL
|
|||
ULONG CommittedPageTables[24];
|
||||
} MMWSL, *PMMWSL;
|
||||
|
||||
//
|
||||
// Flags for Memory Support Structure
|
||||
//
|
||||
typedef struct _MMSUPPORT_FLAGS
|
||||
{
|
||||
ULONG SessionSpace:1;
|
||||
|
@ -254,6 +319,9 @@ typedef struct _MMSUPPORT_FLAGS
|
|||
ULONG MemoryPriority:8;
|
||||
} MMSUPPORT_FLAGS, *PMMSUPPORT_FLAGS;
|
||||
|
||||
//
|
||||
// Per-Process Memory Manager Data
|
||||
//
|
||||
typedef struct _MMSUPPORT
|
||||
{
|
||||
LARGE_INTEGER LastTrimTime;
|
||||
|
@ -272,5 +340,6 @@ typedef struct _MMSUPPORT
|
|||
ULONG GrowthSinceLastEstimate;
|
||||
} MMSUPPORT, *PMMSUPPORT;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif // !NTOS_MODE_USER
|
||||
|
||||
#endif // _MMTYPES_H
|
||||
|
|
|
@ -1,60 +1,77 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
ntndk.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Master include file for the Native Development Kit.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _NTNDK_
|
||||
#define _NTNDK_
|
||||
|
||||
/* C Standard Headers */
|
||||
//
|
||||
// Rounding Macros
|
||||
//
|
||||
#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b))
|
||||
#define ROUNDDOWN(a,b) (((a)/(b))*(b))
|
||||
#define ROUND_UP ROUNDUP
|
||||
#define ROUND_DOWN ROUNDDOWN
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
/* Helper Header */
|
||||
#include <reactos/helper.h>
|
||||
|
||||
/* A version of ntdef.h to be used with PSDK headers. */
|
||||
#include "umtypes.h"
|
||||
|
||||
/* Kernel-Mode NDK */
|
||||
#ifndef NTOS_MODE_USER
|
||||
#include "ifssupp.h" /* IFS Support Header */
|
||||
#include "kdfuncs.h" /* Kernel Debugger Functions */
|
||||
#include "cctypes.h" /* Cache Manager Types */
|
||||
#include "potypes.h" /* Power Manager Types */
|
||||
#include "haltypes.h" /* Hardware Abstraction Layer Types */
|
||||
#include "halfuncs.h" /* Hardware Abstraction Layer Functions */
|
||||
#include "inbvfuncs.h" /* Initialization Boot Video Functions */
|
||||
#include "exfuncs.h" /* Executive Functions */
|
||||
#include "iofuncs.h" /* Input/Output Manager Functions */
|
||||
#include "kefuncs.h" /* Kernel Functions */
|
||||
#include "mmfuncs.h" /* Memory Manager Functions */
|
||||
#include "obfuncs.h" /* Object Manager Functions */
|
||||
#include "psfuncs.h" /* Process Manager Functions */
|
||||
#include "sefuncs.h" /* Security Subsystem Functions */
|
||||
#endif /* !NTOS_MODE_USER */
|
||||
|
||||
/* Shared NDK */
|
||||
#include "extypes.h" /* Executive Types */
|
||||
#include "cmtypes.h" /* Configuration Manager Types */
|
||||
#include "kdtypes.h" /* Kernel Debugger Types */
|
||||
#include "ketypes.h" /* Kernel Types */
|
||||
#include "iotypes.h" /* Input/Output Manager Types */
|
||||
#include "ldrtypes.h" /* Loader Types */
|
||||
#include "ldrfuncs.h" /* Loader Functions */
|
||||
#include "mmtypes.h" /* Memory Manager Types */
|
||||
#include "obtypes.h" /* Object Manager Types */
|
||||
#include "pstypes.h" /* Process Manager Types */
|
||||
#include "lpctypes.h" /* Local Procedure Call Types */
|
||||
#include "dbgktypes.h" /* User-Mode Kernel Debugging Types */
|
||||
#include "zwfuncs.h" /* Native Functions (System Calls) */
|
||||
#include "rtltypes.h" /* Runtime Library Types */
|
||||
#include "rtlfuncs.h" /* Runtime Library Functions */
|
||||
#include "setypes.h" /* Security Subsystem Types */
|
||||
#include "umfuncs.h" /* User-Mode NT Library Functions */
|
||||
#include "i386/floatsave.h" /* Floating Point Save Area Definitions for i386 */
|
||||
#include "i386/segment.h" /* Kernel CPU Segment Definitions for i386 */
|
||||
//
|
||||
// Headers that are only useful to Kernel Mode modules
|
||||
//
|
||||
#include <ifssupp.h> // IFS Support Header
|
||||
#include <kdfuncs.h> // Kernel Debugger Functions
|
||||
#include <cctypes.h> // Cache Manager Types
|
||||
#include <potypes.h> // Power Manager Types
|
||||
#include <haltypes.h> // Hardware Abstraction Layer Types
|
||||
#include <halfuncs.h> // Hardware Abstraction Layer Functions
|
||||
#include <inbvfuncs.h> // Initialization Boot Video Functions
|
||||
#include <exfuncs.h> // Executive Functions
|
||||
#include <iofuncs.h> // Input/Output Manager Functions
|
||||
#include <kefuncs.h> // Kernel Functions
|
||||
#include <mmfuncs.h> // Memory Manager Functions
|
||||
#include <obfuncs.h> // Object Manager Functions
|
||||
#include <psfuncs.h> // Process Manager Functions
|
||||
#include <sefuncs.h> // Security Subsystem Functions
|
||||
|
||||
#endif
|
||||
#endif // !NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Headers used both in User Mode and Kernel Mode
|
||||
//
|
||||
#include <umtypes.h> // General Definitions
|
||||
#include <extypes.h> // Executive Types
|
||||
#include <cmtypes.h> // Configuration Manager Types
|
||||
#include <kdtypes.h> // Kernel Debugger Types
|
||||
#include <ketypes.h> // Kernel Types
|
||||
#include <iotypes.h> // Input/Output Manager Types
|
||||
#include <ldrtypes.h> // Loader Types
|
||||
#include <ldrfuncs.h> // Loader Functions
|
||||
#include <mmtypes.h> // Memory Manager Types
|
||||
#include <obtypes.h> // Object Manager Types
|
||||
#include <pstypes.h> // Process Manager Types
|
||||
#include <lpctypes.h> // Local Procedure Call Types
|
||||
#include <dbgktypes.h> // User-Mode Kernel Debugging Types
|
||||
#include <zwfuncs.h> // Native Functions (System Calls)
|
||||
#include <rtltypes.h> // Runtime Library Types
|
||||
#include <rtlfuncs.h> // Runtime Library Functions
|
||||
#include <setypes.h> // Security Subsystem Types
|
||||
#include <umfuncs.h> // User-Mode NT Library Functions
|
||||
#include <asm.h> // Assembly Offsets
|
||||
|
||||
#endif // _NTNDK_
|
||||
|
|
|
@ -1,51 +1,62 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
obtypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Object Manager
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _OBFUNCS_H
|
||||
#define _OBFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
//
|
||||
// Object Functions
|
||||
//
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
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
|
||||
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
|
||||
NTAPI
|
||||
ObGetObjectPointerCount (
|
||||
ObGetObjectPointerCount(
|
||||
IN PVOID Object
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
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
|
||||
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
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
|
|
@ -1,68 +1,77 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
obtypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Object Manager
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _OBTYPES_H
|
||||
#define _OBTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
/* Definitions for Object Creation */
|
||||
#define OBJ_INHERIT 2L
|
||||
#define OBJ_PERMANENT 16L
|
||||
#define OBJ_EXCLUSIVE 32L
|
||||
#define OBJ_CASE_INSENSITIVE 64L
|
||||
#define OBJ_OPENIF 128L
|
||||
#define OBJ_OPENLINK 256L
|
||||
#define OBJ_VALID_ATTRIBUTES 498L
|
||||
|
||||
//
|
||||
// Definitions for Object Creation
|
||||
//
|
||||
#define OBJ_INHERIT 0x00000002L
|
||||
#define OBJ_PERMANENT 0x00000010L
|
||||
#define OBJ_EXCLUSIVE 0x00000020L
|
||||
#define OBJ_CASE_INSENSITIVE 0x00000040L
|
||||
#define OBJ_OPENIF 0x00000080L
|
||||
#define OBJ_OPENLINK 0x00000100L
|
||||
#define OBJ_KERNEL_HANDLE 0x00000200L
|
||||
#define OBJ_FORCE_ACCESS_CHECK 0x00000400L
|
||||
#define OBJ_VALID_ATTRIBUTES 0x000007F2L
|
||||
|
||||
#define InitializeObjectAttributes(p,n,a,r,s) { \
|
||||
(p)->Length = sizeof(OBJECT_ATTRIBUTES); \
|
||||
(p)->RootDirectory = (r); \
|
||||
(p)->Attributes = (a); \
|
||||
(p)->ObjectName = (n); \
|
||||
(p)->SecurityDescriptor = (s); \
|
||||
(p)->SecurityQualityOfService = NULL; \
|
||||
(p)->Length = sizeof(OBJECT_ATTRIBUTES); \
|
||||
(p)->RootDirectory = (r); \
|
||||
(p)->Attributes = (a); \
|
||||
(p)->ObjectName = (n); \
|
||||
(p)->SecurityDescriptor = (s); \
|
||||
(p)->SecurityQualityOfService = NULL; \
|
||||
}
|
||||
|
||||
/* Directory Object Access Rights */
|
||||
#define DIRECTORY_QUERY 0x0001
|
||||
#define DIRECTORY_TRAVERSE 0x0002
|
||||
#define DIRECTORY_CREATE_OBJECT 0x0004
|
||||
#define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
|
||||
#define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
|
||||
#endif
|
||||
//
|
||||
// Directory Object Access Rights
|
||||
//
|
||||
#define DIRECTORY_QUERY 0x0001
|
||||
#define DIRECTORY_TRAVERSE 0x0002
|
||||
#define DIRECTORY_CREATE_OBJECT 0x0004
|
||||
#define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
|
||||
#define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
|
||||
|
||||
/* Duplication Flags */
|
||||
#define DUPLICATE_SAME_ATTRIBUTES 0x00000004
|
||||
#else
|
||||
|
||||
/* 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
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
/* Object Flags */
|
||||
#define OB_FLAG_CREATE_INFO 0x01
|
||||
#define OB_FLAG_KERNEL_MODE 0x02
|
||||
#define OB_FLAG_CREATOR_INFO 0x04
|
||||
#define OB_FLAG_EXCLUSIVE 0x08
|
||||
#define OB_FLAG_PERMANENT 0x10
|
||||
#define OB_FLAG_SECURITY 0x20
|
||||
#define OB_FLAG_SINGLE_PROCESS 0x40
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// Object Flags
|
||||
//
|
||||
#define OB_FLAG_CREATE_INFO 0x01
|
||||
#define OB_FLAG_KERNEL_MODE 0x02
|
||||
#define OB_FLAG_CREATOR_INFO 0x04
|
||||
#define OB_FLAG_EXCLUSIVE 0x08
|
||||
#define OB_FLAG_PERMANENT 0x10
|
||||
#define OB_FLAG_SECURITY 0x20
|
||||
#define OB_FLAG_SINGLE_PROCESS 0x40
|
||||
|
||||
//
|
||||
// Reasons for Open Callback
|
||||
//
|
||||
typedef enum _OB_OPEN_REASON
|
||||
{
|
||||
ObCreateHandle,
|
||||
|
@ -71,8 +80,33 @@ typedef enum _OB_OPEN_REASON
|
|||
ObInheritHandle,
|
||||
ObMaxOpenReason
|
||||
} OB_OPEN_REASON;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Object Duplication Flags
|
||||
//
|
||||
#define DUPLICATE_SAME_ATTRIBUTES 0x00000004
|
||||
|
||||
//
|
||||
// Number of hash entries in an Object Directory
|
||||
//
|
||||
#define NUMBER_HASH_BUCKETS 37
|
||||
|
||||
//
|
||||
// Types 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
|
||||
|
||||
//
|
||||
// Object Information Classes for NtQueryInformationObject
|
||||
//
|
||||
typedef enum _OBJECT_INFORMATION_CLASS
|
||||
{
|
||||
ObjectBasicInformation,
|
||||
|
@ -85,48 +119,55 @@ typedef enum _OBJECT_INFORMATION_CLASS
|
|||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
/* Object Callbacks FIXME: Update these soon */
|
||||
|
||||
//
|
||||
// FIXME: Object Callbacks
|
||||
//
|
||||
typedef NTSTATUS
|
||||
(NTAPI *OB_OPEN_METHOD)(
|
||||
OB_OPEN_REASON Reason,
|
||||
PVOID ObjectBody,
|
||||
PEPROCESS Process,
|
||||
ULONG HandleCount,
|
||||
ACCESS_MASK GrantedAccess
|
||||
OB_OPEN_REASON Reason,
|
||||
PVOID ObjectBody,
|
||||
PEPROCESS Process,
|
||||
ULONG HandleCount,
|
||||
ACCESS_MASK GrantedAccess
|
||||
);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *OB_PARSE_METHOD)(
|
||||
PVOID Object,
|
||||
PVOID *NextObject,
|
||||
PUNICODE_STRING FullPath,
|
||||
PWSTR *Path,
|
||||
ULONG Attributes
|
||||
PVOID Object,
|
||||
PVOID *NextObject,
|
||||
PUNICODE_STRING FullPath,
|
||||
PWSTR *Path,
|
||||
ULONG Attributes
|
||||
);
|
||||
|
||||
typedef VOID
|
||||
(NTAPI *OB_DELETE_METHOD)(
|
||||
PVOID DeletedObject
|
||||
PVOID DeletedObject
|
||||
);
|
||||
|
||||
typedef VOID
|
||||
(NTAPI *OB_CLOSE_METHOD)(
|
||||
PVOID ClosedObject,
|
||||
ULONG HandleCount
|
||||
PVOID ClosedObject,
|
||||
ULONG HandleCount
|
||||
);
|
||||
|
||||
typedef VOID
|
||||
(NTAPI *OB_DUMP_METHOD)(VOID);
|
||||
(NTAPI *OB_DUMP_METHOD)(
|
||||
VOID
|
||||
);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *OB_OKAYTOCLOSE_METHOD)(VOID);
|
||||
(NTAPI *OB_OKAYTOCLOSE_METHOD)(
|
||||
VOID
|
||||
);
|
||||
|
||||
typedef NTSTATUS
|
||||
(NTAPI *OB_QUERYNAME_METHOD)(
|
||||
PVOID ObjectBody,
|
||||
POBJECT_NAME_INFORMATION ObjectNameInfo,
|
||||
ULONG Length,
|
||||
PULONG ReturnLength
|
||||
PVOID ObjectBody,
|
||||
POBJECT_NAME_INFORMATION ObjectNameInfo,
|
||||
ULONG Length,
|
||||
PULONG ReturnLength
|
||||
);
|
||||
|
||||
typedef PVOID
|
||||
|
@ -148,23 +189,24 @@ typedef NTSTATUS
|
|||
PGENERIC_MAPPING GenericMapping
|
||||
);
|
||||
|
||||
/* FIXME: TEMPORARY HACK */
|
||||
typedef NTSTATUS
|
||||
(NTAPI *OB_CREATE_METHOD)(
|
||||
PVOID ObjectBody,
|
||||
PVOID Parent,
|
||||
PWSTR RemainingPath,
|
||||
struct _OBJECT_ATTRIBUTES* ObjectAttributes
|
||||
PVOID ObjectBody,
|
||||
PVOID Parent,
|
||||
PWSTR RemainingPath,
|
||||
struct _OBJECT_ATTRIBUTES* ObjectAttributes
|
||||
);
|
||||
#endif
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
#else
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
//
|
||||
// Object Information Types for NtQueryInformationObject
|
||||
//
|
||||
typedef struct _OBJECT_NAME_INFORMATION
|
||||
{
|
||||
UNICODE_STRING Name;
|
||||
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFORMATION
|
||||
|
@ -180,6 +222,7 @@ typedef struct _OBJECT_DIRECTORY_INFORMATION
|
|||
} OBJECT_DIRECTORY_INFORMATION, *POBJECT_DIRECTORY_INFORMATION;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
typedef struct _OBJECT_BASIC_INFORMATION
|
||||
{
|
||||
ULONG Attributes;
|
||||
|
@ -195,15 +238,6 @@ typedef struct _OBJECT_BASIC_INFORMATION
|
|||
LARGE_INTEGER CreateTime;
|
||||
} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
|
||||
|
||||
typedef struct _OBJECT_HEADER_NAME_INFO
|
||||
{
|
||||
struct _DIRECTORY_OBJECT *Directory;
|
||||
UNICODE_STRING Name;
|
||||
ULONG QueryReferences;
|
||||
ULONG Reserved2;
|
||||
ULONG DbgReferenceCount;
|
||||
} OBJECT_HEADER_NAME_INFO, *POBJECT_HEADER_NAME_INFO;
|
||||
|
||||
typedef struct _OBJECT_CREATE_INFORMATION
|
||||
{
|
||||
ULONG Attributes;
|
||||
|
@ -218,6 +252,9 @@ typedef struct _OBJECT_CREATE_INFORMATION
|
|||
SECURITY_QUALITY_OF_SERVICE SecurityQualityOfService;
|
||||
} OBJECT_CREATE_INFORMATION, *POBJECT_CREATE_INFORMATION;
|
||||
|
||||
//
|
||||
// Object Type Initialize for ObCreateObjectType
|
||||
//
|
||||
typedef struct _OBJECT_TYPE_INITIALIZER
|
||||
{
|
||||
USHORT Length;
|
||||
|
@ -242,6 +279,9 @@ typedef struct _OBJECT_TYPE_INITIALIZER
|
|||
OB_OKAYTOCLOSE_METHOD OkayToCloseProcedure;
|
||||
} OBJECT_TYPE_INITIALIZER, *POBJECT_TYPE_INITIALIZER;
|
||||
|
||||
//
|
||||
// Object Type Object
|
||||
//
|
||||
typedef struct _OBJECT_TYPE
|
||||
{
|
||||
ERESOURCE Mutex;
|
||||
|
@ -258,6 +298,18 @@ typedef struct _OBJECT_TYPE
|
|||
ERESOURCE ObjectLocks[4];
|
||||
} OBJECT_TYPE;
|
||||
|
||||
//
|
||||
// Object Header Addon Information
|
||||
//
|
||||
typedef struct _OBJECT_HEADER_NAME_INFO
|
||||
{
|
||||
struct _DIRECTORY_OBJECT *Directory;
|
||||
UNICODE_STRING Name;
|
||||
ULONG QueryReferences;
|
||||
ULONG Reserved2;
|
||||
ULONG DbgReferenceCount;
|
||||
} OBJECT_HEADER_NAME_INFO, *POBJECT_HEADER_NAME_INFO;
|
||||
|
||||
typedef struct _OBJECT_HANDLE_COUNT_ENTRY
|
||||
{
|
||||
struct _EPROCESS *Process;
|
||||
|
@ -287,9 +339,12 @@ typedef struct _OBJECT_HEADER_CREATOR_INFO
|
|||
USHORT Reserved;
|
||||
} OBJECT_HEADER_CREATOR_INFO, *POBJECT_HEADER_CREATOR_INFO;
|
||||
|
||||
//
|
||||
// FIXME: Object Header
|
||||
//
|
||||
typedef struct _OBJECT_HEADER
|
||||
{
|
||||
LIST_ENTRY Entry; /* FIXME: REMOVE THIS SOON */
|
||||
LIST_ENTRY Entry;
|
||||
LONG PointerCount;
|
||||
union
|
||||
{
|
||||
|
@ -310,11 +365,9 @@ typedef struct _OBJECT_HEADER
|
|||
QUAD Body;
|
||||
} OBJECT_HEADER, *POBJECT_HEADER;
|
||||
|
||||
/*
|
||||
* FIXME: These will eventually become centerfold in the compliant Ob Manager
|
||||
* For now, they are only here so Device Map is properly defined before the header
|
||||
* changes
|
||||
*/
|
||||
//
|
||||
// Object Directory Structures
|
||||
//
|
||||
typedef struct _OBJECT_DIRECTORY_ENTRY
|
||||
{
|
||||
struct _OBJECT_DIRECTORY_ENTRY *ChainLink;
|
||||
|
@ -322,7 +375,6 @@ typedef struct _OBJECT_DIRECTORY_ENTRY
|
|||
ULONG HashValue;
|
||||
} OBJECT_DIRECTORY_ENTRY, *POBJECT_DIRECTORY_ENTRY;
|
||||
|
||||
#define NUMBER_HASH_BUCKETS 37
|
||||
typedef struct _OBJECT_DIRECTORY
|
||||
{
|
||||
struct _OBJECT_DIRECTORY_ENTRY *HashBuckets[NUMBER_HASH_BUCKETS];
|
||||
|
@ -331,6 +383,9 @@ typedef struct _OBJECT_DIRECTORY
|
|||
ULONG SessionId;
|
||||
} OBJECT_DIRECTORY, *POBJECT_DIRECTORY;
|
||||
|
||||
//
|
||||
// Device Map
|
||||
//
|
||||
typedef struct _DEVICE_MAP
|
||||
{
|
||||
POBJECT_DIRECTORY DosDevicesDirectory;
|
||||
|
@ -340,10 +395,12 @@ typedef struct _DEVICE_MAP
|
|||
UCHAR DriveType[32];
|
||||
} DEVICE_MAP, *PDEVICE_MAP;
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
//
|
||||
// Kernel Exports
|
||||
//
|
||||
extern POBJECT_TYPE NTSYSAPI ObDirectoryType;
|
||||
extern PDEVICE_MAP NTSYSAPI ObSystemDeviceMap;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // !NTOS_MODE_USER
|
||||
|
||||
#endif // _OBTYPES_H
|
||||
|
|
|
@ -1,24 +1,34 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
potypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Power Subystem
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _POTYPES_H
|
||||
#define _POTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#ifndef NTOS_MODE_USER
|
||||
#include <ntpoapi.h>
|
||||
#endif
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
//
|
||||
// Docking states
|
||||
//
|
||||
typedef enum _SYSTEM_DOCK_STATE
|
||||
{
|
||||
SystemDockStateUnknown,
|
||||
|
@ -26,9 +36,11 @@ typedef enum _SYSTEM_DOCK_STATE
|
|||
SystemDocked
|
||||
} SYSTEM_DOCK_STATE, *PSYSTEM_DOCK_STATE;
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Processor Power State Data
|
||||
//
|
||||
typedef struct _PROCESSOR_POWER_STATE
|
||||
{
|
||||
PVOID IdleFunction;
|
||||
|
@ -77,6 +89,9 @@ typedef struct _PROCESSOR_POWER_STATE
|
|||
ULONG Spare1[1];
|
||||
} PROCESSOR_POWER_STATE, *PPROCESSOR_POWER_STATE;
|
||||
|
||||
//
|
||||
// Device Notification Structure
|
||||
//
|
||||
typedef struct _PO_DEVICE_NOTIFY
|
||||
{
|
||||
LIST_ENTRY Link;
|
||||
|
@ -90,5 +105,7 @@ typedef struct _PO_DEVICE_NOTIFY
|
|||
ULONG ChildCount;
|
||||
ULONG ActiveChild;
|
||||
} PO_DEVICE_NOTIFY, *PPO_DEVICE_NOTIFY;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // !NTOS_MODE_USER
|
||||
|
||||
#endif // _POTYPES_H
|
||||
|
|
|
@ -1,28 +1,49 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
psfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for the Process Manager
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _PSFUNCS_H
|
||||
#define _PSFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include "pstypes.h"
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
//
|
||||
// Win32K Process/Thread Functions
|
||||
//
|
||||
struct _W32THREAD*
|
||||
NTAPI
|
||||
PsGetWin32Thread(
|
||||
VOID
|
||||
);
|
||||
|
||||
struct _W32THREAD* NTAPI
|
||||
PsGetWin32Thread(VOID);
|
||||
|
||||
struct _W32PROCESS* NTAPI
|
||||
PsGetWin32Process(VOID);
|
||||
struct _W32PROCESS*
|
||||
NTAPI
|
||||
PsGetWin32Process(
|
||||
VOID
|
||||
);
|
||||
|
||||
PVOID
|
||||
NTAPI
|
||||
PsGetProcessWin32Process(PEPROCESS Process);
|
||||
PsGetProcessWin32Process(
|
||||
PEPROCESS Process
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -40,32 +61,30 @@ PsSetThreadWin32Thread(
|
|||
|
||||
PVOID
|
||||
NTAPI
|
||||
PsGetThreadWin32Thread(PETHREAD Thread);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
PsRevertThreadToSelf(
|
||||
IN struct _ETHREAD* Thread
|
||||
);
|
||||
|
||||
struct _W32THREAD*
|
||||
NTAPI
|
||||
PsGetWin32Thread(
|
||||
VOID
|
||||
);
|
||||
|
||||
struct _W32PROCESS*
|
||||
NTAPI
|
||||
PsGetWin32Process(
|
||||
VOID
|
||||
PsGetThreadWin32Thread(
|
||||
PETHREAD Thread
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
PsEstablishWin32Callouts(PW32_CALLOUT_DATA CalloutData);
|
||||
PsEstablishWin32Callouts(
|
||||
PW32_CALLOUT_DATA CalloutData
|
||||
);
|
||||
|
||||
//
|
||||
// Process Impersonation Functions
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
PsRevertThreadToSelf(
|
||||
IN PETHREAD Thread
|
||||
);
|
||||
|
||||
//
|
||||
// Misc. Functions
|
||||
//
|
||||
HANDLE
|
||||
NTAPI
|
||||
PsGetProcessId(struct _EPROCESS *Process);
|
||||
PsGetProcessId(PEPROCESS Process);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,15 +1,27 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
pstypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Process Manager
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _PSTYPES_H
|
||||
#define _PSTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include "ldrtypes.h"
|
||||
#include "mmtypes.h"
|
||||
#include "obtypes.h"
|
||||
|
@ -18,36 +30,55 @@
|
|||
#include "setypes.h"
|
||||
#endif
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
//
|
||||
// KUSER_SHARED_DATA location in User Mode
|
||||
//
|
||||
#define USER_SHARED_DATA (0x7FFE0000)
|
||||
|
||||
//
|
||||
// Kernel Exports
|
||||
//
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
extern NTSYSAPI struct _EPROCESS* PsInitialSystemProcess;
|
||||
extern NTSYSAPI POBJECT_TYPE PsProcessType;
|
||||
|
||||
#endif
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
//
|
||||
// Global Flags
|
||||
//
|
||||
#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_HANDLE_TYPE_TAGGING 0x01000000
|
||||
#define FLG_HEAP_PAGE_ALLOCS 0x02000000
|
||||
#define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
|
||||
|
||||
/* 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
|
||||
|
||||
#define USER_SHARED_DATA (0x7FFE0000)
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
/* Macros for current Process/Thread built-in 'special' ID */
|
||||
#define NtCurrentProcess() ((HANDLE)(LONG_PTR)-1)
|
||||
#define ZwCurrentProcess() NtCurrentProcess()
|
||||
#define NtCurrentThread() ((HANDLE)(LONG_PTR)-2)
|
||||
#define ZwCurrentThread() NtCurrentThread()
|
||||
#endif
|
||||
|
||||
/* Process priority classes */
|
||||
//
|
||||
// Process priority classes
|
||||
//
|
||||
#define PROCESS_PRIORITY_CLASS_INVALID 0
|
||||
#define PROCESS_PRIORITY_CLASS_IDLE 1
|
||||
#define PROCESS_PRIORITY_CLASS_NORMAL 2
|
||||
|
@ -56,43 +87,37 @@ extern NTSYSAPI POBJECT_TYPE PsProcessType;
|
|||
#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL 5
|
||||
#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL 6
|
||||
|
||||
/* Process base priorities */
|
||||
//
|
||||
// Process base priorities
|
||||
//
|
||||
#define PROCESS_PRIORITY_IDLE 3
|
||||
#define PROCESS_PRIORITY_NORMAL 8
|
||||
#define PROCESS_PRIORITY_NORMAL_FOREGROUND 9
|
||||
|
||||
/* Global Flags */
|
||||
#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_HANDLE_TYPE_TAGGING 0x01000000
|
||||
#define FLG_HEAP_PAGE_ALLOCS 0x02000000
|
||||
#define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
#if 0
|
||||
//
|
||||
// Job Access Types
|
||||
//
|
||||
#define JOB_OBJECT_ASSIGN_PROCESS 0x1
|
||||
#define JOB_OBJECT_SET_ATTRIBUTES 0x2
|
||||
#define JOB_OBJECT_QUERY 0x4
|
||||
#define JOB_OBJECT_TERMINATE 0x8
|
||||
#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES 0x10
|
||||
#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 31)
|
||||
#endif
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
//
|
||||
// Current Process/Thread built-in 'special' handles
|
||||
//
|
||||
#define NtCurrentProcess() ((HANDLE)(LONG_PTR)-1)
|
||||
#define ZwCurrentProcess() NtCurrentProcess()
|
||||
#define NtCurrentThread() ((HANDLE)(LONG_PTR)-2)
|
||||
#define ZwCurrentThread() NtCurrentThread()
|
||||
|
||||
//
|
||||
// Process/Thread/Job Information Classes for NtQueryInformationProcess/Thread/Job
|
||||
//
|
||||
typedef enum _PROCESSINFOCLASS
|
||||
{
|
||||
ProcessBasicInformation,
|
||||
|
@ -169,9 +194,9 @@ typedef enum _THREADINFOCLASS
|
|||
ThreadActualBasePriority,
|
||||
MaxThreadInfoClass
|
||||
} THREADINFOCLASS;
|
||||
#endif
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
#else
|
||||
|
||||
typedef enum _JOBOBJECTINFOCLASS
|
||||
{
|
||||
JobObjectBasicAccountingInformation = 1,
|
||||
|
@ -186,12 +211,18 @@ typedef enum _JOBOBJECTINFOCLASS
|
|||
JobObjectJobSetInformation,
|
||||
MaxJobObjectInfoClass
|
||||
} JOBOBJECTINFOCLASS;
|
||||
#endif
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
typedef VOID (NTAPI *PPEBLOCKROUTINE)(PVOID);
|
||||
//
|
||||
// Declare empty structure definitions so that they may be referenced by
|
||||
// routines before they are defined
|
||||
//
|
||||
struct _W32THREAD;
|
||||
struct _W32PROCESS;
|
||||
struct _ETHREAD;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
//
|
||||
// Win32K Process and Thread Callbacks
|
||||
//
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PW32_PROCESS_CALLBACK)(
|
||||
struct _EPROCESS *Process,
|
||||
|
@ -203,35 +234,51 @@ typedef NTSTATUS
|
|||
struct _ETHREAD *Thread,
|
||||
BOOLEAN Create
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
struct _W32THREAD;
|
||||
struct _W32PROCESS;
|
||||
|
||||
struct _ETHREAD;
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// ClientID Structure
|
||||
//
|
||||
typedef struct _CLIENT_ID
|
||||
{
|
||||
HANDLE UniqueProcess;
|
||||
HANDLE UniqueThread;
|
||||
} CLIENT_ID, *PCLIENT_ID;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Descriptor Table Entry Definition
|
||||
//
|
||||
typedef struct _DESCRIPTOR_TABLE_ENTRY
|
||||
{
|
||||
ULONG Selector;
|
||||
LDT_ENTRY Descriptor;
|
||||
} DESCRIPTOR_TABLE_ENTRY, *PDESCRIPTOR_TABLE_ENTRY;
|
||||
|
||||
//
|
||||
// PEB Lock Routine
|
||||
//
|
||||
typedef VOID
|
||||
(NTAPI *PPEBLOCKROUTINE)(
|
||||
PVOID PebLock
|
||||
);
|
||||
|
||||
//
|
||||
// PEB Free Block Descriptor
|
||||
//
|
||||
typedef struct _PEB_FREE_BLOCK
|
||||
{
|
||||
struct _PEB_FREE_BLOCK* Next;
|
||||
ULONG Size;
|
||||
} PEB_FREE_BLOCK, *PPEB_FREE_BLOCK;
|
||||
|
||||
//
|
||||
// Process Environment Block (PEB)
|
||||
//
|
||||
typedef struct _PEB
|
||||
{
|
||||
UCHAR InheritedAddressSpace; /* 00h */
|
||||
|
@ -293,6 +340,9 @@ typedef struct _PEB
|
|||
UNICODE_STRING CSDVersion; /* 1DCh */
|
||||
} PEB, *PPEB;
|
||||
|
||||
//
|
||||
// GDI Batch Descriptor
|
||||
//
|
||||
typedef struct _GDI_TEB_BATCH
|
||||
{
|
||||
ULONG Offset;
|
||||
|
@ -300,6 +350,9 @@ typedef struct _GDI_TEB_BATCH
|
|||
ULONG Buffer[0x136];
|
||||
} GDI_TEB_BATCH, *PGDI_TEB_BATCH;
|
||||
|
||||
//
|
||||
// Initial TEB
|
||||
//
|
||||
typedef struct _INITIAL_TEB
|
||||
{
|
||||
PVOID PreviousStackBase;
|
||||
|
@ -309,6 +362,9 @@ typedef struct _INITIAL_TEB
|
|||
PVOID AllocatedStackBase;
|
||||
} INITIAL_TEB, *PINITIAL_TEB;
|
||||
|
||||
//
|
||||
// TEB Active Frame Structures
|
||||
//
|
||||
typedef struct _TEB_ACTIVE_FRAME_CONTEXT
|
||||
{
|
||||
ULONG Flags;
|
||||
|
@ -322,6 +378,9 @@ typedef struct _TEB_ACTIVE_FRAME
|
|||
PTEB_ACTIVE_FRAME_CONTEXT Context;
|
||||
} TEB_ACTIVE_FRAME, *PTEB_ACTIVE_FRAME;
|
||||
|
||||
//
|
||||
// Thread Environment Block (TEB)
|
||||
//
|
||||
typedef struct _TEB
|
||||
{
|
||||
NT_TIB Tib; /* 00h */
|
||||
|
@ -398,6 +457,10 @@ typedef struct _TEB
|
|||
} TEB, *PTEB;
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Process Information Structures for NtQueryProcessInformation
|
||||
//
|
||||
typedef struct _PROCESS_BASIC_INFORMATION
|
||||
{
|
||||
NTSTATUS ExitStatus;
|
||||
|
@ -442,6 +505,7 @@ typedef struct _PROCESS_SESSION_INFORMATION
|
|||
{
|
||||
ULONG SessionId;
|
||||
} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct _PROCESS_PRIORITY_CLASS
|
||||
|
@ -450,6 +514,9 @@ typedef struct _PROCESS_PRIORITY_CLASS
|
|||
UCHAR PriorityClass;
|
||||
} PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
|
||||
|
||||
//
|
||||
// Thread Information Structures for NtQueryProcessInformation
|
||||
//
|
||||
typedef struct _THREAD_BASIC_INFORMATION
|
||||
{
|
||||
NTSTATUS ExitStatus;
|
||||
|
@ -466,6 +533,9 @@ typedef struct _THREAD_BASIC_INFORMATION
|
|||
#include <internal/mm.h>
|
||||
#endif
|
||||
|
||||
//
|
||||
// EPROCESS Quota Structures
|
||||
//
|
||||
typedef struct _EPROCESS_QUOTA_ENTRY
|
||||
{
|
||||
SIZE_T Usage;
|
||||
|
@ -482,6 +552,9 @@ typedef struct _EPROCESS_QUOTA_BLOCK
|
|||
ULONG ProcessCount;
|
||||
} EPROCESS_QUOTA_BLOCK, *PEPROCESS_QUOTA_BLOCK;
|
||||
|
||||
//
|
||||
// FIXME: This really belongs in mmtypes.h
|
||||
//
|
||||
typedef struct _PAGEFAULT_HISTORY
|
||||
{
|
||||
ULONG CurrentIndex;
|
||||
|
@ -491,20 +564,29 @@ typedef struct _PAGEFAULT_HISTORY
|
|||
PROCESS_WS_WATCH_INFORMATION WatchInfo[1];
|
||||
} PAGEFAULT_HISTORY, *PPAGEFAULT_HISTORY;
|
||||
|
||||
//
|
||||
// Process Impersonation Information
|
||||
//
|
||||
typedef struct _PS_IMPERSONATION_INFORMATION
|
||||
{
|
||||
PACCESS_TOKEN Token;
|
||||
BOOLEAN CopyOnOpen;
|
||||
BOOLEAN EffectiveOnly;
|
||||
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
|
||||
PACCESS_TOKEN Token;
|
||||
BOOLEAN CopyOnOpen;
|
||||
BOOLEAN EffectiveOnly;
|
||||
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
|
||||
} PS_IMPERSONATION_INFORMATION, *PPS_IMPERSONATION_INFORMATION;
|
||||
|
||||
//
|
||||
// Process Termination Port
|
||||
//
|
||||
typedef struct _TERMINATION_PORT
|
||||
{
|
||||
struct _TERMINATION_PORT *Next;
|
||||
PVOID Port;
|
||||
} TERMINATION_PORT, *PTERMINATION_PORT;
|
||||
|
||||
//
|
||||
// Executive Thread (ETHREAD)
|
||||
//
|
||||
#include <pshpack4.h>
|
||||
typedef struct _ETHREAD
|
||||
{
|
||||
|
@ -607,6 +689,9 @@ typedef struct _ETHREAD
|
|||
UCHAR ActiveFaultCount; /* 24E */
|
||||
} ETHREAD;
|
||||
|
||||
//
|
||||
// Executive Process (EPROCESS)
|
||||
//
|
||||
typedef struct _EPROCESS
|
||||
{
|
||||
KPROCESS Pcb; /* 000 */
|
||||
|
@ -745,6 +830,9 @@ typedef struct _EPROCESS
|
|||
} EPROCESS;
|
||||
#include <poppack.h>
|
||||
|
||||
//
|
||||
// Job Token Filter Data
|
||||
//
|
||||
#include <pshpack1.h>
|
||||
typedef struct _PS_JOB_TOKEN_FILTER
|
||||
{
|
||||
|
@ -759,6 +847,9 @@ typedef struct _PS_JOB_TOKEN_FILTER
|
|||
ULONG CapturedPrivilegesLength;
|
||||
} PS_JOB_TOKEN_FILTER, *PPS_JOB_TOKEN_FILTER;
|
||||
|
||||
//
|
||||
// Executive Job (EJOB)
|
||||
//
|
||||
typedef struct _EJOB
|
||||
{
|
||||
KEVENT Event;
|
||||
|
@ -808,6 +899,9 @@ typedef struct _EJOB
|
|||
} EJOB, *PEJOB;
|
||||
#include <poppack.h>
|
||||
|
||||
//
|
||||
// Win32K Callback Registration Data
|
||||
//
|
||||
typedef struct _W32_CALLOUT_DATA
|
||||
{
|
||||
PW32_PROCESS_CALLBACK W32ProcessCallout;
|
||||
|
@ -831,6 +925,6 @@ typedef struct _W32_CALLOUT_DATA
|
|||
OB_CREATE_METHOD DesktopCreate;
|
||||
} W32_CALLOUT_DATA, *PW32_CALLOUT_DATA;
|
||||
|
||||
#endif
|
||||
#endif // !NTOS_MODE_USER
|
||||
|
||||
#endif
|
||||
#endif // _PSTYPES_H
|
||||
|
|
52
reactos/include/ndk/readme.txt
Normal file
52
reactos/include/ndk/readme.txt
Normal file
|
@ -0,0 +1,52 @@
|
|||
Native Development Kit README
|
||||
NDK 1.00
|
||||
-----------------------------
|
||||
|
||||
1. LICENSE
|
||||
|
||||
1.1 OPEN SOURCE USAGE
|
||||
|
||||
Open Source Projects may choose to use one of either the two following licenses:
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE Version 2, June 1991
|
||||
|
||||
OR
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999
|
||||
|
||||
The choice is yours to make based on the license which is most compatible with your
|
||||
software.
|
||||
|
||||
You MUST read GPL.TXT or LGPL.TXT after your decision. Violating your chosen license
|
||||
voids your usage rights of the NDK and will lead to legal action on the part of the
|
||||
author.
|
||||
|
||||
If your Open Source product does not use a license which is compatible with the ones
|
||||
listed above, please contact the author to reach a mutual agreement to find a better
|
||||
solution for your product. Alternatively, you may choose to use the Proprietary Usage
|
||||
license displayed below in section 1.2
|
||||
|
||||
If you are unsure of whether or not your product qualifies as an Open Source product,
|
||||
please contact the Free Software Foundation, or visit their website at www.fsf.org.
|
||||
|
||||
|
||||
1.2 PROPRIETARY USAGE
|
||||
|
||||
Because it may be undesirable or impossible to adapt this software to your commercial
|
||||
and/or proprietary product(s) and/or service(s) using a (L)GPL license, proprietary
|
||||
products are free to use the following license:
|
||||
|
||||
NDK LICENSE Version 1, November 2005
|
||||
|
||||
You MUST read NDK.TXT for the full text of this license. Violating your chosen license
|
||||
voids your usage rights of the NDK, constitutes a copyright violation, and will lead to
|
||||
legal action on the part of the author.
|
||||
|
||||
If you are unsure of have any questions about the NDK License, please contact the
|
||||
author for further clarification.
|
||||
|
||||
2. USAGE
|
||||
|
||||
2.1 TODO (COPY FROM WIKI)
|
||||
|
||||
... TODO ... (COPY FROM WIKI)
|
|
@ -1,26 +1,204 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
rtlfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for the Run-Time Library
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _RTLFUNCS_H
|
||||
#define _RTLFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include <ntnls.h>
|
||||
#include "extypes.h"
|
||||
#include "rtltypes.h"
|
||||
|
||||
/* MACROS ********************************************************************/
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
/* FIXME: Eventually move the ones in rtltypes.h here... */
|
||||
//
|
||||
// List Functions
|
||||
//
|
||||
FORCEINLINE
|
||||
VOID
|
||||
InitializeListHead(
|
||||
IN PLIST_ENTRY ListHead
|
||||
)
|
||||
{
|
||||
ListHead->Flink = ListHead->Blink = ListHead;
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
InsertHeadList(
|
||||
IN PLIST_ENTRY ListHead,
|
||||
IN PLIST_ENTRY Entry
|
||||
)
|
||||
{
|
||||
PLIST_ENTRY OldFlink;
|
||||
OldFlink = ListHead->Flink;
|
||||
Entry->Flink = OldFlink;
|
||||
Entry->Blink = ListHead;
|
||||
OldFlink->Blink = Entry;
|
||||
ListHead->Flink = Entry;
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
InsertTailList(
|
||||
IN PLIST_ENTRY ListHead,
|
||||
IN PLIST_ENTRY Entry
|
||||
)
|
||||
{
|
||||
PLIST_ENTRY OldBlink;
|
||||
OldBlink = ListHead->Blink;
|
||||
Entry->Flink = ListHead;
|
||||
Entry->Blink = OldBlink;
|
||||
OldBlink->Flink = Entry;
|
||||
ListHead->Blink = Entry;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
FORCEINLINE
|
||||
IsListEmpty(
|
||||
IN const LIST_ENTRY * ListHead
|
||||
)
|
||||
{
|
||||
return (BOOLEAN)(ListHead->Flink == ListHead);
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
PSINGLE_LIST_ENTRY
|
||||
PopEntryList(
|
||||
PSINGLE_LIST_ENTRY ListHead
|
||||
)
|
||||
{
|
||||
PSINGLE_LIST_ENTRY FirstEntry;
|
||||
FirstEntry = ListHead->Next;
|
||||
if (FirstEntry != NULL) {
|
||||
ListHead->Next = FirstEntry->Next;
|
||||
}
|
||||
|
||||
return FirstEntry;
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
PushEntryList(
|
||||
PSINGLE_LIST_ENTRY ListHead,
|
||||
PSINGLE_LIST_ENTRY Entry
|
||||
)
|
||||
{
|
||||
Entry->Next = ListHead->Next;
|
||||
ListHead->Next = Entry;
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
BOOLEAN
|
||||
RemoveEntryList(
|
||||
IN PLIST_ENTRY Entry)
|
||||
{
|
||||
PLIST_ENTRY OldFlink;
|
||||
PLIST_ENTRY OldBlink;
|
||||
|
||||
OldFlink = Entry->Flink;
|
||||
OldBlink = Entry->Blink;
|
||||
OldFlink->Blink = OldBlink;
|
||||
OldBlink->Flink = OldFlink;
|
||||
return (BOOLEAN)(OldFlink == OldBlink);
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
PLIST_ENTRY
|
||||
RemoveHeadList(
|
||||
IN PLIST_ENTRY ListHead)
|
||||
{
|
||||
PLIST_ENTRY Flink;
|
||||
PLIST_ENTRY Entry;
|
||||
|
||||
Entry = ListHead->Flink;
|
||||
Flink = Entry->Flink;
|
||||
ListHead->Flink = Flink;
|
||||
Flink->Blink = ListHead;
|
||||
return Entry;
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
PLIST_ENTRY
|
||||
RemoveTailList(
|
||||
IN PLIST_ENTRY ListHead)
|
||||
{
|
||||
PLIST_ENTRY Blink;
|
||||
PLIST_ENTRY Entry;
|
||||
|
||||
Entry = ListHead->Blink;
|
||||
Blink = Entry->Blink;
|
||||
ListHead->Blink = Blink;
|
||||
Blink->Flink = ListHead;
|
||||
return Entry;
|
||||
}
|
||||
|
||||
//
|
||||
// LUID Macros
|
||||
//
|
||||
#define RtlEqualLuid(L1, L2) (((L1)->HighPart == (L2)->HighPart) && \
|
||||
((L1)->LowPart == (L2)->LowPart))
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// RTL Splay Tree Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlSplay(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlDelete(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlDeleteNoSplay(
|
||||
PRTL_SPLAY_LINKS Links,
|
||||
PRTL_SPLAY_LINKS *Root
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlSubtreeSuccessor(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlSubtreePredecessor(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlRealSuccessor(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlRealPredecessor(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
/*
|
||||
* Splay Tree Macros
|
||||
*/
|
||||
#define RtlIsLeftChild(Links) \
|
||||
(RtlLeftChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
|
||||
|
||||
|
@ -68,52 +246,9 @@
|
|||
_SplayChild->Parent = _SplayParent; \
|
||||
}
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
|
||||
/*
|
||||
* Splay Tree Functions
|
||||
*/
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlSplay(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlDelete(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlDeleteNoSplay(
|
||||
PRTL_SPLAY_LINKS Links,
|
||||
PRTL_SPLAY_LINKS *Root
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlSubtreeSuccessor(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlSubtreePredecessor(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlRealSuccessor(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
NTSYSAPI
|
||||
PRTL_SPLAY_LINKS
|
||||
NTAPI
|
||||
RtlRealPredecessor(PRTL_SPLAY_LINKS Links);
|
||||
|
||||
/*
|
||||
* Error and Exception Functions
|
||||
*/
|
||||
//
|
||||
// Error and Exception Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
|
@ -185,10 +320,9 @@ RtlUnwind(
|
|||
IN PVOID ReturnValue
|
||||
);
|
||||
|
||||
/*
|
||||
* Heap Functions
|
||||
*/
|
||||
|
||||
//
|
||||
// Heap Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
|
@ -273,10 +407,9 @@ RtlValidateHeap(
|
|||
|
||||
#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
|
||||
|
||||
|
||||
/*
|
||||
* Security Functions
|
||||
*/
|
||||
//
|
||||
// Security Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -787,9 +920,9 @@ RtlSetSecurityObject(
|
|||
IN HANDLE Token
|
||||
);
|
||||
|
||||
/*
|
||||
* Single-Character Functions
|
||||
*/
|
||||
//
|
||||
// Single-Character Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -853,7 +986,13 @@ RtlCharToInteger(
|
|||
PULONG Value
|
||||
);
|
||||
|
||||
#if (defined(_M_IX86) && (_MSC_FULL_VER > 13009037)) || ((defined(_M_AMD64) || defined(_M_IA64)) && (_MSC_FULL_VER > 13009175))
|
||||
//
|
||||
// Byte Swap Functions
|
||||
//
|
||||
#if (defined(_M_IX86) && (_MSC_FULL_VER > 13009037)) || \
|
||||
((defined(_M_AMD64) || \
|
||||
defined(_M_IA64)) && (_MSC_FULL_VER > 13009175))
|
||||
|
||||
unsigned short __cdecl _byteswap_ushort(unsigned short);
|
||||
unsigned long __cdecl _byteswap_ulong (unsigned long);
|
||||
unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64);
|
||||
|
@ -863,6 +1002,7 @@ unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64);
|
|||
#define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
|
||||
#define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
|
||||
#define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
|
||||
|
||||
#else
|
||||
|
||||
USHORT
|
||||
|
@ -879,20 +1019,22 @@ RtlUlonglongByteSwap(IN ULONGLONG Source);
|
|||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unicode->Ansi String Functions
|
||||
*/
|
||||
//
|
||||
// Unicode->Ansi String Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
RtlxUnicodeStringToAnsiSize(IN PCUNICODE_STRING UnicodeString);
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
#define RtlUnicodeStringToAnsiSize(STRING) ( \
|
||||
NLS_MB_CODE_PAGE_TAG ? \
|
||||
RtlxUnicodeStringToAnsiSize(STRING) : \
|
||||
((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
|
||||
)
|
||||
|
||||
#endif
|
||||
|
||||
NTSYSAPI
|
||||
|
@ -904,9 +1046,9 @@ RtlUnicodeStringToAnsiString(
|
|||
BOOLEAN AllocateDestinationString
|
||||
);
|
||||
|
||||
/*
|
||||
* Unicode->OEM String Functions
|
||||
*/
|
||||
//
|
||||
// Unicode->OEM String Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -951,14 +1093,17 @@ NTAPI
|
|||
RtlxUnicodeStringToOemSize(IN PCUNICODE_STRING UnicodeString);
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
#define RtlUnicodeStringToOemSize(STRING) ( \
|
||||
NLS_MB_OEM_CODE_PAGE_TAG ? \
|
||||
RtlxUnicodeStringToOemSize(STRING) : \
|
||||
((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
|
||||
|
||||
#define RtlUnicodeStringToOemSize(STRING) ( \
|
||||
NLS_MB_OEM_CODE_PAGE_TAG ? \
|
||||
RtlxUnicodeStringToOemSize(STRING) : \
|
||||
((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
|
||||
)
|
||||
#define RtlUnicodeStringToCountedOemSize(STRING) ( \
|
||||
(ULONG)(RtlUnicodeStringToOemSize(STRING) - sizeof(ANSI_NULL)) \
|
||||
|
||||
#define RtlUnicodeStringToCountedOemSize(STRING) ( \
|
||||
(ULONG)(RtlUnicodeStringToOemSize(STRING) - sizeof(ANSI_NULL)) \
|
||||
)
|
||||
|
||||
#endif
|
||||
|
||||
NTSYSAPI
|
||||
|
@ -972,9 +1117,9 @@ RtlUnicodeToOemN(
|
|||
ULONG UnicodeSize
|
||||
);
|
||||
|
||||
/*
|
||||
* Unicode->MultiByte String Functions
|
||||
*/
|
||||
//
|
||||
// Unicode->MultiByte String Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1011,20 +1156,9 @@ ULONG
|
|||
NTAPI
|
||||
RtlxOemStringToUnicodeSize(IN PCOEM_STRING OemString);
|
||||
|
||||
/*
|
||||
* OEM to Unicode Functions
|
||||
*/
|
||||
#ifdef NTOS_MODE_USER
|
||||
#define RtlOemStringToUnicodeSize(STRING) ( \
|
||||
NLS_MB_OEM_CODE_PAGE_TAG ? \
|
||||
RtlxOemStringToUnicodeSize(STRING) : \
|
||||
((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
|
||||
)
|
||||
#define RtlOemStringToCountedUnicodeSize(STRING) ( \
|
||||
(ULONG)(RtlOemStringToUnicodeSize(STRING) - sizeof(UNICODE_NULL)) \
|
||||
)
|
||||
#endif
|
||||
|
||||
//
|
||||
// OEM to Unicode Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1045,9 +1179,23 @@ RtlOemToUnicodeN(
|
|||
ULONG BytesInOemString
|
||||
);
|
||||
|
||||
/*
|
||||
* Ansi->Unicode String Functions
|
||||
*/
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
#define RtlOemStringToUnicodeSize(STRING) ( \
|
||||
NLS_MB_OEM_CODE_PAGE_TAG ? \
|
||||
RtlxOemStringToUnicodeSize(STRING) : \
|
||||
((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
|
||||
)
|
||||
|
||||
#define RtlOemStringToCountedUnicodeSize(STRING) ( \
|
||||
(ULONG)(RtlOemStringToUnicodeSize(STRING) - sizeof(UNICODE_NULL)) \
|
||||
)
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Ansi->Unicode String Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
|
@ -1065,11 +1213,13 @@ RtlAnsiStringToUnicodeString(
|
|||
);
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
#define RtlAnsiStringToUnicodeSize(STRING) ( \
|
||||
NLS_MB_CODE_PAGE_TAG ? \
|
||||
RtlxAnsiStringToUnicodeSize(STRING) : \
|
||||
((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
|
||||
|
||||
#define RtlAnsiStringToUnicodeSize(STRING) ( \
|
||||
NLS_MB_CODE_PAGE_TAG ? \
|
||||
RtlxAnsiStringToUnicodeSize(STRING) : \
|
||||
((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
|
||||
)
|
||||
|
||||
#endif
|
||||
|
||||
NTSYSAPI
|
||||
|
@ -1080,9 +1230,9 @@ RtlCreateUnicodeStringFromAsciiz(
|
|||
IN PCSZ Source
|
||||
);
|
||||
|
||||
/*
|
||||
* Unicode String Functions
|
||||
*/
|
||||
//
|
||||
// Unicode String Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1125,6 +1275,7 @@ RtlCreateUnicodeString(
|
|||
);
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1133,6 +1284,7 @@ RtlDowncaseUnicodeString(
|
|||
IN PCUNICODE_STRING UniSource,
|
||||
IN BOOLEAN AllocateDestinationString
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
NTSYSAPI
|
||||
|
@ -1220,9 +1372,9 @@ RtlUnicodeStringToInteger(
|
|||
PULONG Value
|
||||
);
|
||||
|
||||
/*
|
||||
* Ansi String Functions
|
||||
*/
|
||||
//
|
||||
// Ansi String Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -1236,17 +1388,17 @@ RtlInitAnsiString(
|
|||
PCSZ SourceString
|
||||
);
|
||||
|
||||
/*
|
||||
* OEM String Functions
|
||||
*/
|
||||
//
|
||||
// OEM String Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlFreeOemString(IN POEM_STRING OemString);
|
||||
|
||||
/*
|
||||
* MultiByte->Unicode String Functions
|
||||
*/
|
||||
//
|
||||
// MultiByte->Unicode String Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1267,9 +1419,9 @@ RtlMultiByteToUnicodeSize(
|
|||
ULONG MbSize
|
||||
);
|
||||
|
||||
/*
|
||||
* Atom Functions
|
||||
*/
|
||||
//
|
||||
// Atom Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1329,9 +1481,9 @@ RtlLookupAtomInAtomTable(
|
|||
OUT PRTL_ATOM Atom
|
||||
);
|
||||
|
||||
/*
|
||||
* Memory Functions
|
||||
*/
|
||||
//
|
||||
// Memory Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -1341,9 +1493,9 @@ RtlFillMemoryUlong(
|
|||
IN ULONG Fill
|
||||
);
|
||||
|
||||
/*
|
||||
* Process Management Functions
|
||||
*/
|
||||
//
|
||||
// Process Management Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -1442,9 +1594,36 @@ RtlSetProcessIsCritical(
|
|||
IN BOOLEAN IsWinlogon
|
||||
);
|
||||
|
||||
/*
|
||||
* Environment/Path Functions
|
||||
*/
|
||||
static __inline
|
||||
struct _PEB*
|
||||
NtCurrentPeb(VOID)
|
||||
{
|
||||
struct _PEB *pPeb;
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"movl %%fs:0x30, %0\n" /* fs:30h == Teb->Peb */
|
||||
: "=r" (pPeb) /* can't have two memory operands */
|
||||
: /* no inputs */
|
||||
);
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
||||
__asm mov eax, fs:0x30;
|
||||
__asm mov pPeb, eax
|
||||
|
||||
#else
|
||||
#error Unknown compiler for inline assembler
|
||||
#endif
|
||||
|
||||
return pPeb;
|
||||
}
|
||||
|
||||
//
|
||||
// Environment/Path Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1550,9 +1729,9 @@ RtlSetEnvironmentVariable(
|
|||
PUNICODE_STRING Value
|
||||
);
|
||||
|
||||
/*
|
||||
* Critical Section/Resource Functions
|
||||
*/
|
||||
//
|
||||
// Critical Section/Resource Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1661,9 +1840,9 @@ RtlReleaseResource(
|
|||
IN PRTL_RESOURCE Resource
|
||||
);
|
||||
|
||||
/*
|
||||
* Compression Functions
|
||||
*/
|
||||
//
|
||||
// Compression Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1699,9 +1878,9 @@ RtlGetCompressionWorkSpaceSize(
|
|||
OUT PULONG CompressFragmentWorkSpaceSize
|
||||
);
|
||||
|
||||
/*
|
||||
* Debug Info Functions
|
||||
*/
|
||||
//
|
||||
// Debug Info Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
PRTL_DEBUG_BUFFER
|
||||
NTAPI
|
||||
|
@ -1724,9 +1903,9 @@ RtlQueryProcessDebugInformation(
|
|||
IN OUT PRTL_DEBUG_BUFFER DebugBuffer
|
||||
);
|
||||
|
||||
/*
|
||||
* Bitmap Functions
|
||||
*/
|
||||
//
|
||||
// Bitmap Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
|
@ -1790,9 +1969,9 @@ RtlSetBits (
|
|||
IN ULONG NumberToSet
|
||||
);
|
||||
|
||||
/*
|
||||
* Timer Functions
|
||||
*/
|
||||
//
|
||||
// Timer Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1843,9 +2022,9 @@ NTSTATUS
|
|||
NTAPI
|
||||
RtlDeleteTimerQueue(HANDLE TimerQueue);
|
||||
|
||||
/*
|
||||
* Debug Functions
|
||||
*/
|
||||
//
|
||||
// Debug Functions
|
||||
//
|
||||
ULONG
|
||||
__cdecl
|
||||
DbgPrint(
|
||||
|
@ -1857,9 +2036,9 @@ VOID
|
|||
NTAPI
|
||||
DbgBreakPoint(VOID);
|
||||
|
||||
/*
|
||||
* Handle Table Functions
|
||||
*/
|
||||
//
|
||||
// Handle Table Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
PRTL_HANDLE_TABLE_ENTRY
|
||||
NTAPI
|
||||
|
@ -1907,9 +2086,9 @@ RtlIsValidIndexHandle(
|
|||
OUT PRTL_HANDLE_TABLE_ENTRY *Handle
|
||||
);
|
||||
|
||||
/*
|
||||
* PE Functions
|
||||
*/
|
||||
//
|
||||
// PE Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -1960,9 +2139,9 @@ RtlImageRvaToSection(
|
|||
ULONG Rva
|
||||
);
|
||||
|
||||
/*
|
||||
* Registry Functions
|
||||
*/
|
||||
//
|
||||
// Registry Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -2017,9 +2196,9 @@ RtlWriteRegistryValue(
|
|||
ULONG ValueLength
|
||||
);
|
||||
|
||||
/*
|
||||
* NLS Functions
|
||||
*/
|
||||
//
|
||||
// NLS Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -2043,14 +2222,17 @@ VOID
|
|||
NTAPI
|
||||
RtlResetRtlTranslations(IN PNLSTABLEINFO NlsTable);
|
||||
|
||||
/*
|
||||
* Misc conversion functions
|
||||
*/
|
||||
#if defined(NTOS_MODE_USER) && !defined(NO_RTL_INLINES)
|
||||
|
||||
//
|
||||
// Misc conversion functions
|
||||
//
|
||||
static __inline
|
||||
LARGE_INTEGER
|
||||
NTAPI_INLINE
|
||||
RtlConvertLongToLargeInteger(LONG SignedInteger)
|
||||
RtlConvertLongToLargeIntegerf(
|
||||
LONG SignedInteger
|
||||
)
|
||||
{
|
||||
LARGE_INTEGER Result;
|
||||
|
||||
|
@ -2063,7 +2245,8 @@ LARGE_INTEGER
|
|||
NTAPI_INLINE
|
||||
RtlEnlargedIntegerMultiply(
|
||||
LONG Multiplicand,
|
||||
LONG Multiplier)
|
||||
LONG Multiplier
|
||||
)
|
||||
{
|
||||
LARGE_INTEGER Product;
|
||||
|
||||
|
@ -2077,7 +2260,8 @@ NTAPI_INLINE
|
|||
RtlEnlargedUnsignedDivide(
|
||||
IN ULARGE_INTEGER Dividend,
|
||||
IN ULONG Divisor,
|
||||
IN PULONG Remainder OPTIONAL)
|
||||
IN PULONG Remainder OPTIONAL
|
||||
)
|
||||
{
|
||||
ULONG Quotient;
|
||||
|
||||
|
@ -2094,7 +2278,8 @@ LARGE_INTEGER
|
|||
NTAPI_INLINE
|
||||
RtlEnlargedUnsignedMultiply(
|
||||
ULONG Multiplicand,
|
||||
ULONG Multiplier)
|
||||
ULONG Multiplier
|
||||
)
|
||||
{
|
||||
LARGE_INTEGER Product;
|
||||
|
||||
|
@ -2108,9 +2293,9 @@ ULONG
|
|||
NTAPI
|
||||
RtlUniform(PULONG Seed);
|
||||
|
||||
/*
|
||||
* Network Functions
|
||||
*/
|
||||
//
|
||||
// Network Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -2121,9 +2306,9 @@ RtlIpv4StringToAddressW(
|
|||
OUT PULONG IpAddr
|
||||
);
|
||||
|
||||
/*
|
||||
* Time Functions
|
||||
*/
|
||||
//
|
||||
// Time Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -2158,9 +2343,9 @@ RtlTimeToTimeFields(
|
|||
PTIME_FIELDS TimeFields
|
||||
);
|
||||
|
||||
/*
|
||||
* Version Functions
|
||||
*/
|
||||
//
|
||||
// Version Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -2180,28 +2365,4 @@ BOOLEAN
|
|||
NTAPI
|
||||
RtlGetNtProductType(OUT PNT_PRODUCT_TYPE ProductType);
|
||||
|
||||
static __inline struct _PEB* NtCurrentPeb (void)
|
||||
{
|
||||
struct _PEB * pPeb;
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"movl %%fs:0x30, %0\n" /* fs:30h == Teb->Peb */
|
||||
: "=r" (pPeb) /* can't have two memory operands */
|
||||
: /* no inputs */
|
||||
);
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
||||
__asm mov eax, fs:0x30;
|
||||
__asm mov pPeb, eax
|
||||
|
||||
#else
|
||||
#error Unknown compiler for inline assembler
|
||||
#endif
|
||||
|
||||
return pPeb;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,256 +1,193 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
rtltypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the Run-Time Library
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _RTLTYPES_H
|
||||
#define _RTLTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include "pstypes.h"
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
#define MAXIMUM_LEADBYTES 12
|
||||
//
|
||||
// Maximum Atom Length
|
||||
//
|
||||
#define RTL_MAXIMUM_ATOM_LENGTH 255
|
||||
|
||||
#define PPF_NORMALIZED 0x01
|
||||
#define PPF_PROFILE_USER 0x02
|
||||
#define PPF_PROFILE_SERVER 0x04
|
||||
#define PPF_PROFILE_KERNEL 0x08
|
||||
//
|
||||
// Process Parameters Flags (FIXME: Rename)
|
||||
//
|
||||
#define PPF_NORMALIZED 0x01
|
||||
#define PPF_PROFILE_USER 0x02
|
||||
#define PPF_PROFILE_SERVER 0x04
|
||||
#define PPF_PROFILE_KERNEL 0x08
|
||||
#define PPF_UNKNOWN 0x10
|
||||
#define PPF_RESERVE_1MB 0x20
|
||||
#define PPF_DISABLE_HEAP_CHECKS 0x100
|
||||
#define PPF_PROCESS_OR_1 0x200
|
||||
#define PPF_PROCESS_OR_2 0x400
|
||||
|
||||
#define PPF_RESERVE_1MB 0x20
|
||||
#define PPF_DISABLE_HEAP_CHECKS 0x100
|
||||
#define PPF_PROCESS_OR_1 0x200
|
||||
#define PPF_PROCESS_OR_2 0x400
|
||||
//
|
||||
// Exception Flags
|
||||
//
|
||||
#define EXCEPTION_CHAIN_END ((PEXCEPTION_REGISTRATION_RECORD)-1)
|
||||
#define EXCEPTION_UNWINDING 0x02
|
||||
#define EXCEPTION_EXIT_UNWIND 0x04
|
||||
#define EXCEPTION_STACK_INVALID 0x08
|
||||
#define EXCEPTION_NESTED_CALL 0x10
|
||||
#define EXCEPTION_TARGET_UNWIND 0x20
|
||||
#define EXCEPTION_COLLIDED_UNWIND 0x20
|
||||
|
||||
#define PEB_BASE (0x7FFDF000)
|
||||
//
|
||||
// Range and Range List Flags
|
||||
//
|
||||
#define RTL_RANGE_LIST_ADD_IF_CONFLICT 0x00000001
|
||||
#define RTL_RANGE_LIST_ADD_SHARED 0x00000002
|
||||
|
||||
#define EXCEPTION_CHAIN_END ((PEXCEPTION_REGISTRATION_RECORD)-1)
|
||||
#define EXCEPTION_CONTINUE_SEARCH 0
|
||||
#define EXCEPTION_EXECUTE_HANDLER 1
|
||||
#define RTL_RANGE_SHARED 0x01
|
||||
#define RTL_RANGE_CONFLICT 0x02
|
||||
|
||||
#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
|
||||
//
|
||||
// Registry Keys
|
||||
//
|
||||
#define RTL_REGISTRY_ABSOLUTE 0
|
||||
#define RTL_REGISTRY_SERVICES 1
|
||||
#define RTL_REGISTRY_CONTROL 2
|
||||
#define RTL_REGISTRY_WINDOWS_NT 3
|
||||
#define RTL_REGISTRY_DEVICEMAP 4
|
||||
#define RTL_REGISTRY_USER 5
|
||||
#define RTL_REGISTRY_MAXIMUM 6
|
||||
#define RTL_REGISTRY_HANDLE 0x40000000
|
||||
#define RTL_REGISTRY_OPTIONAL 0x80000000
|
||||
#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
|
||||
#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
|
||||
#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
|
||||
#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
|
||||
#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
|
||||
#define RTL_QUERY_REGISTRY_DIRECT 0x00000020
|
||||
#define RTL_QUERY_REGISTRY_DELETE 0x00000040
|
||||
|
||||
#define EH_NONCONTINUABLE 0x01
|
||||
#define EH_UNWINDING 0x02
|
||||
#define EH_EXIT_UNWIND 0x04
|
||||
#define EH_STACK_INVALID 0x08
|
||||
#define EH_NESTED_CALL 0x10
|
||||
//
|
||||
// Versioning
|
||||
//
|
||||
#define VER_MINORVERSION 0x0000001
|
||||
#define VER_MAJORVERSION 0x0000002
|
||||
#define VER_BUILDNUMBER 0x0000004
|
||||
#define VER_PLATFORMID 0x0000008
|
||||
#define VER_SERVICEPACKMINOR 0x0000010
|
||||
#define VER_SERVICEPACKMAJOR 0x0000020
|
||||
#define VER_SUITENAME 0x0000040
|
||||
#define VER_PRODUCT_TYPE 0x0000080
|
||||
#define VER_PLATFORM_WIN32s 0
|
||||
#define VER_PLATFORM_WIN32_WINDOWS 1
|
||||
#define VER_PLATFORM_WIN32_NT 2
|
||||
#define VER_EQUAL 1
|
||||
#define VER_GREATER 2
|
||||
#define VER_GREATER_EQUAL 3
|
||||
#define VER_LESS 4
|
||||
#define VER_LESS_EQUAL 5
|
||||
#define VER_AND 6
|
||||
#define VER_OR 7
|
||||
#define VER_CONDITION_MASK 7
|
||||
#define VER_NUM_BITS_PER_CONDITION_MASK 3
|
||||
|
||||
#define RTL_RANGE_LIST_ADD_IF_CONFLICT 0x00000001
|
||||
#define RTL_RANGE_LIST_ADD_SHARED 0x00000002
|
||||
//
|
||||
// Timezone IDs
|
||||
//
|
||||
#define TIME_ZONE_ID_UNKNOWN 0
|
||||
#define TIME_ZONE_ID_STANDARD 1
|
||||
#define TIME_ZONE_ID_DAYLIGHT 2
|
||||
#define TIME_ZONE_ID_INVALID 0xFFFFFFFF
|
||||
|
||||
#define RTL_RANGE_SHARED 0x01
|
||||
#define RTL_RANGE_CONFLICT 0x02
|
||||
|
||||
/* Run-Time Library (RTL) Registry Constants */
|
||||
#define RTL_REGISTRY_ABSOLUTE 0
|
||||
#define RTL_REGISTRY_SERVICES 1
|
||||
#define RTL_REGISTRY_CONTROL 2
|
||||
#define RTL_REGISTRY_WINDOWS_NT 3
|
||||
#define RTL_REGISTRY_DEVICEMAP 4
|
||||
#define RTL_REGISTRY_USER 5
|
||||
#define RTL_REGISTRY_MAXIMUM 6
|
||||
#define RTL_REGISTRY_HANDLE 0x40000000
|
||||
#define RTL_REGISTRY_OPTIONAL 0x80000000
|
||||
#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
|
||||
#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
|
||||
#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
|
||||
#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
|
||||
#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
|
||||
#define RTL_QUERY_REGISTRY_DIRECT 0x00000020
|
||||
#define RTL_QUERY_REGISTRY_DELETE 0x00000040
|
||||
|
||||
/* Version Constants */
|
||||
#define VER_MINORVERSION 0x0000001
|
||||
#define VER_MAJORVERSION 0x0000002
|
||||
#define VER_BUILDNUMBER 0x0000004
|
||||
#define VER_PLATFORMID 0x0000008
|
||||
#define VER_SERVICEPACKMINOR 0x0000010
|
||||
#define VER_SERVICEPACKMAJOR 0x0000020
|
||||
#define VER_SUITENAME 0x0000040
|
||||
#define VER_PRODUCT_TYPE 0x0000080
|
||||
#define VER_PLATFORM_WIN32s 0
|
||||
#define VER_PLATFORM_WIN32_WINDOWS 1
|
||||
#define VER_PLATFORM_WIN32_NT 2
|
||||
#define VER_EQUAL 1
|
||||
#define VER_GREATER 2
|
||||
#define VER_GREATER_EQUAL 3
|
||||
#define VER_LESS 4
|
||||
#define VER_LESS_EQUAL 5
|
||||
#define VER_AND 6
|
||||
#define VER_OR 7
|
||||
#define VER_CONDITION_MASK 7
|
||||
#define VER_NUM_BITS_PER_CONDITION_MASK 3
|
||||
|
||||
#define RTL_CRITSECT_TYPE 0
|
||||
#define RTL_RESOURCE_TYPE 1
|
||||
//
|
||||
// RTL Lock Type (Critical Section or Resource)
|
||||
//
|
||||
#define RTL_CRITSECT_TYPE 0
|
||||
#define RTL_RESOURCE_TYPE 1
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
/* RTL String Hash Algorithms */
|
||||
#define HASH_STRING_ALGORITHM_DEFAULT 0
|
||||
#define HASH_STRING_ALGORITHM_X65599 1
|
||||
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
|
||||
|
||||
/* RtlDuplicateString settings */
|
||||
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE 1
|
||||
#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING 2
|
||||
//
|
||||
// String Hash Algorithms
|
||||
//
|
||||
#define HASH_STRING_ALGORITHM_DEFAULT 0
|
||||
#define HASH_STRING_ALGORITHM_X65599 1
|
||||
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
|
||||
|
||||
/* For Size conversion macros */
|
||||
#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
|
||||
#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
|
||||
#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
|
||||
//
|
||||
// RtlDuplicateString Flags
|
||||
//
|
||||
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE 1
|
||||
#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING 2
|
||||
|
||||
#define MAX_ATOM_LEN 255 /* TCHARS not including nullterm */
|
||||
|
||||
/* List Macros */
|
||||
static __inline
|
||||
VOID
|
||||
InitializeListHead(
|
||||
IN PLIST_ENTRY ListHead)
|
||||
{
|
||||
ListHead->Flink = ListHead->Blink = ListHead;
|
||||
}
|
||||
|
||||
static __inline
|
||||
VOID
|
||||
InsertHeadList(
|
||||
IN PLIST_ENTRY ListHead,
|
||||
IN PLIST_ENTRY Entry)
|
||||
{
|
||||
PLIST_ENTRY OldFlink;
|
||||
OldFlink = ListHead->Flink;
|
||||
Entry->Flink = OldFlink;
|
||||
Entry->Blink = ListHead;
|
||||
OldFlink->Blink = Entry;
|
||||
ListHead->Flink = Entry;
|
||||
}
|
||||
|
||||
static __inline
|
||||
VOID
|
||||
InsertTailList(
|
||||
IN PLIST_ENTRY ListHead,
|
||||
IN PLIST_ENTRY Entry)
|
||||
{
|
||||
PLIST_ENTRY OldBlink;
|
||||
OldBlink = ListHead->Blink;
|
||||
Entry->Flink = ListHead;
|
||||
Entry->Blink = OldBlink;
|
||||
OldBlink->Flink = Entry;
|
||||
ListHead->Blink = Entry;
|
||||
}
|
||||
|
||||
#define IsListEmpty(ListHead) \
|
||||
((ListHead)->Flink == (ListHead))
|
||||
|
||||
#define PopEntryList(ListHead) \
|
||||
(ListHead)->Next; \
|
||||
{ \
|
||||
PSINGLE_LIST_ENTRY _FirstEntry; \
|
||||
_FirstEntry = (ListHead)->Next; \
|
||||
if (_FirstEntry != NULL) \
|
||||
(ListHead)->Next = _FirstEntry->Next; \
|
||||
}
|
||||
|
||||
#define PushEntryList(_ListHead, _Entry) \
|
||||
(_Entry)->Next = (_ListHead)->Next; \
|
||||
(_ListHead)->Next = (_Entry); \
|
||||
|
||||
static __inline
|
||||
BOOLEAN
|
||||
RemoveEntryList(
|
||||
IN PLIST_ENTRY Entry)
|
||||
{
|
||||
PLIST_ENTRY OldFlink;
|
||||
PLIST_ENTRY OldBlink;
|
||||
|
||||
OldFlink = Entry->Flink;
|
||||
OldBlink = Entry->Blink;
|
||||
OldFlink->Blink = OldBlink;
|
||||
OldBlink->Flink = OldFlink;
|
||||
return (BOOLEAN)(OldFlink == OldBlink);
|
||||
}
|
||||
|
||||
static __inline
|
||||
PLIST_ENTRY
|
||||
RemoveHeadList(
|
||||
IN PLIST_ENTRY ListHead)
|
||||
{
|
||||
PLIST_ENTRY Flink;
|
||||
PLIST_ENTRY Entry;
|
||||
|
||||
Entry = ListHead->Flink;
|
||||
Flink = Entry->Flink;
|
||||
ListHead->Flink = Flink;
|
||||
Flink->Blink = ListHead;
|
||||
return Entry;
|
||||
}
|
||||
|
||||
static __inline
|
||||
PLIST_ENTRY
|
||||
RemoveTailList(
|
||||
IN PLIST_ENTRY ListHead)
|
||||
{
|
||||
PLIST_ENTRY Blink;
|
||||
PLIST_ENTRY Entry;
|
||||
|
||||
Entry = ListHead->Blink;
|
||||
Blink = Entry->Blink;
|
||||
ListHead->Blink = Blink;
|
||||
Blink->Flink = ListHead;
|
||||
return Entry;
|
||||
}
|
||||
|
||||
#define IsFirstEntry(ListHead, Entry) \
|
||||
((ListHead)->Flink == Entry)
|
||||
|
||||
#define IsLastEntry(ListHead, Entry) \
|
||||
((ListHead)->Blink == Entry)
|
||||
|
||||
/*
|
||||
* Constant String Macro
|
||||
*/
|
||||
#define RTL_CONSTANT_STRING(__SOURCE_STRING__) \
|
||||
{ \
|
||||
sizeof(__SOURCE_STRING__) - sizeof((__SOURCE_STRING__)[0]), \
|
||||
sizeof(__SOURCE_STRING__), \
|
||||
(__SOURCE_STRING__) \
|
||||
}
|
||||
|
||||
#define RtlEqualLuid(L1, L2) (((L1)->HighPart == (L2)->HighPart) && \
|
||||
((L1)->LowPart == (L2)->LowPart))
|
||||
//
|
||||
// Codepages
|
||||
//
|
||||
#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
|
||||
#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
|
||||
#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
|
||||
#endif
|
||||
#define MAXIMUM_LEADBYTES 12
|
||||
|
||||
/* RTL Debug Queries */
|
||||
#define RTL_DEBUG_QUERY_MODULES 0x01
|
||||
#define RTL_DEBUG_QUERY_BACKTRACES 0x02
|
||||
#define RTL_DEBUG_QUERY_HEAPS 0x04
|
||||
#define RTL_DEBUG_QUERY_HEAP_TAGS 0x08
|
||||
#define RTL_DEBUG_QUERY_HEAP_BLOCKS 0x10
|
||||
#define RTL_DEBUG_QUERY_LOCKS 0x20
|
||||
//
|
||||
// RTL Debug Queries
|
||||
//
|
||||
#define RTL_DEBUG_QUERY_MODULES 0x01
|
||||
#define RTL_DEBUG_QUERY_BACKTRACES 0x02
|
||||
#define RTL_DEBUG_QUERY_HEAPS 0x04
|
||||
#define RTL_DEBUG_QUERY_HEAP_TAGS 0x08
|
||||
#define RTL_DEBUG_QUERY_HEAP_BLOCKS 0x10
|
||||
#define RTL_DEBUG_QUERY_LOCKS 0x20
|
||||
|
||||
/* RTL Handle Flags */
|
||||
#define RTL_HANDLE_VALID 0x1
|
||||
//
|
||||
// RTL Handle Flags
|
||||
//
|
||||
#define RTL_HANDLE_VALID 0x1
|
||||
|
||||
/* RTL Atom Flags */
|
||||
#define RTL_ATOM_IS_PINNED 0x1
|
||||
//
|
||||
// RTL Atom Flags
|
||||
//
|
||||
#define RTL_ATOM_IS_PINNED 0x1
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
//
|
||||
// Codepage Tags
|
||||
//
|
||||
#ifdef NTOS_MODE_USER
|
||||
extern BOOLEAN NTSYSAPI NLS_MB_CODE_PAGE_TAG;
|
||||
extern BOOLEAN NTSYSAPI NLS_MB_OEM_CODE_PAGE_TAG;
|
||||
|
||||
//
|
||||
// Constant String Macro
|
||||
//
|
||||
#define RTL_CONSTANT_STRING(__SOURCE_STRING__) \
|
||||
{ \
|
||||
sizeof(__SOURCE_STRING__) - sizeof((__SOURCE_STRING__)[0]), \
|
||||
sizeof(__SOURCE_STRING__), \
|
||||
(__SOURCE_STRING__) \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Table and Compare result types
|
||||
//
|
||||
typedef enum _TABLE_SEARCH_RESULT
|
||||
{
|
||||
TableEmptyTree,
|
||||
|
@ -265,26 +202,59 @@ typedef enum _RTL_GENERIC_COMPARE_RESULTS
|
|||
GenericGreaterThan,
|
||||
GenericEqual
|
||||
} RTL_GENERIC_COMPARE_RESULTS;
|
||||
#endif
|
||||
|
||||
typedef enum _RTL_PATH_TYPE
|
||||
{
|
||||
INVALID_PATH = 0,
|
||||
UNC_PATH, /* "//foo" */
|
||||
ABSOLUTE_DRIVE_PATH, /* "c:/foo" */
|
||||
RELATIVE_DRIVE_PATH, /* "c:foo" */
|
||||
ABSOLUTE_PATH, /* "/foo" */
|
||||
RELATIVE_PATH, /* "foo" */
|
||||
DEVICE_PATH, /* "//./foo" */
|
||||
UNC_DOT_PATH /* "//." */
|
||||
} RTL_PATH_TYPE;
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
#ifndef NTOS_MODE_USER
|
||||
typedef VOID (NTAPI *WAITORTIMERCALLBACKFUNC)(PVOID, BOOLEAN);
|
||||
|
||||
#else
|
||||
|
||||
//
|
||||
// ACL Query Information Classes
|
||||
//
|
||||
typedef enum _ACL_INFORMATION_CLASS
|
||||
{
|
||||
AclRevisionInformation = 1,
|
||||
AclSizeInformation
|
||||
} ACL_INFORMATION_CLASS;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// RTL Path Types
|
||||
//
|
||||
typedef enum _RTL_PATH_TYPE
|
||||
{
|
||||
INVALID_PATH = 0,
|
||||
UNC_PATH, // "//foo"
|
||||
ABSOLUTE_DRIVE_PATH, // "c:/foo"
|
||||
RELATIVE_DRIVE_PATH, // "c:foo"
|
||||
ABSOLUTE_PATH, // "/foo"
|
||||
RELATIVE_PATH, // "foo"
|
||||
DEVICE_PATH, // "//./foo"
|
||||
UNC_DOT_PATH // "//."
|
||||
} RTL_PATH_TYPE;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// Callback function for RTL Timers or Registered Waits
|
||||
//
|
||||
typedef VOID
|
||||
(NTAPI *WAITORTIMERCALLBACKFUNC)(
|
||||
PVOID pvContext,
|
||||
BOOLEAN fTimerOrWaitFired
|
||||
);
|
||||
|
||||
//
|
||||
// Handler during Vectored RTL Exceptions
|
||||
//
|
||||
typedef LONG
|
||||
(NTAPI *PVECTORED_EXCEPTION_HANDLER)(
|
||||
PEXCEPTION_POINTERS ExceptionPointers
|
||||
);
|
||||
|
||||
#else
|
||||
|
||||
//
|
||||
// Handler during regular RTL Exceptions
|
||||
//
|
||||
typedef EXCEPTION_DISPOSITION
|
||||
(NTAPI *PEXCEPTION_ROUTINE)(
|
||||
IN struct _EXCEPTION_RECORD *ExceptionRecord,
|
||||
|
@ -295,20 +265,18 @@ typedef EXCEPTION_DISPOSITION
|
|||
|
||||
#endif
|
||||
|
||||
struct _RTL_AVL_TABLE;
|
||||
struct _RTL_GENERIC_TABLE;
|
||||
struct _RTL_RANGE;
|
||||
|
||||
//
|
||||
// Callback for RTL Heap Enumeration
|
||||
//
|
||||
typedef NTSTATUS
|
||||
(*PHEAP_ENUMERATION_ROUTINE)(
|
||||
IN PVOID HeapHandle,
|
||||
IN PVOID UserParam
|
||||
);
|
||||
|
||||
typedef LONG (NTAPI *PVECTORED_EXCEPTION_HANDLER)(
|
||||
PEXCEPTION_POINTERS ExceptionPointers
|
||||
);
|
||||
|
||||
//
|
||||
// Thread and Process Start Routines for RtlCreateUserThread/Process
|
||||
//
|
||||
typedef ULONG (NTAPI *PTHREAD_START_ROUTINE)(
|
||||
PVOID Parameter
|
||||
);
|
||||
|
@ -319,6 +287,18 @@ typedef VOID
|
|||
PVOID Parameter
|
||||
);
|
||||
|
||||
//
|
||||
// Declare empty structure definitions so that they may be referenced by
|
||||
// routines before they are defined
|
||||
//
|
||||
struct _RTL_AVL_TABLE;
|
||||
struct _RTL_GENERIC_TABLE;
|
||||
struct _RTL_RANGE;
|
||||
typedef struct _COMPRESSED_DATA_INFO COMPRESSED_DATA_INFO, *PCOMPRESSED_DATA_INFO;
|
||||
|
||||
//
|
||||
// Routines and callbacks for the RTL AVL/Generic Table package
|
||||
//
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PRTL_AVL_MATCH_FUNCTION)(
|
||||
struct _RTL_AVL_TABLE *Table,
|
||||
|
@ -364,6 +344,9 @@ typedef VOID
|
|||
PVOID Buffer
|
||||
);
|
||||
|
||||
//
|
||||
// RTL Query Registry callback
|
||||
//
|
||||
typedef NTSTATUS
|
||||
(NTAPI *PRTL_QUERY_REGISTRY_ROUTINE)(
|
||||
IN PWSTR ValueName,
|
||||
|
@ -374,6 +357,19 @@ typedef NTSTATUS
|
|||
IN PVOID EntryContext
|
||||
);
|
||||
|
||||
//
|
||||
// RTL Range List callbacks
|
||||
//
|
||||
#ifdef NTOS_MODE_USER
|
||||
typedef BOOLEAN
|
||||
(NTAPI *PRTL_CONFLICT_RANGE_CALLBACK)(
|
||||
PVOID Context,
|
||||
struct _RTL_RANGE *Range
|
||||
);
|
||||
|
||||
//
|
||||
// Custom Heap Commit Routine for RtlCreateHeap
|
||||
//
|
||||
typedef NTSTATUS
|
||||
(NTAPI * PRTL_HEAP_COMMIT_ROUTINE)(
|
||||
IN PVOID Base,
|
||||
|
@ -381,22 +377,23 @@ typedef NTSTATUS
|
|||
IN OUT PSIZE_T CommitSize
|
||||
);
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
typedef BOOLEAN
|
||||
(NTAPI *PRTL_CONFLICT_RANGE_CALLBACK) (
|
||||
PVOID Context,
|
||||
struct _RTL_RANGE *Range
|
||||
);
|
||||
#endif
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
//
|
||||
// Version Info redefinitions
|
||||
//
|
||||
typedef OSVERSIONINFOW RTL_OSVERSIONINFOW;
|
||||
typedef LPOSVERSIONINFOW PRTL_OSVERSIONINFOW;
|
||||
typedef OSVERSIONINFOEXW RTL_OSVERSIONINFOEXW;
|
||||
typedef LPOSVERSIONINFOEXW PRTL_OSVERSIONINFOEXW;
|
||||
|
||||
//
|
||||
// Simple pointer definitions
|
||||
//
|
||||
typedef ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION;
|
||||
typedef ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION;
|
||||
|
||||
//
|
||||
// Parameters for RtlCreateHeap
|
||||
//
|
||||
typedef struct _RTL_HEAP_PARAMETERS
|
||||
{
|
||||
ULONG Length;
|
||||
|
@ -412,6 +409,9 @@ typedef struct _RTL_HEAP_PARAMETERS
|
|||
SIZE_T Reserved[2];
|
||||
} RTL_HEAP_PARAMETERS, *PRTL_HEAP_PARAMETERS;
|
||||
|
||||
//
|
||||
// RTL Bitmap structures
|
||||
//
|
||||
typedef struct _RTL_BITMAP
|
||||
{
|
||||
ULONG SizeOfBitMap;
|
||||
|
@ -424,17 +424,9 @@ typedef struct _RTL_BITMAP_RUN
|
|||
ULONG NumberOfBits;
|
||||
} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
|
||||
|
||||
typedef struct _COMPRESSED_DATA_INFO
|
||||
{
|
||||
USHORT CompressionFormatAndEngine;
|
||||
UCHAR CompressionUnitShift;
|
||||
UCHAR ChunkShift;
|
||||
UCHAR ClusterShift;
|
||||
UCHAR Reserved;
|
||||
USHORT NumberOfChunks;
|
||||
ULONG CompressedChunkSizes[ANYSIZE_ARRAY];
|
||||
} COMPRESSED_DATA_INFO, *PCOMPRESSED_DATA_INFO;
|
||||
|
||||
//
|
||||
// RtlGenerateXxxName context
|
||||
//
|
||||
typedef struct _GENERATE_NAME_CONTEXT
|
||||
{
|
||||
USHORT Checksum;
|
||||
|
@ -446,6 +438,9 @@ typedef struct _GENERATE_NAME_CONTEXT
|
|||
ULONG LastIndexValue;
|
||||
} GENERATE_NAME_CONTEXT, *PGENERATE_NAME_CONTEXT;
|
||||
|
||||
//
|
||||
// RTL Splay and Balanced Links structures
|
||||
//
|
||||
typedef struct _RTL_SPLAY_LINKS
|
||||
{
|
||||
struct _RTL_SPLAY_LINKS *Parent;
|
||||
|
@ -453,9 +448,18 @@ typedef struct _RTL_SPLAY_LINKS
|
|||
struct _RTL_SPLAY_LINKS *RightChild;
|
||||
} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
|
||||
|
||||
typedef ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION;
|
||||
typedef ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION;
|
||||
typedef struct _RTL_BALANCED_LINKS
|
||||
{
|
||||
struct _RTL_BALANCED_LINKS *Parent;
|
||||
struct _RTL_BALANCED_LINKS *LeftChild;
|
||||
struct _RTL_BALANCED_LINKS *RightChild;
|
||||
CHAR Balance;
|
||||
UCHAR Reserved[3];
|
||||
} RTL_BALANCED_LINKS, *PRTL_BALANCED_LINKS;
|
||||
|
||||
//
|
||||
// RTL Avl/Generic Tables
|
||||
//
|
||||
typedef struct _RTL_GENERIC_TABLE
|
||||
{
|
||||
PRTL_SPLAY_LINKS TableRoot;
|
||||
|
@ -469,15 +473,6 @@ typedef struct _RTL_GENERIC_TABLE
|
|||
PVOID TableContext;
|
||||
} RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE;
|
||||
|
||||
typedef struct _RTL_BALANCED_LINKS
|
||||
{
|
||||
struct _RTL_BALANCED_LINKS *Parent;
|
||||
struct _RTL_BALANCED_LINKS *LeftChild;
|
||||
struct _RTL_BALANCED_LINKS *RightChild;
|
||||
CHAR Balance;
|
||||
UCHAR Reserved[3];
|
||||
} RTL_BALANCED_LINKS, *PRTL_BALANCED_LINKS;
|
||||
|
||||
typedef struct _RTL_AVL_TABLE
|
||||
{
|
||||
RTL_BALANCED_LINKS BalancedRoot;
|
||||
|
@ -493,6 +488,9 @@ typedef struct _RTL_AVL_TABLE
|
|||
PVOID TableContext;
|
||||
} RTL_AVL_TABLE, *PRTL_AVL_TABLE;
|
||||
|
||||
//
|
||||
// RtlQueryRegistry Data
|
||||
//
|
||||
typedef struct _RTL_QUERY_REGISTRY_TABLE
|
||||
{
|
||||
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
|
||||
|
@ -504,6 +502,9 @@ typedef struct _RTL_QUERY_REGISTRY_TABLE
|
|||
ULONG DefaultLength;
|
||||
} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
|
||||
|
||||
//
|
||||
// RTL Unicode Table Structures
|
||||
//
|
||||
typedef struct _UNICODE_PREFIX_TABLE_ENTRY
|
||||
{
|
||||
CSHORT NodeTypeCode;
|
||||
|
@ -522,6 +523,9 @@ typedef struct _UNICODE_PREFIX_TABLE
|
|||
PUNICODE_PREFIX_TABLE_ENTRY LastNextEntry;
|
||||
} UNICODE_PREFIX_TABLE, *PUNICODE_PREFIX_TABLE;
|
||||
|
||||
//
|
||||
// Time Structure for RTL Time calls
|
||||
//
|
||||
typedef struct _TIME_FIELDS
|
||||
{
|
||||
CSHORT Year;
|
||||
|
@ -535,20 +539,18 @@ typedef struct _TIME_FIELDS
|
|||
} TIME_FIELDS, *PTIME_FIELDS;
|
||||
#endif
|
||||
|
||||
typedef EXCEPTION_DISPOSITION
|
||||
(*PEXCEPTION_HANDLER)(
|
||||
struct _EXCEPTION_RECORD*,
|
||||
PVOID,
|
||||
struct _CONTEXT*,
|
||||
PVOID
|
||||
);
|
||||
|
||||
//
|
||||
// ACE Definition
|
||||
//
|
||||
typedef struct _ACE
|
||||
{
|
||||
ACE_HEADER Header;
|
||||
ACCESS_MASK AccessMask;
|
||||
} ACE, *PACE;
|
||||
|
||||
//
|
||||
// Information Structures for RTL Debug Functions
|
||||
//
|
||||
typedef struct _RTL_PROCESS_MODULE_INFORMATION
|
||||
{
|
||||
ULONG Reserved[2];
|
||||
|
@ -641,6 +643,9 @@ typedef struct _RTL_DEBUG_BUFFER
|
|||
PVOID Reserved[8];
|
||||
} RTL_DEBUG_BUFFER, *PRTL_DEBUG_BUFFER;
|
||||
|
||||
//
|
||||
// RTL Handle Structures
|
||||
//
|
||||
typedef struct _RTL_HANDLE_TABLE_ENTRY
|
||||
{
|
||||
ULONG Flags;
|
||||
|
@ -658,12 +663,18 @@ typedef struct _RTL_HANDLE_TABLE
|
|||
PRTL_HANDLE_TABLE_ENTRY MaxReservedHandles;
|
||||
} RTL_HANDLE_TABLE, *PRTL_HANDLE_TABLE;
|
||||
|
||||
//
|
||||
// Exception Record
|
||||
//
|
||||
typedef struct _EXCEPTION_REGISTRATION_RECORD
|
||||
{
|
||||
struct _EXCEPTION_REGISTRATION_RECORD *Next;
|
||||
PEXCEPTION_HANDLER Handler;
|
||||
} EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD;
|
||||
|
||||
//
|
||||
// Current Directory Structures
|
||||
//
|
||||
typedef struct _CURDIR
|
||||
{
|
||||
UNICODE_STRING DosPath;
|
||||
|
@ -679,6 +690,10 @@ typedef struct RTL_DRIVE_LETTER_CURDIR
|
|||
} RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
// RTL Critical Section Structures
|
||||
//
|
||||
typedef struct _RTL_CRITICAL_SECTION_DEBUG
|
||||
{
|
||||
USHORT Type;
|
||||
|
@ -699,13 +714,16 @@ typedef struct _RTL_CRITICAL_SECTION
|
|||
HANDLE LockSemaphore;
|
||||
ULONG_PTR SpinCount;
|
||||
} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
|
||||
#endif
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
#else
|
||||
|
||||
//
|
||||
// RTL Range List Structures
|
||||
//
|
||||
typedef struct _RTL_RANGE_LIST
|
||||
{
|
||||
LIST_ENTRY ListHead;
|
||||
ULONG Flags; /* RTL_RANGE_LIST_... flags */
|
||||
ULONG Flags;
|
||||
ULONG Count;
|
||||
ULONG Stamp;
|
||||
} RTL_RANGE_LIST, *PRTL_RANGE_LIST;
|
||||
|
@ -717,7 +735,7 @@ typedef struct _RTL_RANGE
|
|||
PVOID UserData;
|
||||
PVOID Owner;
|
||||
UCHAR Attributes;
|
||||
UCHAR Flags; /* RTL_RANGE_... flags */
|
||||
UCHAR Flags;
|
||||
} RTL_RANGE, *PRTL_RANGE;
|
||||
|
||||
typedef struct _RANGE_LIST_ITERATOR
|
||||
|
@ -730,6 +748,9 @@ typedef struct _RANGE_LIST_ITERATOR
|
|||
|
||||
#endif
|
||||
|
||||
//
|
||||
// RTL Resource
|
||||
//
|
||||
typedef struct _RTL_RESOURCE
|
||||
{
|
||||
RTL_CRITICAL_SECTION Lock;
|
||||
|
@ -743,6 +764,9 @@ typedef struct _RTL_RESOURCE
|
|||
PVOID DebugInfo;
|
||||
} RTL_RESOURCE, *PRTL_RESOURCE;
|
||||
|
||||
//
|
||||
// RTL Message Structures for PE Resources
|
||||
//
|
||||
typedef struct _RTL_MESSAGE_RESOURCE_ENTRY
|
||||
{
|
||||
USHORT Length;
|
||||
|
@ -763,19 +787,9 @@ typedef struct _RTL_MESSAGE_RESOURCE_DATA
|
|||
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;
|
||||
USHORT DefaultChar;
|
||||
USHORT UniDefaultChar;
|
||||
USHORT TransDefaultChar;
|
||||
USHORT TransUniDefaultChar;
|
||||
USHORT DBCSCodePage;
|
||||
UCHAR LeadByte[MAXIMUM_LEADBYTES];
|
||||
} NLS_FILE_HEADER, *PNLS_FILE_HEADER;
|
||||
|
||||
//
|
||||
// Structures for RtlCreateUserProcess
|
||||
//
|
||||
typedef struct _RTL_USER_PROCESS_PARAMETERS
|
||||
{
|
||||
ULONG MaximumLength;
|
||||
|
@ -817,6 +831,9 @@ typedef struct _RTL_USER_PROCESS_INFORMATION
|
|||
SECTION_IMAGE_INFORMATION ImageInformation;
|
||||
} RTL_USER_PROCESS_INFORMATION, *PRTL_USER_PROCESS_INFORMATION;
|
||||
|
||||
//
|
||||
// RTL Atom Table Structures
|
||||
//
|
||||
typedef struct _RTL_ATOM_TABLE_ENTRY
|
||||
{
|
||||
struct _RTL_ATOM_TABLE_ENTRY *HashLink;
|
||||
|
@ -828,29 +845,34 @@ typedef struct _RTL_ATOM_TABLE_ENTRY
|
|||
WCHAR Name[1];
|
||||
} RTL_ATOM_TABLE_ENTRY, *PRTL_ATOM_TABLE_ENTRY;
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
typedef RTL_CRITICAL_SECTION FAST_MUTEX;
|
||||
typedef RTL_HANDLE_TABLE HANDLE_TABLE, *PHANDLE_TABLE;
|
||||
#endif
|
||||
typedef struct _RTL_ATOM_TABLE
|
||||
{
|
||||
ULONG Signature;
|
||||
union
|
||||
{
|
||||
#ifdef NTOS_MODE_USER
|
||||
RTL_CRITICAL_SECTION CriticalSection;
|
||||
#else
|
||||
FAST_MUTEX FastMutex;
|
||||
#endif
|
||||
};
|
||||
union
|
||||
{
|
||||
#ifdef NTOS_MODE_USER
|
||||
RTL_HANDLE_TABLE RtlHandleTable;
|
||||
#else
|
||||
PHANDLE_TABLE ExHandleTable;
|
||||
#endif
|
||||
};
|
||||
ULONG NumberOfBuckets;
|
||||
PRTL_ATOM_TABLE_ENTRY Buckets[1];
|
||||
} RTL_ATOM_TABLE, *PRTL_ATOM_TABLE;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
|
||||
//
|
||||
// System Time and Timezone Structures
|
||||
//
|
||||
typedef struct _SYSTEMTIME
|
||||
{
|
||||
USHORT wYear;
|
||||
|
@ -874,16 +896,22 @@ typedef struct _TIME_ZONE_INFORMATION
|
|||
LONG DaylightBias;
|
||||
} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
|
||||
|
||||
typedef enum _ACL_INFORMATION_CLASS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Header for NLS Files
|
||||
//
|
||||
typedef struct _NLS_FILE_HEADER
|
||||
{
|
||||
AclRevisionInformation = 1,
|
||||
AclSizeInformation
|
||||
} ACL_INFORMATION_CLASS;
|
||||
|
||||
#define TIME_ZONE_ID_UNKNOWN 0
|
||||
#define TIME_ZONE_ID_STANDARD 1
|
||||
#define TIME_ZONE_ID_DAYLIGHT 2
|
||||
#define TIME_ZONE_ID_INVALID 0xFFFFFFFF
|
||||
#endif
|
||||
USHORT HeaderSize;
|
||||
USHORT CodePage;
|
||||
USHORT MaximumCharacterSize;
|
||||
USHORT DefaultChar;
|
||||
USHORT UniDefaultChar;
|
||||
USHORT TransDefaultChar;
|
||||
USHORT TransUniDefaultChar;
|
||||
USHORT DBCSCodePage;
|
||||
UCHAR LeadByte[MAXIMUM_LEADBYTES];
|
||||
} NLS_FILE_HEADER, *PNLS_FILE_HEADER;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,20 +1,27 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
sefuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for the security manager.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _SEFUNCS_H
|
||||
#define _SEFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
|
||||
//
|
||||
// Security Descriptors
|
||||
//
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
SeCaptureSecurityDescriptor(
|
||||
|
@ -25,6 +32,17 @@ SeCaptureSecurityDescriptor(
|
|||
OUT PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
SeReleaseSecurityDescriptor(
|
||||
IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor,
|
||||
IN KPROCESSOR_MODE CurrentMode,
|
||||
IN BOOLEAN CaptureIfKernelMode
|
||||
);
|
||||
|
||||
//
|
||||
// Access States
|
||||
//
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
SeCreateAccessState(
|
||||
|
@ -36,16 +54,13 @@ SeCreateAccessState(
|
|||
|
||||
VOID
|
||||
NTAPI
|
||||
SeDeleteAccessState(IN PACCESS_STATE AccessState);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
SeReleaseSecurityDescriptor(
|
||||
IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor,
|
||||
IN KPROCESSOR_MODE CurrentMode,
|
||||
IN BOOLEAN CaptureIfKernelMode
|
||||
SeDeleteAccessState(
|
||||
IN PACCESS_STATE AccessState
|
||||
);
|
||||
|
||||
//
|
||||
// Impersonation
|
||||
//
|
||||
SECURITY_IMPERSONATION_LEVEL
|
||||
NTAPI
|
||||
SeTokenImpersonationLevel(
|
||||
|
|
|
@ -1,19 +1,31 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
setypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the security manager.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _SETYPES_H
|
||||
#define _SETYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
//
|
||||
// Privilege constants
|
||||
//
|
||||
#ifdef NTOS_MODE_USER
|
||||
#define SE_MIN_WELL_KNOWN_PRIVILEGE (2L)
|
||||
#define SE_CREATE_TOKEN_PRIVILEGE (2L)
|
||||
|
@ -43,10 +55,9 @@
|
|||
#define SE_MAX_WELL_KNOWN_PRIVILEGE (SE_REMOTE_SHUTDOWN_PRIVILEGE)
|
||||
#endif
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
//
|
||||
// Policy types
|
||||
//
|
||||
#ifndef NTOS_MODE_USER
|
||||
typedef struct _SEP_AUDIT_POLICY_CATEGORIES
|
||||
{
|
||||
|
@ -77,6 +88,14 @@ typedef struct _SEP_AUDIT_POLICY
|
|||
};
|
||||
} SEP_AUDIT_POLICY, *PSEP_AUDIT_POLICY;
|
||||
|
||||
typedef struct _SE_AUDIT_PROCESS_CREATION_INFO
|
||||
{
|
||||
POBJECT_NAME_INFORMATION ImageFileName;
|
||||
} SE_AUDIT_PROCESS_CREATION_INFO, *PSE_AUDIT_PROCESS_CREATION_INFO;
|
||||
|
||||
//
|
||||
// Token and auxiliary data
|
||||
//
|
||||
typedef struct _TOKEN
|
||||
{
|
||||
TOKEN_SOURCE TokenSource; /* 0x00 */
|
||||
|
@ -118,10 +137,5 @@ typedef struct _AUX_DATA
|
|||
ULONG Reserved;
|
||||
} AUX_DATA, *PAUX_DATA;
|
||||
|
||||
typedef struct _SE_AUDIT_PROCESS_CREATION_INFO
|
||||
{
|
||||
POBJECT_NAME_INFORMATION ImageFileName;
|
||||
} SE_AUDIT_PROCESS_CREATION_INFO, *PSE_AUDIT_PROCESS_CREATION_INFO;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,21 +1,33 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/umfuncs.h
|
||||
* PURPOSE: Prototypes for NT Library Functions
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
umfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for Native DLL (ntdll) APIs exclusive to User Mode.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _UMFUNCS_H
|
||||
#define _UMFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Don't force inclusion of csrss header, leave this opaque.
|
||||
//
|
||||
struct _CSR_API_MESSAGE;
|
||||
struct _CSR_CAPTURE_BUFFER;
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
|
||||
/*
|
||||
* CSR Functions
|
||||
*/
|
||||
//
|
||||
// CSR Functions
|
||||
//
|
||||
PVOID
|
||||
NTAPI
|
||||
CsrAllocateCaptureBuffer(
|
||||
|
@ -27,17 +39,17 @@ ULONG
|
|||
NTAPI
|
||||
CsrAllocateMessagePointer(
|
||||
struct _CSR_CAPTURE_BUFFER *CaptureBuffer,
|
||||
ULONG MessageLength,
|
||||
PVOID *CaptureData
|
||||
ULONG MessageLength,
|
||||
PVOID *CaptureData
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CsrCaptureMessageBuffer(
|
||||
struct _CSR_CAPTURE_BUFFER *CaptureBuffer,
|
||||
PVOID MessageString,
|
||||
ULONG StringLength,
|
||||
PVOID *CapturedData
|
||||
PVOID MessageString,
|
||||
ULONG StringLength,
|
||||
PVOID *CapturedData
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
@ -61,11 +73,15 @@ CsrClientCallServer(
|
|||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
CsrIdentifyAlertableThread(VOID);
|
||||
CsrIdentifyAlertableThread(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CsrFreeCaptureBuffer(struct _CSR_CAPTURE_BUFFER *CaptureBuffer);
|
||||
CsrFreeCaptureBuffer(
|
||||
struct _CSR_CAPTURE_BUFFER *CaptureBuffer
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -94,57 +110,56 @@ CsrProbeForWrite(
|
|||
IN ULONG Alignment
|
||||
);
|
||||
|
||||
/*
|
||||
* Debug Functions
|
||||
*/
|
||||
ULONG
|
||||
__cdecl
|
||||
DbgPrint(
|
||||
IN PCH Format,
|
||||
IN ...
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
DbgBreakPoint(VOID);
|
||||
|
||||
//
|
||||
// Debug Functions
|
||||
//
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
DbgBreakPointWithStatus(IN ULONG Status);
|
||||
DbgBreakPointWithStatus(
|
||||
IN ULONG Status
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DbgUiConnectToDbg(VOID);
|
||||
DbgUiConnectToDbg(
|
||||
VOID
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DbgUiContinue(
|
||||
PCLIENT_ID ClientId,
|
||||
ULONG ContinueStatus
|
||||
IN PCLIENT_ID ClientId,
|
||||
IN ULONG ContinueStatus
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DbgUiWaitStateChange(
|
||||
PDBGUI_WAIT_STATE_CHANGE DbgUiWaitStateCange,
|
||||
PLARGE_INTEGER TimeOut
|
||||
IN PDBGUI_WAIT_STATE_CHANGE DbgUiWaitStateCange,
|
||||
IN PLARGE_INTEGER TimeOut
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
DbgUiRemoteBreakin(VOID);
|
||||
DbgUiRemoteBreakin(
|
||||
VOID
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DbgUiIssueRemoteBreakin(HANDLE Process);
|
||||
DbgUiIssueRemoteBreakin(
|
||||
IN HANDLE Process
|
||||
);
|
||||
|
||||
/*
|
||||
* Loader Functions
|
||||
*/
|
||||
//
|
||||
// Loader Functions
|
||||
//
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
LdrDisableThreadCalloutsForDll(IN PVOID BaseAddress);
|
||||
LdrDisableThreadCalloutsForDll(
|
||||
IN PVOID BaseAddress
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -219,15 +234,21 @@ LdrQueryProcessModuleInformation(
|
|||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
LdrShutdownProcess(VOID);
|
||||
LdrShutdownProcess(
|
||||
VOID
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
LdrShutdownThread(VOID);
|
||||
LdrShutdownThread(
|
||||
VOID
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
LdrUnloadDll(IN PVOID BaseAddress);
|
||||
LdrUnloadDll(
|
||||
IN PVOID BaseAddress
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -239,4 +260,3 @@ LdrVerifyImageMatchesChecksum(
|
|||
);
|
||||
|
||||
#endif
|
||||
/* EOF */
|
||||
|
|
|
@ -1,64 +1,88 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/umtypes.h
|
||||
* PURPOSE: Definitions needed for Native Headers if target is not Kernel-Mode.
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 06/10/04
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
umtypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Type definitions for the basic native types.
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#if !defined(_NTDEF_) && !defined(_NTDEF_H)
|
||||
#define _NTDEF_
|
||||
#define _NTDEF_H
|
||||
#undef WIN32_NO_STATUS
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include <winioctl.h>
|
||||
#include <ntnls.h>
|
||||
#undef WIN32_NO_STATUS
|
||||
#include <ntstatus.h>
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
//
|
||||
// Compiler Definitions
|
||||
//
|
||||
#ifndef _MANAGED
|
||||
#if defined(_M_IX86)
|
||||
#define FASTCALL _fastcall
|
||||
#else
|
||||
#define FASTCALL
|
||||
#endif
|
||||
#else
|
||||
#define FASTCALL NTAPI
|
||||
#endif
|
||||
|
||||
#if !defined(_M_CEE_PURE)
|
||||
#define NTAPI_INLINE NTAPI
|
||||
#else
|
||||
#define NTAPI_INLINE
|
||||
#endif
|
||||
|
||||
/* NTAPI/NTOSAPI Define */
|
||||
#define DECLSPEC_ADDRSAFE
|
||||
#define NTAPI __stdcall
|
||||
#define FASTCALL __fastcall
|
||||
#if !defined(_NTSYSTEM_)
|
||||
#define NTSYSAPI DECLSPEC_IMPORT
|
||||
#define NTSYSCALLAPI DECLSPEC_IMPORT
|
||||
#define NTSYSAPI DECLSPEC_IMPORT
|
||||
#define NTSYSCALLAPI DECLSPEC_IMPORT
|
||||
#else
|
||||
#define NTSYSAPI
|
||||
#if defined(_NTDLLBUILD_)
|
||||
#define NTSYSCALLAPI
|
||||
#else
|
||||
#define NTSYSCALLAPI DECLSPEC_ADDRSAFE
|
||||
#define NTSYSCALLAPI DECLSPEC_ADDRSAFE
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(_M_CEE_PURE)
|
||||
#define NTAPI_INLINE NTAPI
|
||||
#else
|
||||
#define NTAPI_INLINE
|
||||
#endif
|
||||
|
||||
/* Native API Return Value Macros */
|
||||
#define NT_SUCCESS(x) ((x)>=0)
|
||||
#define NT_WARNING(x) ((ULONG)(x)>>30==2)
|
||||
#define NT_ERROR(x) ((ULONG)(x)>>30==3)
|
||||
//
|
||||
// Native API Return Value Macros
|
||||
//
|
||||
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
|
||||
#define NT_INFORMATION(Status) ((((ULONG)(Status)) >> 30) == 1)
|
||||
#define NT_WARNING(Status) ((((ULONG)(Status)) >> 30) == 2)
|
||||
#define NT_ERROR(Status) ((((ULONG)(Status)) >> 30) == 3)
|
||||
|
||||
/* Limits */
|
||||
#define MINCHAR 0x80
|
||||
#define MAXCHAR 0x7f
|
||||
#define MINSHORT 0x8000
|
||||
#define MAXSHORT 0x7fff
|
||||
#define MINLONG 0x80000000
|
||||
#define MAXLONG 0x7fffffff
|
||||
#define MAXUCHAR 0xff
|
||||
#define MAXUSHORT 0xffff
|
||||
#define MAXULONG 0xffffffff
|
||||
//
|
||||
// Limits
|
||||
//
|
||||
#define MINCHAR 0x80
|
||||
#define MAXCHAR 0x7f
|
||||
#define MINSHORT 0x8000
|
||||
#define MAXSHORT 0x7fff
|
||||
#define MINLONG 0x80000000
|
||||
#define MAXLONG 0x7fffffff
|
||||
#define MAXUCHAR 0xff
|
||||
#define MAXUSHORT 0xffff
|
||||
#define MAXULONG 0xffffffff
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
/* Basic Types that aren't defined in User-Mode Headers */
|
||||
//
|
||||
// Basic Types that aren't defined in User-Mode Headers
|
||||
//
|
||||
typedef CONST int CINT;
|
||||
typedef CONST char *PCSZ;
|
||||
typedef ULONG CLONG;
|
||||
|
@ -67,10 +91,12 @@ typedef CSHORT *PCSHORT;
|
|||
typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
|
||||
typedef LONG KPRIORITY;
|
||||
typedef LONG NTSTATUS, *PNTSTATUS;
|
||||
#define STATIC static
|
||||
|
||||
/* Basic NT Types */
|
||||
//
|
||||
// Basic NT Types
|
||||
//
|
||||
#if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
|
||||
|
||||
typedef struct _UNICODE_STRING
|
||||
{
|
||||
USHORT Length;
|
||||
|
|
|
@ -1,24 +1,36 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Native Headers
|
||||
* FILE: include/ndk/zwfuncs.h
|
||||
* PURPOSE: Defintions for Native Functions not defined in DDK/IFS
|
||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||
* UPDATE HISTORY:
|
||||
* Created 06/10/04
|
||||
*/
|
||||
/*++ NDK Version: 0095
|
||||
|
||||
Copyright (c) Alex Ionescu. All rights reserved.
|
||||
|
||||
Header Name:
|
||||
|
||||
zwfuncs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Function definitions for Native APIs (Nt/Zw).
|
||||
|
||||
Author:
|
||||
|
||||
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _ZWFUNCS_H
|
||||
#define _ZWFUNCS_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
#define _WMIKM_
|
||||
|
||||
//
|
||||
// Dependencies
|
||||
//
|
||||
#include <evntrace.h>
|
||||
#include "lpctypes.h"
|
||||
#include "dbgktypes.h"
|
||||
#include "kdtypes.h"
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
//
|
||||
// FIXME: Group these in logical groups.
|
||||
//
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -90,18 +102,18 @@ NtAccessCheckAndAuditAlarm(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtAddAtom(
|
||||
IN PWSTR AtomName,
|
||||
IN ULONG AtomNameLength,
|
||||
IN OUT PRTL_ATOM Atom
|
||||
IN PWSTR AtomName,
|
||||
IN ULONG AtomNameLength,
|
||||
IN OUT PRTL_ATOM Atom
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwAddAtom(
|
||||
IN PWSTR AtomName,
|
||||
IN ULONG AtomNameLength,
|
||||
IN OUT PRTL_ATOM Atom
|
||||
IN PWSTR AtomName,
|
||||
IN ULONG AtomNameLength,
|
||||
IN OUT PRTL_ATOM Atom
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
@ -124,11 +136,11 @@ NTSTATUS
|
|||
NTAPI
|
||||
NtAdjustGroupsToken(
|
||||
IN HANDLE TokenHandle,
|
||||
IN BOOLEAN ResetToDefault,
|
||||
IN PTOKEN_GROUPS NewState,
|
||||
IN ULONG BufferLength,
|
||||
OUT PTOKEN_GROUPS PreviousState OPTIONAL,
|
||||
OUT PULONG ReturnLength
|
||||
IN BOOLEAN ResetToDefault,
|
||||
IN PTOKEN_GROUPS NewState,
|
||||
IN ULONG BufferLength,
|
||||
OUT PTOKEN_GROUPS PreviousState OPTIONAL,
|
||||
OUT PULONG ReturnLength
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
|
@ -136,22 +148,22 @@ NTSTATUS
|
|||
NTAPI
|
||||
ZwAdjustGroupsToken(
|
||||
IN HANDLE TokenHandle,
|
||||
IN BOOLEAN ResetToDefault,
|
||||
IN PTOKEN_GROUPS NewState,
|
||||
IN ULONG BufferLength,
|
||||
OUT PTOKEN_GROUPS PreviousState,
|
||||
OUT PULONG ReturnLength
|
||||
IN BOOLEAN ResetToDefault,
|
||||
IN PTOKEN_GROUPS NewState,
|
||||
IN ULONG BufferLength,
|
||||
OUT PTOKEN_GROUPS PreviousState,
|
||||
OUT PULONG ReturnLength
|
||||
);
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtAdjustPrivilegesToken(
|
||||
IN HANDLE TokenHandle,
|
||||
IN BOOLEAN DisableAllPrivileges,
|
||||
IN PTOKEN_PRIVILEGES NewState,
|
||||
IN ULONG BufferLength,
|
||||
OUT PTOKEN_PRIVILEGES PreviousState,
|
||||
IN HANDLE TokenHandle,
|
||||
IN BOOLEAN DisableAllPrivileges,
|
||||
IN PTOKEN_PRIVILEGES NewState,
|
||||
IN ULONG BufferLength,
|
||||
OUT PTOKEN_PRIVILEGES PreviousState,
|
||||
OUT PULONG ReturnLength
|
||||
);
|
||||
|
||||
|
@ -159,11 +171,11 @@ NTSYSAPI
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
ZwAdjustPrivilegesToken(
|
||||
IN HANDLE TokenHandle,
|
||||
IN BOOLEAN DisableAllPrivileges,
|
||||
IN PTOKEN_PRIVILEGES NewState,
|
||||
IN ULONG BufferLength,
|
||||
OUT PTOKEN_PRIVILEGES PreviousState,
|
||||
IN HANDLE TokenHandle,
|
||||
IN BOOLEAN DisableAllPrivileges,
|
||||
IN PTOKEN_PRIVILEGES NewState,
|
||||
IN ULONG BufferLength,
|
||||
OUT PTOKEN_PRIVILEGES PreviousState,
|
||||
OUT PULONG ReturnLength
|
||||
);
|
||||
|
||||
|
@ -233,10 +245,10 @@ NTAPI
|
|||
NtAllocateVirtualMemory(
|
||||
IN HANDLE ProcessHandle,
|
||||
IN OUT PVOID *BaseAddress,
|
||||
IN ULONG ZeroBits,
|
||||
IN OUT PULONG RegionSize,
|
||||
IN ULONG AllocationType,
|
||||
IN ULONG Protect
|
||||
IN ULONG ZeroBits,
|
||||
IN OUT PULONG RegionSize,
|
||||
IN ULONG AllocationType,
|
||||
IN ULONG Protect
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
|
@ -245,10 +257,10 @@ NTAPI
|
|||
ZwAllocateVirtualMemory(
|
||||
IN HANDLE ProcessHandle,
|
||||
IN OUT PVOID *BaseAddress,
|
||||
IN ULONG ZeroBits,
|
||||
IN OUT PULONG RegionSize,
|
||||
IN ULONG AllocationType,
|
||||
IN ULONG Protect
|
||||
IN ULONG ZeroBits,
|
||||
IN OUT PULONG RegionSize,
|
||||
IN ULONG AllocationType,
|
||||
IN ULONG Protect
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
@ -535,21 +547,21 @@ ZwCreateFile(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtCreateIoCompletion(
|
||||
OUT PHANDLE IoCompletionHandle,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
IN ULONG NumberOfConcurrentThreads
|
||||
);
|
||||
OUT PHANDLE IoCompletionHandle,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
IN ULONG NumberOfConcurrentThreads
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwCreateIoCompletion(
|
||||
OUT PHANDLE IoCompletionHandle,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
IN ULONG NumberOfConcurrentThreads
|
||||
);
|
||||
OUT PHANDLE IoCompletionHandle,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
IN ULONG NumberOfConcurrentThreads
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
@ -827,13 +839,13 @@ NTSTATUS
|
|||
NTAPI
|
||||
NtCreateThread(
|
||||
OUT PHANDLE ThreadHandle,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
|
||||
IN HANDLE ProcessHandle,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
|
||||
IN HANDLE ProcessHandle,
|
||||
OUT PCLIENT_ID ClientId,
|
||||
IN PCONTEXT ThreadContext,
|
||||
IN PINITIAL_TEB UserStack,
|
||||
IN BOOLEAN CreateSuspended
|
||||
IN PCONTEXT ThreadContext,
|
||||
IN PINITIAL_TEB UserStack,
|
||||
IN BOOLEAN CreateSuspended
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
|
@ -1305,9 +1317,9 @@ NTSTATUS
|
|||
NTAPI
|
||||
NtFreeVirtualMemory(
|
||||
IN HANDLE ProcessHandle,
|
||||
IN PVOID *BaseAddress,
|
||||
IN PULONG RegionSize,
|
||||
IN ULONG FreeType
|
||||
IN PVOID *BaseAddress,
|
||||
IN PULONG RegionSize,
|
||||
IN ULONG FreeType
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
|
@ -1315,9 +1327,9 @@ NTSTATUS
|
|||
NTAPI
|
||||
ZwFreeVirtualMemory(
|
||||
IN HANDLE ProcessHandle,
|
||||
IN PVOID *BaseAddress,
|
||||
IN PULONG RegionSize,
|
||||
IN ULONG FreeType
|
||||
IN PVOID *BaseAddress,
|
||||
IN PULONG RegionSize,
|
||||
IN ULONG FreeType
|
||||
);
|
||||
|
||||
NTSYSCALLAPI
|
||||
|
@ -1471,15 +1483,17 @@ ZwIsProcessInJob(
|
|||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtListenPort(HANDLE PortHandle,
|
||||
PPORT_MESSAGE ConnectionRequest
|
||||
NtListenPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE ConnectionRequest
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwListenPort(HANDLE PortHandle,
|
||||
PPORT_MESSAGE ConnectionRequest
|
||||
ZwListenPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE ConnectionRequest
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
@ -1531,16 +1545,16 @@ NTSYSCALLAPI
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtLockFile(
|
||||
IN HANDLE FileHandle,
|
||||
IN HANDLE Event OPTIONAL,
|
||||
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
|
||||
IN PVOID ApcContext OPTIONAL,
|
||||
IN HANDLE FileHandle,
|
||||
IN HANDLE Event OPTIONAL,
|
||||
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
|
||||
IN PVOID ApcContext OPTIONAL,
|
||||
OUT PIO_STATUS_BLOCK IoStatusBlock,
|
||||
IN PLARGE_INTEGER ByteOffset,
|
||||
IN PLARGE_INTEGER Length,
|
||||
IN ULONG Key,
|
||||
IN BOOLEAN FailImmediatedly,
|
||||
IN BOOLEAN ExclusiveLock
|
||||
IN PLARGE_INTEGER ByteOffset,
|
||||
IN PLARGE_INTEGER Length,
|
||||
IN ULONG Key,
|
||||
IN BOOLEAN FailImmediatedly,
|
||||
IN BOOLEAN ExclusiveLock
|
||||
);
|
||||
|
||||
|
||||
|
@ -1548,16 +1562,16 @@ NTSYSAPI
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
ZwLockFile(
|
||||
IN HANDLE FileHandle,
|
||||
IN HANDLE Event OPTIONAL,
|
||||
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
|
||||
IN PVOID ApcContext OPTIONAL,
|
||||
IN HANDLE FileHandle,
|
||||
IN HANDLE Event OPTIONAL,
|
||||
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
|
||||
IN PVOID ApcContext OPTIONAL,
|
||||
OUT PIO_STATUS_BLOCK IoStatusBlock,
|
||||
IN PLARGE_INTEGER ByteOffset,
|
||||
IN PLARGE_INTEGER Length,
|
||||
IN ULONG Key,
|
||||
IN BOOLEAN FailImmediatedly,
|
||||
IN BOOLEAN ExclusiveLock
|
||||
IN PLARGE_INTEGER ByteOffset,
|
||||
IN PLARGE_INTEGER Length,
|
||||
IN ULONG Key,
|
||||
IN BOOLEAN FailImmediatedly,
|
||||
IN BOOLEAN ExclusiveLock
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
@ -2305,26 +2319,26 @@ ZwQueryDirectoryFile(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtQueryDirectoryObject(
|
||||
IN HANDLE DirectoryHandle,
|
||||
OUT PVOID Buffer,
|
||||
IN ULONG BufferLength,
|
||||
IN BOOLEAN ReturnSingleEntry,
|
||||
IN BOOLEAN RestartScan,
|
||||
IN HANDLE DirectoryHandle,
|
||||
OUT PVOID Buffer,
|
||||
IN ULONG BufferLength,
|
||||
IN BOOLEAN ReturnSingleEntry,
|
||||
IN BOOLEAN RestartScan,
|
||||
IN OUT PULONG Context,
|
||||
OUT PULONG ReturnLength OPTIONAL
|
||||
OUT PULONG ReturnLength OPTIONAL
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwQueryDirectoryObject(
|
||||
IN HANDLE DirectoryHandle,
|
||||
OUT PVOID Buffer,
|
||||
IN ULONG BufferLength,
|
||||
IN BOOLEAN ReturnSingleEntry,
|
||||
IN BOOLEAN RestartScan,
|
||||
IN HANDLE DirectoryHandle,
|
||||
OUT PVOID Buffer,
|
||||
IN ULONG BufferLength,
|
||||
IN BOOLEAN ReturnSingleEntry,
|
||||
IN BOOLEAN RestartScan,
|
||||
IN OUT PULONG Context,
|
||||
OUT PULONG ReturnLength OPTIONAL
|
||||
OUT PULONG ReturnLength OPTIONAL
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
@ -2483,22 +2497,22 @@ ZwQueryInformationPort(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtQueryInformationProcess(
|
||||
IN HANDLE ProcessHandle,
|
||||
IN PROCESSINFOCLASS ProcessInformationClass,
|
||||
OUT PVOID ProcessInformation,
|
||||
IN ULONG ProcessInformationLength,
|
||||
OUT PULONG ReturnLength OPTIONAL
|
||||
IN HANDLE ProcessHandle,
|
||||
IN PROCESSINFOCLASS ProcessInformationClass,
|
||||
OUT PVOID ProcessInformation,
|
||||
IN ULONG ProcessInformationLength,
|
||||
OUT PULONG ReturnLength OPTIONAL
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwQueryInformationProcess(
|
||||
IN HANDLE ProcessHandle,
|
||||
IN PROCESSINFOCLASS ProcessInformationClass,
|
||||
OUT PVOID ProcessInformation,
|
||||
IN ULONG ProcessInformationLength,
|
||||
OUT PULONG ReturnLength OPTIONAL
|
||||
IN HANDLE ProcessHandle,
|
||||
IN PROCESSINFOCLASS ProcessInformationClass,
|
||||
OUT PVOID ProcessInformation,
|
||||
IN ULONG ProcessInformationLength,
|
||||
OUT PULONG ReturnLength OPTIONAL
|
||||
);
|
||||
#endif
|
||||
|
||||
|
@ -2576,10 +2590,10 @@ ZwQueryIntervalProfile(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtQueryIoCompletion(
|
||||
IN HANDLE IoCompletionHandle,
|
||||
IN IO_COMPLETION_INFORMATION_CLASS IoCompletionInformationClass,
|
||||
IN HANDLE IoCompletionHandle,
|
||||
IN IO_COMPLETION_INFORMATION_CLASS IoCompletionInformationClass,
|
||||
OUT PVOID IoCompletionInformation,
|
||||
IN ULONG IoCompletionInformationLength,
|
||||
IN ULONG IoCompletionInformationLength,
|
||||
OUT PULONG ResultLength OPTIONAL
|
||||
);
|
||||
|
||||
|
@ -2587,10 +2601,10 @@ NTSYSAPI
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
ZwQueryIoCompletion(
|
||||
IN HANDLE IoCompletionHandle,
|
||||
IN IO_COMPLETION_INFORMATION_CLASS IoCompletionInformationClass,
|
||||
IN HANDLE IoCompletionHandle,
|
||||
IN IO_COMPLETION_INFORMATION_CLASS IoCompletionInformationClass,
|
||||
OUT PVOID IoCompletionInformation,
|
||||
IN ULONG IoCompletionInformationLength,
|
||||
IN ULONG IoCompletionInformationLength,
|
||||
OUT PULONG ResultLength OPTIONAL
|
||||
);
|
||||
|
||||
|
@ -2771,10 +2785,10 @@ ZwQuerySecurityObject(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtQuerySemaphore(
|
||||
IN HANDLE SemaphoreHandle,
|
||||
IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass,
|
||||
IN HANDLE SemaphoreHandle,
|
||||
IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass,
|
||||
OUT PVOID SemaphoreInformation,
|
||||
IN ULONG Length,
|
||||
IN ULONG Length,
|
||||
OUT PULONG ReturnLength
|
||||
);
|
||||
|
||||
|
@ -2782,10 +2796,10 @@ NTSYSAPI
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
ZwQuerySemaphore(
|
||||
IN HANDLE SemaphoreHandle,
|
||||
IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass,
|
||||
IN HANDLE SemaphoreHandle,
|
||||
IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass,
|
||||
OUT PVOID SemaphoreInformation,
|
||||
IN ULONG Length,
|
||||
IN ULONG Length,
|
||||
OUT PULONG ReturnLength
|
||||
);
|
||||
|
||||
|
@ -2828,9 +2842,9 @@ ZwQuerySystemEnvironmentValue(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtQuerySystemInformation(
|
||||
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
||||
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
||||
OUT PVOID SystemInformation,
|
||||
IN ULONG Length,
|
||||
IN ULONG Length,
|
||||
OUT PULONG ResultLength
|
||||
);
|
||||
|
||||
|
@ -2838,9 +2852,9 @@ NTSYSAPI
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
ZwQuerySystemInformation(
|
||||
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
||||
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
||||
OUT PVOID SystemInformation,
|
||||
IN ULONG Length,
|
||||
IN ULONG Length,
|
||||
OUT PULONG ResultLength
|
||||
);
|
||||
|
||||
|
@ -3112,7 +3126,7 @@ NtReadVirtualMemory(
|
|||
IN HANDLE ProcessHandle,
|
||||
IN PVOID BaseAddress,
|
||||
OUT PVOID Buffer,
|
||||
IN ULONG NumberOfBytesToRead,
|
||||
IN ULONG NumberOfBytesToRead,
|
||||
OUT PULONG NumberOfBytesRead
|
||||
);
|
||||
|
||||
|
@ -3123,7 +3137,7 @@ ZwReadVirtualMemory(
|
|||
IN HANDLE ProcessHandle,
|
||||
IN PVOID BaseAddress,
|
||||
OUT PVOID Buffer,
|
||||
IN ULONG NumberOfBytesToRead,
|
||||
IN ULONG NumberOfBytesToRead,
|
||||
OUT PULONG NumberOfBytesRead
|
||||
);
|
||||
|
||||
|
@ -3158,8 +3172,8 @@ ZwReleaseMutant(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtReleaseSemaphore(
|
||||
IN HANDLE SemaphoreHandle,
|
||||
IN LONG ReleaseCount,
|
||||
IN HANDLE SemaphoreHandle,
|
||||
IN LONG ReleaseCount,
|
||||
OUT PLONG PreviousCount
|
||||
);
|
||||
|
||||
|
@ -3167,30 +3181,30 @@ NTSYSAPI
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
ZwReleaseSemaphore(
|
||||
IN HANDLE SemaphoreHandle,
|
||||
IN LONG ReleaseCount,
|
||||
IN HANDLE SemaphoreHandle,
|
||||
IN LONG ReleaseCount,
|
||||
OUT PLONG PreviousCount
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtRemoveIoCompletion(
|
||||
IN HANDLE IoCompletionHandle,
|
||||
IN HANDLE IoCompletionHandle,
|
||||
OUT PVOID *CompletionKey,
|
||||
OUT PVOID *CompletionContext,
|
||||
OUT PIO_STATUS_BLOCK IoStatusBlock,
|
||||
IN PLARGE_INTEGER Timeout OPTIONAL
|
||||
IN PLARGE_INTEGER Timeout OPTIONAL
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwRemoveIoCompletion(
|
||||
IN HANDLE IoCompletionHandle,
|
||||
IN HANDLE IoCompletionHandle,
|
||||
OUT PVOID *CompletionKey,
|
||||
OUT PVOID *CompletionContext,
|
||||
OUT PIO_STATUS_BLOCK IoStatusBlock,
|
||||
IN PLARGE_INTEGER Timeout OPTIONAL
|
||||
IN PLARGE_INTEGER Timeout OPTIONAL
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
@ -3213,114 +3227,115 @@ ZwReplaceKey(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtReplyPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE LpcReply
|
||||
IN HANDLE PortHandle,
|
||||
IN PPORT_MESSAGE LpcReply
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwReplyPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE LpcReply
|
||||
IN HANDLE PortHandle,
|
||||
IN PPORT_MESSAGE LpcReply
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtReplyWaitReceivePort(
|
||||
HANDLE PortHandle,
|
||||
PVOID *PortContext OPTIONAL,
|
||||
PPORT_MESSAGE ReplyMessage OPTIONAL,
|
||||
PPORT_MESSAGE ReceiveMessage
|
||||
IN HANDLE PortHandle,
|
||||
IN PVOID *PortContext OPTIONAL,
|
||||
IN PPORT_MESSAGE ReplyMessage OPTIONAL,
|
||||
OUT PPORT_MESSAGE ReceiveMessage
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwReplyWaitReceivePort(
|
||||
HANDLE PortHandle,
|
||||
PVOID *PortContext OPTIONAL,
|
||||
PPORT_MESSAGE ReplyMessage,
|
||||
PPORT_MESSAGE ReceiveMessage
|
||||
IN HANDLE PortHandle,
|
||||
IN PVOID *PortContext OPTIONAL,
|
||||
IN PPORT_MESSAGE ReplyMessage OPTIONAL,
|
||||
OUT PPORT_MESSAGE ReceiveMessage
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtReplyWaitReplyPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE ReplyMessage
|
||||
IN HANDLE PortHandle,
|
||||
OUT PPORT_MESSAGE ReplyMessage
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwReplyWaitReplyPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE ReplyMessage
|
||||
IN HANDLE PortHandle,
|
||||
OUT PPORT_MESSAGE ReplyMessage
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtRequestPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE LpcMessage);
|
||||
IN HANDLE PortHandle,
|
||||
IN PPORT_MESSAGE LpcMessage
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwRequestPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE LpcMessage
|
||||
IN HANDLE PortHandle,
|
||||
IN PPORT_MESSAGE LpcMessage
|
||||
);
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtRequestWaitReplyPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE LpcReply,
|
||||
PPORT_MESSAGE LpcRequest
|
||||
IN HANDLE PortHandle,
|
||||
OUT PPORT_MESSAGE LpcReply,
|
||||
IN PPORT_MESSAGE LpcRequest
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwRequestWaitReplyPort(
|
||||
HANDLE PortHandle,
|
||||
PPORT_MESSAGE LpcReply,
|
||||
PPORT_MESSAGE LpcRequest
|
||||
IN HANDLE PortHandle,
|
||||
OUT PPORT_MESSAGE LpcReply,
|
||||
IN PPORT_MESSAGE LpcRequest
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtResetEvent(
|
||||
HANDLE EventHandle,
|
||||
PLONG NumberOfWaitingThreads OPTIONAL
|
||||
IN HANDLE EventHandle,
|
||||
OUT PLONG NumberOfWaitingThreads OPTIONAL
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwResetEvent(
|
||||
HANDLE EventHandle,
|
||||
PLONG NumberOfWaitingThreads OPTIONAL
|
||||
IN HANDLE EventHandle,
|
||||
OUT PLONG NumberOfWaitingThreads OPTIONAL
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtRestoreKey(
|
||||
HANDLE KeyHandle,
|
||||
HANDLE FileHandle,
|
||||
ULONG RestoreFlags
|
||||
IN HANDLE KeyHandle,
|
||||
IN HANDLE FileHandle,
|
||||
IN ULONG RestoreFlags
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwRestoreKey(
|
||||
HANDLE KeyHandle,
|
||||
HANDLE FileHandle,
|
||||
ULONG RestoreFlags
|
||||
IN HANDLE KeyHandle,
|
||||
IN HANDLE FileHandle,
|
||||
IN ULONG RestoreFlags
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
@ -3985,27 +4000,27 @@ ZwSignalAndWaitForSingleObject(
|
|||
NTSTATUS
|
||||
NTAPI
|
||||
NtStartProfile(
|
||||
HANDLE ProfileHandle
|
||||
IN HANDLE ProfileHandle
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwStartProfile(
|
||||
HANDLE ProfileHandle
|
||||
IN HANDLE ProfileHandle
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtStopProfile(
|
||||
HANDLE ProfileHandle
|
||||
IN HANDLE ProfileHandle
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwStopProfile(
|
||||
HANDLE ProfileHandle
|
||||
IN HANDLE ProfileHandle
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
|
|
@ -1,22 +1,38 @@
|
|||
#ifndef _HELPER_H
|
||||
#define _HELPER_H
|
||||
|
||||
/* FIXME: clean this mess up and move to NDK */
|
||||
#ifndef ROUNDUP
|
||||
#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b))
|
||||
#endif
|
||||
|
||||
#ifndef ROUNDUP
|
||||
#define ROUNDDOWN(a,b) (((a)/(b))*(b))
|
||||
#endif
|
||||
|
||||
#ifndef ROUND_UP
|
||||
#define ROUND_UP ROUNDUP
|
||||
#endif
|
||||
|
||||
#ifndef ROUND_DOWN
|
||||
#define ROUND_DOWN ROUNDDOWN
|
||||
#endif
|
||||
|
||||
#ifndef PAGE_ROUND_DOWN
|
||||
#define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~(PAGE_SIZE-1)))
|
||||
#endif
|
||||
|
||||
#ifndef PAGE_ROUND_UP
|
||||
#define PAGE_ROUND_UP(x) ( (((ULONG)x)%PAGE_SIZE) ? ((((ULONG)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG)x) )
|
||||
#endif
|
||||
|
||||
#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V))
|
||||
#define RtlRosMin(X,Y) (((X) < (Y))? (X) : (Y))
|
||||
|
||||
#define RtlRosMin3(X,Y,Z) (((X) < (Y)) ? RtlRosMin(X,Z) : RtlRosMin(Y,Z))
|
||||
|
||||
#ifndef KEBUGCHECK
|
||||
#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx at %s:%i\n",__FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e)
|
||||
#define KEBUGCHECK(a) DbgPrint("KeBugCheck at %s:%i\n",__FILE__,__LINE__), KeBugCheck(a)
|
||||
#endif
|
||||
#define EXPORTED __declspec(dllexport)
|
||||
#define IMPORTED __declspec(dllimport)
|
||||
|
||||
/* iterate through the list using a list entry.
|
||||
* elem is set to NULL if the list is run thru without breaking out or if list is empty.
|
||||
|
@ -40,7 +56,9 @@
|
|||
((PIMAGE_DOS_HEADER)a)->e_lfanew + \
|
||||
sizeof (IMAGE_NT_SIGNATURE) + \
|
||||
sizeof (IMAGE_FILE_HEADER)))
|
||||
#ifndef TAG
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
#endif
|
||||
#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m)))
|
||||
#define NTSTAT_SEVERITY_SHIFT 30
|
||||
#define NTSTAT_SEVERITY_MASK 0x00000003
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __WIN32K_MISC_H
|
||||
#define __WIN32K_MISC_H
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
/* W32PROCESS flags */
|
||||
#define W32PF_NOWINDOWGHOSTING (0x0001)
|
||||
#define W32PF_MANUALGUICHECK (0x0002)
|
||||
|
@ -10,4 +12,6 @@ VOID
|
|||
FASTCALL
|
||||
DestroyThreadWindows(struct _ETHREAD *Thread);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __WIN32K_MISC_H */
|
||||
|
|
|
@ -348,7 +348,7 @@ RtlAddAtomToAtomTable(IN PRTL_ATOM_TABLE AtomTable,
|
|||
{
|
||||
ULONG AtomNameLen = wcslen(AtomName);
|
||||
|
||||
if (AtomNameLen > MAX_ATOM_LEN)
|
||||
if (AtomNameLen > RTL_MAXIMUM_ATOM_LENGTH)
|
||||
{
|
||||
Status = STATUS_INVALID_PARAMETER;
|
||||
goto end;
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
#include <ddk/ntifs.h>
|
||||
#include <ddk/wdmguid.h>
|
||||
#include <ndk/ntndk.h>
|
||||
#include <ndk/sysguid.h>
|
||||
#include <ndk/asm.h>
|
||||
|
||||
/* FIXME: Temporary until CC Ros is gone */
|
||||
#include <ccros.h>
|
||||
|
@ -41,6 +39,9 @@
|
|||
/* SEH support with PSEH */
|
||||
#include <pseh/pseh.h>
|
||||
|
||||
/* PNP GUIDs */
|
||||
#include <umpnpmgr/sysguid.h>
|
||||
|
||||
/* Helper Header */
|
||||
#include <reactos/helper.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <ndk/i386/segment.h>
|
||||
#include <ndk/asm.h>
|
||||
#include <../hal/halx86/include/halirq.h>
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/ntndk.h>
|
||||
#include <ndk/sysguid.h>
|
||||
#include <umpnpmgr/sysguid.h>
|
||||
#include <ddk/wdmguid.h>
|
||||
#include <ddk/cfgmgr32.h>
|
||||
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
* NOTE: The constants structs and typedefs below should be defined in the
|
||||
* Win32 API headers.
|
||||
*/
|
||||
#define EXCEPTION_EXECUTE_HANDLER 1
|
||||
#define EXCEPTION_CONTINUE_SEARCH 0
|
||||
#define EXCEPTION_CONTINUE_EXECUTION -1
|
||||
|
||||
#define EH_NONCONTINUABLE 0x01
|
||||
#define EH_UNWINDING 0x02
|
||||
#define EH_EXIT_UNWIND 0x04
|
||||
|
|
|
@ -36,6 +36,7 @@ extern "C" {
|
|||
*/
|
||||
#define DDKAPI __stdcall
|
||||
#define DDKFASTAPI __fastcall
|
||||
#define FASTCALL __fastcall
|
||||
#define DDKCDECLAPI __cdecl
|
||||
|
||||
/* FIXME: REMOVE THIS UNCOMPATIBLE CRUFT!!! */
|
||||
|
|
|
@ -396,9 +396,6 @@ extern "C" {
|
|||
#define SLE_MINORERROR 2
|
||||
#define SLE_WARNING 3
|
||||
#define SHUTDOWN_NORETRY 1
|
||||
#define EXCEPTION_EXECUTE_HANDLER 1
|
||||
#define EXCEPTION_CONTINUE_EXECUTION (-1)
|
||||
#define EXCEPTION_CONTINUE_SEARCH 0
|
||||
#define MAXINTATOM 0xC000
|
||||
#define INVALID_ATOM ((ATOM)0)
|
||||
#define IGNORE 0
|
||||
|
|
|
@ -103,7 +103,6 @@ extern "C" {
|
|||
#define PASCAL _pascal
|
||||
#define CDECL _cdecl
|
||||
#define STDCALL __stdcall
|
||||
#define FASTCALL __fastcall
|
||||
#define WINAPI __stdcall
|
||||
#define WINAPIV __cdecl
|
||||
#define APIENTRY __stdcall
|
||||
|
|
|
@ -47,6 +47,24 @@ extern "C" {
|
|||
#define UNALIGNED
|
||||
#endif
|
||||
|
||||
#ifndef DECLSPEC_ADDRSAFE
|
||||
#if (_MSC_VER >= 1200) && (defined(_M_ALPHA) || defined(_M_AXP64))
|
||||
#define DECLSPEC_ADDRSAFE __declspec(address_safe)
|
||||
#else
|
||||
#define DECLSPEC_ADDRSAFE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef FORCEINLINE
|
||||
#if (_MSC_VER >= 1200)
|
||||
#define FORCEINLINE __forceinline
|
||||
#elif (_MSC_VER)
|
||||
#define FORCEINLINE __inline
|
||||
#else
|
||||
#define FORCEINLINE static __inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef VOID
|
||||
#define VOID void
|
||||
#endif
|
||||
|
@ -2456,6 +2474,11 @@ typedef struct _RTL_CRITICAL_SECTION {
|
|||
} RTL_CRITICAL_SECTION,*PRTL_CRITICAL_SECTION;
|
||||
#endif
|
||||
|
||||
typedef LONG
|
||||
(NTAPI *PVECTORED_EXCEPTION_HANDLER)(
|
||||
struct _EXCEPTION_POINTERS *ExceptionInfo
|
||||
);
|
||||
|
||||
typedef struct _EVENTLOGRECORD {
|
||||
DWORD Length;
|
||||
DWORD Reserved;
|
||||
|
|
Loading…
Reference in a new issue