Author: tkreuzer
Date: Fri Mar 12 17:37:33 2010
New Revision: 46137
URL:
http://svn.reactos.org/svn/reactos?rev=46137&view=rev
Log:
[PSDK]
- Add dpfilter.h
- batclass.h: Fix BatteryClassSystemControl
- ntdef.h: add ARGUMENT_PRESENT and PEXCEPTION_ROUTINE
[NDK]
- Add some ob functions
[DDK]
- add wmlib.h
- remove winddk.h
[WDM]
- include dpfilter.h
- Add ASSERT_GATE, ASSERT_TIMER, ASSERT_MUTANT, ASSERT_SEMAPHORE, ASSERT_EVENT,
TIMER_TABLE_SIZE, TIMER_TABLE_SHIFT, ADDRESS_AND_SIZE_TO_SPAN_PAGES,
PoRequestShutdownEvent
- Group architecture specific definitions (currently only x86)
- uncomment some _DECL_HAL_KE_IMPORT
Added:
branches/header-work/include/ddk/wmlib.h (with props)
branches/header-work/include/psdk/dpfilter.h (with props)
Removed:
branches/header-work/include/ddk/winddk.h
Modified:
branches/header-work/include/ddk/ntdddisk.h
branches/header-work/include/ddk/ntddk.h
branches/header-work/include/ddk/wdm.h
branches/header-work/include/ndk/obfuncs.h
branches/header-work/include/psdk/batclass.h
branches/header-work/include/psdk/ntdef.h
Modified: branches/header-work/include/ddk/ntdddisk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntdddis…
==============================================================================
--- branches/header-work/include/ddk/ntdddisk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/ntdddisk.h [iso-8859-1] Fri Mar 12 17:37:33 2010
@@ -335,6 +335,12 @@
WCHAR Name [36];
} PARTITION_INFORMATION_GPT, *PPARTITION_INFORMATION_GPT;
+typedef enum _PARTITION_STYLE {
+ PARTITION_STYLE_MBR,
+ PARTITION_STYLE_GPT,
+ PARTITION_STYLE_RAW
+} PARTITION_STYLE;
+
typedef struct _DISK_PARTITION_INFO {
ULONG SizeOfPartitionInfo;
PARTITION_STYLE PartitionStyle;
Modified: branches/header-work/include/ddk/ntddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddk.h…
==============================================================================
--- branches/header-work/include/ddk/ntddk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/ntddk.h [iso-8859-1] Fri Mar 12 17:37:33 2010
@@ -1190,7 +1190,31 @@
#endif
} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA;
+extern NTKERNELAPI PVOID MmHighestUserAddress;
+extern NTKERNELAPI PVOID MmSystemRangeStart;
+extern NTKERNELAPI ULONG MmUserProbeAddress;
+
+
#ifdef _X86_
+
+#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress
+#define MM_SYSTEM_RANGE_START MmSystemRangeStart
+#if defined(_LOCAL_COPY_USER_PROBE_ADDRESS_)
+#define MM_USER_PROBE_ADDRESS _LOCAL_COPY_USER_PROBE_ADDRESS_
+extern ULONG _LOCAL_COPY_USER_PROBE_ADDRESS_;
+#else
+#define MM_USER_PROBE_ADDRESS MmUserProbeAddress
+#endif
+#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000
+#define MM_KSEG0_BASE MM_SYSTEM_RANGE_START
+#define MM_SYSTEM_SPACE_END 0xFFFFFFFF
+#if !defined (_X86PAE_)
+#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xC0800000
+#else
+#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xC0C00000
+#endif
+
+#define KeGetPcr() PCR
#define KERNEL_STACK_SIZE 12288
#define KERNEL_LARGE_STACK_SIZE 61440
@@ -1253,6 +1277,13 @@
ULONG HalReserved[16];
} KPCR, *PKPCR;
+FORCEINLINE
+ULONG
+KeGetCurrentProcessorNumber(VOID)
+{
+ return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number));
+}
+
typedef struct _FLOATING_SAVE_AREA {
ULONG ControlWord;
ULONG StatusWord;
@@ -1298,6 +1329,173 @@
#endif /* _X86_ */
#ifdef _AMD64_
+
+#define PTI_SHIFT 12L
+#define PDI_SHIFT 21L
+#define PPI_SHIFT 30L
+#define PXI_SHIFT 39L
+#define PTE_PER_PAGE 512
+#define PDE_PER_PAGE 512
+#define PPE_PER_PAGE 512
+#define PXE_PER_PAGE 512
+#define PTI_MASK_AMD64 (PTE_PER_PAGE - 1)
+#define PDI_MASK_AMD64 (PDE_PER_PAGE - 1)
+#define PPI_MASK (PPE_PER_PAGE - 1)
+#define PXI_MASK (PXE_PER_PAGE - 1)
+
+#define PXE_BASE 0xFFFFF6FB7DBED000ULL
+#define PXE_SELFMAP 0xFFFFF6FB7DBEDF68ULL
+#define PPE_BASE 0xFFFFF6FB7DA00000ULL
+#define PDE_BASE 0xFFFFF6FB40000000ULL
+#define PTE_BASE 0xFFFFF68000000000ULL
+#define PXE_TOP 0xFFFFF6FB7DBEDFFFULL
+#define PPE_TOP 0xFFFFF6FB7DBFFFFFULL
+#define PDE_TOP 0xFFFFF6FB7FFFFFFFULL
+#define PTE_TOP 0xFFFFF6FFFFFFFFFFULL
+
+#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress
+#define MM_SYSTEM_RANGE_START MmSystemRangeStart
+#define MM_USER_PROBE_ADDRESS MmUserProbeAddress
+#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000
+#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xFFFF080000000000ULL
+#define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL
+
+typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
+ ULONG64 P1Home;
+ ULONG64 P2Home;
+ ULONG64 P3Home;
+ ULONG64 P4Home;
+ ULONG64 P5Home;
+ ULONG64 P6Home;
+
+ /* Control flags */
+ ULONG ContextFlags;
+ ULONG MxCsr;
+
+ /* Segment */
+ USHORT SegCs;
+ USHORT SegDs;
+ USHORT SegEs;
+ USHORT SegFs;
+ USHORT SegGs;
+ USHORT SegSs;
+ ULONG EFlags;
+
+ /* Debug */
+ ULONG64 Dr0;
+ ULONG64 Dr1;
+ ULONG64 Dr2;
+ ULONG64 Dr3;
+ ULONG64 Dr6;
+ ULONG64 Dr7;
+
+ /* Integer */
+ ULONG64 Rax;
+ ULONG64 Rcx;
+ ULONG64 Rdx;
+ ULONG64 Rbx;
+ ULONG64 Rsp;
+ ULONG64 Rbp;
+ ULONG64 Rsi;
+ ULONG64 Rdi;
+ ULONG64 R8;
+ ULONG64 R9;
+ ULONG64 R10;
+ ULONG64 R11;
+ ULONG64 R12;
+ ULONG64 R13;
+ ULONG64 R14;
+ ULONG64 R15;
+
+ /* Counter */
+ ULONG64 Rip;
+
+ /* Floating point */
+ union {
+ XMM_SAVE_AREA32 FltSave;
+ struct {
+ M128A Header[2];
+ M128A Legacy[8];
+ M128A Xmm0;
+ M128A Xmm1;
+ M128A Xmm2;
+ M128A Xmm3;
+ M128A Xmm4;
+ M128A Xmm5;
+ M128A Xmm6;
+ M128A Xmm7;
+ M128A Xmm8;
+ M128A Xmm9;
+ M128A Xmm10;
+ M128A Xmm11;
+ M128A Xmm12;
+ M128A Xmm13;
+ M128A Xmm14;
+ M128A Xmm15;
+ } DUMMYSTRUCTNAME;
+ } DUMMYUNIONNAME;
+
+ /* Vector */
+ M128A VectorRegister[26];
+ ULONG64 VectorControl;
+
+ /* Debug control */
+ ULONG64 DebugControl;
+ ULONG64 LastBranchToRip;
+ ULONG64 LastBranchFromRip;
+ ULONG64 LastExceptionToRip;
+ ULONG64 LastExceptionFromRip;
+} CONTEXT;
+
+typedef struct _KPCR
+{
+ _ANONYMOUS_UNION union
+ {
+ NT_TIB NtTib;
+ _ANONYMOUS_STRUCT struct
+ {
+ union _KGDTENTRY64 *GdtBase;
+ struct _KTSS64 *TssBase;
+ ULONG64 UserRsp;
+ struct _KPCR *Self;
+ struct _KPRCB *CurrentPrcb;
+ PKSPIN_LOCK_QUEUE LockArray;
+ PVOID Used_Self;
+ };
+ };
+ union _KIDTENTRY64 *IdtBase;
+ ULONG64 Unused[2];
+ KIRQL Irql;
+ UCHAR SecondLevelCacheAssociativity;
+ UCHAR ObsoleteNumber;
+ UCHAR Fill0;
+ ULONG Unused0[3];
+ USHORT MajorVersion;
+ USHORT MinorVersion;
+ ULONG StallScaleFactor;
+ PVOID Unused1[3];
+ ULONG KernelReserved[15];
+ ULONG SecondLevelCacheSize;
+ ULONG HalReserved[16];
+ ULONG Unused2;
+ PVOID KdVersionBlock;
+ PVOID Unused3;
+ ULONG PcrAlign1[24];
+} KPCR, *PKPCR;
+
+FORCEINLINE
+PKPCR
+KeGetPcr(VOID)
+{
+ return (PKPCR)__readgsqword(FIELD_OFFSET(KPCR, Self));
+}
+
+FORCEINLINE
+ULONG
+KeGetCurrentProcessorNumber(VOID)
+{
+ return (ULONG)__readgsword(0x184);
+}
#if !defined(RC_INVOKED)
@@ -2736,8 +2934,6 @@
#endif
-/* Windows Device Driver Kit */
-#include "winddk.h"
#ifdef __cplusplus
}
Modified: branches/header-work/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
==============================================================================
--- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Fri Mar 12 17:37:33 2010
@@ -42,6 +42,10 @@
#ifndef GUID_DEFINED
#include <guiddef.h>
#endif /* GUID_DEFINED */
+
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+#include <dpfilter.h>
+#endif
#include "intrin.h"
@@ -493,8 +497,26 @@
((Object)->Type == DpcObject) || \
((Object)->Type == ThreadedDpcObject))
+#define ASSERT_GATE(object) \
+ ASSERT((((object)->Header.Type & KOBJECT_TYPE_MASK) == GateObject) || \
+ (((object)->Header.Type & KOBJECT_TYPE_MASK) ==
EventSynchronizationObject))
+
#define ASSERT_DEVICE_QUEUE(Object) \
ASSERT((Object)->Type == DeviceQueueObject)
+
+#define ASSERT_TIMER(E) \
+ ASSERT(((E)->Header.Type == TimerNotificationObject) || \
+ ((E)->Header.Type == TimerSynchronizationObject))
+
+#define ASSERT_MUTANT(E) \
+ ASSERT((E)->Header.Type == MutantObject)
+
+#define ASSERT_SEMAPHORE(E) \
+ ASSERT((E)->Header.Type == SemaphoreObject)
+
+#define ASSERT_EVENT(E) \
+ ASSERT(((E)->Header.Type == NotificationEvent) || \
+ ((E)->Header.Type == SynchronizationEvent))
#define DPC_NORMAL 0
#define DPC_THREADED 1
@@ -519,89 +541,12 @@
#define DBG_STATUS_DEBUG_CONTROL 6
#define DBG_STATUS_WORKER 7
-#define KI_USER_SHARED_DATA 0xffdf0000
-#define SharedUserData ((KUSER_SHARED_DATA * CONST)
KI_USER_SHARED_DATA)
-
-#define EFLAG_SIGN 0x8000
-#define EFLAG_ZERO 0x4000
-#define EFLAG_SELECT (EFLAG_SIGN | EFLAG_ZERO)
-
-#define RESULT_NEGATIVE ((EFLAG_SIGN & ~EFLAG_ZERO) &
EFLAG_SELECT)
-#define RESULT_ZERO ((~EFLAG_SIGN & EFLAG_ZERO) &
EFLAG_SELECT)
-#define RESULT_POSITIVE ((~EFLAG_SIGN & ~EFLAG_ZERO) &
EFLAG_SELECT)
-
#if defined(_WIN64)
#define MAXIMUM_PROC_PER_GROUP 64
#else
#define MAXIMUM_PROC_PER_GROUP 32
#endif
#define MAXIMUM_PROCESSORS MAXIMUM_PROC_PER_GROUP
-
-#if (_M_IX86)
-#define KIP0PCRADDRESS 0xffdff000
-#endif
-
-#if defined(_X86_)
-
-#define PASSIVE_LEVEL 0
-#define LOW_LEVEL 0
-#define APC_LEVEL 1
-#define DISPATCH_LEVEL 2
-#define CMCI_LEVEL 5
-#define PROFILE_LEVEL 27
-#define CLOCK1_LEVEL 28
-#define CLOCK2_LEVEL 28
-#define IPI_LEVEL 29
-#define POWER_LEVEL 30
-#define HIGH_LEVEL 31
-#define CLOCK_LEVEL (CLOCK2_LEVEL)
-
-typedef struct _KFLOATING_SAVE {
- ULONG ControlWord;
- ULONG StatusWord;
- ULONG ErrorOffset;
- ULONG ErrorSelector;
- ULONG DataOffset;
- ULONG DataSelector;
- ULONG Cr0NpxState;
- ULONG Spare1;
-} KFLOATING_SAVE, *PKFLOATING_SAVE;
-
-#endif
-
-#if defined(_AMD64_)
-
-#define PASSIVE_LEVEL 0
-#define LOW_LEVEL 0
-#define APC_LEVEL 1
-#define DISPATCH_LEVEL 2
-#define CMCI_LEVEL 5
-#define CLOCK_LEVEL 13
-#define IPI_LEVEL 14
-#define DRS_LEVEL 14
-#define POWER_LEVEL 14
-#define PROFILE_LEVEL 15
-#define HIGH_LEVEL 15
-
-#endif
-
-#if defined(_IA64_)
-
-#define PASSIVE_LEVEL 0
-#define LOW_LEVEL 0
-#define APC_LEVEL 1
-#define DISPATCH_LEVEL 2
-#define CMC_LEVEL 3
-#define DEVICE_LEVEL_BASE 4
-#define PC_LEVEL 12
-#define IPI_LEVEL 14
-#define DRS_LEVEL 14
-#define CLOCK_LEVEL 13
-#define POWER_LEVEL 15
-#define PROFILE_LEVEL 15
-#define HIGH_LEVEL 15
-
-#endif
/* Exception Records */
#define EXCEPTION_NONCONTINUABLE 1
@@ -694,13 +639,6 @@
(DDKAPI *PNMI_CALLBACK)(
IN PVOID Context,
IN BOOLEAN Handled);
-
-typedef enum _KDPC_IMPORTANCE {
- LowImportance,
- MediumImportance,
- HighImportance,
- MediumHighImportance
-} KDPC_IMPORTANCE;
typedef enum _TRACE_INFORMATION_CLASS {
TraceIdClass,
@@ -892,11 +830,10 @@
typedef
VOID
(NTAPI *PKIPI_WORKER)(
- IN PKIPI_CONTEXT PacketContext,
- IN PVOID Parameter1,
- IN PVOID Parameter2,
- IN PVOID Parameter3
-);
+ IN PKIPI_CONTEXT PacketContext,
+ IN PVOID Parameter1,
+ IN PVOID Parameter2,
+ IN PVOID Parameter3);
typedef
ULONG_PTR
@@ -971,6 +908,13 @@
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
IN PVOID SystemArgument2);
+
+typedef enum _KDPC_IMPORTANCE {
+ LowImportance,
+ MediumImportance,
+ HighImportance,
+ MediumHighImportance
+} KDPC_IMPORTANCE;
typedef struct _KDPC
{
@@ -1085,6 +1029,15 @@
LIST_ENTRY WaitListHead;
} DISPATCHER_HEADER, *PDISPATCHER_HEADER;
+typedef struct _KEVENT {
+ DISPATCHER_HEADER Header;
+} KEVENT, *PKEVENT, *RESTRICTED_POINTER PRKEVENT;
+
+typedef struct _KSEMAPHORE {
+ DISPATCHER_HEADER Header;
+ LONG Limit;
+} KSEMAPHORE, *PKSEMAPHORE, *RESTRICTED_POINTER PRKSEMAPHORE;
+
typedef struct _KGATE
{
DISPATCHER_HEADER Header;
@@ -1114,6 +1067,9 @@
BOOLEAN Abandoned;
UCHAR ApcDisable;
} KMUTANT, *PKMUTANT, *RESTRICTED_POINTER PRKMUTANT, KMUTEX, *PKMUTEX,
*RESTRICTED_POINTER PRKMUTEX;
+
+#define TIMER_TABLE_SIZE 512
+#define TIMER_TABLE_SHIFT 9
typedef struct _KTIMER {
DISPATCHER_HEADER Header;
@@ -1162,15 +1118,6 @@
LONG High2Time;
} KSYSTEM_TIME, *PKSYSTEM_TIME;
-typedef struct _KEVENT {
- DISPATCHER_HEADER Header;
-} KEVENT, *PKEVENT, *RESTRICTED_POINTER PRKEVENT;
-
-typedef struct _KSEMAPHORE {
- DISPATCHER_HEADER Header;
- LONG Limit;
-} KSEMAPHORE, *PKSEMAPHORE, *RESTRICTED_POINTER PRKSEMAPHORE;
-
typedef struct _PNP_BUS_INFORMATION {
GUID BusTypeGuid;
INTERFACE_TYPE LegacyBusType;
@@ -1197,43 +1144,22 @@
ULONG MxCsr;
ULONG MxCsr_Mask;
M128A FloatRegisters[8];
-
#if defined(_WIN64)
-
M128A XmmRegisters[16];
UCHAR Reserved4[96];
-
#else
-
M128A XmmRegisters[8];
UCHAR Reserved4[192];
-
ULONG StackControl[7];
ULONG Cr0NpxState;
-
#endif
-
} XSAVE_FORMAT, *PXSAVE_FORMAT;
-#ifdef _AMD64_
-
-typedef XSAVE_FORMAT XMM_SAVE_AREA32, *PXMM_SAVE_AREA32;
-
-#endif // _AMD64_
-
-#if defined(_IA64_)
-extern volatile LARGE_INTEGER KeTickCount;
-#elif defined(_X86_)
-extern volatile KSYSTEM_TIME KeTickCount;
-#endif
/******************************************************************************
* Memory manager Types *
******************************************************************************/
-
-#define PAGE_SIZE 0x1000
-#define PAGE_SHIFT 12L
#define MM_DONT_ZERO_ALLOCATION 0x00000001
#define MM_ALLOCATE_FROM_LOCAL_NODE_ONLY 0x00000002
@@ -5222,6 +5148,157 @@
#define HIGH_PRIORITY 31
#define MAXIMUM_PRIORITY 32
+
+#ifdef _X86_
+/** Kernel definitions for x86 **/
+
+/* Interrupt request levels */
+#define PASSIVE_LEVEL 0
+#define LOW_LEVEL 0
+#define APC_LEVEL 1
+#define DISPATCH_LEVEL 2
+#define CMCI_LEVEL 5
+#define PROFILE_LEVEL 27
+#define CLOCK1_LEVEL 28
+#define CLOCK2_LEVEL 28
+#define IPI_LEVEL 29
+#define POWER_LEVEL 30
+#define HIGH_LEVEL 31
+#define CLOCK_LEVEL (CLOCK2_LEVEL)
+
+#define KIP0PCRADDRESS 0xffdff000
+#define KI_USER_SHARED_DATA 0xffdf0000
+#define SharedUserData ((KUSER_SHARED_DATA * CONST) KI_USER_SHARED_DATA)
+
+#define PAGE_SIZE 0x1000
+#define PAGE_SHIFT 12L
+#define KeGetDcacheFillSize() 1L
+
+#define EFLAG_SIGN 0x8000
+#define EFLAG_ZERO 0x4000
+#define EFLAG_SELECT (EFLAG_SIGN | EFLAG_ZERO)
+
+#define RESULT_NEGATIVE ((EFLAG_SIGN & ~EFLAG_ZERO) & EFLAG_SELECT)
+#define RESULT_ZERO ((~EFLAG_SIGN & EFLAG_ZERO) & EFLAG_SELECT)
+#define RESULT_POSITIVE ((~EFLAG_SIGN & ~EFLAG_ZERO) & EFLAG_SELECT)
+
+
+typedef struct _KFLOATING_SAVE {
+ ULONG ControlWord;
+ ULONG StatusWord;
+ ULONG ErrorOffset;
+ ULONG ErrorSelector;
+ ULONG DataOffset;
+ ULONG DataSelector;
+ ULONG Cr0NpxState;
+ ULONG Spare1;
+} KFLOATING_SAVE, *PKFLOATING_SAVE;
+
+extern volatile KSYSTEM_TIME KeTickCount;
+
+#define YieldProcessor _mm_pause
+
+FORCEINLINE
+VOID
+KeMemoryBarrier(
+ VOID)
+{
+ volatile LONG Barrier;
+#if defined(__GNUC__)
+ __asm__ __volatile__ ("xchg %%eax, %0" : : "m" (Barrier) :
"%eax");
+#elif defined(_MSC_VER)
+ __asm xchg [Barrier], eax
+#endif
+}
+
+NTHALAPI
+VOID
+FASTCALL
+KfLowerIrql(
+ IN KIRQL NewIrql);
+#define KeLowerIrql(a) KfLowerIrql(a)
+
+NTHALAPI
+KIRQL
+FASTCALL
+KfRaiseIrql(
+ IN KIRQL NewIrql);
+#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a)
+
+NTHALAPI
+KIRQL
+DDKAPI
+KeRaiseIrqlToDpcLevel(
+ VOID);
+
+NTHALAPI
+KIRQL
+DDKAPI
+KeRaiseIrqlToSynchLevel(
+ VOID);
+
+NTHALAPI
+KIRQL
+FASTCALL
+KfAcquireSpinLock(
+ IN PKSPIN_LOCK SpinLock);
+#define KeAcquireSpinLock(a,b) *(b) = KfAcquireSpinLock(a)
+
+NTHALAPI
+VOID
+FASTCALL
+KfReleaseSpinLock(
+ IN PKSPIN_LOCK SpinLock,
+ IN KIRQL NewIrql);
+#define KeReleaseSpinLock(a,b) KfReleaseSpinLock(a,b)
+
+NTKERNELAPI
+VOID
+FASTCALL
+KefAcquireSpinLockAtDpcLevel(
+ IN PKSPIN_LOCK SpinLock);
+#define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock)
+
+NTKERNELAPI
+VOID
+FASTCALL
+KefReleaseSpinLockFromDpcLevel(
+ IN PKSPIN_LOCK SpinLock);
+#define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock)
+
+NTSYSAPI
+PKTHREAD
+NTAPI
+KeGetCurrentThread(
+ VOID);
+
+NTKERNELAPI
+NTSTATUS
+NTAPI
+KeSaveFloatingPointState(
+ OUT PKFLOATING_SAVE FloatSave);
+
+NTKERNELAPI
+NTSTATUS
+NTAPI
+KeRestoreFloatingPointState(
+ IN PKFLOATING_SAVE FloatSave);
+
+/* VOID
+ * KeFlushIoBuffers(
+ * IN PMDL Mdl,
+ * IN BOOLEAN ReadOperation,
+ * IN BOOLEAN DmaOperation)
+ */
+#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
+
+/* x86 and x64 performs a 0x2C interrupt */
+#define DbgRaiseAssertionFailure __int2c
+
+#endif /* _X86_ */
+
+
+
/******************************************************************************
* Runtime Library Functions *
******************************************************************************/
@@ -6491,19 +6568,11 @@
* Kernel Functions *
******************************************************************************/
-#if defined(_M_IX86)
-#define YieldProcessor _mm_pause
-#elif defined (_M_AMD64)
-#define YieldProcessor _mm_pause
-#elif defined(_M_PPC)
-#define YieldProcessor() __asm__ __volatile__("nop");
-#elif defined(_M_MIPS)
-#define YieldProcessor() __asm__ __volatile__("nop");
-#elif defined(_M_ARM)
-#define YieldProcessor()
-#else
-#error Unknown architecture
-#endif
+NTHALAPI
+KIRQL
+NTAPI
+KeGetCurrentIrql(
+ VOID);
NTKERNELAPI
VOID
@@ -6521,6 +6590,22 @@
#if (NTDDI_VERSION >= NTDDI_WIN2K)
+NTKERNELAPI
+VOID
+NTAPI
+ProbeForRead(
+ IN CONST VOID *Address, /* CONST is added */
+ IN SIZE_T Length,
+ IN ULONG Alignment);
+
+NTKERNELAPI
+VOID
+NTAPI
+ProbeForWrite(
+ IN PVOID Address,
+ IN SIZE_T Length,
+ IN ULONG Alignment);
+
#if defined(SINGLE_GROUP_LEGACY_API)
NTKERNELAPI
VOID
@@ -6560,6 +6645,22 @@
KeQuerySystemTime(
OUT PLARGE_INTEGER CurrentTime);
#endif /* !_M_AMD64 */
+
+#if defined(_X86_) && (defined(_WDM_INCLUDED_) ||
defined(WIN9X_COMPAT_SPINLOCK))
+NTKERNELAPI
+VOID
+NTAPI
+KeInitializeSpinLock(
+ IN PKSPIN_LOCK SpinLock);
+#else
+FORCEINLINE
+VOID
+KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
+{
+ /* Clear the lock */
+ *SpinLock = 0;
+}
+#endif
NTKERNELAPI
DECLSPEC_NORETURN
@@ -6850,7 +6951,7 @@
#if (NTDDI_VERSION >= NTDDI_WINXP)
-// _DECL_HAL_KE_IMPORT
+_DECL_HAL_KE_IMPORT
VOID
FASTCALL
KeAcquireInStackQueuedSpinLock(
@@ -6907,7 +7008,7 @@
IN OUT PKDEVICE_QUEUE DeviceQueue,
IN ULONG SortKey);
-//_DECL_HAL_KE_IMPORT
+_DECL_HAL_KE_IMPORT
VOID
FASTCALL
KeReleaseInStackQueuedSpinLock(
@@ -6986,6 +7087,12 @@
KeReleaseSpinLockForDpc(
IN OUT PKSPIN_LOCK SpinLock,
IN KIRQL OldIrql);
+
+NTKERNELAPI
+BOOLEAN
+FASTCALL
+KeTestSpinLock(
+ IN PKSPIN_LOCK SpinLock);
#endif /* (NTDDI_VERSION >= NTDDI_WS03) */
@@ -7254,84 +7361,14 @@
#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
-#if defined(_X86_)
-NTKERNELAPI
-NTSTATUS
-NTAPI
-KeSaveFloatingPointState(
- OUT PKFLOATING_SAVE FloatSave);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-KeRestoreFloatingPointState(
- IN PKFLOATING_SAVE FloatSave);
-#endif
-
-#if defined(_IA64_)
-FORCEINLINE
-VOID
-KeFlushWriteBuffer(VOID)
-{
- __mf ();
- return;
-}
-#else
+#if !defined(_IA64_)
NTHALAPI
VOID
NTAPI
KeFlushWriteBuffer(VOID);
#endif
-/*
- * VOID
- * KeFlushIoBuffers(
- * IN PMDL Mdl,
- * IN BOOLEAN ReadOperation,
- * IN BOOLEAN DmaOperation)
- */
-#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
-
-#define ExAcquireSpinLock(Lock, OldIrql) KeAcquireSpinLock((Lock), (OldIrql))
-#define ExReleaseSpinLock(Lock, OldIrql) KeReleaseSpinLock((Lock), (OldIrql))
-#define ExAcquireSpinLockAtDpcLevel(Lock) KeAcquireSpinLockAtDpcLevel(Lock)
-#define ExReleaseSpinLockFromDpcLevel(Lock) KeReleaseSpinLockFromDpcLevel(Lock)
-
-#if (NTDDI_VERSION >= NTDDI_WS03)
-NTKERNELAPI
-BOOLEAN
-FASTCALL
-KeTestSpinLock(
- IN PKSPIN_LOCK SpinLock
-);
-#endif
-
-NTHALAPI
-KIRQL
-NTAPI
-KeGetCurrentIrql(
- VOID);
-
-#if defined(_M_AMD64)
-FORCEINLINE
-PKTHREAD
-KeGetCurrentThread (
- VOID)
-{
- return (struct _KTHREAD *)__readgsqword(0x188);
-}
-#endif
-
-#if defined(_M_IX86) || defined(_M_IA64)
-NTSYSAPI
-PKTHREAD
-NTAPI
-KeGetCurrentThread(
- VOID);
-#endif
-
-/*
- * VOID
+/* VOID
* KeInitializeCallbackRecord(
* IN PKBUGCHECK_CALLBACK_RECORD CallbackRecord)
*/
@@ -7361,42 +7398,6 @@
#define PAGED_CODE_LOCKED() NOP_FUNCTION;
-
-#if (NTDDI_VERSION >= NTDDI_WIN2K)
-
-NTKERNELAPI
-VOID
-NTAPI
-ProbeForRead(
- IN CONST VOID *Address, /* CONST is added */
- IN SIZE_T Length,
- IN ULONG Alignment);
-
-NTKERNELAPI
-VOID
-NTAPI
-ProbeForWrite(
- IN PVOID Address,
- IN SIZE_T Length,
- IN ULONG Alignment);
-
-#endif
-
-#if defined(_X86_) || defined(_AMD64_)
-
-/* x86 and x64 performs a 0x2C interrupt */
-#define DbgRaiseAssertionFailure __int2c
-
-#elif defined(_ARM_)
-
-//
-// TODO
-//
-
-#else
-#error Unsupported Architecture
-#endif
-
/******************************************************************************
* Memory manager Functions *
******************************************************************************/
@@ -7430,31 +7431,40 @@
/* ULONG
* BYTE_OFFSET(
- * IN PVOID Va)
+ * IN PVOID Va)
*/
#define BYTE_OFFSET(Va) \
((ULONG) ((ULONG_PTR) (Va) & (PAGE_SIZE - 1)))
/* ULONG
* BYTES_TO_PAGES(
- * IN ULONG Size)
+ * IN ULONG Size)
*/
#define BYTES_TO_PAGES(Size) \
(((Size) >> PAGE_SHIFT) + (((Size) & (PAGE_SIZE - 1)) != 0))
/* PVOID
* PAGE_ALIGN(
- * IN PVOID Va)
+ * IN PVOID Va)
*/
#define PAGE_ALIGN(Va) \
((PVOID) ((ULONG_PTR)(Va) & ~(PAGE_SIZE - 1)))
/* ULONG_PTR
* ROUND_TO_PAGES(
- * IN ULONG_PTR Size)
+ * IN ULONG_PTR Size)
*/
#define ROUND_TO_PAGES(Size) \
(((ULONG_PTR) (Size) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
+
+/* ULONG
+ * ADDRESS_AND_SIZE_TO_SPAN_PAGES(
+ * IN PVOID Va,
+ * IN ULONG Size)
+ */
+#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, _Size) \
+ ((ULONG) ((((ULONG_PTR) (_Va) & (PAGE_SIZE - 1)) \
+ + (_Size) + (PAGE_SIZE - 1)) >> PAGE_SHIFT))
/*
* ULONG
@@ -9590,6 +9600,12 @@
PoUnregisterSystemState(
IN OUT PVOID StateHandle);
+NTKERNELAPI
+NTSTATUS
+NTAPI
+PoRequestShutdownEvent(
+ OUT PVOID *Event);
+
#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
#if (NTDDI_VERSION >= NTDDI_VISTA)
@@ -9691,6 +9707,11 @@
#define ExInterlockedIncrementLong(Addend,Lock) Exfi386InterlockedIncrementLong(Addend)
#define ExInterlockedDecrementLong(Addend,Lock) Exfi386InterlockedDecrementLong(Addend)
#define ExInterlockedExchangeUlong(Target, Value, Lock)
Exfi386InterlockedExchangeUlong(Target, Value)
+
+#define ExAcquireSpinLock(Lock, OldIrql) KeAcquireSpinLock((Lock), (OldIrql))
+#define ExReleaseSpinLock(Lock, OldIrql) KeReleaseSpinLock((Lock), (OldIrql))
+#define ExAcquireSpinLockAtDpcLevel(Lock) KeAcquireSpinLockAtDpcLevel(Lock)
+#define ExReleaseSpinLockFromDpcLevel(Lock) KeReleaseSpinLockFromDpcLevel(Lock)
#define ExInitializeSListHead InitializeSListHead
@@ -11538,6 +11559,11 @@
#define SERVICE_DEMAND_START 0x00000003
#define SERVICE_DISABLED 0x00000004
+#ifndef _TRACEHANDLE_DEFINED
+#define _TRACEHANDLE_DEFINED
+typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
+#endif
+
#ifdef __cplusplus
Removed: branches/header-work/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
==============================================================================
--- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/winddk.h (removed)
@@ -1,1541 +1,0 @@
-/*
- * winddk.h
- *
- * Windows Device Driver Kit
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns(a)users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __WINDDK_H
-#define __WINDDK_H
-
-/* Helper macro to enable gcc's extension. */
-#ifndef __GNU_EXTENSION
-#ifdef __GNUC__
-#define __GNU_EXTENSION __extension__
-#else
-#define __GNU_EXTENSION
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <excpt.h>
-#include <ntdef.h>
-#include <ntstatus.h>
-
-#include "intrin.h"
-
-/* Pseudo modifiers for parameters */
-#ifndef IN
-#define IN
-#endif
-#ifndef OUT
-#define OUT
-#endif
-#ifndef OPTIONAL
-#define OPTIONAL
-#endif
-#ifndef UNALLIGNED
-#define UNALLIGNED
-#endif
-
-#define CONST const
-
-#define RESTRICTED_POINTER
-
-#define DECLSPEC_ADDRSAFE
-
-#ifdef NONAMELESSUNION
-# define _DDK_DUMMYUNION_MEMBER(name) DUMMYUNIONNAME.name
-# define _DDK_DUMMYUNION_N_MEMBER(n, name) DUMMYUNIONNAME##n.name
-#else
-# define _DDK_DUMMYUNION_MEMBER(name) name
-# define _DDK_DUMMYUNION_N_MEMBER(n, name) name
-#endif
-
-/*
-** Forward declarations
-*/
-
-struct _KPCR;
-struct _KPRCB;
-struct _KTSS;
-struct _DRIVE_LAYOUT_INFORMATION_EX;
-struct _LOADER_PARAMETER_BLOCK;
-struct _BUS_HANDLER;
-
-#if 1
-/* FIXME: Unknown definitions */
-struct _SET_PARTITION_INFORMATION_EX;
-#define WaitAll 0
-#define WaitAny 1
-typedef HANDLE TRACEHANDLE;
-typedef PVOID PWMILIB_CONTEXT;
-#endif
-
-/*
-** WmiLib specific structure
-*/
-typedef enum
-{
- IrpProcessed, // Irp was processed and possibly completed
- IrpNotCompleted, // Irp was process and NOT completed
- IrpNotWmi, // Irp is not a WMI irp
- IrpForward // Irp is wmi irp, but targeted at another device object
-} SYSCTL_IRP_DISPOSITION, *PSYSCTL_IRP_DISPOSITION;
-
-#define DPFLTR_ERROR_LEVEL 0
-#define DPFLTR_WARNING_LEVEL 1
-#define DPFLTR_TRACE_LEVEL 2
-#define DPFLTR_INFO_LEVEL 3
-#define DPFLTR_MASK 0x80000000
-
-typedef enum _DPFLTR_TYPE
-{
- DPFLTR_SYSTEM_ID = 0,
- DPFLTR_SMSS_ID = 1,
- DPFLTR_SETUP_ID = 2,
- DPFLTR_NTFS_ID = 3,
- DPFLTR_FSTUB_ID = 4,
- DPFLTR_CRASHDUMP_ID = 5,
- DPFLTR_CDAUDIO_ID = 6,
- DPFLTR_CDROM_ID = 7,
- DPFLTR_CLASSPNP_ID = 8,
- DPFLTR_DISK_ID = 9,
- DPFLTR_REDBOOK_ID = 10,
- DPFLTR_STORPROP_ID = 11,
- DPFLTR_SCSIPORT_ID = 12,
- DPFLTR_SCSIMINIPORT_ID = 13,
- DPFLTR_CONFIG_ID = 14,
- DPFLTR_I8042PRT_ID = 15,
- DPFLTR_SERMOUSE_ID = 16,
- DPFLTR_LSERMOUS_ID = 17,
- DPFLTR_KBDHID_ID = 18,
- DPFLTR_MOUHID_ID = 19,
- DPFLTR_KBDCLASS_ID = 20,
- DPFLTR_MOUCLASS_ID = 21,
- DPFLTR_TWOTRACK_ID = 22,
- DPFLTR_WMILIB_ID = 23,
- DPFLTR_ACPI_ID = 24,
- DPFLTR_AMLI_ID = 25,
- DPFLTR_HALIA64_ID = 26,
- DPFLTR_VIDEO_ID = 27,
- DPFLTR_SVCHOST_ID = 28,
- DPFLTR_VIDEOPRT_ID = 29,
- DPFLTR_TCPIP_ID = 30,
- DPFLTR_DMSYNTH_ID = 31,
- DPFLTR_NTOSPNP_ID = 32,
- DPFLTR_FASTFAT_ID = 33,
- DPFLTR_SAMSS_ID = 34,
- DPFLTR_PNPMGR_ID = 35,
- DPFLTR_NETAPI_ID = 36,
- DPFLTR_SCSERVER_ID = 37,
- DPFLTR_SCCLIENT_ID = 38,
- DPFLTR_SERIAL_ID = 39,
- DPFLTR_SERENUM_ID = 40,
- DPFLTR_UHCD_ID = 41,
- DPFLTR_BOOTOK_ID = 42,
- DPFLTR_BOOTVRFY_ID = 43,
- DPFLTR_RPCPROXY_ID = 44,
- DPFLTR_AUTOCHK_ID = 45,
- DPFLTR_DCOMSS_ID = 46,
- DPFLTR_UNIMODEM_ID = 47,
- DPFLTR_SIS_ID = 48,
- DPFLTR_FLTMGR_ID = 49,
- DPFLTR_WMICORE_ID = 50,
- DPFLTR_BURNENG_ID = 51,
- DPFLTR_IMAPI_ID = 52,
- DPFLTR_SXS_ID = 53,
- DPFLTR_FUSION_ID = 54,
- DPFLTR_IDLETASK_ID = 55,
- DPFLTR_SOFTPCI_ID = 56,
- DPFLTR_TAPE_ID = 57,
- DPFLTR_MCHGR_ID = 58,
- DPFLTR_IDEP_ID = 59,
- DPFLTR_PCIIDE_ID = 60,
- DPFLTR_FLOPPY_ID = 61,
- DPFLTR_FDC_ID = 62,
- DPFLTR_TERMSRV_ID = 63,
- DPFLTR_W32TIME_ID = 64,
- DPFLTR_PREFETCHER_ID = 65,
- DPFLTR_RSFILTER_ID = 66,
- DPFLTR_FCPORT_ID = 67,
- DPFLTR_PCI_ID = 68,
- DPFLTR_DMIO_ID = 69,
- DPFLTR_DMCONFIG_ID = 70,
- DPFLTR_DMADMIN_ID = 71,
- DPFLTR_WSOCKTRANSPORT_ID = 72,
- DPFLTR_VSS_ID = 73,
- DPFLTR_PNPMEM_ID = 74,
- DPFLTR_PROCESSOR_ID = 75,
- DPFLTR_DMSERVER_ID = 76,
- DPFLTR_SR_ID = 77,
- DPFLTR_INFINIBAND_ID = 78,
- DPFLTR_IHVDRIVER_ID = 79,
- DPFLTR_IHVVIDEO_ID = 80,
- DPFLTR_IHVAUDIO_ID = 81,
- DPFLTR_IHVNETWORK_ID = 82,
- DPFLTR_IHVSTREAMING_ID = 83,
- DPFLTR_IHVBUS_ID = 84,
- DPFLTR_HPS_ID = 85,
- DPFLTR_RTLTHREADPOOL_ID = 86,
- DPFLTR_LDR_ID = 87,
- DPFLTR_TCPIP6_ID = 88,
- DPFLTR_ISAPNP_ID = 89,
- DPFLTR_SHPC_ID = 90,
- DPFLTR_STORPORT_ID = 91,
- DPFLTR_STORMINIPORT_ID = 92,
- DPFLTR_PRINTSPOOLER_ID = 93,
- DPFLTR_VDS_ID = 94,
- DPFLTR_VDSBAS_ID = 95,
- DPFLTR_VDSDYNDR_ID = 96,
- DPFLTR_VDSUTIL_ID = 97,
- DPFLTR_DFRGIFC_ID = 98,
- DPFLTR_DEFAULT_ID = 99,
- DPFLTR_MM_ID = 100,
- DPFLTR_DFSC_ID = 101,
- DPFLTR_WOW64_ID = 102,
- DPFLTR_ENDOFTABLE_ID
-} DPFLTR_TYPE;
-
-/* also in winnt.h */
-
-#define FILE_COPY_STRUCTURED_STORAGE 0x00000041
-#define FILE_STRUCTURED_STORAGE 0x00000441
-
-/* end winnt.h */
-
-/* Exported object types */
-extern POBJECT_TYPE NTSYSAPI ExDesktopObjectType;
-extern POBJECT_TYPE NTSYSAPI ExWindowStationObjectType;
-extern ULONG NTSYSAPI IoDeviceHandlerObjectSize;
-extern POBJECT_TYPE NTSYSAPI IoDeviceHandlerObjectType;
-extern POBJECT_TYPE NTSYSAPI IoDeviceObjectType;
-extern POBJECT_TYPE NTSYSAPI IoDriverObjectType;
-extern POBJECT_TYPE NTSYSAPI LpcPortObjectType;
-extern POBJECT_TYPE NTSYSAPI PsProcessType;
-
-typedef EXCEPTION_DISPOSITION
-(DDKAPI *PEXCEPTION_ROUTINE)(
- IN struct _EXCEPTION_RECORD *ExceptionRecord,
- IN PVOID EstablisherFrame,
- IN OUT struct _CONTEXT *ContextRecord,
- IN OUT PVOID DispatcherContext);
-
-typedef NTSTATUS
-(DDKAPI *PDRIVER_ENTRY)(
- IN struct _DRIVER_OBJECT *DriverObject,
- IN PUNICODE_STRING RegistryPath);
-
-typedef BOOLEAN
-(DDKAPI *PKTRANSFER_ROUTINE)(
- VOID);
-
-#define ASSERT_GATE(object) \
- ASSERT((((object)->Header.Type & KOBJECT_TYPE_MASK) == GateObject) || \
- (((object)->Header.Type & KOBJECT_TYPE_MASK) ==
EventSynchronizationObject))
-
-#define TIMER_TABLE_SIZE 512
-#define TIMER_TABLE_SHIFT 9
-
-#define ASSERT_TIMER(E) \
- ASSERT(((E)->Header.Type == TimerNotificationObject) || \
- ((E)->Header.Type == TimerSynchronizationObject))
-
-#define ASSERT_MUTANT(E) \
- ASSERT((E)->Header.Type == MutantObject)
-
-#define ASSERT_SEMAPHORE(E) \
- ASSERT((E)->Header.Type == SemaphoreObject)
-
-#define ASSERT_EVENT(E) \
- ASSERT(((E)->Header.Type == NotificationEvent) || \
- ((E)->Header.Type == SynchronizationEvent))
-
-#define KEYBOARD_INSERT_ON 0x08
-#define KEYBOARD_CAPS_LOCK_ON 0x04
-#define KEYBOARD_NUM_LOCK_ON 0x02
-#define KEYBOARD_SCROLL_LOCK_ON 0x01
-#define KEYBOARD_ALT_KEY_DOWN 0x80
-#define KEYBOARD_CTRL_KEY_DOWN 0x40
-#define KEYBOARD_LEFT_SHIFT_DOWN 0x20
-#define KEYBOARD_RIGHT_SHIFT_DOWN 0x10
-
-/* Function Type Defintions for Dispatch Functions */
-struct _DEVICE_CONTROL_CONTEXT;
-
-typedef VOID
-(DDKAPI *PDEVICE_CONTROL_COMPLETION)(
- IN struct _DEVICE_CONTROL_CONTEXT *ControlContext);
-
-typedef struct _DEVICE_CONTROL_CONTEXT {
- NTSTATUS Status;
- PDEVICE_HANDLER_OBJECT DeviceHandler;
- PDEVICE_OBJECT DeviceObject;
- ULONG ControlCode;
- PVOID Buffer;
- PULONG BufferLength;
- PVOID Context;
-} DEVICE_CONTROL_CONTEXT, *PDEVICE_CONTROL_CONTEXT;
-
-typedef NTSTATUS
-(DDKAPI *pHalDeviceControl)(
- IN PDEVICE_HANDLER_OBJECT DeviceHandler,
- IN PDEVICE_OBJECT DeviceObject,
- IN ULONG ControlCode,
- IN OUT PVOID Buffer OPTIONAL,
- IN OUT PULONG BufferLength OPTIONAL,
- IN PVOID Context,
- IN PDEVICE_CONTROL_COMPLETION CompletionRoutine);
-
-typedef
-ULONG
-(DDKAPI *pHalGetInterruptVector)(
- IN INTERFACE_TYPE InterfaceType,
- IN ULONG BusNumber,
- IN ULONG BusInterruptLevel,
- IN ULONG BusInterruptVector,
- OUT PKIRQL Irql,
- OUT PKAFFINITY Affinity
-);
-
-typedef
-NTSTATUS
-(DDKAPI *pHalGetVectorInput)(
- IN ULONG Vector,
- IN KAFFINITY Affinity,
- OUT PULONG Input,
- OUT PKINTERRUPT_POLARITY Polarity
-);
-
-typedef struct _KEY_USER_FLAGS_INFORMATION {
- ULONG UserFlags;
-} KEY_USER_FLAGS_INFORMATION, *PKEY_USER_FLAGS_INFORMATION;
-
-#define PCI_ADDRESS_MEMORY_SPACE 0x00000000
-
-struct _RTL_RANGE;
-
-typedef BOOLEAN
-(NTAPI *PRTL_CONFLICT_RANGE_CALLBACK) (
- PVOID Context,
- struct _RTL_RANGE *Range
-);
-
-/*
-** Storage structures
-*/
-typedef enum _PARTITION_STYLE {
- PARTITION_STYLE_MBR,
- PARTITION_STYLE_GPT,
- PARTITION_STYLE_RAW
-} PARTITION_STYLE;
-
-typedef struct _CREATE_DISK_MBR {
- ULONG Signature;
-} CREATE_DISK_MBR, *PCREATE_DISK_MBR;
-
-typedef struct _CREATE_DISK_GPT {
- GUID DiskId;
- ULONG MaxPartitionCount;
-} CREATE_DISK_GPT, *PCREATE_DISK_GPT;
-
-typedef struct _CREATE_DISK {
- PARTITION_STYLE PartitionStyle;
- _ANONYMOUS_UNION union {
- CREATE_DISK_MBR Mbr;
- CREATE_DISK_GPT Gpt;
- } DUMMYUNIONNAME;
-} CREATE_DISK, *PCREATE_DISK;
-
-typedef VOID
-(FASTCALL*PTIME_UPDATE_NOTIFY_ROUTINE)(
- IN HANDLE ThreadId,
- IN KPROCESSOR_MODE Mode);
-
-/*
-** Architecture specific structures
-*/
-
-#ifdef _X86_
-
-typedef struct _KPCR_TIB {
- PVOID ExceptionList; /* 00 */
- PVOID StackBase; /* 04 */
- PVOID StackLimit; /* 08 */
- PVOID SubSystemTib; /* 0C */
- _ANONYMOUS_UNION union {
- PVOID FiberData; /* 10 */
- ULONG Version; /* 10 */
- } DUMMYUNIONNAME;
- PVOID ArbitraryUserPointer; /* 14 */
- struct _KPCR_TIB *Self; /* 18 */
-} KPCR_TIB, *PKPCR_TIB; /* 1C */
-
-#define KeGetPcr() PCR
-
-FORCEINLINE
-ULONG
-KeGetCurrentProcessorNumber(VOID)
-{
- return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number));
-}
-
-extern NTKERNELAPI PVOID MmHighestUserAddress;
-extern NTKERNELAPI PVOID MmSystemRangeStart;
-extern NTKERNELAPI ULONG_PTR MmUserProbeAddress;
-
-#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress
-#define MM_SYSTEM_RANGE_START MmSystemRangeStart
-#define MM_USER_PROBE_ADDRESS MmUserProbeAddress
-#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000
-#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xC0C00000
-
-#define MM_KSEG0_BASE MM_SYSTEM_RANGE_START
-#define MM_SYSTEM_SPACE_END 0xFFFFFFFF
-
-#elif defined(__x86_64__)
-
-typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
- ULONG64 P1Home;
- ULONG64 P2Home;
- ULONG64 P3Home;
- ULONG64 P4Home;
- ULONG64 P5Home;
- ULONG64 P6Home;
-
- /* Control flags */
- ULONG ContextFlags;
- ULONG MxCsr;
-
- /* Segment */
- USHORT SegCs;
- USHORT SegDs;
- USHORT SegEs;
- USHORT SegFs;
- USHORT SegGs;
- USHORT SegSs;
- ULONG EFlags;
-
- /* Debug */
- ULONG64 Dr0;
- ULONG64 Dr1;
- ULONG64 Dr2;
- ULONG64 Dr3;
- ULONG64 Dr6;
- ULONG64 Dr7;
-
- /* Integer */
- ULONG64 Rax;
- ULONG64 Rcx;
- ULONG64 Rdx;
- ULONG64 Rbx;
- ULONG64 Rsp;
- ULONG64 Rbp;
- ULONG64 Rsi;
- ULONG64 Rdi;
- ULONG64 R8;
- ULONG64 R9;
- ULONG64 R10;
- ULONG64 R11;
- ULONG64 R12;
- ULONG64 R13;
- ULONG64 R14;
- ULONG64 R15;
-
- /* Counter */
- ULONG64 Rip;
-
- /* Floating point */
- union {
- XMM_SAVE_AREA32 FltSave;
- struct {
- M128A Header[2];
- M128A Legacy[8];
- M128A Xmm0;
- M128A Xmm1;
- M128A Xmm2;
- M128A Xmm3;
- M128A Xmm4;
- M128A Xmm5;
- M128A Xmm6;
- M128A Xmm7;
- M128A Xmm8;
- M128A Xmm9;
- M128A Xmm10;
- M128A Xmm11;
- M128A Xmm12;
- M128A Xmm13;
- M128A Xmm14;
- M128A Xmm15;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
-
- /* Vector */
- M128A VectorRegister[26];
- ULONG64 VectorControl;
-
- /* Debug control */
- ULONG64 DebugControl;
- ULONG64 LastBranchToRip;
- ULONG64 LastBranchFromRip;
- ULONG64 LastExceptionToRip;
- ULONG64 LastExceptionFromRip;
-} CONTEXT;
-
-#define PAGE_SIZE 0x1000
-#define PAGE_SHIFT 12L
-#define PTI_SHIFT 12L
-#define PDI_SHIFT 21L
-#define PPI_SHIFT 30L
-#define PXI_SHIFT 39L
-#define PTE_PER_PAGE 512
-#define PDE_PER_PAGE 512
-#define PPE_PER_PAGE 512
-#define PXE_PER_PAGE 512
-#define PTI_MASK_AMD64 (PTE_PER_PAGE - 1)
-#define PDI_MASK_AMD64 (PDE_PER_PAGE - 1)
-#define PPI_MASK (PPE_PER_PAGE - 1)
-#define PXI_MASK (PXE_PER_PAGE - 1)
-
-#define PXE_BASE 0xFFFFF6FB7DBED000ULL
-#define PXE_SELFMAP 0xFFFFF6FB7DBEDF68ULL
-#define PPE_BASE 0xFFFFF6FB7DA00000ULL
-#define PDE_BASE 0xFFFFF6FB40000000ULL
-#define PTE_BASE 0xFFFFF68000000000ULL
-#define PXE_TOP 0xFFFFF6FB7DBEDFFFULL
-#define PPE_TOP 0xFFFFF6FB7DBFFFFFULL
-#define PDE_TOP 0xFFFFF6FB7FFFFFFFULL
-#define PTE_TOP 0xFFFFF6FFFFFFFFFFULL
-
-extern NTKERNELAPI PVOID MmHighestUserAddress;
-extern NTKERNELAPI PVOID MmSystemRangeStart;
-extern NTKERNELAPI ULONG_PTR MmUserProbeAddress;
-
-#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress
-#define MM_SYSTEM_RANGE_START MmSystemRangeStart
-#define MM_USER_PROBE_ADDRESS MmUserProbeAddress
-#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000
-#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xFFFF080000000000ULL
-#define KI_USER_SHARED_DATA 0xFFFFF78000000000ULL
-
-#define SharedUserData ((PKUSER_SHARED_DATA const)KI_USER_SHARED_DATA)
-#define SharedInterruptTime (&SharedUserData->InterruptTime)
-#define SharedSystemTime (&SharedUserData->SystemTime)
-#define SharedTickCount (&SharedUserData->TickCount)
-
-#define KeQueryInterruptTime() \
- (*(volatile ULONG64*)SharedInterruptTime)
-#define KeQuerySystemTime(CurrentCount) \
- *(ULONG64*)(CurrentCount) = *(volatile ULONG64*)SharedSystemTime
-#define KeQueryTickCount(CurrentCount) \
- *(ULONG64*)(CurrentCount) = *(volatile ULONG64*)SharedTickCount
-
-typedef struct _KPCR
-{
- __GNU_EXTENSION union
- {
- NT_TIB NtTib;
- __GNU_EXTENSION struct
- {
- union _KGDTENTRY64 *GdtBase;
- struct _KTSS64 *TssBase;
- ULONG64 UserRsp;
- struct _KPCR *Self;
- struct _KPRCB *CurrentPrcb;
- PKSPIN_LOCK_QUEUE LockArray;
- PVOID Used_Self;
- };
- };
- union _KIDTENTRY64 *IdtBase;
- ULONG64 Unused[2];
- KIRQL Irql;
- UCHAR SecondLevelCacheAssociativity;
- UCHAR ObsoleteNumber;
- UCHAR Fill0;
- ULONG Unused0[3];
- USHORT MajorVersion;
- USHORT MinorVersion;
- ULONG StallScaleFactor;
- PVOID Unused1[3];
- ULONG KernelReserved[15];
- ULONG SecondLevelCacheSize;
- ULONG HalReserved[16];
- ULONG Unused2;
- PVOID KdVersionBlock;
- PVOID Unused3;
- ULONG PcrAlign1[24];
-} KPCR, *PKPCR;
-
-typedef struct _KFLOATING_SAVE {
- ULONG Dummy;
-} KFLOATING_SAVE, *PKFLOATING_SAVE;
-
-FORCEINLINE
-PKPCR
-KeGetPcr(VOID)
-{
- return (PKPCR)__readgsqword(FIELD_OFFSET(KPCR, Self));
-}
-
-FORCEINLINE
-ULONG
-KeGetCurrentProcessorNumber(VOID)
-{
- return (ULONG)__readgsword(0x184);
-}
-
-#elif defined(__PowerPC__)
-
-//
-// Used to contain PFNs and PFN counts
-//
-typedef ULONG PFN_COUNT;
-typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
-typedef LONG SPFN_NUMBER, *PSPFN_NUMBER;
-
-#define PASSIVE_LEVEL 0
-#define LOW_LEVEL 0
-#define APC_LEVEL 1
-#define DISPATCH_LEVEL 2
-#define PROFILE_LEVEL 27
-#define CLOCK1_LEVEL 28
-#define CLOCK2_LEVEL 28
-#define IPI_LEVEL 29
-#define POWER_LEVEL 30
-#define HIGH_LEVEL 31
-
-typedef struct _KFLOATING_SAVE {
- ULONG Dummy;
-} KFLOATING_SAVE, *PKFLOATING_SAVE;
-
-typedef struct _KPCR_TIB {
- PVOID ExceptionList; /* 00 */
- PVOID StackBase; /* 04 */
- PVOID StackLimit; /* 08 */
- PVOID SubSystemTib; /* 0C */
- _ANONYMOUS_UNION union {
- PVOID FiberData; /* 10 */
- ULONG Version; /* 10 */
- } DUMMYUNIONNAME;
- PVOID ArbitraryUserPointer; /* 14 */
- struct _KPCR_TIB *Self; /* 18 */
-} KPCR_TIB, *PKPCR_TIB; /* 1C */
-
-#define PCR_MINOR_VERSION 1
-#define PCR_MAJOR_VERSION 1
-
-typedef struct _KPCR {
- KPCR_TIB Tib; /* 00 */
- struct _KPCR *Self; /* 1C */
- struct _KPRCB *Prcb; /* 20 */
- KIRQL Irql; /* 24 */
- ULONG IRR; /* 28 */
- ULONG IrrActive; /* 2C */
- ULONG IDR; /* 30 */
- PVOID KdVersionBlock; /* 34 */
- PUSHORT IDT; /* 38 */
- PUSHORT GDT; /* 3C */
- struct _KTSS *TSS; /* 40 */
- USHORT MajorVersion; /* 44 */
- USHORT MinorVersion; /* 46 */
- KAFFINITY SetMember; /* 48 */
- ULONG StallScaleFactor; /* 4C */
- UCHAR SpareUnused; /* 50 */
- UCHAR Number; /* 51 */
-} KPCR, *PKPCR; /* 54 */
-
-#define KeGetPcr() PCR
-
-static __inline
-ULONG
-DDKAPI
-KeGetCurrentProcessorNumber(VOID)
-{
- ULONG Number;
- __asm__ __volatile__ (
- "lwz %0, %c1(12)\n"
- : "=r" (Number)
- : "i" (FIELD_OFFSET(KPCR, Number))
- );
- return Number;
-}
-
-#elif defined(_MIPS_)
-
-#error MIPS Headers are totally incorrect
-
-//
-// Used to contain PFNs and PFN counts
-//
-typedef ULONG PFN_COUNT;
-typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
-typedef LONG SPFN_NUMBER, *PSPFN_NUMBER;
-
-#define PASSIVE_LEVEL 0
-#define APC_LEVEL 1
-#define DISPATCH_LEVEL 2
-#define PROFILE_LEVEL 27
-#define IPI_LEVEL 29
-#define HIGH_LEVEL 31
-
-typedef struct _KPCR {
- struct _KPRCB *Prcb; /* 20 */
- KIRQL Irql; /* 24 */
- ULONG IRR; /* 28 */
- ULONG IDR; /* 30 */
-} KPCR, *PKPCR;
-
-#define KeGetPcr() PCR
-
-typedef struct _KFLOATING_SAVE {
-} KFLOATING_SAVE, *PKFLOATING_SAVE;
-
-static __inline
-ULONG
-DDKAPI
-KeGetCurrentProcessorNumber(VOID)
-{
- return 0;
-}
-
-#elif defined(_M_ARM)
-
-//
-// NT-ARM is not documented, need DDK-ARM
-//
-#include <armddk.h>
-
-#else
-#error Unknown architecture
-#endif
-
-/** SPINLOCK FUNCTIONS ********************************************************/
-
-#if defined (_X86_)
-
-#if defined(WIN9X_COMPAT_SPINLOCK)
-
-NTKERNELAPI
-VOID
-NTAPI
-KeInitializeSpinLock(
- IN PKSPIN_LOCK SpinLock
-);
-
-#else
-
-FORCEINLINE
-VOID
-KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
-{
- /* Clear the lock */
- *SpinLock = 0;
-}
-
-#endif
-
-NTHALAPI
-KIRQL
-FASTCALL
-KfAcquireSpinLock(
- IN PKSPIN_LOCK SpinLock);
-
-NTHALAPI
-VOID
-FASTCALL
-KfReleaseSpinLock(
- IN PKSPIN_LOCK SpinLock,
- IN KIRQL NewIrql);
-
-NTKERNELAPI
-VOID
-FASTCALL
-KefAcquireSpinLockAtDpcLevel(
- IN PKSPIN_LOCK SpinLock);
-
-NTKERNELAPI
-VOID
-FASTCALL
-KefReleaseSpinLockFromDpcLevel(
- IN PKSPIN_LOCK SpinLock);
-
-#define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock)
-#define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock)
-#define KeAcquireSpinLock(a,b) *(b) = KfAcquireSpinLock(a)
-#define KeReleaseSpinLock(a,b) KfReleaseSpinLock(a,b)
-
-#define KeGetDcacheFillSize() 1L
-
-#elif defined(_M_ARM) // !defined (_X86_)
-
- FORCEINLINE
- VOID
- KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
- {
- /* Clear the lock */
- *SpinLock = 0;
- }
-
- NTHALAPI
- KIRQL
- FASTCALL
- KfAcquireSpinLock(
- IN PKSPIN_LOCK SpinLock);
-
- NTHALAPI
- VOID
- FASTCALL
- KfReleaseSpinLock(
- IN PKSPIN_LOCK SpinLock,
- IN KIRQL NewIrql);
-
-
- NTKERNELAPI
- VOID
- FASTCALL
- KefAcquireSpinLockAtDpcLevel(
- IN PKSPIN_LOCK SpinLock);
-
- NTKERNELAPI
- VOID
- FASTCALL
- KefReleaseSpinLockFromDpcLevel(
- IN PKSPIN_LOCK SpinLock);
-
-
-#define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock)
-#define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock)
-#define KeAcquireSpinLock(a,b) *(b) = KfAcquireSpinLock(a)
-#define KeReleaseSpinLock(a,b) KfReleaseSpinLock(a,b)
-
- NTKERNELAPI
- VOID
- NTAPI
- KeInitializeSpinLock(
- IN PKSPIN_LOCK SpinLock);
-
-#else
-
-FORCEINLINE
-VOID
-NTAPI
-KeInitializeSpinLock(
- PKSPIN_LOCK SpinLock)
-{
- *SpinLock = 0;
-}
-
-NTKERNELAPI
-VOID
-KeReleaseSpinLock(
- IN PKSPIN_LOCK SpinLock,
- IN KIRQL NewIrql);
-
-NTKERNELAPI
-VOID
-KeAcquireSpinLockAtDpcLevel(
- IN PKSPIN_LOCK SpinLock);
-
-NTKERNELAPI
-VOID
-KeReleaseSpinLockFromDpcLevel(
- IN PKSPIN_LOCK SpinLock);
-
-NTKERNELAPI
-KIRQL
-KeAcquireSpinLockRaiseToDpc(
- IN PKSPIN_LOCK SpinLock);
-
-#define KeAcquireSpinLock(SpinLock, OldIrql) \
- *(OldIrql) = KeAcquireSpinLockRaiseToDpc(SpinLock)
-
-#endif // !defined (_X86_)
-
-#define ARGUMENT_PRESENT(ArgumentPointer) \
- ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL)
-
-NTSYSAPI
-VOID
-NTAPI
-RtlCopyMemory32(
- IN VOID UNALIGNED *Destination,
- IN CONST VOID UNALIGNED *Source,
- IN ULONG Length);
-
-/** Kernel routines **/
-
-#ifdef _X86_
-
-static __inline
-VOID
-KeMemoryBarrier(
- VOID)
-{
- volatile LONG Barrier;
-#if defined(__GNUC__)
- __asm__ __volatile__ ("xchg %%eax, %0" : : "m" (Barrier) :
"%eax");
-#elif defined(_MSC_VER)
- __asm xchg [Barrier], eax
-#endif
-}
-
-#endif
-
-#if !defined(_M_AMD64)
-
-NTKERNELAPI
-VOID
-NTAPI
-KeQueryTickCount(
- OUT PLARGE_INTEGER TickCount);
-#endif
-
-NTKERNELAPI
-VOID
-FASTCALL
-KeSetTimeUpdateNotifyRoutine(
- IN PTIME_UPDATE_NOTIFY_ROUTINE NotifyRoutine);
-
-#if defined(_X86_)
-
-NTHALAPI
-VOID
-FASTCALL
-KfLowerIrql(
- IN KIRQL NewIrql);
-
-NTHALAPI
-KIRQL
-FASTCALL
-KfRaiseIrql(
- IN KIRQL NewIrql);
-
-NTHALAPI
-KIRQL
-DDKAPI
-KeRaiseIrqlToDpcLevel(
- VOID);
-
-NTHALAPI
-KIRQL
-DDKAPI
-KeRaiseIrqlToSynchLevel(
- VOID);
-
-#define KeLowerIrql(a) KfLowerIrql(a)
-#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a)
-
-#elif defined(_M_AMD64)
-
-FORCEINLINE
-KIRQL
-KeGetCurrentIrql(VOID)
-{
- return (KIRQL)__readcr8();
-}
-
-FORCEINLINE
-VOID
-KeLowerIrql(IN KIRQL NewIrql)
-{
- ASSERT(KeGetCurrentIrql() >= NewIrql);
- __writecr8(NewIrql);
-}
-
-FORCEINLINE
-KIRQL
-KfRaiseIrql(IN KIRQL NewIrql)
-{
- KIRQL OldIrql;
-
- OldIrql = __readcr8();
- ASSERT(OldIrql <= NewIrql);
- __writecr8(NewIrql);
- return OldIrql;
-}
-#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a)
-
-FORCEINLINE
-KIRQL
-KeRaiseIrqlToDpcLevel(VOID)
-{
- return KfRaiseIrql(DISPATCH_LEVEL);
-}
-
-FORCEINLINE
-KIRQL
-KeRaiseIrqlToSynchLevel(VOID)
-{
- return KfRaiseIrql(12); // SYNCH_LEVEL = IPI_LEVEL - 2
-}
-
-#elif defined(__PowerPC__)
-
-NTHALAPI
-VOID
-FASTCALL
-KfLowerIrql(
- IN KIRQL NewIrql);
-
-NTHALAPI
-KIRQL
-FASTCALL
-KfRaiseIrql(
- IN KIRQL NewIrql);
-
-NTHALAPI
-KIRQL
-DDKAPI
-KeRaiseIrqlToDpcLevel(
- VOID);
-
-NTHALAPI
-KIRQL
-DDKAPI
-KeRaiseIrqlToSynchLevel(
- VOID);
-
-#define KeLowerIrql(a) KfLowerIrql(a)
-#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a)
-
-#elif defined(_M_MIPS)
-
-#define KeLowerIrql(a) KfLowerIrql(a)
-#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a)
-
-NTKERNELAPI
-VOID
-NTAPI
-KfLowerIrql(
- IN KIRQL NewIrql);
-
-NTKERNELAPI
-KIRQL
-NTAPI
-KfRaiseIrql(
- IN KIRQL NewIrql);
-
-NTKERNELAPI
-KIRQL
-NTAPI
-KeRaiseIrqlToDpcLevel(
- VOID);
-
-NTKERNELAPI
-KIRQL
-DDKAPI
-KeRaiseIrqlToSynchLevel(
- VOID);
-
-#elif defined(_M_ARM)
-
-#include <armddk.h>
-
-#else
-
-NTKERNELAPI
-VOID
-NTAPI
-KeLowerIrql(
- IN KIRQL NewIrql);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeRaiseIrql(
- IN KIRQL NewIrql,
- OUT PKIRQL OldIrql);
-
-NTKERNELAPI
-KIRQL
-NTAPI
-KeRaiseIrqlToDpcLevel(
- VOID);
-
-NTKERNELAPI
-KIRQL
-DDKAPI
-KeRaiseIrqlToSynchLevel(
- VOID);
-
-#endif
-
-/** Memory manager routines **/
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-MmMarkPhysicalMemoryAsBad(
- IN PPHYSICAL_ADDRESS StartAddress,
- IN OUT PLARGE_INTEGER NumberOfBytes);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-MmMarkPhysicalMemoryAsGood(
- IN PPHYSICAL_ADDRESS StartAddress,
- IN OUT PLARGE_INTEGER NumberOfBytes);
-
-/*
- * ULONG
- * ADDRESS_AND_SIZE_TO_SPAN_PAGES(
- * IN PVOID Va,
- * IN ULONG Size)
- */
-#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, \
- _Size) \
- ((ULONG) ((((ULONG_PTR) (_Va) & (PAGE_SIZE - 1)) \
- + (_Size) + (PAGE_SIZE - 1)) >> PAGE_SHIFT))
-
-NTKERNELAPI
-PVOID
-NTAPI
-MmLockPagableImageSection(
- IN PVOID AddressWithinSection);
-
-/*
- * PVOID
- * MmLockPagableCodeSection(
- * IN PVOID AddressWithinSection)
- */
-#define MmLockPagableCodeSection(Address) MmLockPagableDataSection(Address)
-
-NTKERNELAPI
-PVOID
-NTAPI
-MmLockPageableDataSection (
- IN PVOID AddressWithinSection
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-MmUnlockPageableImageSection(
- IN PVOID ImageSectionHandle
-);
-
-/** Object manager routines **/
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObAssignSecurity(
- IN PACCESS_STATE AccessState,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN PVOID Object,
- IN POBJECT_TYPE Type);
-
-NTKERNELAPI
-VOID
-NTAPI
-ObDereferenceSecurityDescriptor(
- PSECURITY_DESCRIPTOR SecurityDescriptor,
- ULONG Count);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObLogSecurityDescriptor(
- IN PSECURITY_DESCRIPTOR InputSecurityDescriptor,
- OUT PSECURITY_DESCRIPTOR *OutputSecurityDescriptor,
- IN ULONG RefBias);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObOpenObjectByName(
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN POBJECT_TYPE ObjectType,
- IN KPROCESSOR_MODE AccessMode,
- IN PACCESS_STATE PassedAccessState,
- IN ACCESS_MASK DesiredAccess,
- IN OUT PVOID ParseContext OPTIONAL,
- OUT PHANDLE Handle);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObReferenceObjectByName(
- IN PUNICODE_STRING ObjectPath,
- 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);
-
-NTKERNELAPI
-VOID
-NTAPI
-ObReferenceSecurityDescriptor(
- IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN ULONG Count);
-
-/** Process manager routines **/
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-PsCreateSystemProcess(
- IN PHANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes);
-
-/** NtXxx and ZwXxx routines **/
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtClose(
- IN HANDLE Handle);
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtCreateEvent(
- OUT PHANDLE EventHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN EVENT_TYPE EventType,
- IN BOOLEAN InitialState);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwCreateEvent(
- OUT PHANDLE EventHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN EVENT_TYPE EventType,
- IN BOOLEAN InitialState);
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtDeviceIoControlFile(
- IN HANDLE DeviceHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL,
- IN PVOID UserApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG IoControlCode,
- IN PVOID InputBuffer,
- IN ULONG InputBufferSize,
- OUT PVOID OutputBuffer,
- IN ULONG OutputBufferSize);
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtMapViewOfSection(
- IN HANDLE SectionHandle,
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
- IN ULONG_PTR ZeroBits,
- IN SIZE_T CommitSize,
- IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
- IN OUT PSIZE_T ViewSize,
- IN SECTION_INHERIT InheritDisposition,
- IN ULONG AllocationType,
- IN ULONG Protect);
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtOpenFile(
- OUT PHANDLE FileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG ShareAccess,
- IN ULONG OpenOptions);
-
-
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwOpenFile(
- OUT PHANDLE FileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG ShareAccess,
- IN ULONG OpenOptions);
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtReadFile(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID Buffer,
- IN ULONG Length,
- IN PLARGE_INTEGER ByteOffset OPTIONAL,
- IN PULONG Key OPTIONAL);
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtSetEvent(
- IN HANDLE EventHandle,
- OUT PLONG PreviousState OPTIONAL);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetEvent(
- IN HANDLE EventHandle,
- OUT PLONG PreviousState OPTIONAL);
-
-/* [Nt|Zw]MapViewOfSection.InheritDisposition constants */
-#define AT_EXTENDABLE_FILE 0x00002000
-#define AT_RESERVED 0x20000000
-#define AT_ROUND_TO_PAGE 0x40000000
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtUnmapViewOfSection(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress);
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtWaitForSingleObject(
- IN HANDLE ObjectHandle,
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER TimeOut OPTIONAL);
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtWriteFile(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PVOID Buffer,
- IN ULONG Length,
- IN PLARGE_INTEGER ByteOffset OPTIONAL,
- IN PULONG Key OPTIONAL);
-
-/** Power management support routines **/
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-PoRequestShutdownEvent(
- OUT PVOID *Event);
-
-/** WMI library support routines **/
-
-NTSTATUS
-NTAPI
-WmiCompleteRequest(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp,
- IN NTSTATUS Status,
- IN ULONG BufferUsed,
- IN CCHAR PriorityBoost);
-
-NTSTATUS
-NTAPI
-WmiFireEvent(
- IN PDEVICE_OBJECT DeviceObject,
- IN LPGUID Guid,
- IN ULONG InstanceIndex,
- IN ULONG EventDataSize,
- IN PVOID EventData);
-
-NTSTATUS
-NTAPI
-WmiSystemControl(
- IN PWMILIB_CONTEXT WmiLibInfo,
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp,
- OUT PSYSCTL_IRP_DISPOSITION IrpDisposition);
-
-/** Stuff from winnt4.h */
-
-#ifndef _X86_
-NTKERNELAPI
-INTERLOCKED_RESULT
-NTAPI
-ExInterlockedDecrementLong(
- IN PLONG Addend,
- IN PKSPIN_LOCK Lock);
-
-NTKERNELAPI
-ULONG
-NTAPI
-ExInterlockedExchangeUlong(
- IN PULONG Target,
- IN ULONG Value,
- IN PKSPIN_LOCK Lock);
-
-NTKERNELAPI
-INTERLOCKED_RESULT
-NTAPI
-ExInterlockedIncrementLong(
- IN PLONG Addend,
- IN PKSPIN_LOCK Lock);
-#endif
-
-NTHALAPI
-ULONG
-NTAPI
-HalGetDmaAlignmentRequirement(
- VOID);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerEqualToZero(
- IN LARGE_INTEGER Operand);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerGreaterOrEqualToZero(
- IN LARGE_INTEGER Operand);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerGreaterThan(
- IN LARGE_INTEGER Operand1,
- IN LARGE_INTEGER Operand2);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerGreaterThanOrEqualTo(
- IN LARGE_INTEGER Operand1,
- IN LARGE_INTEGER Operand2);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerGreaterThanZero(
- IN LARGE_INTEGER Operand);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerLessOrEqualToZero(
- IN LARGE_INTEGER Operand);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerLessThan(
- IN LARGE_INTEGER Operand1,
- IN LARGE_INTEGER Operand2);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerLessThanOrEqualTo(
- IN LARGE_INTEGER Operand1,
- IN LARGE_INTEGER Operand2);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerLessThanZero(
- IN LARGE_INTEGER Operand);
-
-NTSYSAPI
-LARGE_INTEGER
-NTAPI
-RtlLargeIntegerNegate(
- IN LARGE_INTEGER Subtrahend);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerNotEqualTo(
- IN LARGE_INTEGER Operand1,
- IN LARGE_INTEGER Operand2);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlLargeIntegerNotEqualToZero(
- IN LARGE_INTEGER Operand);
-
-NTSYSAPI
-LARGE_INTEGER
-NTAPI
-RtlLargeIntegerShiftLeft(
- IN LARGE_INTEGER LargeInteger,
- IN CCHAR ShiftCount);
-
-NTSYSAPI
-LARGE_INTEGER
-NTAPI
-RtlLargeIntegerShiftRight(
- IN LARGE_INTEGER LargeInteger,
- IN CCHAR ShiftCount);
-
-NTSYSAPI
-LARGE_INTEGER
-NTAPI
-RtlLargeIntegerSubtract(
- IN LARGE_INTEGER Minuend,
- IN LARGE_INTEGER Subtrahend);
-
-
-/*
- * ULONG
- * COMPUTE_PAGES_SPANNED(
- * IN PVOID Va,
- * IN ULONG Size)
- */
-#define COMPUTE_PAGES_SPANNED(Va, \
- Size) \
- (ADDRESS_AND_SIZE_TO_SPAN_PAGES(Va, Size))
-
-
-/*
-** Architecture specific structures
-*/
-
-
-#ifdef _M_ARM
-//
-// NT-ARM is not documented
-//
-#include <armddk.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __WINDDK_H */
Added: branches/header-work/include/ddk/wmlib.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wmlib.h…
==============================================================================
--- branches/header-work/include/ddk/wmlib.h (added)
+++ branches/header-work/include/ddk/wmlib.h [iso-8859-1] Fri Mar 12 17:37:33 2010
@@ -1,0 +1,107 @@
+
+#ifndef _WMILIB_
+#define _WMILIB_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _WMIGUIDREGINFO {
+ LPCGUID Guid;
+ ULONG InstanceCount;
+ ULONG Flags;
+} WMIGUIDREGINFO, *PWMIGUIDREGINFO;
+
+typedef
+NTSTATUS
+(NTAPI WMI_QUERY_REGINFO_CALLBACK)(
+ IN OUT PDEVICE_OBJECT DeviceObject,
+ IN OUT PULONG RegFlags,
+ IN OUT PUNICODE_STRING InstanceName,
+ IN OUT PUNICODE_STRING *RegistryPath OPTIONAL,
+ IN OUT PUNICODE_STRING MofResourceName,
+ OUT PDEVICE_OBJECT *Pdo OPTIONAL);
+
+typedef WMI_QUERY_REGINFO_CALLBACK *PWMI_QUERY_REGINFO;
+
+typedef
+NTSTATUS
+(NTAPI WMI_QUERY_DATABLOCK_CALLBACK)(
+ IN OUT PDEVICE_OBJECT DeviceObject,
+ IN OUT PIRP Irp,
+ IN OUT ULONG GuidIndex,
+ IN ULONG InstanceIndex,
+ IN ULONG InstanceCount,
+ OUT PULONG InstanceLengthArray OPTIONAL,
+ IN ULONG BufferAvail,
+ OUT PUCHAR Buffer OPTIONAL);
+
+typedef WMI_QUERY_DATABLOCK_CALLBACK *PWMI_QUERY_DATABLOCK;
+
+typedef
+NTSTATUS
+(NTAPI WMI_SET_DATABLOCK_CALLBACK)(
+ IN OUT PDEVICE_OBJECT DeviceObject,
+ IN OUT PIRP Irp,
+ IN ULONG GuidIndex,
+ IN ULONG InstanceIndex,
+ IN ULONG BufferSize,
+ IN PUCHAR Buffer);
+
+typedef WMI_SET_DATABLOCK_CALLBACK *PWMI_SET_DATABLOCK;
+
+typedef
+NTSTATUS
+(NTAPI WMI_SET_DATAITEM_CALLBACK)(
+ IN OUT PDEVICE_OBJECT DeviceObject,
+ IN OUT PIRP Irp,
+ IN ULONG GuidIndex,
+ IN ULONG InstanceIndex,
+ IN ULONG DataItemId,
+ IN ULONG BufferSize,
+ IN PUCHAR Buffer);
+
+typedef WMI_SET_DATAITEM_CALLBACK *PWMI_SET_DATAITEM;
+
+typedef
+NTSTATUS
+(NTAPI WMI_EXECUTE_METHOD_CALLBACK)(
+ IN OUT PDEVICE_OBJECT DeviceObject,
+ IN OUT PIRP Irp,
+ IN ULONG GuidIndex,
+ IN ULONG InstanceIndex,
+ IN ULONG MethodId,
+ IN ULONG InBufferSize,
+ IN ULONG OutBufferSize,
+ IN OUT PUCHAR Buffer);
+
+typedef WMI_EXECUTE_METHOD_CALLBACK *PWMI_EXECUTE_METHOD;
+
+typedef
+NTSTATUS
+(NTAPI WMI_FUNCTION_CONTROL_CALLBACK)(
+ IN OUT PDEVICE_OBJECT DeviceObject,
+ IN OUT PIRP Irp,
+ IN ULONG GuidIndex,
+ IN WMIENABLEDISABLECONTROL Function,
+ IN BOOLEAN Enable);
+
+typedef WMI_FUNCTION_CONTROL_CALLBACK *PWMI_FUNCTION_CONTROL;
+
+typedef struct _WMILIB_CONTEXT {
+ ULONG GuidCount;
+ PWMIGUIDREGINFO GuidList;
+ PWMI_QUERY_REGINFO QueryWmiRegInfo;
+ PWMI_QUERY_DATABLOCK QueryWmiDataBlock;
+ PWMI_SET_DATABLOCK SetWmiDataBlock;
+ PWMI_SET_DATAITEM SetWmiDataItem;
+ PWMI_EXECUTE_METHOD ExecuteWmiMethod;
+ PWMI_FUNCTION_CONTROL WmiFunctionControl;
+} WMILIB_CONTEXT, *PWMILIB_CONTEXT;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_WMILIB_ */
+
Propchange: branches/header-work/include/ddk/wmlib.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/header-work/include/ndk/obfuncs.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ndk/obfuncs…
==============================================================================
--- branches/header-work/include/ndk/obfuncs.h [iso-8859-1] (original)
+++ branches/header-work/include/ndk/obfuncs.h [iso-8859-1] Fri Mar 12 17:37:33 2010
@@ -75,10 +75,27 @@
);
NTKERNELAPI
+VOID
+NTAPI
+ObDereferenceSecurityDescriptor(
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ ULONG Count
+);
+
+NTKERNELAPI
ULONG
NTAPI
ObGetObjectPointerCount(
IN PVOID Object
+);
+
+NTKERNELAPI
+NTSTATUS
+NTAPI
+ObLogSecurityDescriptor(
+ IN PSECURITY_DESCRIPTOR InputSecurityDescriptor,
+ OUT PSECURITY_DESCRIPTOR *OutputSecurityDescriptor,
+ IN ULONG RefBias
);
NTKERNELAPI
@@ -109,6 +126,14 @@
);
NTKERNELAPI
+VOID
+NTAPI
+ObReferenceSecurityDescriptor(
+ IN PSECURITY_DESCRIPTOR SecurityDescriptor,
+ IN ULONG Count
+);
+
+NTKERNELAPI
NTSTATUS
NTAPI
ObSetSecurityObjectByPointer(
Modified: branches/header-work/include/psdk/batclass.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/batcla…
==============================================================================
--- branches/header-work/include/psdk/batclass.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/batclass.h [iso-8859-1] Fri Mar 12 17:37:33 2010
@@ -274,10 +274,10 @@
DDKAPI
BatteryClassSystemControl(
IN PVOID ClassData,
- IN PWMILIB_CONTEXT WmiLibContext,
+ IN PVOID WmiLibContext, /* PWMILIB_CONTEXT */
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
- OUT PSYSCTL_IRP_DISPOSITION Disposition);
+ OUT PVOID Disposition); /* PSYSCTL_IRP_DISPOSITION */
BCLASSAPI
NTSTATUS
Added: branches/header-work/include/psdk/dpfilter.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/dpfilt…
==============================================================================
--- branches/header-work/include/psdk/dpfilter.h (added)
+++ branches/header-work/include/psdk/dpfilter.h [iso-8859-1] Fri Mar 12 17:37:33 2010
@@ -1,0 +1,267 @@
+
+#define DPFLTR_ERROR_LEVEL 0
+#define DPFLTR_WARNING_LEVEL 1
+#define DPFLTR_TRACE_LEVEL 2
+#define DPFLTR_INFO_LEVEL 3
+#define DPFLTR_MASK 0x80000000
+
+#if 1
+typedef enum _DPFLTR_TYPE
+{
+ DPFLTR_SYSTEM_ID = 0,
+ DPFLTR_SMSS_ID = 1,
+ DPFLTR_SETUP_ID = 2,
+ DPFLTR_NTFS_ID = 3,
+ DPFLTR_FSTUB_ID = 4,
+ DPFLTR_CRASHDUMP_ID = 5,
+ DPFLTR_CDAUDIO_ID = 6,
+ DPFLTR_CDROM_ID = 7,
+ DPFLTR_CLASSPNP_ID = 8,
+ DPFLTR_DISK_ID = 9,
+ DPFLTR_REDBOOK_ID = 10,
+ DPFLTR_STORPROP_ID = 11,
+ DPFLTR_SCSIPORT_ID = 12,
+ DPFLTR_SCSIMINIPORT_ID = 13,
+ DPFLTR_CONFIG_ID = 14,
+ DPFLTR_I8042PRT_ID = 15,
+ DPFLTR_SERMOUSE_ID = 16,
+ DPFLTR_LSERMOUS_ID = 17,
+ DPFLTR_KBDHID_ID = 18,
+ DPFLTR_MOUHID_ID = 19,
+ DPFLTR_KBDCLASS_ID = 20,
+ DPFLTR_MOUCLASS_ID = 21,
+ DPFLTR_TWOTRACK_ID = 22,
+ DPFLTR_WMILIB_ID = 23,
+ DPFLTR_ACPI_ID = 24,
+ DPFLTR_AMLI_ID = 25,
+ DPFLTR_HALIA64_ID = 26,
+ DPFLTR_VIDEO_ID = 27,
+ DPFLTR_SVCHOST_ID = 28,
+ DPFLTR_VIDEOPRT_ID = 29,
+ DPFLTR_TCPIP_ID = 30,
+ DPFLTR_DMSYNTH_ID = 31,
+ DPFLTR_NTOSPNP_ID = 32,
+ DPFLTR_FASTFAT_ID = 33,
+ DPFLTR_SAMSS_ID = 34,
+ DPFLTR_PNPMGR_ID = 35,
+ DPFLTR_NETAPI_ID = 36,
+ DPFLTR_SCSERVER_ID = 37,
+ DPFLTR_SCCLIENT_ID = 38,
+ DPFLTR_SERIAL_ID = 39,
+ DPFLTR_SERENUM_ID = 40,
+ DPFLTR_UHCD_ID = 41,
+ DPFLTR_BOOTOK_ID = 42,
+ DPFLTR_BOOTVRFY_ID = 43,
+ DPFLTR_RPCPROXY_ID = 44,
+ DPFLTR_AUTOCHK_ID = 45,
+ DPFLTR_DCOMSS_ID = 46,
+ DPFLTR_UNIMODEM_ID = 47,
+ DPFLTR_SIS_ID = 48,
+ DPFLTR_FLTMGR_ID = 49,
+ DPFLTR_WMICORE_ID = 50,
+ DPFLTR_BURNENG_ID = 51,
+ DPFLTR_IMAPI_ID = 52,
+ DPFLTR_SXS_ID = 53,
+ DPFLTR_FUSION_ID = 54,
+ DPFLTR_IDLETASK_ID = 55,
+ DPFLTR_SOFTPCI_ID = 56,
+ DPFLTR_TAPE_ID = 57,
+ DPFLTR_MCHGR_ID = 58,
+ DPFLTR_IDEP_ID = 59,
+ DPFLTR_PCIIDE_ID = 60,
+ DPFLTR_FLOPPY_ID = 61,
+ DPFLTR_FDC_ID = 62,
+ DPFLTR_TERMSRV_ID = 63,
+ DPFLTR_W32TIME_ID = 64,
+ DPFLTR_PREFETCHER_ID = 65,
+ DPFLTR_RSFILTER_ID = 66,
+ DPFLTR_FCPORT_ID = 67,
+ DPFLTR_PCI_ID = 68,
+ DPFLTR_DMIO_ID = 69,
+ DPFLTR_DMCONFIG_ID = 70,
+ DPFLTR_DMADMIN_ID = 71,
+ DPFLTR_WSOCKTRANSPORT_ID = 72,
+ DPFLTR_VSS_ID = 73,
+ DPFLTR_PNPMEM_ID = 74,
+ DPFLTR_PROCESSOR_ID = 75,
+ DPFLTR_DMSERVER_ID = 76,
+ DPFLTR_SR_ID = 77,
+ DPFLTR_INFINIBAND_ID = 78,
+ DPFLTR_IHVDRIVER_ID = 79,
+ DPFLTR_IHVVIDEO_ID = 80,
+ DPFLTR_IHVAUDIO_ID = 81,
+ DPFLTR_IHVNETWORK_ID = 82,
+ DPFLTR_IHVSTREAMING_ID = 83,
+ DPFLTR_IHVBUS_ID = 84,
+ DPFLTR_HPS_ID = 85,
+ DPFLTR_RTLTHREADPOOL_ID = 86,
+ DPFLTR_LDR_ID = 87,
+ DPFLTR_TCPIP6_ID = 88,
+ DPFLTR_ISAPNP_ID = 89,
+ DPFLTR_SHPC_ID = 90,
+ DPFLTR_STORPORT_ID = 91,
+ DPFLTR_STORMINIPORT_ID = 92,
+ DPFLTR_PRINTSPOOLER_ID = 93,
+ DPFLTR_VDS_ID = 94,
+ DPFLTR_VDSBAS_ID = 95,
+ DPFLTR_VDSDYNDR_ID = 96,
+ DPFLTR_VDSUTIL_ID = 97,
+ DPFLTR_DFRGIFC_ID = 98,
+ DPFLTR_DEFAULT_ID = 99,
+ DPFLTR_MM_ID = 100,
+ DPFLTR_DFSC_ID = 101,
+ DPFLTR_WOW64_ID = 102,
+ DPFLTR_ENDOFTABLE_ID
+} DPFLTR_TYPE;
+#else
+typedef enum _DPFLTR_TYPE
+{
+ DPFLTR_SYSTEM_ID = 0,
+ DPFLTR_SMSS_ID = 1,
+ DPFLTR_SETUP_ID = 2,
+ DPFLTR_NTFS_ID = 3,
+ DPFLTR_FSTUB_ID = 4,
+ DPFLTR_CRASHDUMP_ID = 5,
+ DPFLTR_CDAUDIO_ID = 6,
+ DPFLTR_CDROM_ID = 7,
+ DPFLTR_CLASSPNP_ID = 8,
+ DPFLTR_DISK_ID = 9,
+ DPFLTR_REDBOOK_ID = 10,
+ DPFLTR_STORPROP_ID = 11,
+ DPFLTR_SCSIPORT_ID = 12,
+ DPFLTR_SCSIMINIPORT_ID = 13,
+ DPFLTR_CONFIG_ID = 14,
+ DPFLTR_I8042PRT_ID = 15,
+ DPFLTR_SERMOUSE_ID = 16,
+ DPFLTR_LSERMOUS_ID = 17,
+ DPFLTR_KBDHID_ID = 18,
+ DPFLTR_MOUHID_ID = 19,
+ DPFLTR_KBDCLASS_ID = 20,
+ DPFLTR_MOUCLASS_ID = 21,
+ DPFLTR_TWOTRACK_ID = 22,
+ DPFLTR_WMILIB_ID = 23,
+ DPFLTR_ACPI_ID = 24,
+ DPFLTR_AMLI_ID = 25,
+ DPFLTR_HALIA64_ID = 26,
+ DPFLTR_VIDEO_ID = 27,
+ DPFLTR_SVCHOST_ID = 28,
+ DPFLTR_VIDEOPRT_ID = 29,
+ DPFLTR_TCPIP_ID = 30,
+ DPFLTR_DMSYNTH_ID = 31,
+ DPFLTR_NTOSPNP_ID = 32,
+ DPFLTR_FASTFAT_ID = 33,
+ DPFLTR_SAMSS_ID = 34,
+ DPFLTR_PNPMGR_ID = 35,
+ DPFLTR_NETAPI_ID = 36,
+ DPFLTR_SCSERVER_ID = 37,
+ DPFLTR_SCCLIENT_ID = 38,
+ DPFLTR_SERIAL_ID = 39,
+ DPFLTR_SERENUM_ID = 40,
+ DPFLTR_UHCD_ID = 41,
+ DPFLTR_RPCPROXY_ID = 42,
+ DPFLTR_AUTOCHK_ID = 43,
+ DPFLTR_DCOMSS_ID = 44,
+ DPFLTR_UNIMODEM_ID = 45,
+ DPFLTR_SIS_ID = 46,
+ DPFLTR_FLTMGR_ID = 47,
+ DPFLTR_WMICORE_ID = 48,
+ DPFLTR_BURNENG_ID = 49,
+ DPFLTR_IMAPI_ID = 50,
+ DPFLTR_SXS_ID = 51,
+ DPFLTR_FUSION_ID = 52,
+ DPFLTR_IDLETASK_ID = 53,
+ DPFLTR_SOFTPCI_ID = 54,
+ DPFLTR_TAPE_ID = 55,
+ DPFLTR_MCHGR_ID = 56,
+ DPFLTR_IDEP_ID = 57,
+ DPFLTR_PCIIDE_ID = 58,
+ DPFLTR_FLOPPY_ID = 59,
+ DPFLTR_FDC_ID = 60,
+ DPFLTR_TERMSRV_ID = 61,
+ DPFLTR_W32TIME_ID = 62,
+ DPFLTR_PREFETCHER_ID = 63,
+ DPFLTR_RSFILTER_ID = 64,
+ DPFLTR_FCPORT_ID = 65,
+ DPFLTR_PCI_ID = 66,
+ DPFLTR_DMIO_ID = 67,
+ DPFLTR_DMCONFIG_ID = 68,
+ DPFLTR_DMADMIN_ID = 69,
+ DPFLTR_WSOCKTRANSPORT_ID = 70,
+ DPFLTR_VSS_ID = 71,
+ DPFLTR_PNPMEM_ID = 72,
+ DPFLTR_PROCESSOR_ID = 73,
+ DPFLTR_DMSERVER_ID = 74,
+ DPFLTR_SR_ID = 75,
+ DPFLTR_INFINIBAND_ID = 76,
+ DPFLTR_IHVDRIVER_ID = 77,
+ DPFLTR_IHVVIDEO_ID = 78,
+ DPFLTR_IHVAUDIO_ID = 79,
+ DPFLTR_IHVNETWORK_ID = 80,
+ DPFLTR_IHVSTREAMING_ID = 81,
+ DPFLTR_IHVBUS_ID = 82,
+ DPFLTR_HPS_ID = 83,
+ DPFLTR_RTLTHREADPOOL_ID = 84,
+ DPFLTR_LDR_ID = 85,
+ DPFLTR_TCPIP6_ID = 86,
+ DPFLTR_ISAPNP_ID = 87,
+ DPFLTR_SHPC_ID = 88,
+ DPFLTR_STORPORT_ID = 89,
+ DPFLTR_STORMINIPORT_ID = 90,
+ DPFLTR_PRINTSPOOLER_ID = 91,
+ DPFLTR_VSSDYNDISK_ID = 92,
+ DPFLTR_VERIFIER_ID = 93,
+ DPFLTR_VDS_ID = 94,
+ DPFLTR_VDSBAS_ID = 95,
+ DPFLTR_VDSDYN_ID = 96,
+ DPFLTR_VDSDYNDR_ID = 97,
+ DPFLTR_VDSLDR_ID = 98,
+ DPFLTR_VDSUTIL_ID = 99,
+ DPFLTR_DFRGIFC_ID = 100,
+ DPFLTR_DEFAULT_ID = 101,
+ DPFLTR_MM_ID = 102,
+ DPFLTR_DFSC_ID = 103,
+ DPFLTR_WOW64_ID = 104,
+ DPFLTR_ALPC_ID = 105,
+ DPFLTR_WDI_ID = 106,
+ DPFLTR_PERFLIB_ID = 107,
+ DPFLTR_KTM_ID = 108,
+ DPFLTR_IOSTRESS_ID = 109,
+ DPFLTR_HEAP_ID = 110,
+ DPFLTR_WHEA_ID = 111,
+ DPFLTR_USERGDI_ID = 112,
+ DPFLTR_MMCSS_ID = 113,
+ DPFLTR_TPM_ID = 114,
+ DPFLTR_THREADORDER_ID = 115,
+ DPFLTR_ENVIRON_ID = 116,
+ DPFLTR_EMS_ID = 117,
+ DPFLTR_WDT_ID = 118,
+ DPFLTR_FVEVOL_ID = 119,
+ DPFLTR_NDIS_ID = 120,
+ DPFLTR_NVCTRACE_ID = 121,
+ DPFLTR_LUAFV_ID = 122,
+ DPFLTR_APPCOMPAT_ID = 123,
+ DPFLTR_USBSTOR_ID = 124,
+ DPFLTR_SBP2PORT_ID = 125,
+ DPFLTR_COVERAGE_ID = 126,
+ DPFLTR_CACHEMGR_ID = 127,
+ DPFLTR_MOUNTMGR_ID = 128,
+ DPFLTR_CFR_ID = 129,
+ DPFLTR_TXF_ID = 130,
+ DPFLTR_KSECDD_ID = 131,
+ DPFLTR_FLTREGRESS_ID = 132,
+ DPFLTR_MPIO_ID = 133,
+ DPFLTR_MSDSM_ID = 134,
+ DPFLTR_UDFS_ID = 135,
+ DPFLTR_PSHED_ID = 136,
+ DPFLTR_STORVSP_ID = 137,
+ DPFLTR_LSASS_ID = 138,
+ DPFLTR_SSPICLI_ID = 139,
+ DPFLTR_CNG_ID = 140,
+ DPFLTR_EXFAT_ID = 141,
+ DPFLTR_FILETRACE_ID = 142,
+ DPFLTR_XSAVE_ID = 143,
+ DPFLTR_SE_ID = 144,
+ DPFLTR_DRIVEEXTENDER_ID = 145,
+ DPFLTR_ENDOFTABLE_ID
+} DPFLTR_TYPE;
+#endif
Propchange: branches/header-work/include/psdk/dpfilter.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/header-work/include/psdk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/ntdef.…
==============================================================================
--- branches/header-work/include/psdk/ntdef.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/ntdef.h [iso-8859-1] Fri Mar 12 17:37:33 2010
@@ -166,6 +166,10 @@
#undef UNALIGNED
#define UNALIGNED
#define RESTRICTED_POINTER
+
+
+#define ARGUMENT_PRESENT(ArgumentPointer) \
+ ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL)
//
// Returns the base address of a structure from a structure member
@@ -675,6 +679,13 @@
UCHAR Number;
UCHAR Reserved;
} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
+
+typedef EXCEPTION_DISPOSITION
+(DDKAPI *PEXCEPTION_ROUTINE)(
+ IN struct _EXCEPTION_RECORD *ExceptionRecord,
+ IN PVOID EstablisherFrame,
+ IN OUT struct _CONTEXT *ContextRecord,
+ IN OUT PVOID DispatcherContext);
//