- NDK compatibility fixes for MSDDK. Use NTAPI instead of STDCALL, and use NTSYSAPI instead of NTOSAPI.

- Remove some functions/types in NDK that were already documented in DDK/IFS.
- Fixup syscall structures for the table and fix protoype of KeAdd/RemoveServiceDescriptorTable.

svn path=/trunk/; revision=17651
This commit is contained in:
Alex Ionescu 2005-09-05 04:48:20 +00:00
parent 118aa9fba3
commit 51f0dfd307
25 changed files with 340 additions and 457 deletions

View file

@ -2,7 +2,7 @@
#define __SERVICES_FS_MS_MSFS_H
#include <ntifs.h>
#include <ndk/iotypes.h>
#include <ndk/ntndk.h>
/*
* FIXME: GCC doesn't have a working option for defaulting to a calling

View file

@ -13,9 +13,8 @@
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
extern ULONG NTOSAPI CcFastMdlReadWait;
extern ULONG NTOSAPI CcFastReadNotPossible;
extern ULONG NTOSAPI CcFastReadWait;
extern ULONG NTSYSAPI CcFastReadNotPossible;
extern ULONG NTSYSAPI CcFastReadWait;
/* ENUMERATIONS **************************************************************/

View file

@ -14,9 +14,9 @@
/* EXPORTED DATA *************************************************************/
#ifndef NTOS_MODE_USER
extern POBJECT_TYPE NTOSAPI ExIoCompletionType;
extern NTOSAPI POBJECT_TYPE ExMutantObjectType;
extern NTOSAPI POBJECT_TYPE ExTimerType;
extern POBJECT_TYPE NTSYSAPI ExIoCompletionType;
extern POBJECT_TYPE NTSYSAPI ExMutantObjectType;
extern POBJECT_TYPE NTSYSAPI ExTimerType;
#endif
/* CONSTANTS *****************************************************************/
@ -46,9 +46,9 @@ extern NTOSAPI POBJECT_TYPE ExTimerType;
#ifndef NTOS_MODE_USER
typedef struct _EX_QUEUE_WORKER_INFO
{
UCHAR QueueDisabled:1;
UCHAR MakeThreadsAsNecessary:1;
UCHAR WaitMode:1;
ULONG QueueDisabled:1;
ULONG MakeThreadsAsNecessary:1;
ULONG WaitMode:1;
ULONG WorkerCount:29;
} EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;

View file

