mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
- More NDK/MSDDK compatibility fixes.
svn path=/trunk/; revision=17652
This commit is contained in:
parent
51f0dfd307
commit
4e8d1019ce
21 changed files with 908 additions and 612 deletions
|
@ -112,5 +112,12 @@ typedef struct _SECURITY_CLIENT_CONTEXT
|
|||
TOKEN_CONTROL ClientTokenControl;
|
||||
} SECURITY_CLIENT_CONTEXT, *PSECURITY_CLIENT_CONTEXT;
|
||||
|
||||
typedef enum _RTL_GENERIC_COMPARE_RESULTS
|
||||
{
|
||||
GenericLessThan,
|
||||
GenericGreaterThan,
|
||||
GenericEqual
|
||||
} RTL_GENERIC_COMPARE_RESULTS;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
#include "ldrtypes.h"
|
||||
/* FIXME: this needs be implemented in the w32api ddk */
|
||||
//#include "ntimage.h"
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
|
||||
|
|
|
@ -123,6 +123,14 @@ typedef enum _PROCESSINFOCLASS
|
|||
ProcessDebugObjectHandle,
|
||||
ProcessDebugFlags,
|
||||
ProcessHandleTracing,
|
||||
ProcessIoPriority,
|
||||
ProcessExecuteFlags,
|
||||
ProcessTlsInformation,
|
||||
ProcessCookie,
|
||||
ProcessImageInformation,
|
||||
ProcessCycleTime,
|
||||
ProcessPagePriority,
|
||||
ProcessInstrumentationCallback,
|
||||
MaxProcessInfoClass
|
||||
} PROCESSINFOCLASS;
|
||||
|
||||
|
@ -147,10 +155,34 @@ typedef enum _THREADINFOCLASS
|
|||
ThreadIsIoPending,
|
||||
ThreadHideFromDebugger,
|
||||
ThreadBreakOnTermination,
|
||||
ThreadSwitchLegacyState,
|
||||
ThreadIsTerminated,
|
||||
ThreadLastSystemCall,
|
||||
ThreadIoPriority,
|
||||
ThreadCycleTime,
|
||||
ThreadPagePriority,
|
||||
ThreadActualBasePriority,
|
||||
MaxThreadInfoClass
|
||||
} THREADINFOCLASS;
|
||||
#endif
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
typedef enum _JOBOBJECTINFOCLASS
|
||||
{
|
||||
JobObjectBasicAccountingInformation = 1,
|
||||
JobObjectBasicLimitInformation,
|
||||
JobObjectBasicProcessIdList,
|
||||
JobObjectBasicUIRestrictions,
|
||||
JobObjectSecurityLimitInformation,
|
||||
JobObjectEndOfJobTimeInformation,
|
||||
JobObjectAssociateCompletionPortInformation,
|
||||
JobObjectBasicAndIoAccountingInformation,
|
||||
JobObjectExtendedLimitInformation,
|
||||
JobObjectJobSetInformation,
|
||||
MaxJobObjectInfoClass
|
||||
} JOBOBJECTINFOCLASS;
|
||||
#endif
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
typedef VOID (NTAPI *PPEBLOCKROUTINE)(PVOID);
|
||||
|
||||
|
@ -360,6 +392,53 @@ typedef struct _TEB
|
|||
UCHAR BooleanSpare[3]; /* FB9h */
|
||||
} TEB, *PTEB;
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
typedef struct _PROCESS_BASIC_INFORMATION
|
||||
{
|
||||
NTSTATUS ExitStatus;
|
||||
PPEB PebBaseAddress;
|
||||
ULONG_PTR AffinityMask;
|
||||
KPRIORITY BasePriority;
|
||||
ULONG_PTR UniqueProcessId;
|
||||
ULONG_PTR InheritedFromUniqueProcessId;
|
||||
} PROCESS_BASIC_INFORMATION,*PPROCESS_BASIC_INFORMATION;
|
||||
|
||||
typedef struct _PROCESS_ACCESS_TOKEN
|
||||
{
|
||||
HANDLE Token;
|
||||
HANDLE Thread;
|
||||
} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
|
||||
|
||||
typedef struct _PROCESS_DEVICEMAP_INFORMATION
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
HANDLE DirectoryHandle;
|
||||
} Set;
|
||||
struct
|
||||
{
|
||||
ULONG DriveMap;
|
||||
UCHAR DriveType[32];
|
||||
} Query;
|
||||
};
|
||||
} PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
|
||||
|
||||
typedef struct _KERNEL_USER_TIMES
|
||||
{
|
||||
LARGE_INTEGER CreateTime;
|
||||
LARGE_INTEGER ExitTime;
|
||||
LARGE_INTEGER KernelTime;
|
||||
LARGE_INTEGER UserTime;
|
||||
} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
|
||||
|
||||
typedef struct _PROCESS_SESSION_INFORMATION
|
||||
{
|
||||
ULONG SessionId;
|
||||
} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
|
||||
#endif
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
/* FIXME: see note in mmtypes.h */
|
||||
#ifdef _NTOSKRNL_
|
||||
|
|
|
@ -93,7 +93,7 @@ DWORD
|
|||
STDCALL
|
||||
RtlCompactHeap(
|
||||
HANDLE heap,
|
||||
DWORD flags
|
||||
ULONG flags
|
||||
);
|
||||
|
||||
HANDLE
|
||||
|
|
|
@ -91,12 +91,15 @@
|
|||
#define VER_CONDITION_MASK 7
|
||||
#define VER_NUM_BITS_PER_CONDITION_MASK 3
|
||||
|
||||
#define RTL_CRITSECT_TYPE 0
|
||||
#define RTL_RESOURCE_TYPE 1
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
/* RTL String Hash Algorithms */
|
||||
#define HASH_STRING_ALGORITHM_DEFAULT 0
|
||||
#define HASH_STRING_ALGORITHM_X65599 1
|
||||
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
/* List Macros */
|
||||
static __inline
|
||||
VOID
|
||||
|
@ -231,6 +234,7 @@ RemoveTailList(
|
|||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
typedef enum _TABLE_SEARCH_RESULT
|
||||
{
|
||||
TableEmptyTree,
|
||||
|
@ -245,6 +249,7 @@ typedef enum _RTL_GENERIC_COMPARE_RESULTS
|
|||
GenericGreaterThan,
|
||||
GenericEqual
|
||||
} RTL_GENERIC_COMPARE_RESULTS;
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -281,8 +286,8 @@ typedef LONG (NTAPI *PVECTORED_EXCEPTION_HANDLER)(
|
|||
PEXCEPTION_POINTERS ExceptionPointers
|
||||
);
|
||||
|
||||
typedef DWORD (NTAPI *PTHREAD_START_ROUTINE)(
|
||||
LPVOID Parameter
|
||||
typedef ULONG (NTAPI *PTHREAD_START_ROUTINE)(
|
||||
PVOID Parameter
|
||||
);
|
||||
|
||||
typedef VOID
|
||||
|
@ -315,7 +320,7 @@ typedef RTL_GENERIC_COMPARE_RESULTS
|
|||
typedef PVOID
|
||||
(NTAPI *PRTL_GENERIC_ALLOCATE_ROUTINE) (
|
||||
struct _RTL_GENERIC_TABLE *Table,
|
||||
LONG ByteSize
|
||||
CLONG ByteSize
|
||||
);
|
||||
|
||||
typedef VOID
|
||||
|
@ -324,10 +329,10 @@ typedef VOID
|
|||
PVOID Buffer
|
||||
);
|
||||
|
||||
typedef VOID
|
||||
typedef PVOID
|
||||
(NTAPI *PRTL_AVL_ALLOCATE_ROUTINE) (
|
||||
struct _RTL_AVL_TABLE *Table,
|
||||
LONG ByteSize
|
||||
CLONG ByteSize
|
||||
);
|
||||
|
||||
typedef VOID
|
||||
|
@ -353,11 +358,14 @@ typedef NTSTATUS
|
|||
IN OUT PSIZE_T CommitSize
|
||||
);
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
typedef BOOLEAN
|
||||
(NTAPI *PRTL_CONFLICT_RANGE_CALLBACK) (
|
||||
PVOID Context,
|
||||
struct _RTL_RANGE *Range
|
||||
);
|
||||
#endif
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
@ -634,6 +642,30 @@ typedef struct RTL_DRIVE_LETTER_CURDIR
|
|||
UNICODE_STRING DosPath;
|
||||
} RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
|
||||
|
||||
#ifndef NTOS_MODE_USER
|
||||
typedef struct _RTL_CRITICAL_SECTION_DEBUG
|
||||
{
|
||||
USHORT Type;
|
||||
USHORT CreatorBackTraceIndex;
|
||||
struct _RTL_CRITICAL_SECTION *CriticalSection;
|
||||
LIST_ENTRY ProcessLocksList;
|
||||
ULONG EntryCount;
|
||||
ULONG ContentionCount;
|
||||
ULONG Spare[2];
|
||||
} RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG;
|
||||
|
||||
typedef struct _RTL_CRITICAL_SECTION
|
||||
{
|
||||
PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
|
||||
LONG LockCount;
|
||||
LONG RecursionCount;
|
||||
HANDLE OwningThread;
|
||||
HANDLE LockSemaphore;
|
||||
ULONG_PTR SpinCount;
|
||||
} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
|
||||
#endif
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
typedef struct _RTL_RANGE_LIST
|
||||
{
|
||||
LIST_ENTRY ListHead;
|
||||
|
@ -652,6 +684,16 @@ typedef struct _RTL_RANGE
|
|||
UCHAR Flags; /* RTL_RANGE_... flags */
|
||||
} RTL_RANGE, *PRTL_RANGE;
|
||||
|
||||
typedef struct _RANGE_LIST_ITERATOR
|
||||
{
|
||||
PLIST_ENTRY RangeListHead;
|
||||
PLIST_ENTRY MergedHead;
|
||||
PVOID Current;
|
||||
ULONG Stamp;
|
||||
} RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct _RTL_RESOURCE
|
||||
{
|
||||
RTL_CRITICAL_SECTION Lock;
|
||||
|
@ -665,14 +707,6 @@ typedef struct _RTL_RESOURCE
|
|||
PVOID DebugInfo; /* ?? */
|
||||
} RTL_RESOURCE, *PRTL_RESOURCE;
|
||||
|
||||
typedef struct _RANGE_LIST_ITERATOR
|
||||
{
|
||||
PLIST_ENTRY RangeListHead;
|
||||
PLIST_ENTRY MergedHead;
|
||||
PVOID Current;
|
||||
ULONG Stamp;
|
||||
} RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
|
||||
|
||||
typedef struct _RTL_MESSAGE_RESOURCE_ENTRY
|
||||
{
|
||||
USHORT Length;
|
||||
|
@ -779,41 +813,41 @@ typedef struct _RTL_ATOM_TABLE
|
|||
PRTL_ATOM_TABLE_ENTRY Buckets[1];
|
||||
} RTL_ATOM_TABLE, *PRTL_ATOM_TABLE;
|
||||
|
||||
/* Let Kernel Drivers use this */
|
||||
#if !defined(_WINBASE_H) && !defined(_WINBASE_)
|
||||
typedef struct _SYSTEMTIME
|
||||
{
|
||||
WORD wYear;
|
||||
WORD wMonth;
|
||||
WORD wDayOfWeek;
|
||||
WORD wDay;
|
||||
WORD wHour;
|
||||
WORD wMinute;
|
||||
WORD wSecond;
|
||||
WORD wMilliseconds;
|
||||
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
|
||||
#ifndef NTOS_MODE_USER
|
||||
|
||||
typedef struct _SYSTEMTIME
|
||||
{
|
||||
USHORT wYear;
|
||||
USHORT wMonth;
|
||||
USHORT wDayOfWeek;
|
||||
USHORT wDay;
|
||||
USHORT wHour;
|
||||
USHORT wMinute;
|
||||
USHORT wSecond;
|
||||
USHORT wMilliseconds;
|
||||
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
|
||||
|
||||
typedef struct _TIME_ZONE_INFORMATION
|
||||
{
|
||||
LONG Bias;
|
||||
WCHAR StandardName[32];
|
||||
SYSTEMTIME StandardDate;
|
||||
LONG StandardBias;
|
||||
WCHAR DaylightName[32];
|
||||
SYSTEMTIME DaylightDate;
|
||||
LONG DaylightBias;
|
||||
} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
|
||||
typedef struct _TIME_ZONE_INFORMATION
|
||||
{
|
||||
LONG Bias;
|
||||
WCHAR StandardName[32];
|
||||
SYSTEMTIME StandardDate;
|
||||
LONG StandardBias;
|
||||
WCHAR DaylightName[32];
|
||||
SYSTEMTIME DaylightDate;
|
||||
LONG DaylightBias;
|
||||
} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
|
||||
|
||||
typedef enum _ACL_INFORMATION_CLASS
|
||||
{
|
||||
AclRevisionInformation = 1,
|
||||
AclSizeInformation
|
||||
} ACL_INFORMATION_CLASS;
|
||||
typedef enum _ACL_INFORMATION_CLASS
|
||||
{
|
||||
AclRevisionInformation = 1,
|
||||
AclSizeInformation
|
||||
} ACL_INFORMATION_CLASS;
|
||||
|
||||
#define TIME_ZONE_ID_UNKNOWN 0
|
||||
#define TIME_ZONE_ID_STANDARD 1
|
||||
#define TIME_ZONE_ID_DAYLIGHT 2
|
||||
#define TIME_ZONE_ID_INVALID 0xFFFFFFFF
|
||||
#define TIME_ZONE_ID_UNKNOWN 0
|
||||
#define TIME_ZONE_ID_STANDARD 1
|
||||
#define TIME_ZONE_ID_DAYLIGHT 2
|
||||
#define TIME_ZONE_ID_INVALID 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -46,13 +46,6 @@ SeReleaseSecurityDescriptor(
|
|||
IN BOOLEAN CaptureIfKernelMode
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
SeSetAccessStateGenericMapping(
|
||||
IN PACCESS_STATE AccessState,
|
||||
IN PGENERIC_MAPPING GenericMapping
|
||||
);
|
||||
|
||||
SECURITY_IMPERSONATION_LEVEL
|
||||
NTAPI
|
||||
SeTokenImpersonationLevel(
|
||||
|
|
|
@ -61,15 +61,24 @@
|
|||
#undef STATUS_SXS_INVALID_DEACTIVATION
|
||||
|
||||
#include <ntstatus.h>
|
||||
#define STATIC static
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
|
||||
/* NTAPI/NTOSAPI Define */
|
||||
#define DECLSPEC_ADDRSAFE
|
||||
#define NTAPI __stdcall
|
||||
#define NTOSAPI
|
||||
#define FASTCALL __fastcall
|
||||
#define STDCALL __stdcall
|
||||
#if !defined(_NTSYSTEM_)
|
||||
#define NTSYSAPI DECLSPEC_IMPORT
|
||||
#define NTSYSCALLAPI DECLSPEC_IMPORT
|
||||
#else
|
||||
#define NTSYSAPI
|
||||
#if defined(_NTDLLBUILD_)
|
||||
#define NTSYSCALLAPI
|
||||
#else
|
||||
#define NTSYSCALLAPI DECLSPEC_ADDRSAFE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Native API Return Value Macros */
|
||||
#define NT_SUCCESS(x) ((x)>=0)
|
||||
|
@ -81,10 +90,12 @@
|
|||
/* Basic Types that aren't defined in User-Mode Headers */
|
||||
typedef CONST int CINT;
|
||||
typedef CONST char *PCSZ;
|
||||
typedef ULONG CLONG;
|
||||
typedef short CSHORT;
|
||||
typedef CSHORT *PCSHORT;
|
||||
typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
|
||||
typedef LONG NTSTATUS, *PNTSTATUS;
|
||||
#define STATIC static
|
||||
|
||||
/* Basic NT Types */
|
||||
#if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -24,9 +24,6 @@
|
|||
|
||||
#define EVENT_PAIR_ALL_ACCESS (0x1F0000L)
|
||||
|
||||
#define OBJECT_TYPE_CREATE 0x0001
|
||||
#define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
|
||||
|
||||
/* For ProcessDeviceMap */
|
||||
#define DOSDEVICE_DRIVE_UNKNOWN 0
|
||||
#define DOSDEVICE_DRIVE_CALCULATE 1
|
||||
|
@ -115,18 +112,6 @@ typedef enum _PLUGPLAY_EVENT_CATEGORY
|
|||
|
||||
/**** Information Classes ****/
|
||||
|
||||
/*
|
||||
* Process (extra ones not defined in DDK)
|
||||
*/
|
||||
typedef enum _PROCESS_INFORMATION_FLAGS
|
||||
{
|
||||
ProcessUnknown33 = 33,
|
||||
ProcessUnknown34,
|
||||
ProcessUnknown35,
|
||||
ProcessCookie,
|
||||
MaximumProcessInformationClass
|
||||
} PROCESS_INFORMATION_FLAGS;
|
||||
|
||||
/*
|
||||
* System
|
||||
*/
|
||||
|
@ -201,6 +186,14 @@ typedef enum _OBJECT_INFORMATION_CLASS
|
|||
ObjectHandleInformation
|
||||
} OBJECT_INFORMATION_CLASS;
|
||||
|
||||
/*
|
||||
* Port
|
||||
*/
|
||||
typedef enum _PORT_INFORMATION_CLASS
|
||||
{
|
||||
PortNoInformation
|
||||
} PORT_INFORMATION_CLASS;
|
||||
|
||||
/*
|
||||
* Memory
|
||||
*/
|
||||
|
@ -491,34 +484,6 @@ typedef struct _EVENT_BASIC_INFORMATION
|
|||
* Process
|
||||
*/
|
||||
|
||||
/* Class 0 */
|
||||
typedef struct _PROCESS_BASIC_INFORMATION
|
||||
{
|
||||
NTSTATUS ExitStatus;
|
||||
PPEB PebBaseAddress;
|
||||
KAFFINITY AffinityMask;
|
||||
KPRIORITY BasePriority;
|
||||
ULONG UniqueProcessId;
|
||||
ULONG InheritedFromUniqueProcessId;
|
||||
} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
|
||||
|
||||
|
||||
/* Class 4 */
|
||||
typedef struct _KERNEL_USER_TIMES
|
||||
{
|
||||
LARGE_INTEGER CreateTime;
|
||||
LARGE_INTEGER ExitTime;
|
||||
LARGE_INTEGER KernelTime;
|
||||
LARGE_INTEGER UserTime;
|
||||
} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
|
||||
|
||||
/* Class 9 */
|
||||
typedef struct _PROCESS_ACCESS_TOKEN
|
||||
{
|
||||
HANDLE Token;
|
||||
HANDLE Thread;
|
||||
} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
|
||||
|
||||
/* Class 16 */
|
||||
typedef struct _PROCESS_PRIORITY_CLASS
|
||||
{
|
||||
|
@ -526,29 +491,6 @@ typedef struct _PROCESS_PRIORITY_CLASS
|
|||
UCHAR PriorityClass;
|
||||
} PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
|
||||
|
||||
/* Class 23 */
|
||||
typedef struct _PROCESS_DEVICEMAP_INFORMATION
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
HANDLE DirectoryHandle;
|
||||
} Set;
|
||||
struct
|
||||
{
|
||||
ULONG DriveMap;
|
||||
UCHAR DriveType[32];
|
||||
} Query;
|
||||
};
|
||||
} PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
|
||||
|
||||
/* Class 24 */
|
||||
typedef struct _PROCESS_SESSION_INFORMATION
|
||||
{
|
||||
ULONG SessionId;
|
||||
} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
|
||||
|
||||
/*
|
||||
* System
|
||||
*/
|
||||
|
|
|
@ -98,7 +98,7 @@ LockFileEx(
|
|||
(PIO_STATUS_BLOCK)lpOverlapped,
|
||||
&Offset,
|
||||
&BytesToLock,
|
||||
NULL,
|
||||
0,
|
||||
LockImmediate,
|
||||
LockExclusive);
|
||||
if ( !NT_SUCCESS(errCode) )
|
||||
|
@ -168,7 +168,7 @@ UnlockFileEx(
|
|||
(PIO_STATUS_BLOCK)lpOverlapped,
|
||||
&StartAddress,
|
||||
&BytesToUnLock,
|
||||
NULL);
|
||||
0);
|
||||
if ( !NT_SUCCESS(errCode) ) {
|
||||
SetLastErrorByStatus (errCode);
|
||||
return FALSE;
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/* We're a core NT DLL, we don't import syscalls */
|
||||
#define _NTSYSTEM_
|
||||
#define _NTDLLBUILD_
|
||||
|
||||
/* C Headers */
|
||||
#define _CTYPE_DISABLE_MACROS
|
||||
#define _INC_SWPRINTF_INL_
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/* We're a core NT DLL, we don't import syscalls */
|
||||
#define _NTSYSTEM_
|
||||
#define _NTDLLBUILD_
|
||||
|
||||
/* C Headers */
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -1654,7 +1654,7 @@ STDCALL
|
|||
NtFlushInstructionCache (
|
||||
IN HANDLE ProcessHandle,
|
||||
IN PVOID BaseAddress,
|
||||
IN UINT NumberOfBytesToFlush
|
||||
IN ULONG NumberOfBytesToFlush
|
||||
)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
|
|
@ -1963,7 +1963,7 @@ NtLockFile(IN HANDLE FileHandle,
|
|||
OUT PIO_STATUS_BLOCK IoStatusBlock,
|
||||
IN PLARGE_INTEGER ByteOffset,
|
||||
IN PLARGE_INTEGER Length,
|
||||
IN PULONG Key,
|
||||
IN ULONG Key,
|
||||
IN BOOLEAN FailImmediately,
|
||||
IN BOOLEAN ExclusiveLock)
|
||||
{
|
||||
|
@ -2067,7 +2067,7 @@ NtLockFile(IN HANDLE FileHandle,
|
|||
/* Set Parameters */
|
||||
StackPtr->Parameters.LockControl.Length = LocalLength;
|
||||
StackPtr->Parameters.LockControl.ByteOffset = *ByteOffset;
|
||||
StackPtr->Parameters.LockControl.Key = Key ? *Key : 0;
|
||||
StackPtr->Parameters.LockControl.Key = Key ? Key : 0;
|
||||
|
||||
/* Set Flags */
|
||||
if (FailImmediately) StackPtr->Flags = SL_FAIL_IMMEDIATELY;
|
||||
|
@ -3184,7 +3184,7 @@ NTSTATUS
|
|||
STDCALL
|
||||
NtSetQuotaInformationFile(HANDLE FileHandle,
|
||||
PIO_STATUS_BLOCK IoStatusBlock,
|
||||
PFILE_QUOTA_INFORMATION Buffer,
|
||||
PVOID Buffer,
|
||||
ULONG BufferLength)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
|
@ -3200,7 +3200,7 @@ NtUnlockFile(IN HANDLE FileHandle,
|
|||
OUT PIO_STATUS_BLOCK IoStatusBlock,
|
||||
IN PLARGE_INTEGER ByteOffset,
|
||||
IN PLARGE_INTEGER Length,
|
||||
OUT PULONG Key OPTIONAL)
|
||||
OUT ULONG Key OPTIONAL)
|
||||
{
|
||||
PFILE_OBJECT FileObject = NULL;
|
||||
PLARGE_INTEGER LocalLength = NULL;
|
||||
|
@ -3292,7 +3292,7 @@ NtUnlockFile(IN HANDLE FileHandle,
|
|||
/* Set Parameters */
|
||||
StackPtr->Parameters.LockControl.Length = LocalLength;
|
||||
StackPtr->Parameters.LockControl.ByteOffset = *ByteOffset;
|
||||
StackPtr->Parameters.LockControl.Key = Key ? *Key : 0;
|
||||
StackPtr->Parameters.LockControl.Key = Key ? Key : 0;
|
||||
|
||||
/* Call the Driver */
|
||||
Status = IoCallDriver(DeviceObject, Irp);
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
/*EXPORTED*/ NTSTATUS STDCALL
|
||||
NtQueryInformationPort (IN HANDLE PortHandle,
|
||||
IN CINT PortInformationClass,
|
||||
IN PORT_INFORMATION_CLASS PortInformationClass,
|
||||
OUT PVOID PortInformation,
|
||||
IN ULONG PortInformationLength,
|
||||
OUT PULONG ReturnLength)
|
||||
|
|
|
@ -277,7 +277,7 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle,
|
|||
NTSTATUS STDCALL
|
||||
NtQueryVirtualMemory (IN HANDLE ProcessHandle,
|
||||
IN PVOID Address,
|
||||
IN CINT VirtualMemoryInformationClass,
|
||||
IN MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
|
||||
OUT PVOID VirtualMemoryInformation,
|
||||
IN ULONG Length,
|
||||
OUT PULONG UnsafeResultLength)
|
||||
|
|
|
@ -16,19 +16,19 @@
|
|||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
NTSTATUS STDCALL
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtAccessCheckAndAuditAlarm(IN PUNICODE_STRING SubsystemName,
|
||||
IN PHANDLE ObjectHandle,
|
||||
IN PUNICODE_STRING ObjectTypeName,
|
||||
IN PUNICODE_STRING ObjectName,
|
||||
IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN PGENERIC_MAPPING GenericMapping,
|
||||
IN BOOLEAN ObjectCreation,
|
||||
OUT PACCESS_MASK GrantedAccess,
|
||||
OUT PNTSTATUS AccessStatus,
|
||||
OUT PBOOLEAN GenerateOnClose
|
||||
)
|
||||
IN PVOID HandleId,
|
||||
IN PUNICODE_STRING ObjectTypeName,
|
||||
IN PUNICODE_STRING ObjectName,
|
||||
IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN ACCESS_MASK DesiredAccess,
|
||||
IN PGENERIC_MAPPING GenericMapping,
|
||||
IN BOOLEAN ObjectCreation,
|
||||
OUT PACCESS_MASK GrantedAccess,
|
||||
OUT PNTSTATUS AccessStatus,
|
||||
OUT PBOOLEAN GenerateOnClose)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return(STATUS_NOT_IMPLEMENTED);
|
||||
|
|
|
@ -38,6 +38,10 @@
|
|||
|
||||
/* Base types, structures and definitions */
|
||||
typedef short CSHORT;
|
||||
typedef ULONG CLONG;
|
||||
typedef CCHAR *PCCHAR;
|
||||
typedef CSHORT *PCSHORT;
|
||||
typedef CLONG *PCLONG;
|
||||
typedef CONST int CINT;
|
||||
typedef CONST char *PCSZ;
|
||||
|
||||
|
|
|
@ -1323,6 +1323,13 @@ typedef struct _RTL_SPLAY_LINKS {
|
|||
struct _RTL_SPLAY_LINKS *RightChild;
|
||||
} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
|
||||
|
||||
typedef enum _RTL_GENERIC_COMPARE_RESULTS
|
||||
{
|
||||
GenericLessThan,
|
||||
GenericGreaterThan,
|
||||
GenericEqual
|
||||
} RTL_GENERIC_COMPARE_RESULTS;
|
||||
|
||||
#if defined(USE_LPC6432)
|
||||
#define LPC_CLIENT_ID CLIENT_ID64
|
||||
#define LPC_SIZE_T ULONGLONG
|
||||
|
|
|
@ -74,6 +74,7 @@ extern "C" {
|
|||
|
||||
#define RESTRICTED_POINTER
|
||||
#define POINTER_ALIGNMENT
|
||||
#define DECLSPEC_ADDRSAFE
|
||||
|
||||
#ifdef NONAMELESSUNION
|
||||
# define _DDK_DUMMYUNION_MEMBER(name) DUMMYUNIONNAME.name
|
||||
|
@ -350,6 +351,9 @@ typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT;
|
|||
SYNCHRONIZE)
|
||||
/* end winnt.h */
|
||||
|
||||
#define OBJECT_TYPE_CREATE (0x0001)
|
||||
#define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
|
||||
|
||||
#define DIRECTORY_QUERY (0x0001)
|
||||
#define DIRECTORY_TRAVERSE (0x0002)
|
||||
#define DIRECTORY_CREATE_OBJECT (0x0004)
|
||||
|
@ -3836,6 +3840,38 @@ typedef struct _RTL_BITMAP_RUN {
|
|||
ULONG NumberOfBits;
|
||||
} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
|
||||
|
||||
typedef struct _RTL_RANGE_LIST
|
||||
{
|
||||
LIST_ENTRY ListHead;
|
||||
ULONG Flags; /* RTL_RANGE_LIST_... flags */
|
||||
ULONG Count;
|
||||
ULONG Stamp;
|
||||
} RTL_RANGE_LIST, *PRTL_RANGE_LIST;
|
||||
|
||||
typedef struct _RTL_RANGE
|
||||
{
|
||||
ULONGLONG Start;
|
||||
ULONGLONG End;
|
||||
PVOID UserData;
|
||||
PVOID Owner;
|
||||
UCHAR Attributes;
|
||||
UCHAR Flags; /* RTL_RANGE_... flags */
|
||||
} RTL_RANGE, *PRTL_RANGE;
|
||||
|
||||
typedef struct _RANGE_LIST_ITERATOR
|
||||
{
|
||||
PLIST_ENTRY RangeListHead;
|
||||
PLIST_ENTRY MergedHead;
|
||||
PVOID Current;
|
||||
ULONG Stamp;
|
||||
} RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
|
||||
|
||||
typedef BOOLEAN
|
||||
(NTAPI *PRTL_CONFLICT_RANGE_CALLBACK) (
|
||||
PVOID Context,
|
||||
struct _RTL_RANGE *Range
|
||||
);
|
||||
|
||||
typedef NTSTATUS
|
||||
(DDKAPI *PRTL_QUERY_REGISTRY_ROUTINE)(
|
||||
IN PWSTR ValueName,
|
||||
|
@ -4358,6 +4394,14 @@ typedef enum _PROCESSINFOCLASS {
|
|||
ProcessDebugObjectHandle,
|
||||
ProcessDebugFlags,
|
||||
ProcessHandleTracing,
|
||||
ProcessIoPriority,
|
||||
ProcessExecuteFlags,
|
||||
ProcessTlsInformation,
|
||||
ProcessCookie,
|
||||
ProcessImageInformation,
|
||||
ProcessCycleTime,
|
||||
ProcessPagePriority,
|
||||
ProcessInstrumentationCallback,
|
||||
MaxProcessInfoClass
|
||||
} PROCESSINFOCLASS;
|
||||
|
||||
|
@ -4381,15 +4425,67 @@ typedef enum _THREADINFOCLASS {
|
|||
ThreadIsIoPending,
|
||||
ThreadHideFromDebugger,
|
||||
ThreadBreakOnTermination,
|
||||
ThreadSwitchLegacyState,
|
||||
ThreadIsTerminated,
|
||||
ThreadLastSystemCall,
|
||||
ThreadIoPriority,
|
||||
ThreadCycleTime,
|
||||
ThreadPagePriority,
|
||||
ThreadActualBasePriority,
|
||||
MaxThreadInfoClass
|
||||
} THREADINFOCLASS;
|
||||
|
||||
typedef struct _PROCESS_BASIC_INFORMATION
|
||||
{
|
||||
NTSTATUS ExitStatus;
|
||||
PPEB PebBaseAddress;
|
||||
ULONG_PTR AffinityMask;
|
||||
KPRIORITY BasePriority;
|
||||
ULONG_PTR UniqueProcessId;
|
||||
ULONG_PTR InheritedFromUniqueProcessId;
|
||||
} PROCESS_BASIC_INFORMATION,*PPROCESS_BASIC_INFORMATION;
|
||||
|
||||
typedef struct _PROCESS_WS_WATCH_INFORMATION
|
||||
{
|
||||
PVOID FaultingPc;
|
||||
PVOID FaultingVa;
|
||||
} PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
|
||||
|
||||
typedef struct _PROCESS_DEVICEMAP_INFORMATION
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
HANDLE DirectoryHandle;
|
||||
} Set;
|
||||
struct
|
||||
{
|
||||
ULONG DriveMap;
|
||||
UCHAR DriveType[32];
|
||||
} Query;
|
||||
};
|
||||
} PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
|
||||
|
||||
typedef struct _KERNEL_USER_TIMES
|
||||
{
|
||||
LARGE_INTEGER CreateTime;
|
||||
LARGE_INTEGER ExitTime;
|
||||
LARGE_INTEGER KernelTime;
|
||||
LARGE_INTEGER UserTime;
|
||||
} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
|
||||
|
||||
typedef struct _PROCESS_ACCESS_TOKEN
|
||||
{
|
||||
HANDLE Token;
|
||||
HANDLE Thread;
|
||||
} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
|
||||
|
||||
typedef struct _PROCESS_SESSION_INFORMATION
|
||||
{
|
||||
ULONG SessionId;
|
||||
} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
|
||||
|
||||
#define ES_SYSTEM_REQUIRED 0x00000001
|
||||
#define ES_DISPLAY_REQUIRED 0x00000002
|
||||
#define ES_USER_PRESENT 0x00000004
|
||||
|
|
|
@ -2382,6 +2382,8 @@ typedef union _SLIST_HEADER {
|
|||
} SLIST_HEADER,*PSLIST_HEADER;
|
||||
#endif /* !_SLIST_HEADER_ */
|
||||
|
||||
/* FIXME: Please oh please stop including winnt.h from the DDK... */
|
||||
#ifndef __NTDDK_H
|
||||
typedef struct _RTL_CRITICAL_SECTION_DEBUG {
|
||||
WORD Type;
|
||||
WORD CreatorBackTraceIndex;
|
||||
|
@ -2399,6 +2401,8 @@ typedef struct _RTL_CRITICAL_SECTION {
|
|||
HANDLE LockSemaphore;
|
||||
ULONG_PTR SpinCount;
|
||||
} RTL_CRITICAL_SECTION,*PRTL_CRITICAL_SECTION;
|
||||
#endif
|
||||
|
||||
typedef struct _EVENTLOGRECORD {
|
||||
DWORD Length;
|
||||
DWORD Reserved;
|
||||
|
@ -3099,6 +3103,8 @@ typedef union _FILE_SEGMENT_ELEMENT {
|
|||
#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES 16
|
||||
#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
|
||||
|
||||
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
|
||||
#ifndef __NTDDK_H
|
||||
typedef enum _JOBOBJECTINFOCLASS {
|
||||
JobObjectBasicAccountingInformation = 1,
|
||||
JobObjectBasicLimitInformation,
|
||||
|
@ -3112,6 +3118,8 @@ typedef enum _JOBOBJECTINFOCLASS {
|
|||
JobObjectJobSetInformation,
|
||||
MaxJobObjectInfoClass
|
||||
} JOBOBJECTINFOCLASS;
|
||||
#endif
|
||||
|
||||
typedef struct _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION {
|
||||
LARGE_INTEGER TotalUserTime;
|
||||
LARGE_INTEGER TotalKernelTime;
|
||||
|
|
Loading…
Reference in a new issue