@ -16,31 +16,16 @@
/* PROTOTYPES ****************************************************************/
VOID
STDCALL
HalAcquireDisplayOwnership(
IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters
);
BOOLEAN
STDCALL
NTAPI
HalQueryDisplayOwnership(VOID);
BOOLEAN
STDCALL
NTAPI
HalAllProcessorsStarted(VOID);
NTSTATUS
STDCALL
HalAllocateAdapterChannel(
IN PADAPTER_OBJECT AdapterObject,
IN PWAIT_CONTEXT_BLOCK WaitContextBlock,
IN ULONG NumberOfMapRegisters,
IN PDRIVER_CONTROL ExecutionRoutine
);
BOOLEAN
STDCALL
NTAPI
HalBeginSystemInterrupt(
ULONG Vector,
KIRQL Irql,
@ -48,20 +33,20 @@ HalBeginSystemInterrupt(
);
BOOLEAN
STDCALL
NTAPI
HalDisableSystemInterrupt(
ULONG Vector,
KIRQL Irql
);
VOID
STDCALL
NTAPI
HalDisplayString (
IN PCHAR String
);
BOOLEAN
STDCALL
NTAPI
HalEnableSystemInterrupt(
ULONG Vector,
KIRQL Irql,
@ -69,14 +54,14 @@ HalEnableSystemInterrupt(
);
VOID
STDCALL
NTAPI
HalEndSystemInterrupt(
KIRQL Irql,
ULONG Vector
);
BOOLEAN
STDCALL
NTAPI
HalGetEnvironmentVariable(
PCH Name,
PCH Value,
@ -84,25 +69,25 @@ HalGetEnvironmentVariable(
);
VOID
STDCALL
NTAPI
HalInitializeProcessor(
ULONG ProcessorNumber,
PVOID ProcessorStack
);
BOOLEAN
STDCALL
NTAPI
HalInitSystem(
ULONG BootPhase,
PLOADER_PARAMETER_BLOCK LoaderBlock
);
BOOLEAN
STDCALL
NTAPI
HalQueryDisplayOwnership(VOID);
VOID
STDCALL
NTAPI
HalReportResourceUsage(VOID);
VOID
@ -112,37 +97,37 @@ HalRequestSoftwareInterrupt(
);
VOID
STDCALL
NTAPI
HalReleaseDisplayOwnership(VOID);
VOID
STDCALL
NTAPI
HalReturnToFirmware(
FIRMWARE_REENTRY Action
);
VOID
STDCALL
NTAPI
HalRequestIpi(
ULONG Unknown
);
BOOLEAN
STDCALL
NTAPI
HalSetEnvironmentVariable(
IN PCH Name,
IN PCH Value
);
BOOLEAN
STDCALL
NTAPI
HalStartNextProcessor(
ULONG Unknown1,
ULONG Unknown2
);
VOID
STDCALL
NTAPI
IoAssignDriveLetters(
struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
PSTRING NtDeviceName,

View file

@ -12,7 +12,7 @@
/* DEPENDENCIES **************************************************************/
/* EXPORTED DATA *************************************************************/
extern ULONG NTOSAPI KdComPortInUse;
extern ULONG NTSYSAPI KdComPortInUse;
/* CONSTANTS *****************************************************************/
@ -50,9 +50,9 @@ typedef struct _HAL_PRIVATE_DISPATCH
} HAL_PRIVATE_DISPATCH, *PHAL_PRIVATE_DISPATCH;
#ifdef __NTOSKRNL__
extern NTOSAPI HAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
extern HAL_PRIVATE_DISPATCH NTSYSAPI HalPrivateDispatchTable;
#else
extern NTOSAPI PHAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
extern PHAL_PRIVATE_DISPATCH NTSYSAPI HalPrivateDispatchTable;
#endif
#define HAL_PRIVATE_DISPATCH_VERSION 1

View file

@ -117,29 +117,29 @@ typedef struct _KTRAP_FRAME
typedef struct _LDT_ENTRY
{
WORD LimitLow;
WORD BaseLow;
USHORT LimitLow;
USHORT BaseLow;
union
{
struct
{
BYTE BaseMid;
BYTE Flags1;
BYTE Flags2;
BYTE BaseHi;
UCHAR BaseMid;
UCHAR Flags1;
UCHAR Flags2;
UCHAR BaseHi;
} Bytes;
struct
{
DWORD BaseMid : 8;
DWORD Type : 5;
DWORD Dpl : 2;
DWORD Pres : 1;
DWORD LimitHi : 4;
DWORD Sys : 1;
DWORD Reserved_0 : 1;
DWORD Default_Big : 1;
DWORD Granularity : 1;
DWORD BaseHi : 8;
ULONG BaseMid : 8;
ULONG Type : 5;
ULONG Dpl : 2;
ULONG Pres : 1;
ULONG LimitHi : 4;
ULONG Sys : 1;
ULONG Reserved_0 : 1;
ULONG Default_Big : 1;
ULONG Granularity : 1;
ULONG BaseHi : 8;
} Bits;
} HighWord;
} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
@ -216,28 +216,28 @@ typedef struct _HARDWARE_PTE_X86
typedef struct _DESCRIPTOR
{
WORD Pad;
WORD Limit;
DWORD Base;
USHORT Pad;
USHORT Limit;
ULONG Base;
} KDESCRIPTOR, *PKDESCRIPTOR;
typedef struct _KSPECIAL_REGISTERS
{
DWORD Cr0;
DWORD Cr2;
DWORD Cr3;
DWORD Cr4;
DWORD KernelDr0;
DWORD KernelDr1;
DWORD KernelDr2;
DWORD KernelDr3;
DWORD KernelDr6;
DWORD KernelDr7;
ULONG Cr0;
ULONG Cr2;
ULONG Cr3;
ULONG Cr4;
ULONG KernelDr0;
ULONG KernelDr1;
ULONG KernelDr2;
ULONG KernelDr3;
ULONG KernelDr6;
ULONG KernelDr7;
KDESCRIPTOR Gdtr;
KDESCRIPTOR Idtr;
WORD Tr;
WORD Ldtr;
DWORD Reserved[6];
USHORT Tr;
USHORT Ldtr;
ULONG Reserved[6];
} KSPECIAL_REGISTERS, *PKSPECIAL_REGISTERS;
#pragma pack(push,4)
@ -384,32 +384,45 @@ typedef struct _KPRCB
*/
typedef struct _KIPCR
{
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 SparedUnused; /* 50 */
UCHAR Number; /* 51 */
UCHAR Reserved; /* 52 */
UCHAR L2CacheAssociativity; /* 53 */
ULONG VdmAlert; /* 54 */
ULONG KernelReserved[14]; /* 58 */
ULONG L2CacheSize; /* 90 */
ULONG HalReserved[16]; /* 94 */
ULONG InterruptMode; /* D4 */
UCHAR KernelReserved2[0x48]; /* D8 */
KPRCB PrcbData; /* 120 */
union
{
NT_TIB NtTib;
struct
{
struct _EXCEPTION_REGISTRATION_RECORD *Used_ExceptionList;
PVOID Used_StackBase;
PVOID PerfGlobalGroupMask;
PVOID TssCopy;
ULONG ContextSwitches;
KAFFINITY SetMemberCopy;
PVOID Used_Self;
};
};
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 SparedUnused; /* 50 */
UCHAR Number; /* 51 */
UCHAR Reserved; /* 52 */
UCHAR L2CacheAssociativity; /* 53 */
ULONG VdmAlert; /* 54 */
ULONG KernelReserved[14]; /* 58 */
ULONG L2CacheSize; /* 90 */
ULONG HalReserved[16]; /* 94 */
ULONG InterruptMode; /* D4 */
UCHAR KernelReserved2[0x48]; /* D8 */
KPRCB PrcbData; /* 120 */
} KIPCR, *PKIPCR;
#pragma pack(pop)
@ -507,9 +520,6 @@ typedef struct _KTSS
#include <poppack.h>
/* i386 Doesn't have Exception Frames */
typedef struct _KEXCEPTION_FRAME
{
} KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
typedef struct _KEXCEPTION_FRAME KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
#endif

View file

@ -16,53 +16,53 @@
/* PROTOTYPES ****************************************************************/
VOID
STDCALL
NTAPI
InbvAcquireDisplayOwnership(VOID);
BOOLEAN
STDCALL
NTAPI
InbvCheckDisplayOwnership(VOID);
BOOLEAN
STDCALL
NTAPI
InbvDisplayString(
IN PCHAR String
);
VOID
STDCALL
NTAPI
InbvEnableBootDriver(
IN BOOLEAN Enable
);
BOOLEAN
STDCALL
NTAPI
InbvEnableDisplayString(
IN BOOLEAN Enable
);
VOID
STDCALL
NTAPI
InbvInstallDisplayStringFilter(
IN PVOID Unknown
);
BOOLEAN
STDCALL
NTAPI
InbvIsBootDriverInstalled(VOID);
VOID
STDCALL
NTAPI
InbvNotifyDisplayOwnershipLost(
IN PVOID Callback
);
BOOLEAN
STDCALL
NTAPI
InbvResetDisplay(VOID);
VOID
STDCALL
NTAPI
InbvSetScrollRegion(
IN ULONG Left,
IN ULONG Top,
@ -71,13 +71,13 @@ InbvSetScrollRegion(
);
VOID
STDCALL
NTAPI
InbvSetTextColor(
IN ULONG Color
);
VOID
STDCALL
NTAPI
InbvSolidColorFill(
IN ULONG Left,
IN ULONG Top,
@ -87,15 +87,15 @@ InbvSolidColorFill(
);
VOID
STDCALL
NTAPI
VidCleanUp(VOID);
BOOL
STDCALL
BOOLEAN
NTAPI
VidResetDisplay(VOID);
BOOLEAN
STDCALL
NTAPI
VidIsBootDriverInstalled(VOID);
#endif

View file

@ -14,79 +14,79 @@
/* PROTOTYPES ****************************************************************/
BYTE
STDCALL
UCHAR
NTAPI
KdPollBreakIn(VOID);
BOOLEAN
STDCALL
NTAPI
KdPortInitialize(
PKD_PORT_INFORMATION PortInformation,
DWORD Unknown1,
DWORD Unknown2
ULONG Unknown1,
ULONG Unknown2
);
BOOLEAN
STDCALL
NTAPI
KdPortInitializeEx(
PKD_PORT_INFORMATION PortInformation,
DWORD Unknown1,
DWORD Unknown2
ULONG Unknown1,
ULONG Unknown2
);
BOOLEAN
STDCALL
NTAPI
KdPortGetByte(
PUCHAR ByteRecieved
);
BOOLEAN
STDCALL
NTAPI
KdPortGetByteEx(
PKD_PORT_INFORMATION PortInformation,
PUCHAR ByteRecieved
);
BOOLEAN
STDCALL
NTAPI
KdPortPollByte(
PUCHAR ByteRecieved
);
BOOLEAN
STDCALL
NTAPI
KdPortPollByteEx(
PKD_PORT_INFORMATION PortInformation,
PUCHAR ByteRecieved
);
VOID
STDCALL
NTAPI
KdPortPutByte(
UCHAR ByteToSend
);
VOID
STDCALL
NTAPI
KdPortPutByteEx(
PKD_PORT_INFORMATION PortInformation,
UCHAR ByteToSend
);
VOID
STDCALL
NTAPI
KdPortRestore(VOID);
VOID
STDCALL
NTAPI
KdPortSave (VOID);
BOOLEAN
STDCALL
NTAPI
KdPortDisableInterrupts(VOID);
BOOLEAN
STDCALL
NTAPI
KdPortEnableInterrupts(VOID);
#endif

View file

@ -14,8 +14,18 @@
/* PROTOTYPES ****************************************************************/
BOOLEAN
NTAPI
KeAddSystemServiceTable(
PULONG_PTR Base,
PULONG Count OPTIONAL,
ULONG Limit,
PUCHAR Number,
ULONG Index
);
VOID
STDCALL
NTAPI
KeInitializeApc(
IN PKAPC Apc,
IN PKTHREAD Thread,
@ -28,7 +38,7 @@ KeInitializeApc(
);
VOID
STDCALL
NTAPI
KeEnterKernelDebugger(VOID);
VOID
@ -44,7 +54,7 @@ KiReleaseSpinLock(
);
VOID
STDCALL
NTAPI
KiDeliverApc(
IN KPROCESSOR_MODE PreviousMode,
IN PVOID Reserved,
@ -52,81 +62,34 @@ KiDeliverApc(
);
VOID
STDCALL
NTAPI
KiDispatchInterrupt(VOID);
BOOLEAN
STDCALL
KeAreApcsDisabled(
VOID
);
VOID
STDCALL
KeFlushQueuedDpcs(
VOID
);
ULONG
STDCALL
KeGetRecommendedSharedDataAlignment(
VOID
);
ULONG
STDCALL
KeQueryRuntimeThread(
IN PKTHREAD Thread,
OUT PULONG UserTime
);
BOOLEAN
STDCALL
KeSetKernelStackSwapEnable(
IN BOOLEAN Enable
);
BOOLEAN
STDCALL
KeDeregisterBugCheckReasonCallback(
IN PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord
);
BOOLEAN
STDCALL
KeRegisterBugCheckReasonCallback(
IN PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord,
IN PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine,
IN KBUGCHECK_CALLBACK_REASON Reason,
IN PUCHAR Component
);
VOID
STDCALL
NTAPI
KeTerminateThread(
IN KPRIORITY Increment
);
BOOLEAN
STDCALL
NTAPI
KeIsAttachedProcess(VOID);
BOOLEAN
STDCALL
NTAPI
KeIsExecutingDpc(
VOID
);
VOID
STDCALL
NTAPI
KeSetEventBoostPriority(
IN PKEVENT Event,
IN PKTHREAD *Thread OPTIONAL
);
PCONFIGURATION_COMPONENT_DATA
STDCALL
NTAPI
KeFindConfigurationNextEntry(
IN PCONFIGURATION_COMPONENT_DATA Child,
IN CONFIGURATION_CLASS Class,
@ -136,7 +99,7 @@ KeFindConfigurationNextEntry(
);
PCONFIGURATION_COMPONENT_DATA
STDCALL
NTAPI
KeFindConfigurationEntry(
IN PCONFIGURATION_COMPONENT_DATA Child,
IN CONFIGURATION_CLASS Class,
@ -145,57 +108,45 @@ KeFindConfigurationEntry(
);
VOID
STDCALL
NTAPI
KeFlushEntireTb(
IN BOOLEAN Unknown,
IN BOOLEAN CurrentCpuOnly
);
VOID
STDCALL
KeRevertToUserAffinityThread(
VOID
);
VOID
STDCALL
NTAPI
KiCoprocessorError(
VOID
);
VOID
STDCALL
NTAPI
KiUnexpectedInterrupt(
VOID
);
VOID
STDCALL
NTAPI
KeSetDmaIoCoherency(
IN ULONG Coherency
);
VOID
STDCALL
NTAPI
KeSetProfileIrql(
IN KIRQL ProfileIrql
);
NTSTATUS
STDCALL
NTAPI
KeSetAffinityThread(
PKTHREAD Thread,
KAFFINITY Affinity
);
VOID
STDCALL
KeSetSystemAffinityThread(
IN KAFFINITY Affinity
);
NTSTATUS
STDCALL
NTAPI
KeUserModeCallback(
IN ULONG FunctionID,
IN PVOID InputBuffer,
@ -205,14 +156,14 @@ KeUserModeCallback(
);
VOID
STDCALL
NTAPI
KeSetTimeIncrement(
IN ULONG MaxIncrement,
IN ULONG MinIncrement
);
VOID
STDCALL
NTAPI
KeInitializeInterrupt(
PKINTERRUPT InterruptObject,
PKSERVICE_ROUTINE ServiceRoutine,
@ -228,19 +179,19 @@ KeInitializeInterrupt(
);
BOOLEAN
STDCALL
NTAPI
KeConnectInterrupt(
PKINTERRUPT InterruptObject
);
BOOLEAN
STDCALL
NTAPI
KeDisconnectInterrupt(
PKINTERRUPT InterruptObject
);
PKPROCESS
STDCALL
NTAPI
KeGetCurrentProcess(
VOID
);
@ -252,36 +203,10 @@ KeSetGdtSelector(
ULONG Value2
);
LONG
STDCALL
KeReadStateMutant(
IN PKMUTANT Mutant
);
VOID
STDCALL
KeInitializeMutant(
IN PKMUTANT Mutant,
IN BOOLEAN InitialOwner
);
LONG
STDCALL
KeReleaseMutant(
IN PKMUTANT Mutant,
IN KPRIORITY Increment,
IN BOOLEAN Abandon,
IN BOOLEAN Wait
);
NTSTATUS
STDCALL
NTAPI
KeRaiseUserException(
IN NTSTATUS ExceptionCode
);
VOID
STDCALL
KeFlushWriteBuffer(VOID);
#endif

View file

@ -19,28 +19,11 @@
#define SSDT_MAX_ENTRIES 4
#define PROCESSOR_FEATURE_MAX 64
#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
#define THREAD_WAIT_OBJECTS 4
#define THREAD_ALERT 0x4
#ifdef NTOS_MODE_USER
#define SharedUserData ((KUSER_SHARED_DATA * CONST) USER_SHARED_DATA)
#endif
/* EXPORTED DATA *************************************************************/
#ifndef NTOS_MODE_USER
extern CHAR NTOSAPI KeNumberProcessors;
extern LOADER_PARAMETER_BLOCK NTOSAPI KeLoaderBlock;
extern ULONG NTOSAPI KeDcacheFlushCount;
extern ULONG NTOSAPI KeIcacheFlushCount;
extern KAFFINITY NTOSAPI KeActiveProcessors;
extern ULONG NTOSAPI KiDmaIoCoherency; /* RISC Architectures only */
extern ULONG NTOSAPI KeMaximumIncrement;
extern ULONG NTOSAPI KeMinimumIncrement;
extern ULONG NTOSAPI NtBuildNumber;
extern SSDT_ENTRY NTOSAPI KeServiceDescriptorTable[SSDT_MAX_ENTRIES];
extern SSDT_ENTRY NTOSAPI KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES];
#endif
/* ENUMERATIONS **************************************************************/
#ifdef NTOS_MODE_USER
@ -166,6 +149,7 @@ typedef enum _KTHREAD_STATE
/* FUNCTION TYPES ************************************************************/
#ifdef NTOS_MODE_USER
typedef VOID
(NTAPI *PKNORMAL_ROUTINE)(
IN PVOID NormalContext,
@ -177,6 +161,7 @@ typedef VOID
IN PVOID TimerContext,
IN ULONG TimerLowValue,
IN LONG TimerHighValue);
#endif
/* TYPES *********************************************************************/
@ -486,6 +471,32 @@ typedef struct _KPROCESS
ULONG StackCount; /* 06C */
LIST_ENTRY ProcessListEntry; /* 070 */
} KPROCESS;
typedef struct _KSERVICE_TABLE_DESCRIPTOR
{
PULONG_PTR Base;
PULONG Count;
ULONG Limit;
#if defined(_IA64_)
LONG TableBaseGpOffset;
#endif
PUCHAR Number;
} KSERVICE_TABLE_DESCRIPTOR, *PKSERVICE_TABLE_DESCRIPTOR;
#endif /* !NTOS_MODE_USER */
/* EXPORTED DATA *************************************************************/
#ifndef NTOS_MODE_USER
extern CHAR NTSYSAPI KeNumberProcessors;
extern LOADER_PARAMETER_BLOCK NTSYSAPI KeLoaderBlock;
extern ULONG NTSYSAPI KeDcacheFlushCount;
extern ULONG NTSYSAPI KeIcacheFlushCount;
extern KAFFINITY NTSYSAPI KeActiveProcessors;
extern ULONG NTSYSAPI KiDmaIoCoherency; /* RISC Architectures only */
extern ULONG NTSYSAPI KeMaximumIncrement;
extern ULONG NTSYSAPI KeMinimumIncrement;
extern ULONG NTSYSAPI NtBuildNumber;
extern KSERVICE_TABLE_DESCRIPTOR NTSYSAPI KeServiceDescriptorTable[SSDT_MAX_ENTRIES];
extern KSERVICE_TABLE_DESCRIPTOR NTSYSAPI KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES];
#endif
#endif

View file

@ -17,7 +17,7 @@
/* PROTOTYPES ****************************************************************/
NTSTATUS
STDCALL
NTAPI
LdrAccessResource(
IN PVOID BaseAddress,
IN PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry,
@ -26,7 +26,7 @@ LdrAccessResource(
);
NTSTATUS
STDCALL
NTAPI
LdrFindResource_U(
IN PVOID BaseAddress,
IN PLDR_RESOURCE_INFO ResourceInfo,
@ -35,7 +35,7 @@ LdrFindResource_U(
);
NTSTATUS
STDCALL
NTAPI
LdrFindResourceDirectory_U(
IN PVOID BaseAddress,
IN PLDR_RESOURCE_INFO ResourceInfo,
@ -44,7 +44,7 @@ LdrFindResourceDirectory_U(
);
NTSTATUS
STDCALL
NTAPI
LdrGetProcedureAddress(
IN PVOID BaseAddress,
IN PANSI_STRING Name,

View file

@ -14,7 +14,7 @@
/* PROTOTYPES ****************************************************************/
NTSTATUS
STDCALL
NTAPI
MmUnmapViewOfSection(
struct _EPROCESS* Process,
PVOID BaseAddress

View file

@ -16,7 +16,7 @@
/* PROTOTYPES ****************************************************************/
NTSTATUS
STDCALL
NTAPI
ObCreateObject (
IN KPROCESSOR_MODE ObjectAttributesAccessMode OPTIONAL,
IN POBJECT_TYPE ObjectType,
@ -30,58 +30,13 @@ ObCreateObject (
);
ULONG
STDCALL
NTAPI
ObGetObjectPointerCount (
IN PVOID Object
);
NTSTATUS
STDCALL
ObInsertObject (
IN PVOID Object,
IN PACCESS_STATE PassedAccessState OPTIONAL,
IN ACCESS_MASK DesiredAccess,
IN ULONG AdditionalReferences,
OUT PVOID *ReferencedObject OPTIONAL,
OUT PHANDLE Handle
);
VOID
STDCALL
ObMakeTemporaryObject (
IN PVOID Object
);
NTSTATUS
STDCALL
ObOpenObjectByPointer (
IN PVOID Object,
IN ULONG HandleAttributes,
IN PACCESS_STATE PassedAccessState OPTIONAL,
IN ACCESS_MASK DesiredAccess OPTIONAL,
IN POBJECT_TYPE ObjectType OPTIONAL,
IN KPROCESSOR_MODE AccessMode,
OUT PHANDLE Handle
);
NTSTATUS
STDCALL
ObQueryNameString (
IN PVOID Object,
OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
IN ULONG Length,
OUT PULONG ReturnLength
);
NTSTATUS
STDCALL
ObQueryObjectAuditingByHandle (
IN HANDLE Handle,
OUT PBOOLEAN GenerateOnClose
);
NTSTATUS
STDCALL
NTAPI
ObReferenceObjectByName (
IN PUNICODE_STRING ObjectName,
IN ULONG Attributes,
@ -94,7 +49,7 @@ ObReferenceObjectByName (
);
NTSTATUS
STDCALL
NTAPI
ObFindHandleForObject(
IN PEPROCESS Process,
IN PVOID Object,

View file

@ -76,7 +76,7 @@ typedef enum _OB_OPEN_REASON
/* Object Callbacks FIXME: Update these soon */
typedef NTSTATUS
(STDCALL *OB_OPEN_METHOD)(
(NTAPI *OB_OPEN_METHOD)(
OB_OPEN_REASON Reason,
PVOID ObjectBody,
PEPROCESS Process,
@ -85,7 +85,7 @@ typedef NTSTATUS
);
typedef NTSTATUS
(STDCALL *OB_PARSE_METHOD)(
(NTAPI *OB_PARSE_METHOD)(
PVOID Object,
PVOID *NextObject,
PUNICODE_STRING FullPath,
@ -94,24 +94,24 @@ typedef NTSTATUS
);
typedef VOID
(STDCALL *OB_DELETE_METHOD)(
(NTAPI *OB_DELETE_METHOD)(
PVOID DeletedObject
);
typedef VOID
(STDCALL *OB_CLOSE_METHOD)(
(NTAPI *OB_CLOSE_METHOD)(
PVOID ClosedObject,
ULONG HandleCount
);
typedef VOID
(STDCALL *OB_DUMP_METHOD)(VOID);
(NTAPI *OB_DUMP_METHOD)(VOID);
typedef NTSTATUS
(STDCALL *OB_OKAYTOCLOSE_METHOD)(VOID);
(NTAPI *OB_OKAYTOCLOSE_METHOD)(VOID);
typedef NTSTATUS
(STDCALL *OB_QUERYNAME_METHOD)(
(NTAPI *OB_QUERYNAME_METHOD)(
PVOID ObjectBody,
POBJECT_NAME_INFORMATION ObjectNameInfo,
ULONG Length,
@ -119,14 +119,14 @@ typedef NTSTATUS
);
typedef PVOID
(STDCALL *OB_FIND_METHOD)(
(NTAPI *OB_FIND_METHOD)(
PVOID WinStaObject,
PWSTR Name,
ULONG Attributes
);
typedef NTSTATUS
(STDCALL *OB_SECURITY_METHOD)(
(NTAPI *OB_SECURITY_METHOD)(
PVOID Object,
SECURITY_OPERATION_CODE OperationType,
SECURITY_INFORMATION SecurityInformation,
@ -139,7 +139,7 @@ typedef NTSTATUS
/* FIXME: TEMPORARY HACK */
typedef NTSTATUS
(STDCALL *OB_CREATE_METHOD)(
(NTAPI *OB_CREATE_METHOD)(
PVOID ObjectBody,
PVOID Parent,
PWSTR RemainingPath,
@ -197,7 +197,7 @@ typedef struct _OBJECT_CREATE_INFORMATION
typedef struct _OBJECT_TYPE_INITIALIZER
{
WORD Length;
USHORT Length;
UCHAR UseDefaultObject;
UCHAR CaseInsensitive;
ULONG InvalidAttributes;
@ -264,15 +264,6 @@ typedef struct _OBJECT_HEADER_CREATOR_INFO
USHORT Reserved;
} OBJECT_HEADER_CREATOR_INFO, *POBJECT_HEADER_CREATOR_INFO;
typedef struct _QUAD
{
union
{
LONGLONG UseThisFieldToCopy;
float DoNotUseThisField;
};
} QUAD, *PQUAD;
typedef struct _OBJECT_HEADER
{
LIST_ENTRY Entry; /* FIXME: REMOVE THIS SOON */
@ -328,8 +319,8 @@ typedef struct _DEVICE_MAP
/* EXPORTED DATA *************************************************************/
extern NTOSAPI POBJECT_TYPE ObDirectoryType;
extern NTOSAPI PDEVICE_MAP ObSystemDeviceMap;
extern POBJECT_TYPE NTSYSAPI ObDirectoryType;
extern PDEVICE_MAP NTSYSAPI ObSystemDeviceMap;
#endif
#endif

View file

@ -10,7 +10,7 @@
#define _POTYPES_H
/* DEPENDENCIES **************************************************************/
#include <ddk/ntpoapi.h>
#include <ntpoapi.h>
/* EXPORTED DATA *************************************************************/

View file

@ -14,58 +14,58 @@
/* PROTOTYPES ****************************************************************/
struct _W32THREAD* STDCALL
struct _W32THREAD* NTAPI
PsGetWin32Thread(VOID);
struct _W32PROCESS* STDCALL
struct _W32PROCESS* NTAPI
PsGetWin32Process(VOID);
PVOID
STDCALL
NTAPI
PsGetProcessWin32Process(PEPROCESS Process);
VOID
STDCALL
NTAPI
PsSetProcessWin32Process(
PEPROCESS Process,
PVOID Win32Process
);
VOID
STDCALL
NTAPI
PsSetThreadWin32Thread(
PETHREAD Thread,
PVOID Win32Thread
);
PVOID
STDCALL
NTAPI
PsGetThreadWin32Thread(PETHREAD Thread);
VOID
STDCALL
NTAPI
PsRevertThreadToSelf(
IN struct _ETHREAD* Thread
);
struct _W32THREAD*
STDCALL
NTAPI
PsGetWin32Thread(
VOID
);
struct _W32PROCESS*
STDCALL
NTAPI
PsGetWin32Process(
VOID
);
VOID
STDCALL
NTAPI
PsEstablishWin32Callouts(PW32_CALLOUT_DATA CalloutData);
HANDLE
STDCALL
NTAPI
PsGetProcessId(struct _EPROCESS *Process);
#endif

View file

@ -21,9 +21,8 @@
/* EXPORTED DATA *************************************************************/
#ifndef NTOS_MODE_USER
extern NTOSAPI struct _EPROCESS* PsInitialSystemProcess;
extern NTOSAPI POBJECT_TYPE PsProcessType;
extern NTOSAPI POBJECT_TYPE PsThreadType;
extern NTSYSAPI struct _EPROCESS* PsInitialSystemProcess;
extern NTSYSAPI POBJECT_TYPE PsProcessType;
#endif
/* CONSTANTS *****************************************************************/
@ -643,15 +642,15 @@ typedef struct _EPROCESS
#include <pshpack1.h>
typedef struct _PS_JOB_TOKEN_FILTER
{
UINT CapturedSidCount;
ULONG CapturedSidCount;
PSID_AND_ATTRIBUTES CapturedSids;
UINT CapturedSidsLength;
UINT CapturedGroupCount;
ULONG CapturedSidsLength;
ULONG CapturedGroupCount;
PSID_AND_ATTRIBUTES CapturedGroups;
UINT CapturedGroupsLength;
UINT CapturedPrivilegeCount;
ULONG CapturedGroupsLength;
ULONG CapturedPrivilegeCount;
PLUID_AND_ATTRIBUTES CapturedPrivileges;
UINT CapturedPrivilegesLength;
ULONG CapturedPrivilegesLength;
} PS_JOB_TOKEN_FILTER, *PPS_JOB_TOKEN_FILTER;
typedef struct _EJOB
@ -664,27 +663,27 @@ typedef struct _EJOB
LARGE_INTEGER TotalKernelTime;
LARGE_INTEGER ThisPeriodTotalUserTime;
LARGE_INTEGER ThisPeriodTotalKernelTime;
UINT TotalPageFaultCount;
UINT TotalProcesses;
UINT ActiveProcesses;
UINT TotalTerminatedProcesses;
ULONG TotalPageFaultCount;
ULONG TotalProcesses;
ULONG ActiveProcesses;
ULONG TotalTerminatedProcesses;
LARGE_INTEGER PerProcessUserTimeLimit;
LARGE_INTEGER PerJobUserTimeLimit;
UINT LimitFlags;
UINT MinimumWorkingSetSize;
UINT MaximumWorkingSetSize;
UINT ActiveProcessLimit;
UINT Affinity;
BYTE PriorityClass;
UINT UIRestrictionsClass;
UINT SecurityLimitFlags;
ULONG LimitFlags;
ULONG MinimumWorkingSetSize;
ULONG MaximumWorkingSetSize;
ULONG ActiveProcessLimit;
ULONG Affinity;
UCHAR PriorityClass;
ULONG UIRestrictionsClass;
ULONG SecurityLimitFlags;
PVOID Token;
PPS_JOB_TOKEN_FILTER Filter;
UINT EndOfJobTimeAction;
ULONG EndOfJobTimeAction;
PVOID CompletionPort;
PVOID CompletionKey;
UINT SessionId;
UINT SchedulingClass;
ULONG SessionId;
ULONG SchedulingClass;
ULONGLONG ReadOperationCount;
ULONGLONG WriteOperationCount;
ULONGLONG OtherOperationCount;
@ -692,11 +691,11 @@ typedef struct _EJOB
ULONGLONG WriteTransferCount;
ULONGLONG OtherTransferCount;
IO_COUNTERS IoInfo;
UINT ProcessMemoryLimit;
UINT JobMemoryLimit;
UINT PeakProcessMemoryUsed;
UINT PeakJobMemoryUsed;
UINT CurrentJobMemoryUsed;
ULONG ProcessMemoryLimit;
ULONG JobMemoryLimit;
ULONG PeakProcessMemoryUsed;
ULONG PeakJobMemoryUsed;
ULONG CurrentJobMemoryUsed;
KGUARDED_MUTEX MemoryLimitsLock;
ULONG MemberLevel;
ULONG JobFlags;

View file

@ -16,7 +16,7 @@
/* PROTOTYPES ****************************************************************/
NTSTATUS
STDCALL
NTAPI
SeCaptureSecurityDescriptor(
IN PSECURITY_DESCRIPTOR OriginalSecurityDescriptor,
IN KPROCESSOR_MODE CurrentMode,
@ -26,7 +26,7 @@ SeCaptureSecurityDescriptor(
);
NTSTATUS
STDCALL
NTAPI
SeCreateAccessState(
PACCESS_STATE AccessState,
PAUX_DATA AuxData,
@ -35,11 +35,11 @@ SeCreateAccessState(
);
VOID
STDCALL
NTAPI
SeDeleteAccessState(IN PACCESS_STATE AccessState);
NTSTATUS
STDCALL
NTAPI
SeReleaseSecurityDescriptor(
IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor,
IN KPROCESSOR_MODE CurrentMode,
@ -47,14 +47,14 @@ SeReleaseSecurityDescriptor(
);
VOID
STDCALL
NTAPI
SeSetAccessStateGenericMapping(
IN PACCESS_STATE AccessState,
IN PGENERIC_MAPPING GenericMapping
);
SECURITY_IMPERSONATION_LEVEL
STDCALL
NTAPI
SeTokenImpersonationLevel(
IN PACCESS_TOKEN Token
);

View file

@ -77,7 +77,6 @@ typedef struct _SEP_AUDIT_POLICY
};
} SEP_AUDIT_POLICY, *PSEP_AUDIT_POLICY;
#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01
typedef struct _TOKEN
{
TOKEN_SOURCE TokenSource; /* 0x00 */

View file

@ -10,6 +10,7 @@
/* We are the Kernel */
#define NTKERNELAPI
#define _NTSYSTEM_
/* DDK/IFS/NDK Headers */
#include <ddk/ntddk.h>

View file

@ -187,7 +187,7 @@ KePrepareForApplicationProcessorInit(ULONG Id)
memset(Pcr, 0, PAGE_SIZE);
Pcr->Number = Id;
Pcr->SetMember = 1 << Id;
Pcr->Tib.Self = &Pcr->Tib;
Pcr->NtTib.Self = &Pcr->NtTib;
Pcr->Self = (PKPCR)Pcr;
Pcr->Prcb = &Pcr->PrcbData;
Pcr->Irql = SYNCH_LEVEL;
@ -197,7 +197,7 @@ KePrepareForApplicationProcessorInit(ULONG Id)
Pcr->StallScaleFactor = BootPcr->StallScaleFactor;
/* Mark the end of the exception handler list */
Pcr->Tib.ExceptionList = (PVOID)-1;
Pcr->NtTib.ExceptionList = (PVOID)-1;
KiGdtPrepareForApplicationProcessorInit(Id);
@ -287,7 +287,7 @@ KeInit1(PCHAR CommandLine, PULONG LastKernelAddress)
KPCR->Self = (PKPCR)KPCR;
KPCR->Prcb = &KPCR->PrcbData;
KPCR->Irql = SYNCH_LEVEL;
KPCR->Tib.Self = &KPCR->Tib;
KPCR->NtTib.Self = &KPCR->NtTib;
KPCR->GDT = KiBootGdt;
KPCR->IDT = (PUSHORT)KiIdt;
KPCR->TSS = &KiBootTss;
@ -308,7 +308,7 @@ KeInit1(PCHAR CommandLine, PULONG LastKernelAddress)
KiCheckFPU();
/* Mark the end of the exception handler list */
KPCR->Tib.ExceptionList = (PVOID)-1;
KPCR->NtTib.ExceptionList = (PVOID)-1;
KeInitDpc(KPCR->Prcb);

View file

@ -17,7 +17,7 @@
/* GLOBALS *****************************************************************/
SSDT_ENTRY
KSERVICE_TABLE_DESCRIPTOR
__declspec(dllexport)
KeServiceDescriptorTable[SSDT_MAX_ENTRIES] = {
{ MainSSDT, NULL, NUMBER_OF_SYSCALLS, MainSSPT },
@ -26,7 +26,7 @@ KeServiceDescriptorTable[SSDT_MAX_ENTRIES] = {
{ NULL, NULL, 0, NULL }
};
SSDT_ENTRY
KSERVICE_TABLE_DESCRIPTOR
KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES] = {
{ MainSSDT, NULL, NUMBER_OF_SYSCALLS, MainSSPT },
{ NULL, NULL, 0, NULL },
@ -362,24 +362,27 @@ KeUnstackDetachProcess (
/*
* @implemented
*/
BOOLEAN STDCALL
KeAddSystemServiceTable(PSSDT SSDT,
PULONG ServiceCounterTable,
ULONG NumberOfServices,
PSSPT SSPT,
ULONG TableIndex)
BOOLEAN
STDCALL
KeAddSystemServiceTable(PULONG_PTR Base,
PULONG Count OPTIONAL,
ULONG Limit,
PUCHAR Number,
ULONG Index)
{
/* check if descriptor table entry is free */
if ((TableIndex > SSDT_MAX_ENTRIES - 1) ||
(KeServiceDescriptorTable[TableIndex].SSDT != NULL) ||
(KeServiceDescriptorTableShadow[TableIndex].SSDT != NULL))
/* Check if descriptor table entry is free */
if ((Index > SSDT_MAX_ENTRIES - 1) ||
(KeServiceDescriptorTable[Index].Base) ||
(KeServiceDescriptorTableShadow[Index].Base))
{
return FALSE;
}
/* initialize the shadow service descriptor table */
KeServiceDescriptorTableShadow[TableIndex].SSDT = SSDT;
KeServiceDescriptorTableShadow[TableIndex].SSPT = SSPT;
KeServiceDescriptorTableShadow[TableIndex].NumberOfServices = NumberOfServices;
KeServiceDescriptorTableShadow[TableIndex].ServiceCounterTable = ServiceCounterTable;
/* Initialize the shadow service descriptor table */
KeServiceDescriptorTableShadow[Index].Base = Base;
KeServiceDescriptorTableShadow[Index].Limit = Limit;
KeServiceDescriptorTableShadow[Index].Number = Number;
KeServiceDescriptorTableShadow[Index].Count = Count;
return TRUE;
}
@ -389,31 +392,31 @@ KeAddSystemServiceTable(PSSDT SSDT,
*/
BOOLEAN
STDCALL
KeRemoveSystemServiceTable(IN ULONG TableIndex)
KeRemoveSystemServiceTable(IN ULONG Index)
{
/* Make sure the Index is valid */
if (TableIndex > SSDT_MAX_ENTRIES - 1) return FALSE;
if (Index > SSDT_MAX_ENTRIES - 1) return FALSE;
/* Is there a Normal Descriptor Table? */
if (!KeServiceDescriptorTable[TableIndex].SSDT) {
if (!KeServiceDescriptorTable[Index].Base)
{
/* Not with the index, is there a shadow at least? */
if (!KeServiceDescriptorTableShadow[TableIndex].SSDT) return FALSE;
if (!KeServiceDescriptorTableShadow[Index].Base) return FALSE;
}
/* Now clear from the Shadow Table. */
KeServiceDescriptorTableShadow[TableIndex].SSDT = NULL;
KeServiceDescriptorTableShadow[TableIndex].SSPT = NULL;
KeServiceDescriptorTableShadow[TableIndex].NumberOfServices = 0;
KeServiceDescriptorTableShadow[TableIndex].ServiceCounterTable = NULL;
KeServiceDescriptorTableShadow[Index].Base = NULL;
KeServiceDescriptorTableShadow[Index].Number = NULL;
KeServiceDescriptorTableShadow[Index].Limit = 0;
KeServiceDescriptorTableShadow[Index].Count = NULL;
/* Check if we should clean from the Master one too */
if (TableIndex == 1) {
KeServiceDescriptorTable[TableIndex].SSDT = NULL;
KeServiceDescriptorTable[TableIndex].SSPT = NULL;
KeServiceDescriptorTable[TableIndex].NumberOfServices = 0;
KeServiceDescriptorTable[TableIndex].ServiceCounterTable = NULL;
if (Index == 1)
{
KeServiceDescriptorTable[Index].Base = NULL;
KeServiceDescriptorTable[Index].Number = NULL;
KeServiceDescriptorTable[Index].Limit = 0;
KeServiceDescriptorTable[Index].Count = NULL;
}
return TRUE;

View file

@ -30,8 +30,8 @@
BOOL INTERNAL_CALL GDI_CleanupForProcess (struct _EPROCESS *Process);
extern SSDT Win32kSSDT[];
extern SSPT Win32kSSPT[];
extern ULONG_PTR Win32kSSDT[];
extern UCHAR Win32kSSPT[];
extern ULONG Win32kNumberOfSysCalls;
PSHARED_SECTION_POOL SessionSharedSectionPool = NULL;

View file

@ -420,7 +420,7 @@ CreateSystemServiceTable(FILE *SyscallDb,
/* First we build the SSDT */
fprintf(SyscallTable,"\n\n\n");
fprintf(SyscallTable,"SSDT %sSSDT[] = {\n", Name);
fprintf(SyscallTable,"ULONG_PTR %sSSDT[] = {\n", Name);
/* We loop, incrementing the System Call Index, until the end of the file */
for (SyscallId = 0; ((!feof(SyscallDb)) && (fgets(Line, sizeof(Line), SyscallDb) != NULL));) {
@ -435,7 +435,7 @@ CreateSystemServiceTable(FILE *SyscallDb,
if (SyscallId > 0) fprintf(SyscallTable,",\n");
/* Write the syscall name in the service table. */
fprintf(SyscallTable,"\t\t(PVOID (NTAPI *)(VOID))%s", NtSyscallName);
fprintf(SyscallTable,"\t\t(ULONG_PTR)%s", NtSyscallName);
/* Only increase if we actually added something */
SyscallId++;
@ -448,7 +448,7 @@ CreateSystemServiceTable(FILE *SyscallDb,
/* Now we build the SSPT */
rewind(SyscallDb);
fprintf(SyscallTable,"\n\n\n");
fprintf(SyscallTable,"SSPT %sSSPT[] = {\n", Name);
fprintf(SyscallTable,"UCHAR %sSSPT[] = {\n", Name);
for (SyscallId = 0; ((!feof(SyscallDb)) && (fgets(Line, sizeof(Line), SyscallDb) != NULL));) {

View file

@ -187,6 +187,14 @@ typedef enum _MODE {
MaximumMode
} MODE;
typedef struct _QUAD
{
union
{
LONGLONG UseThisFieldToCopy;
float DoNotUseThisField;
};
} QUAD, *PQUAD;
/* Structures not exposed to drivers */
typedef struct _IO_TIMER *PIO_TIMER;
@ -356,6 +364,8 @@ typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT;
#define SEMAPHORE_MODIFY_STATE (0x0002)
#define SEMAPHORE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3)
#define THREAD_ALERT (0x0004)
/* Exported object types */
extern NTOSAPI POBJECT_TYPE ExDesktopObjectType;
extern NTOSAPI POBJECT_TYPE ExEventObjectType;
@ -366,6 +376,7 @@ extern NTOSAPI POBJECT_TYPE IoDeviceHandlerObjectType;
extern NTOSAPI POBJECT_TYPE IoDeviceObjectType;
extern NTOSAPI POBJECT_TYPE IoDriverObjectType;
extern NTOSAPI POBJECT_TYPE IoFileObjectType;
extern NTOSAPI POBJECT_TYPE PsThreadType;
extern NTOSAPI POBJECT_TYPE LpcPortObjectType;
extern NTOSAPI POBJECT_TYPE MmSectionObjectType;
extern NTOSAPI POBJECT_TYPE SeTokenObjectType;
@ -4032,6 +4043,8 @@ typedef enum _KINTERRUPT_MODE {
Latched
} KINTERRUPT_MODE;
#define THREAD_WAIT_OBJECTS 3
typedef VOID
(DDKAPI *PKINTERRUPT_ROUTINE)(
VOID);
@ -7886,31 +7899,6 @@ DDKAPI
KeAcquireInterruptSpinLock(
IN PKINTERRUPT Interrupt);
/* System Service Dispatch Table */
typedef PVOID (NTAPI * SSDT)(VOID);
typedef SSDT * PSSDT;
/* System Service Parameters Table */
typedef UCHAR SSPT, * PSSPT;
typedef struct _SSDT_ENTRY {
PSSDT SSDT;
PULONG ServiceCounterTable;
ULONG NumberOfServices;
PSSPT SSPT;
} SSDT_ENTRY, *PSSDT_ENTRY;
NTOSAPI
BOOLEAN
DDKAPI
KeAddSystemServiceTable(
IN PSSDT SSDT,
IN PULONG ServiceCounterTable,
IN ULONG NumberOfServices,
IN PSSPT SSPT,
IN ULONG TableIndex);
NTOSAPI
BOOLEAN
DDKAPI
@ -7974,6 +7962,11 @@ KeEnterCriticalRegion(
*/
#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
NTHALAPI
VOID
DDKAPI
KeFlushWriteBuffer(VOID);
NTOSAPI
PRKTHREAD
DDKAPI
@ -8130,6 +8123,7 @@ DDKAPI
KeReadStateMutex(
IN PRKMUTEX Mutex);
NTOSAPI
LONG
DDKAPI
@ -8225,6 +8219,11 @@ DDKAPI
KeRestoreFloatingPointState(
IN PKFLOATING_SAVE FloatSave);
NTOSAPI
VOID
DDKAPI
KeRevertToUserAffinityThread(VOID);
NTOSAPI
NTSTATUS
DDKAPI
@ -8260,6 +8259,12 @@ KeSetPriorityThread(
IN PKTHREAD Thread,
IN KPRIORITY Priority);
NTOSAPI
VOID
DDKAPI
KeSetSystemAffinityThread(
IN KAFFINITY Affinity);
NTOSAPI
VOID
DDKAPI