*/
#include <windows.h>
-/* NOTE: W32API ddk/ntapi.h header has wrong definition of SYSTEM_PROCESSES. */
-#include <ntos/types.h>
+#define NTOS_MODE_USER
+#include <ndk/ntndk.h>
typedef struct _SYSTEM_THREADS
{
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
-#include <ntos/halfuncs.h>
+#include <wincon.h>
#include <ddk/ntddblue.h>
-#include <string.h>
+#include <ndk/halfuncs.h>
#define NDEBUG
#include <debug.h>
#include <ddk/ntddk.h>
#include <ddk/ntbootvid.h>
-#include <ntos/ldrtypes.h>
-#include <ddk/ldrfuncs.h>
+#include <ndk/ldrfuncs.h>
#include "bootvid.h"
#include "resource.h"
#include <ddk/ntddk.h>
#include <ntddcdrm.h>
-#include <ntos/minmax.h>
#define NDEBUG
#include <debug.h>
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-#include <ntos/minmax.h>
#define NDEBUG
#include <debug.h>
/* INCLUDES ******************************************************************/
#include <ntifs.h>
-#include <ntos/fstypes.h> /* FIXME: NDK */
-/* FIXME: The headers are broken! */
-#undef CreateMailslot
+#include <ndk/iotypes.h>
#include "msfs.h"
#define NDEBUG
/* INCLUDES ******************************************************************/
#include <ntifs.h>
-#include <ntos/fstypes.h> /* FIXME: NDK */
+#include <ndk/iotypes.h>
#include "npfs.h"
#define NDEBUG
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-#include <ntos/minmax.h>
#define NDEBUG
#include <debug.h>
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
-#include <ntos/minmax.h>
#define NDEBUG
#include <debug.h>
#include <ddk/ntdddisk.h>
#include <ddk/ntddcdrm.h>
#include <ddk/class2.h>
-#include <ntos/minmax.h>
#include <stdio.h>
#define NDEBUG
#include <ddk/srb.h>
#include <ddk/scsi.h>
#include <ddk/ntddscsi.h>
-#include <ntos/minmax.h>
#include <stdio.h>
#define NDEBUG
#include <ddk/ntddk.h>
#include <ddk/ntddvdeo.h>
#include <ddk/winddi.h>
-#include <ntos/minmax.h>
#include <stdlib.h>
#include "vgavideo.h"
#include <windows.h>
#include <ddk/ntddblue.h>
-#ifndef _NTNDK_
-#include <ntos.h>
-#endif
#define CSR_NATIVE 0x0000
#define CSR_CONSOLE 0x0001
#ifndef _NTDDBLUE_H_INCLUDED_
#define _NTDDBLUE_H_INCLUDED_
-#include <ntos/console.h>
-
#define IOCTL_CONSOLE_GET_SCREEN_BUFFER_INFO CTL_CODE(FILE_DEVICE_SCREEN, 0x801, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO CTL_CODE(FILE_DEVICE_SCREEN, 0x802, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_CONSOLE_GET_CURSOR_INFO CTL_CODE(FILE_DEVICE_SCREEN, 0x803, METHOD_BUFFERED, FILE_READ_ACCESS)
#ifndef __NTPNP_H\r
#define __NTPNP_H\r
\r
+#include <ddk/cfg.h>\r
+\r
/*\r
* TODO:\r
* - Describe the undocumented GUIDs.\r
IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters
);
+BOOLEAN
+STDCALL
+HalQueryDisplayOwnership(VOID);
+
BOOLEAN
STDCALL
HalAllProcessorsStarted(VOID);
STDCALL
VidCleanUp(VOID);
-BOOLEAN
-STDCALL
-VidInitialize(VOID);
-
-BOOLEAN
+BOOL
STDCALL
VidResetDisplay(VOID);
+++ /dev/null
-#ifndef _NTOS_H
-#define _NTOS_H
-/* $Id$ */
-
-#if defined(NTOS_MODE_USER)
-/*
- * Include windows.h before ntddk.h to get user mode prototype
- * for InterlockedXxx functions.
- */
-#include <windows.h>
-#include <ddk/ntddk.h>
-#include <ddk/ntifs.h>
-#include <ddk/ntnls.h>
-#include <ddk/cfg.h>
-#include <evntrace.h>
-#include "ntos/types.h"
-#include "ntos/cdrom.h"
-#include "ntos/console.h"
-#include "ntos/disk.h"
-#include "ntos/tape.h"
-#include "ntos/except.h"
-#include "ntos/file.h"
-#include "ntos/gditypes.h"
-#include "ntos/fstypes.h" /* AG */
-#include "ntos/heap.h"
-#include "ntos/keyboard.h"
-#include "ntos/minmax.h"
-#include "ntos/mm.h"
-#include "ntos/ntdef.h"
-#include "ntos/port.h"
-#include "ntos/ps.h"
-#include "ntos/registry.h"
-#include "ntos/security.h"
-#include "ntos/synch.h"
-#include "ntos/time.h"
-#include "napi/i386/segment.h"
-#include "napi/types.h"
-#include "napi/dbg.h"
-#include "napi/npipe.h"
-#include "napi/shared_data.h"
-#include "napi/win32.h"
-#include "ntos/rtltypes.h"
-#include "ntos/rtl.h"
-#include "ntos/zwtypes.h"
-#include "ntos/zw.h"
-#include "ntos/dbgfuncs.h"
-#include "ntos/service.h"
-//#include "ntdll/csr.h"
-#include "ntdll/dbg.h"
-#include "ntdll/ldr.h"
-#include "ntdll/rtl.h"
-#include "ntdll/trace.h"
-#include "rosrtl/thread.h"
-#else /* Assume kernel mode */
-#include <ddk/ntddk.h>
-#include <ddk/ntifs.h>
-#include <ddk/ntnls.h>
-#include <ddk/cfg.h>
-#include <evntrace.h>
-#include "ntos/types.h"
-#include "ntos/cdrom.h"
-#include "ntos/console.h"
-#include "ntos/disk.h"
-#include "ntos/tape.h"
-#include "ntos/except.h"
-#include "ntos/file.h"
-#include "ntos/gditypes.h"
-#include "ntos/heap.h"
-#include "ntos/keyboard.h"
-#include "ntos/minmax.h"
-#include "ntos/mm.h"
-#include "ntos/ntdef.h"
-#include "ntos/port.h"
-#include "ntos/ps.h"
-#include "ntos/registry.h"
-#include "ntos/security.h"
-#include "ntos/synch.h"
-#include "ntos/time.h"
-#include "napi/i386/segment.h"
-#include "napi/types.h"
-#include "napi/dbg.h"
-#include "napi/npipe.h"
-#include "napi/shared_data.h"
-#include "napi/win32.h"
-#include "ntos/rtltypes.h"
-#include "ntos/rtl.h"
-#include "ntos/zwtypes.h"
-#include "ntos/zw.h"
-#include "ntos/dbgfuncs.h"
-#include "ntos/service.h"
-#include "ntos/haltypes.h"
-#include "ntos/halfuncs.h"
-#include "ntos/kdfuncs.h"
-#include "ntos/kefuncs.h" /* AG */
-#include "ntos/fstypes.h" /* AG */
-#include "ntos/obtypes.h"
-#include "ntos/setypes.h"
-#include "ntos/sefuncs.h"
-#include "ntos/krnltypes.h"
-#include "ntos/tss.h"
-#include "rosrtl/thread.h"
-#endif
-
-#endif /* ndef _NTOS_H */
+++ /dev/null
-#ifndef __INCLUDE_NTOS_BOOTVID_H
-#define __INCLUDE_NTOS_BOOTVID_H
-
-VOID
-STDCALL
-InbvAcquireDisplayOwnership(VOID);
-
-BOOLEAN
-STDCALL
-InbvCheckDisplayOwnership(VOID);
-
-BOOLEAN
-STDCALL
-InbvDisplayString(IN PCHAR String);
-
-VOID
-STDCALL
-InbvEnableBootDriver(IN BOOLEAN Enable);
-
-BOOLEAN
-STDCALL
-InbvEnableDisplayString(IN BOOLEAN Enable);
-
-VOID
-STDCALL
-InbvInstallDisplayStringFilter(IN PVOID Unknown);
-
-BOOLEAN
-STDCALL
-InbvIsBootDriverInstalled(VOID);
-
-VOID
-STDCALL
-InbvNotifyDisplayOwnershipLost(IN PVOID Callback);
-
-BOOLEAN
-STDCALL
-InbvResetDisplay(VOID);
-
-VOID
-STDCALL
-InbvSetScrollRegion(IN ULONG Left,
- IN ULONG Top,
- IN ULONG Width,
- IN ULONG Height);
-
-VOID
-STDCALL
-InbvSetTextColor(IN ULONG Color);
-
-VOID
-STDCALL
-InbvSolidColorFill(IN ULONG Left,
- IN ULONG Top,
- IN ULONG Width,
- IN ULONG Height,
- IN ULONG Color);
-
-VOID
-STDCALL
-VidCleanUp(VOID);
-
-BOOLEAN
-STDCALL
-VidInitialize(VOID);
-
-BOOLEAN
-STDCALL
-VidResetDisplay(VOID);
-
-BOOLEAN
-STDCALL
-VidIsBootDriverInstalled(VOID);
-
-#endif /* __INCLUDE_NTOS_BOOTVID_H */
+++ /dev/null
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ntos/cdrom.h
- * PURPOSE: CD-ROM related definitions used by all the parts of the system
- * PROGRAMMER: Eric Kohl
- * UPDATE HISTORY:
- * 10/04/2002: Created
- */
-
-#ifndef __INCLUDE_NTOS_CDROM_H
-#define __INCLUDE_NTOS_CDROM_H
-
-
-#define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
-
-#define IOCTL_CDROM_READ_TOC CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_GET_LAST_SESSION CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_GET_DRIVE_GEOMETRY CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_CHECK_VERIFY CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_MEDIA_REMOVAL CTL_CODE(IOCTL_CDROM_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_EJECT_MEDIA CTL_CODE(IOCTL_CDROM_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_LOAD_MEDIA CTL_CODE(IOCTL_CDROM_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_RESERVE CTL_CODE(IOCTL_CDROM_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_RELEASE CTL_CODE(IOCTL_CDROM_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_CDROM_FIND_NEW_DEVICES CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-#define MAXIMUM_NUMBER_TRACKS 100
-#define MAXIMUM_CDROM_SIZE 804
-
-typedef struct _TRACK_DATA
-{
- UCHAR Reserved;
- UCHAR Control : 4;
- UCHAR Adr : 4;
- UCHAR TrackNumber;
- UCHAR Reserved1;
- UCHAR Address[4];
-} TRACK_DATA, *PTRACK_DATA;
-
-typedef struct _CDROM_TOC
-{
- UCHAR Length[2];
- UCHAR FirstTrack;
- UCHAR LastTrack;
- TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS];
-} CDROM_TOC, *PCDROM_TOC;
-
-#define CDROM_TOC_SIZE sizeof(CDROM_TOC)
-
-#endif /* __INCLUDE_NTOS_CDROM_H */
-
-/* EOF */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/console.h
- * PURPOSE: Console declarations used by all the parts of the
- * system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_CONSOLE_H
-#define __INCLUDE_CONSOLE_H
-
-/* GetConsoleMode */
-#define CONSOLE_INPUT_MODE_VALID (0x0f)
-#define CONSOLE_OUTPUT_MODE_VALID (0x03)
-
-typedef struct _CONSOLE_SELECTION_INFO {
- DWORD dwFlags;
- COORD dwSelectionAnchor;
- SMALL_RECT srSelection;
-} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO;
-
-#ifndef __USE_W32API
-
-typedef struct _CONSOLE_FONT_INFO {
- DWORD nFont;
- COORD dwFontSize;
-} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
-
-/* GetConsoleMode */
-#define ENABLE_LINE_INPUT (0x02)
-#define ENABLE_ECHO_INPUT (0x04)
-#define ENABLE_PROCESSED_INPUT (0x01)
-#define ENABLE_WINDOW_INPUT (0x08)
-#define ENABLE_MOUSE_INPUT (0x0f)
-#define ENABLE_PROCESSED_OUTPUT (0x01)
-#define ENABLE_WRAP_AT_EOL_OUTPUT (0x02)
-
-typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
- COORD dwSize;
- COORD dwCursorPosition;
- WORD wAttributes;
- SMALL_RECT srWindow;
- COORD dwMaximumWindowSize;
-} CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO ;
-
-typedef struct _CONSOLE_CURSOR_INFO {
- DWORD dwSize;
- BOOL bVisible;
-} CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO;
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_CONSOLE_H */
+++ /dev/null
-#ifndef __INCLUDE_NTOS_DBGFUNCS_H
-#define __INCLUDE_NTOS_DBGFUNCS_H
-/* $Id$ */
-
-#define DBG_STATUS_CONTROL_C 1
-#define DBG_STATUS_SYSRQ 2
-#define DBG_STATUS_BUGCHECK_FIRST 3
-#define DBG_STATUS_BUGCHECK_SECOND 4
-#define DBG_STATUS_FATAL 5
-
-
-#define DBG_GET_SHOW_FACILITY 0x0001
-#define DBG_GET_SHOW_SEVERITY 0x0002
-#define DBG_GET_SHOW_ERRCODE 0x0004
-#define DBG_GET_SHOW_ERRTEXT 0x0008
-VOID DbgGetErrorText(NTSTATUS ErrorCode, PUNICODE_STRING ErrorText, ULONG Flags);
-VOID DbgPrintErrorMessage(NTSTATUS ErrorCode);
-
-#endif /* __INCLUDE_NTOS_DBGFUNCS_H */
+++ /dev/null
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/disk.h
- * PURPOSE: Disk related definitions used by all the parts of the system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-#ifndef __INCLUDE_DISK_H
-#define __INCLUDE_DISK_H
-
-#ifndef __USE_W32API
-
-#define IOCTL_DISK_BASE FILE_DEVICE_DISK
-
-#define IOCTL_DISK_GET_DRIVE_GEOMETRY CTL_CODE(IOCTL_DISK_BASE, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_GET_PARTITION_INFO CTL_CODE(IOCTL_DISK_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_SET_PARTITION_INFO CTL_CODE(IOCTL_DISK_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_GET_DRIVE_LAYOUT CTL_CODE(IOCTL_DISK_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_SET_DRIVE_LAYOUT CTL_CODE(IOCTL_DISK_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_VERIFY CTL_CODE(IOCTL_DISK_BASE, 0x0005, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_FORMAT_TRACKS CTL_CODE(IOCTL_DISK_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_REASSIGN_BLOCKS CTL_CODE(IOCTL_DISK_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_PERFORMANCE CTL_CODE(IOCTL_DISK_BASE, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_IS_WRITABLE CTL_CODE(IOCTL_DISK_BASE, 0x0009, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_LOGGING CTL_CODE(IOCTL_DISK_BASE, 0x000A, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_FORMAT_TRACKS_EX CTL_CODE(IOCTL_DISK_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_HISTOGRAM_STRUCTURE CTL_CODE(IOCTL_DISK_BASE, 0x000C, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_HISTOGRAM_DATA CTL_CODE(IOCTL_DISK_BASE, 0x000D, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_HISTOGRAM_RESET CTL_CODE(IOCTL_DISK_BASE, 0x000E, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_REQUEST_STRUCTURE CTL_CODE(IOCTL_DISK_BASE, 0x000F, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_REQUEST_DATA CTL_CODE(IOCTL_DISK_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_CONTRIOLLER_NUMBER CTL_CODE(IOCTL_DISK_BASE, 0x0011, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define SMART_GET_VERSION CTL_CODE(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define SMART_SEND_DRIVE_COMMAND CTL_CODE(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define SMART_RCV_DRIVE_DATA CTL_CODE(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_INTERNAL_SET_VERIFY CTL_CODE(IOCTL_DISK_BASE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define IOCTL_DISK_INTERNAL_CLEAR_VERIFY CTL_CODE(IOCTL_DISK_BASE, 0x0101, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_CHECK_VERIFY CTL_CODE(IOCTL_DISK_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_MEDIA_REMOVAL CTL_CODE(IOCTL_DISK_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_EJECT_MEDIA CTL_CODE(IOCTL_DISK_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_LOAD_MEDIA CTL_CODE(IOCTL_DISK_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_RESERVE CTL_CODE(IOCTL_DISK_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_RELEASE CTL_CODE(IOCTL_DISK_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_FIND_NEW_DEVICES CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_DISK_GET_MEDIA_TYPES CTL_CODE(IOCTL_DISK_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-#define PARTITION_ENTRY_UNUSED 0x00
-#define PARTITION_FAT_12 0x01
-#define PARTITION_XENIX_1 0x02
-#define PARTITION_XENIX_2 0x03
-#define PARTITION_FAT_16 0x04
-#define PARTITION_EXTENDED 0x05
-#define PARTITION_HUGE 0x06
-#define PARTITION_IFS 0x07
-#define PARTITION_FAT32 0x0B
-#define PARTITION_FAT32_XINT13 0x0C
-#define PARTITION_XINT13 0x0E
-#define PARTITION_XINT13_EXTENDED 0x0F
-#define PARTITION_PREP 0x41
-#define PARTITION_LDM 0x42
-#define PARTITION_UNIX 0x63
-#define PARTITION_EXT2 0x83
-
-#define PARTITION_NTFT 0x80
-#define VALID_NTFT 0xC0
-
-#if 0
-#define PTEmpty 0x00
-#define PTDOS3xPrimary 0x01
-#define PTXENIXRoot 0x02
-#define PTXENIXUsr 0x03
-#define PTOLDDOS16Bit 0x04
-#define PTDosExtended 0x05
-#define PTDos5xPrimary 0x06
-#define PTIfs 0x07 /* e.g.: HPFS, NTFS, etc */
-#define PTAIX 0x08
-#define PTAIXBootable 0x09
-#define PTOS2BootMgr 0x0A
-#define PTWin95FAT32 0x0B
-#define PTWin95FAT32LBA 0x0C
-#define PTWin95FAT16LBA 0x0E
-#define PTWin95ExtendedLBA 0x0F
-#define PTVenix286 0x40
-#define PTNovell 0x51
-#define PTMicroport 0x52
-#define PTGnuHurd 0x63
-#define PTNetware286 0x64
-#define PTNetware386 0x65
-#define PTPCIX 0x75
-#define PTOldMinix 0x80
-#define PTMinix 0x81
-#define PTLinuxSwap 0x82
-#define PTLinuxExt2 0x83
-#define PTAmoeba 0x93
-#define PTAmoebaBBT 0x94
-#define PTBSD 0xA5
-#define PTBSDIFS 0xB7
-#define PTBSDISwap 0xB8
-#define PTSyrinx 0xC7
-#define PTCPM 0xDB
-#define PTDOSAccess 0xE1
-#define PTDOSRO 0xE3
-#define PTDOSSecondary 0xF2
-#define PTBBT 0xFF
-#endif
-
-#define IsRecognizedPartition(P) \
- ((P) == PARTITION_FAT_12 || \
- (P) == PARTITION_FAT_16 || \
- (P) == PARTITION_HUGE || \
- (P) == PARTITION_IFS || \
- (P) == PARTITION_FAT32 || \
- (P) == PARTITION_FAT32_XINT13 || \
- (P) == PARTITION_XINT13 || \
- (P) == PARTITION_EXT2)
-
-#define IsContainerPartition(P) \
- ((P) == PARTITION_EXTENDED || \
- (P) == PARTITION_XINT13_EXTENDED)
-
-
-typedef enum _MEDIA_TYPE
-{
- Unknown,
- F5_1Pt2_512,
- F3_1Pt44_512,
- F3_2Pt88_512,
- F3_20Pt8_512,
- F3_720_512,
- F5_360_512,
- F5_320_512,
- F5_320_1024,
- F5_180_512,
- F5_160_512,
- RemovableMedia,
- FixedMedia
-} MEDIA_TYPE;
-
-typedef struct _PARTITION_INFORMATION
-{
- LARGE_INTEGER StartingOffset;
- LARGE_INTEGER PartitionLength;
- DWORD HiddenSectors;
- DWORD PartitionNumber;
- BYTE PartitionType;
- BOOLEAN BootIndicator;
- BOOLEAN RecognizedPartition;
- BOOLEAN RewritePartition;
-} PARTITION_INFORMATION, *PPARTITION_INFORMATION;
-
-typedef struct _SET_PARTITION_INFORMATION
-{
- ULONG PartitionType;
-} SET_PARTITION_INFORMATION, *PSET_PARTITION_INFORMATION;
-
-typedef struct _DISK_GEOMETRY
-{
- LARGE_INTEGER Cylinders;
- MEDIA_TYPE MediaType;
- DWORD TracksPerCylinder;
- DWORD SectorsPerTrack;
- DWORD BytesPerSector;
-} DISK_GEOMETRY, *PDISK_GEOMETRY;
-
-typedef struct _DRIVE_LAYOUT_INFORMATION
-{
- DWORD PartitionCount;
- DWORD Signature;
- PARTITION_INFORMATION PartitionEntry[1];
-} DRIVE_LAYOUT_INFORMATION;
-
-typedef DRIVE_LAYOUT_INFORMATION *PDRIVE_LAYOUT_INFORMATION;
-#endif
-
-#endif /* __INCLUDE_DISK_H */
-
-/* EOF */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ntos/except.h
- * PURPOSE: Exception handling structures
- * PROGRAMMER: Casper S. Hornstrup <chorns@users.sourceforge.net>
- */
-
-#ifndef __INCLUDE_EXCEPT_H
-#define __INCLUDE_EXCEPT_H
-
-typedef enum {
- ExceptionContinueExecution = 0,
- ExceptionContinueSearch,
- ExceptionNestedException,
- ExceptionCollidedUnwind,
- ExceptionDismiss = 0 /* assuming this is the same thing as DISPOSITION_DISMISS */
-} EXCEPTION_DISPOSITION;
-
-
-struct _EXCEPTION_RECORD;
-struct _EXCEPTION_REGISTRATION;
-
-/*
- * The type of function that is expected as an exception handler to be
- * installed with _try1.
- */
-#ifdef __GNUC__
-typedef EXCEPTION_DISPOSITION (CDECL *PEXCEPTION_HANDLER)(
- struct _EXCEPTION_RECORD* ExceptionRecord,
- struct _EXCEPTION_REGISTRATION* ExceptionRegistration,
- PCONTEXT Context,
- PVOID DispatcherContext);
-#else
-typedef EXCEPTION_DISPOSITION (CDECL *PEXCEPTION_HANDLER)(
- struct _EXCEPTION_RECORD* ExceptionRecord,
- struct _EXCEPTION_REGISTRATION* ExceptionRegistration,
- PCONTEXT Context,
- PVOID DispatcherContext);
-#endif /*__GNUC__*/
-
-#ifndef __USE_W32API
-
-#define EXCEPTION_MAXIMUM_PARAMETERS (15)
-
-typedef struct _EXCEPTION_RECORD {
- DWORD ExceptionCode;
- DWORD ExceptionFlags;
- struct _EXCEPTION_RECORD *ExceptionRecord;
- PVOID ExceptionAddress;
- DWORD NumberParameters;
- DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
-} EXCEPTION_RECORD, *PEXCEPTION_RECORD, *LPEXCEPTION_RECORD;
-
-#endif /* !__USE_W32API */
-
-/* ExceptionFlags */
-#ifndef _GNU_H_WINDOWS32_DEFINES
-#ifdef __NTOSKRNL__
-#ifndef EXCEPTION_NONCONTINUABLE
-#define EXCEPTION_NONCONTINUABLE 0x01
-#endif
-#endif /* __NTOSKRNL__ */
-#endif /* _GNU_H_WINDOWS32_DEFINES */
-#define EXCEPTION_UNWINDING 0x02
-#define EXCEPTION_EXIT_UNWIND 0x04
-#define EXCEPTION_STACK_INVALID 0x08
-#define EXCEPTION_NESTED_CALL 0x10
-
-
-typedef struct _EXCEPTION_REGISTRATION
-{
- struct _EXCEPTION_REGISTRATION* prev;
- PEXCEPTION_HANDLER handler;
-} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
-
-typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
-typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
-
-
-/*
- * A macro which installs the supplied exception handler.
- * Push the pointer to the new handler onto the stack,
- * then push the pointer to the old registration structure (at fs:0)
- * onto the stack, then put a pointer to the new registration
- * structure (i.e. the current stack pointer) at fs:0.
- */
-#define __try1(pHandler) \
- __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
-
-
-/*
- * A macro which (dispite its name) *removes* an installed
- * exception handler. Should be used only in conjunction with the above
- * install routine __try1.
- * Move the pointer to the old reg. struct (at the current stack
- * position) to fs:0, replacing the pointer we installed above,
- * then add 8 to the stack pointer to get rid of the space we
- * used when we pushed on our new reg. struct above. Notice that
- * the stack must be in the exact state at this point that it was
- * after we did _try1 or this will smash things.
- */
-#define __except1 \
- __asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
- : : : "%eax");
-
-
-#if 1
-
-/* Runtime DLL structures */
-
-#ifndef _GNU_H_WINDOWS32_DEFINES
-#ifdef __NTOSKRNL__
-#define EXCEPTION_EXECUTE_HANDLER 1
-#define EXCEPTION_CONTINUE_SEARCH 0
-/* #define EXCEPTION_CONTINUE_EXECUTION -1 */
-#endif /* __NTOSKRNL__ */
-#endif /* _GNU_H_WINDOWS32_DEFINES */
-
-/* Functions of the following prototype return one of the above constants */
-#ifdef __GNUC__
-typedef DWORD CDECL (*PSCOPE_EXCEPTION_FILTER)(VOID);
-typedef VOID CDECL (*PSCOPE_EXCEPTION_HANDLER)(VOID);
-#else
-typedef DWORD (CDECL *PSCOPE_EXCEPTION_FILTER)(VOID);
-typedef VOID (CDECL *PSCOPE_EXCEPTION_HANDLER)(VOID);
-#endif /*__GNUC__*/
-
-typedef struct _SCOPETABLE_ENTRY
-{
- DWORD PreviousTryLevel;
- PSCOPE_EXCEPTION_FILTER FilterRoutine;
- PSCOPE_EXCEPTION_HANDLER HandlerRoutine;
-} SCOPETABLE_ENTRY, *PSCOPETABLE_ENTRY;
-
-/*
- Other structures preceeding this structure:
- ULONG_PTR StandardESPInFrame;
- LPEXCEPTION_POINTERS ExceptionPointers;
- */
-typedef struct _RTL_EXCEPTION_REGISTRATION_I386
-{
- EXCEPTION_REGISTRATION OS;
- PSCOPETABLE_ENTRY ScopeTable;
- DWORD TryLevel;
- /* Value of EBP before the EXCEPTION_REGISTRATION was created */
- ULONG_PTR Ebp;
-} RTL_EXCEPTION_REGISTRATION_I386, *PRTL_EXCEPTION_REGISTRATION_I386;
-
-#define TRYLEVEL_NONE -1
-
-typedef RTL_EXCEPTION_REGISTRATION_I386 RTL_EXCEPTION_REGISTRATION;
-typedef PRTL_EXCEPTION_REGISTRATION_I386 PRTL_EXCEPTION_REGISTRATION;
-
-#endif
-
-#ifndef __USE_W32API
-
-#define EXCEPTION_MAXIMUM_PARAMETERS (15)
-
-typedef struct _EXCEPTION_POINTERS {
- PEXCEPTION_RECORD ExceptionRecord;
- PCONTEXT ContextRecord;
-} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS, *LPEXCEPTION_POINTERS;
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_EXCEPT_H */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ps.h
- * PURPOSE: Filesystem declarations used by all the parts of the
- * system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_FILE_H
-#define __INCLUDE_FILE_H
-
-#ifndef __USE_W32API
-
-#define FILE_READ_DATA ( 0x0001 ) /* file & pipe */
-#define FILE_LIST_DIRECTORY ( 0x0001 ) /* directory */
-
-#define FILE_WRITE_DATA ( 0x0002 ) /* file & pipe */
-#define FILE_ADD_FILE ( 0x0002 ) /* directory */
-
-#define FILE_APPEND_DATA ( 0x0004 ) /* file */
-#define FILE_ADD_SUBDIRECTORY ( 0x0004 ) /* directory */
-#define FILE_CREATE_PIPE_INSTANCE ( 0x0004 ) /* named pipe */
-
-#define FILE_READ_EA ( 0x0008 ) /* file & directory */
-#define FILE_READ_PROPERTIES FILE_READ_EA
-
-#define FILE_WRITE_EA ( 0x0010 ) /* file & directory */
-#define FILE_WRITE_PROPERTIES FILE_WRITE_EA
-
-#define FILE_EXECUTE ( 0x0020 ) /* file */
-#define FILE_TRAVERSE ( 0x0020 ) /* directory */
-
-#define FILE_DELETE_CHILD ( 0x0040 ) /* directory */
-
-#define FILE_READ_ATTRIBUTES ( 0x0080 ) /* all */
-
-#define FILE_WRITE_ATTRIBUTES ( 0x0100 ) /* all */
-
-#define FILE_SHARE_DELETE (4)
-#define FILE_SHARE_READ (1)
-#define FILE_SHARE_WRITE (2)
-#define CONSOLE_TEXTMODE_BUFFER (1)
-#define CREATE_NEW (1)
-#define CREATE_ALWAYS (2)
-#define OPEN_EXISTING (3)
-#define OPEN_ALWAYS (4)
-#define TRUNCATE_EXISTING (5)
-#define FILE_ATTRIBUTE_ARCHIVE (32)
-#define FILE_ATTRIBUTE_COMPRESSED (2048)
-#define FILE_ATTRIBUTE_DEVICE (64)
-#define FILE_ATTRIBUTE_NORMAL (128)
-#define FILE_ATTRIBUTE_DIRECTORY (16)
-#define FILE_ATTRIBUTE_ENCRYPTED (16384)
-#define FILE_ATTRIBUTE_HIDDEN (2)
-#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED (8192)
-#define FILE_ATTRIBUTE_OFFLINE (4096)
-#define FILE_ATTRIBUTE_READONLY (1)
-#define FILE_ATTRIBUTE_REPARSE_POINT (1024)
-#define FILE_ATTRIBUTE_SPARSE_FILE (512)
-#define FILE_ATTRIBUTE_SYSTEM (4)
-#define FILE_ATTRIBUTE_TEMPORARY (256)
-#define FILE_ATTRIBUTE_VALID_FLAGS (0x00007fb7)
-#define FILE_ATTRIBUTE_VALID_SET_FLAGS (0x000031a7)
-#define FILE_FLAG_WRITE_THROUGH (0x80000000)
-#define FILE_FLAG_OVERLAPPED (0x40000000)
-#define FILE_FLAG_NO_BUFFERING (0x20000000)
-#define FILE_FLAG_RANDOM_ACCESS (0x10000000)
-#define FILE_FLAG_SEQUENTIAL_SCAN (0x08000000)
-#define FILE_FLAG_DELETE_ON_CLOSE (0x04000000)
-#define FILE_FLAG_BACKUP_SEMANTICS (0x02000000)
-#define FILE_FLAG_POSIX_SEMANTICS (0x01000000)
-
-/* GetVolumeInformation */
-#define FS_CASE_IS_PRESERVED (2)
-#define FS_CASE_SENSITIVE (1)
-#define FS_UNICODE_STORED_ON_DISK (4)
-#define FS_PERSISTENT_ACLS (8)
-#define FS_FILE_COMPRESSION (16)
-#define FS_VOL_IS_COMPRESSED (32768)
-
-/* NtQueryVolumeInformationFile */
-#define FILE_CASE_SENSITIVE_SEARCH (0x00000001)
-#define FILE_CASE_PRESERVED_NAMES (0x00000002)
-#define FILE_UNICODE_ON_DISK (0x00000004)
-#define FILE_PERSISTENT_ACLS (0x00000008)
-#define FILE_FILE_COMPRESSION (0x00000010)
-#define FILE_VOLUME_IS_COMPRESSED (0x00008000)
-
-#define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
-
-#define FILE_GENERIC_READ (STANDARD_RIGHTS_READ |\
- FILE_READ_DATA |\
- FILE_READ_ATTRIBUTES |\
- FILE_READ_EA |\
- SYNCHRONIZE)
-
-
-#define FILE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE |\
- FILE_WRITE_DATA |\
- FILE_WRITE_ATTRIBUTES |\
- FILE_WRITE_EA |\
- FILE_APPEND_DATA |\
- SYNCHRONIZE)
-
-#define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
- FILE_READ_ATTRIBUTES |\
- FILE_EXECUTE |\
- SYNCHRONIZE)
-
-#endif /* !__USE_W32API */
-
-
-#endif /* __INCLUDE_FILE_H */
+++ /dev/null
-#ifndef __INCLUDE_NTOS_FSTYPES_H
-#define __INCLUDE_NTOS_FSTYPES_H
-
-#define FSRTL_TAG TAG('F','S','r','t')
-
-
-typedef ULONG LBN;
-typedef LBN *PLBN;
-
-typedef ULONG VBN;
-typedef VBN *PVBN;
-
-#ifndef __USE_W32API
-typedef struct _LARGE_MCB
-{
- PFAST_MUTEX FastMutex;
- ULONG MaximumPairCount;
- ULONG PairCount;
- POOL_TYPE PoolType;
- PVOID Mapping;
-} LARGE_MCB, *PLARGE_MCB;
-
-typedef struct _MCB {
- LARGE_MCB LargeMcb;
-} MCB, *PMCB;
-#endif
-
-typedef struct _MAILSLOT_CREATE_PARAMETERS
-{
- ULONG MailslotQuota;
- ULONG MaximumMessageSize;
- LARGE_INTEGER ReadTimeout;
- BOOLEAN TimeoutSpecified;
-} MAILSLOT_CREATE_PARAMETERS, *PMAILSLOT_CREATE_PARAMETERS;
-
-typedef struct _NAMED_PIPE_CREATE_PARAMETERS
-{
- ULONG NamedPipeType;
- ULONG ReadMode;
- ULONG CompletionMode;
- ULONG MaximumInstances;
- ULONG InboundQuota;
- ULONG OutboundQuota;
- LARGE_INTEGER DefaultTimeout;
- BOOLEAN TimeoutSpecified;
-} NAMED_PIPE_CREATE_PARAMETERS, *PNAMED_PIPE_CREATE_PARAMETERS;
-
-#endif /* __INCLUDE_DDK_FSTYPES_H */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ntos/gditypes.h
- * PURPOSE: Common GDI definitions
- * PROGRAMMER: Eric Kohl <ekohl@rz-online.de>
- * UPDATE HISTORY:
- * 25/06/2001: Created
-*/
-
-#ifndef __INCLUDE_NTOS_GDITYPES_H
-#define __INCLUDE_NTOS_GDITYPES_H
-
-#ifndef __USE_W32API
-
-#define CCHDEVICENAME (32)
-#define CCHFORMNAME (32)
-
-typedef struct _devicemodeA
-{
- BYTE dmDeviceName[CCHDEVICENAME];
- WORD dmSpecVersion;
- WORD dmDriverVersion;
- WORD dmSize;
- WORD dmDriverExtra;
- DWORD dmFields;
- union
- {
- struct
- {
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- };
- struct
- {
- LONG x;
- LONG y;
- } dmPosition;
- };
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- BYTE dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- union
- {
- DWORD dmDisplayFlags;
- DWORD dmNup;
- };
- DWORD dmDisplayFrequency;
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- union
- {
- DWORD dmICCManufacturer;
- DWORD dmReserved1;
- };
- union
- {
- DWORD dmICCModel;
- DWORD dmReserved2;
- };
- DWORD dmPanningWidth;
- DWORD dmPanningHeight;
-} DEVMODEA,*LPDEVMODEA,*PDEVMODEA;
-
-typedef struct _devicemodeW
-{
- WCHAR dmDeviceName[CCHDEVICENAME];
- WORD dmSpecVersion;
- WORD dmDriverVersion;
- WORD dmSize;
- WORD dmDriverExtra;
- DWORD dmFields;
- union
- {
- struct
- {
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- };
- struct
- {
- LONG x;
- LONG y;
- } dmPosition;
- };
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- WCHAR dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- union
- {
- DWORD dmDisplayFlags;
- DWORD dmNup;
- };
- DWORD dmDisplayFrequency;
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- union
- {
- DWORD dmICCManufacturer;
- DWORD dmReserved1;
- };
- union
- {
- DWORD dmICCModel;
- DWORD dmReserved2;
- };
- DWORD dmPanningWidth;
- DWORD dmPanningHeight;
-} DEVMODEW,*LPDEVMODEW,*PDEVMODEW;
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_NTOS_GDITYPES_H */
-
-/* EOF */
+++ /dev/null
-#ifndef __INCLUDE_NTOS_HALFUNCS_H
-#define __INCLUDE_NTOS_HALFUNCS_H
-
-#include <ntos/haltypes.h>
-
-NTSTATUS STDCALL
-HalAdjustResourceList(PCM_RESOURCE_LIST Resources);
-
-BOOLEAN STDCALL
-HalAllProcessorsStarted(VOID);
-
-VOID
-STDCALL
-HalDisplayString (
- IN PCHAR String
-);
-
-BOOLEAN STDCALL
-HalBeginSystemInterrupt(ULONG Vector,
- KIRQL Irql,
- PKIRQL OldIrql);
-
-VOID STDCALL
-HalCalibratePerformanceCounter(ULONG Count);
-
-BOOLEAN STDCALL
-HalDisableSystemInterrupt(ULONG Vector,
- KIRQL Irql);
-
-VOID STDCALL
-HalDisplayString(IN PCH String);
-
-BOOLEAN STDCALL
-HalEnableSystemInterrupt(ULONG Vector,
- KIRQL Irql,
- KINTERRUPT_MODE InterruptMode);
-
-VOID STDCALL
-HalEndSystemInterrupt(KIRQL Irql,
- ULONG Unknown2);
-
-BOOLEAN STDCALL
-HalFlushCommonBuffer(ULONG Unknown1,
- ULONG Unknown2,
- ULONG Unknown3,
- ULONG Unknown4,
- ULONG Unknown5,
- ULONG Unknown6,
- ULONG Unknown7,
- ULONG Unknown8);
-
-BOOLEAN STDCALL
-HalGetEnvironmentVariable(IN PCH Name,
- OUT PCH Value,
- IN USHORT ValueLength);
-
-VOID STDCALL
-HalInitializeProcessor(ULONG ProcessorNumber,
- PVOID ProcessorStack);
-
-BOOLEAN STDCALL
-HalInitSystem(ULONG BootPhase,
- PLOADER_PARAMETER_BLOCK LoaderBlock);
-
-VOID STDCALL
-HalQueryDisplayParameters(PULONG DispSizeX,
- PULONG DispSizeY,
- PULONG CursorPosX,
- PULONG CursorPosY);
-
-VOID STDCALL
-HalQueryRealTimeClock(PTIME_FIELDS Time);
-
-VOID STDCALL
-HalReportResourceUsage(VOID);
-
-VOID STDCALL
-HalRequestIpi(ULONG Unknown);
-
-VOID STDCALL
-HalSetDisplayParameters(ULONG CursorPosX,
- ULONG CursorPosY);
-
-BOOLEAN STDCALL
-HalSetEnvironmentVariable(IN PCH Name,
- IN PCH Value);
-
-ULONG FASTCALL
-HalSystemVectorDispatchEntry(ULONG Unknown1,
- ULONG Unknown2,
- ULONG Unknown3);
-
-BOOLEAN STDCALL
-HalStartNextProcessor(ULONG Unknown1,
- ULONG Unknown2);
-
-VOID
-STDCALL
-IoAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
- IN PSTRING NtDeviceName,
- OUT PUCHAR NtSystemPath,
- OUT PSTRING NtSystemPathString);
-
-KIRQL
-STDCALL
-KeRaiseIrqlToSynchLevel(VOID);
-
-VOID STDCALL
-HalReturnToFirmware(ULONG Action);
-
-VOID FASTCALL
-HalRequestSoftwareInterrupt(KIRQL SoftwareInterruptRequested);
-
-/*
- * Kernel debugger support functions
- */
-
-BOOLEAN STDCALL
-KdPortInitialize(PKD_PORT_INFORMATION PortInformation,
- DWORD Unknown1,
- DWORD Unknown2);
-
-BOOLEAN STDCALL
-KdPortGetByte(PUCHAR ByteRecieved);
-
-BOOLEAN STDCALL
-KdPortPollByte(PUCHAR ByteRecieved);
-
-VOID STDCALL
-KdPortPutByte(UCHAR ByteToSend);
-
-/* Non-standard functions */
-VOID STDCALL
-HalReleaseDisplayOwnership();
-
-BOOLEAN STDCALL
-HalQueryDisplayOwnership();
-
-#endif /* __INCLUDE_NTOS_HALDDK_H */
-
-/* EOF */
+++ /dev/null
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ddk/haltypes.h
- * PURPOSE: HAL provided defintions for device drivers
- * PROGRAMMER: David Welch (welch@mcmail.com)
- * REVISION HISTORY:
- * 23/06/98: Taken from linux system.h
- */
-
-
-#ifndef __INCLUDE_NTOS_HALTYPES_H
-#define __INCLUDE_NTOS_HALTYPES_H
-
-#ifndef STDCALL_FUNC
-#define STDCALL_FUNC(a) (STDCALL a)
-#endif
-#ifndef FASTCALL_FUNC
-#define FASTCALL_FUNC(a) (FASTCALL a)
-#endif
-
-#include "types.h"
-
-
-/* HalReturnToFirmware */
-typedef enum _FIRMWARE_ENTRY
-{
- HalHaltRoutine,
- HalPowerDownRoutine,
- HalRestartRoutine,
- HalRebootRoutine,
- HalInteractiveModeRoutine,
- HalMaximumRoutine
-} FIRMWARE_REENTRY, *PFIRMWARE_REENTRY;
-
-#ifndef __USE_W32API
-
-enum
-{
- DEVICE_DESCRIPTION_VERSION,
- DEVICE_DESCRIPTION_VERSION1,
-};
-
-/*
- * DMA speed specifiers
- */
-typedef enum _DMA_SPEED
-{
- Compatible,
- TypeA,
- TypeB,
- TypeC,
- TypeF,
- MaximumDmaSpeed
-} DMA_SPEED, *PDMA_SPEED;
-
-/*
- * DMA width specifiers
- */
-typedef enum _DMA_WIDTH
-{
- Width8Bits,
- Width16Bits,
- Width32Bits,
- MaximumDmaWidth
-} DMA_WIDTH, *PDMA_WIDTH;
-
-/*
- * PURPOSE: Types for HalGetBusData
- */
-typedef enum _BUS_DATA_TYPE
-{
- ConfigurationSpaceUndefined = -1,
- Cmos,
- EisaConfiguration,
- Pos,
- CbusConfiguration,
- PCIConfiguration,
- VMEConfiguration,
- NuBusConfiguration,
- PCMCIAConfiguration,
- MPIConfiguration,
- MPSAConfiguration,
- PNPISAConfiguration,
- MaximumBusDataType,
-} BUS_DATA_TYPE, *PBUS_DATA_TYPE;
-
-typedef struct _DEVICE_DESCRIPTION
-{
- ULONG Version;
- BOOLEAN Master;
- BOOLEAN ScatterGather;
- BOOLEAN DemandMode;
- BOOLEAN AutoInitialize;
- BOOLEAN Dma32BitAddresses;
- BOOLEAN IgnoreCount;
- BOOLEAN Reserved1; /* Must be false */
- BOOLEAN Dma64BitAddresses;
- ULONG BusNumber;
- ULONG DmaChannel;
- INTERFACE_TYPE InterfaceType;
- DMA_WIDTH DmaWidth;
- DMA_SPEED DmaSpeed;
- ULONG MaximumLength;
- ULONG DmaPort;
-} DEVICE_DESCRIPTION, *PDEVICE_DESCRIPTION;
-
-
-/* PCI bus definitions */
-
-#define PCI_TYPE0_ADDRESSES 6
-#define PCI_TYPE1_ADDRESSES 2
-#define PCI_TYPE2_ADDRESSES 5
-
-typedef struct _PCI_COMMON_CONFIG
-{
- USHORT VendorID; /* read-only */
- USHORT DeviceID; /* read-only */
- USHORT Command;
- USHORT Status;
- UCHAR RevisionID; /* read-only */
- UCHAR ProgIf; /* read-only */
- UCHAR SubClass; /* read-only */
- UCHAR BaseClass; /* read-only */
- UCHAR CacheLineSize; /* read-only */
- UCHAR LatencyTimer; /* read-only */
- UCHAR HeaderType; /* read-only */
- UCHAR BIST;
- union
- {
- struct _PCI_HEADER_TYPE_0
- {
- ULONG BaseAddresses[PCI_TYPE0_ADDRESSES];
- ULONG CIS;
- USHORT SubVendorID;
- USHORT SubSystemID;
- ULONG ROMBaseAddress;
- ULONG Reserved2[2];
-
- UCHAR InterruptLine;
- UCHAR InterruptPin; /* read-only */
- UCHAR MinimumGrant; /* read-only */
- UCHAR MaximumLatency; /* read-only */
- } type0;
-
- /* PCI to PCI Bridge */
- struct _PCI_HEADER_TYPE_1
- {
- ULONG BaseAddresses[PCI_TYPE1_ADDRESSES];
- UCHAR PrimaryBus;
- UCHAR SecondaryBus;
- UCHAR SubordinateBus;
- UCHAR SecondaryLatency;
- UCHAR IOBase;
- UCHAR IOLimit;
- USHORT SecondaryStatus;
- USHORT MemoryBase;
- USHORT MemoryLimit;
- USHORT PrefetchBase;
- USHORT PrefetchLimit;
- ULONG PrefetchBaseUpper32;
- ULONG PrefetchLimitUpper32;
- USHORT IOBaseUpper16;
- USHORT IOLimitUpper16;
- UCHAR CapabilitiesPtr;
- UCHAR Reserved1[3];
- ULONG ROMBaseAddress;
- UCHAR InterruptLine;
- UCHAR InterruptPin;
- USHORT BridgeControl;
- } type1;
-
- /* PCI to CARDBUS Bridge */
- struct _PCI_HEADER_TYPE_2
- {
- ULONG SocketRegistersBaseAddress;
- UCHAR CapabilitiesPtr;
- UCHAR Reserved;
- USHORT SecondaryStatus;
- UCHAR PrimaryBus;
- UCHAR SecondaryBus;
- UCHAR SubordinateBus;
- UCHAR SecondaryLatency;
- struct
- {
- ULONG Base;
- ULONG Limit;
- } Range[PCI_TYPE2_ADDRESSES-1];
- UCHAR InterruptLine;
- UCHAR InterruptPin;
- USHORT BridgeControl;
- } type2;
- } u;
- UCHAR DeviceSpecific[192];
-} PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG;
-
-#define PCI_COMMON_HDR_LENGTH (FIELD_OFFSET (PCI_COMMON_CONFIG, DeviceSpecific))
-
-#define PCI_MAX_DEVICES 32
-#define PCI_MAX_FUNCTION 8
-#define PCI_MAX_BRIDGE_NUMBER 0xFF
-
-#define PCI_INVALID_VENDORID 0xFFFF
-
-/* Bit encodings for PCI_COMMON_CONFIG.HeaderType */
-
-#define PCI_MULTIFUNCTION 0x80
-#define PCI_DEVICE_TYPE 0x00
-#define PCI_BRIDGE_TYPE 0x01
-#define PCI_CARDBUS_BRIDGE_TYPE 0x02
-
-#define PCI_CONFIGURATION_TYPE(PciData) \
- (((PPCI_COMMON_CONFIG)(PciData))->HeaderType & ~PCI_MULTIFUNCTION)
-
-#define PCI_MULTIFUNCTION_DEVICE(PciData) \
- ((((PPCI_COMMON_CONFIG)(PciData))->HeaderType & PCI_MULTIFUNCTION) != 0)
-
-
-/* Bit encodings for PCI_COMMON_CONFIG.Command */
-
-#define PCI_ENABLE_IO_SPACE 0x0001
-#define PCI_ENABLE_MEMORY_SPACE 0x0002
-#define PCI_ENABLE_BUS_MASTER 0x0004
-#define PCI_ENABLE_SPECIAL_CYCLES 0x0008
-#define PCI_ENABLE_WRITE_AND_INVALIDATE 0x0010
-#define PCI_ENABLE_VGA_COMPATIBLE_PALETTE 0x0020
-#define PCI_ENABLE_PARITY 0x0040
-#define PCI_ENABLE_WAIT_CYCLE 0x0080
-#define PCI_ENABLE_SERR 0x0100
-#define PCI_ENABLE_FAST_BACK_TO_BACK 0x0200
-
-
-/* Bit encodings for PCI_COMMON_CONFIG.Status */
-
-#define PCI_STATUS_FAST_BACK_TO_BACK 0x0080
-#define PCI_STATUS_DATA_PARITY_DETECTED 0x0100
-#define PCI_STATUS_DEVSEL 0x0600 /* 2 bits wide */
-#define PCI_STATUS_SIGNALED_TARGET_ABORT 0x0800
-#define PCI_STATUS_RECEIVED_TARGET_ABORT 0x1000
-#define PCI_STATUS_RECEIVED_MASTER_ABORT 0x2000
-#define PCI_STATUS_SIGNALED_SYSTEM_ERROR 0x4000
-#define PCI_STATUS_DETECTED_PARITY_ERROR 0x8000
-
-
-/* PCI device classes */
-
-#define PCI_CLASS_PRE_20 0x00
-#define PCI_CLASS_MASS_STORAGE_CTLR 0x01
-#define PCI_CLASS_NETWORK_CTLR 0x02
-#define PCI_CLASS_DISPLAY_CTLR 0x03
-#define PCI_CLASS_MULTIMEDIA_DEV 0x04
-#define PCI_CLASS_MEMORY_CTLR 0x05
-#define PCI_CLASS_BRIDGE_DEV 0x06
-#define PCI_CLASS_SIMPLE_COMMS_CTLR 0x07
-#define PCI_CLASS_BASE_SYSTEM_DEV 0x08
-#define PCI_CLASS_INPUT_DEV 0x09
-#define PCI_CLASS_DOCKING_STATION 0x0a
-#define PCI_CLASS_PROCESSOR 0x0b
-#define PCI_CLASS_SERIAL_BUS_CTLR 0x0c
-
-
-/* PCI device subclasses for class 0 */
-
-#define PCI_SUBCLASS_PRE_20_NON_VGA 0x00
-#define PCI_SUBCLASS_PRE_20_VGA 0x01
-
-
-/* PCI device subclasses for class 1 (mass storage controllers)*/
-
-#define PCI_SUBCLASS_MSC_SCSI_BUS_CTLR 0x00
-#define PCI_SUBCLASS_MSC_IDE_CTLR 0x01
-#define PCI_SUBCLASS_MSC_FLOPPY_CTLR 0x02
-#define PCI_SUBCLASS_MSC_IPI_CTLR 0x03
-#define PCI_SUBCLASS_MSC_RAID_CTLR 0x04
-#define PCI_SUBCLASS_MSC_OTHER 0x80
-
-
-/* PCI device subclasses for class 2 (network controllers)*/
-
-#define PCI_SUBCLASS_NET_ETHERNET_CTLR 0x00
-#define PCI_SUBCLASS_NET_TOKEN_RING_CTLR 0x01
-#define PCI_SUBCLASS_NET_FDDI_CTLR 0x02
-#define PCI_SUBCLASS_NET_ATM_CTLR 0x03
-#define PCI_SUBCLASS_NET_OTHER 0x80
-
-
-/* PCI device subclasses for class 3 (display controllers)*/
-
-#define PCI_SUBCLASS_VID_VGA_CTLR 0x00
-#define PCI_SUBCLASS_VID_XGA_CTLR 0x01
-#define PCI_SUBLCASS_VID_3D_CTLR 0x02
-#define PCI_SUBCLASS_VID_OTHER 0x80
-
-
-/* PCI device subclasses for class 4 (multimedia device)*/
-
-#define PCI_SUBCLASS_MM_VIDEO_DEV 0x00
-#define PCI_SUBCLASS_MM_AUDIO_DEV 0x01
-#define PCI_SUBCLASS_MM_TELEPHONY_DEV 0x02
-#define PCI_SUBCLASS_MM_OTHER 0x80
-
-
-/* PCI device subclasses for class 5 (memory controller)*/
-
-#define PCI_SUBCLASS_MEM_RAM 0x00
-#define PCI_SUBCLASS_MEM_FLASH 0x01
-#define PCI_SUBCLASS_MEM_OTHER 0x80
-
-
-/* PCI device subclasses for class 6 (bridge device)*/
-
-#define PCI_SUBCLASS_BR_HOST 0x00
-#define PCI_SUBCLASS_BR_ISA 0x01
-#define PCI_SUBCLASS_BR_EISA 0x02
-#define PCI_SUBCLASS_BR_MCA 0x03
-#define PCI_SUBCLASS_BR_PCI_TO_PCI 0x04
-#define PCI_SUBCLASS_BR_PCMCIA 0x05
-#define PCI_SUBCLASS_BR_NUBUS 0x06
-#define PCI_SUBCLASS_BR_CARDBUS 0x07
-#define PCI_SUBCLASS_BR_OTHER 0x80
-
-
-/* PCI device subclasses for class C (serial bus controller)*/
-
-#define PCI_SUBCLASS_SB_IEEE1394 0x00
-#define PCI_SUBCLASS_SB_ACCESS 0x01
-#define PCI_SUBCLASS_SB_SSA 0x02
-#define PCI_SUBCLASS_SB_USB 0x03
-#define PCI_SUBCLASS_SB_FIBRE_CHANNEL 0x04
-
-
-/* Bit encodes for PCI_COMMON_CONFIG.u.type0.BaseAddresses */
-
-#define PCI_ADDRESS_IO_SPACE 0x00000001
-#define PCI_ADDRESS_MEMORY_TYPE_MASK 0x00000006
-#define PCI_ADDRESS_MEMORY_PREFETCHABLE 0x00000008
-
-#define PCI_ADDRESS_IO_ADDRESS_MASK 0xfffffffc
-#define PCI_ADDRESS_MEMORY_ADDRESS_MASK 0xfffffff0
-#define PCI_ADDRESS_ROM_ADDRESS_MASK 0xfffff800
-
-#define PCI_TYPE_32BIT 0
-#define PCI_TYPE_20BIT 2
-#define PCI_TYPE_64BIT 4
-
-
-/* Bit encodes for PCI_COMMON_CONFIG.u.type0.ROMBaseAddresses */
-
-#define PCI_ROMADDRESS_ENABLED 0x00000001
-
-
-
-typedef struct _PCI_SLOT_NUMBER
-{
- union
- {
- struct
- {
- ULONG DeviceNumber:5;
- ULONG FunctionNumber:3;
- ULONG Reserved:24;
- } bits;
- ULONG AsULONG;
- } u;
-} PCI_SLOT_NUMBER, *PPCI_SLOT_NUMBER;
-
-typedef enum _RESOURCE_TRANSLATION_DIRECTION {
- TranslateChildToParent,
- TranslateParentToChild
-} RESOURCE_TRANSLATION_DIRECTION;
-
-typedef NTSTATUS STDCALL_FUNC
-(*PTRANSLATE_RESOURCE_HANDLER)(IN PVOID Context,
- IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Source,
- IN RESOURCE_TRANSLATION_DIRECTION Direction,
- IN ULONG AlternativesCount, OPTIONAL
- IN IO_RESOURCE_DESCRIPTOR Alternatives[], OPTIONAL
- IN PDEVICE_OBJECT PhysicalDeviceObject,
- OUT PCM_PARTIAL_RESOURCE_DESCRIPTOR Target
-);
-
-typedef NTSTATUS STDCALL_FUNC
-(*PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER)(IN PVOID Context,
- IN PIO_RESOURCE_DESCRIPTOR Source,
- IN PDEVICE_OBJECT PhysicalDeviceObject,
- OUT PULONG TargetCount,
- OUT PIO_RESOURCE_DESCRIPTOR *Target);
-
-typedef struct _TRANSLATOR_INTERFACE {
- USHORT Size;
- USHORT Version;
- PVOID Context;
- PINTERFACE_REFERENCE InterfaceReference;
- PINTERFACE_DEREFERENCE InterfaceDereference;
- PTRANSLATE_RESOURCE_HANDLER TranslateResources;
- PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER TranslateResourceRequirements;
-} TRANSLATOR_INTERFACE, *PTRANSLATOR_INTERFACE;
-
-
-/* Hal dispatch table */
-
-typedef enum _HAL_QUERY_INFORMATION_CLASS
-{
- HalInstalledBusInformation,
- HalProfileSourceInformation,
- HalSystemDockInformation,
- HalPowerInformation,
- HalProcessorSpeedInformation,
- HalCallbackInformation,
- HalMapRegisterInformation,
- HalMcaLogInformation,
- HalFrameBufferCachingInformation,
- HalDisplayBiosInformation
- /* information levels >= 0x8000000 reserved for OEM use */
-} HAL_QUERY_INFORMATION_CLASS, *PHAL_QUERY_INFORMATION_CLASS;
-
-
-typedef enum _HAL_SET_INFORMATION_CLASS
-{
- HalProfileSourceInterval,
- HalProfileSourceInterruptHandler,
- HalMcaRegisterDriver
-} HAL_SET_INFORMATION_CLASS, *PHAL_SET_INFORMATION_CLASS;
-
-
-typedef struct _BUS_HANDLER *PBUS_HANDLER;
-typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT;
-
-
-typedef BOOLEAN STDCALL_FUNC
-(*PHAL_RESET_DISPLAY_PARAMETERS)(ULONG Columns, ULONG Rows);
-
-#endif /* __USE_W32API */
-/* Control codes of HalDeviceControl function */
-#define BCTL_EJECT 0x0001
-#define BCTL_QUERY_DEVICE_ID 0x0002
-#define BCTL_QUERY_DEVICE_UNIQUE_ID 0x0003
-#define BCTL_QUERY_DEVICE_CAPABILITIES 0x0004
-#define BCTL_QUERY_DEVICE_RESOURCES 0x0005
-#define BCTL_QUERY_DEVICE_RESOURCE_REQUIREMENTS 0x0006
-#define BCTL_QUERY_EJECT 0x0007
-#define BCTL_SET_LOCK 0x0008
-#define BCTL_SET_POWER 0x0009
-#define BCTL_SET_RESUME 0x000A
-#define BCTL_SET_DEVICE_RESOURCES 0x000B
-
-/* Defines for BCTL structures */
-typedef struct
-{
- BOOLEAN PowerSupported;
- BOOLEAN ResumeSupported;
- BOOLEAN LockSupported;
- BOOLEAN EjectSupported;
- BOOLEAN Removable;
-} BCTL_DEVICE_CAPABILITIES, *PBCTL_DEVICE_CAPABILITIES;
-
-#ifndef __USE_W32API
-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 struct _PM_DISPATCH_TABLE {
- ULONG Signature;
- ULONG Version;
- PVOID Function[1];
-} PM_DISPATCH_TABLE, *PPM_DISPATCH_TABLE;
-
-typedef VOID STDCALL_FUNC
-(*PDEVICE_CONTROL_COMPLETION)(IN PDEVICE_CONTROL_CONTEXT ControlContext);
-
-typedef NTSTATUS STDCALL_FUNC
-(*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 VOID FASTCALL_FUNC
-(*pHalExamineMBR)(IN PDEVICE_OBJECT DeviceObject,
- IN ULONG SectorSize,
- IN ULONG MBRTypeIdentifier,
- OUT PVOID *Buffer);
-
-typedef VOID FASTCALL_FUNC
-(*pHalIoAssignDriveLetters)(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
- IN PSTRING NtDeviceName,
- OUT PUCHAR NtSystemPath,
- OUT PSTRING NtSystemPathString);
-
-typedef NTSTATUS FASTCALL_FUNC
-(*pHalIoReadPartitionTable)(IN PDEVICE_OBJECT DeviceObject,
- IN ULONG SectorSize,
- IN BOOLEAN ReturnRecognizedPartitions,
- OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer);
-
-typedef NTSTATUS FASTCALL_FUNC
-(*pHalIoSetPartitionInformation)(IN PDEVICE_OBJECT DeviceObject,
- IN ULONG SectorSize,
- IN ULONG PartitionNumber,
- IN ULONG PartitionType);
-
-typedef NTSTATUS FASTCALL_FUNC
-(*pHalIoWritePartitionTable)(IN PDEVICE_OBJECT DeviceObject,
- IN ULONG SectorSize,
- IN ULONG SectorsPerTrack,
- IN ULONG NumberOfHeads,
- IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer);
-
-typedef PBUS_HANDLER FASTCALL_FUNC
-(*pHalHandlerForBus)(IN INTERFACE_TYPE InterfaceType,
- IN ULONG BusNumber);
-
-typedef VOID FASTCALL_FUNC
-(*pHalReferenceBusHandler)(IN PBUS_HANDLER BusHandler);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalQuerySystemInformation)(IN HAL_QUERY_INFORMATION_CLASS InformationClass,
- IN ULONG BufferSize,
- IN OUT PVOID Buffer,
- OUT PULONG ReturnedLength);
-
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalSetSystemInformation)(IN HAL_SET_INFORMATION_CLASS InformationClass,
- IN ULONG BufferSize,
- IN PVOID Buffer);
-
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalQueryBusSlots)(IN PBUS_HANDLER BusHandler,
- IN ULONG BufferSize,
- OUT PULONG SlotNumbers,
- OUT PULONG ReturnedLength);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalInitPnpDriver)(VOID);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalInitPowerManagement)(IN PPM_DISPATCH_TABLE PmDriverDispatchTable,
- OUT PPM_DISPATCH_TABLE *PmHalDispatchTable);
-
-typedef struct _DMA_ADAPTER * STDCALL_FUNC
-(*pHalGetDmaAdapter)(IN PVOID Context,
- IN struct _DEVICE_DESCRIPTION *DeviceDescriptor,
- OUT PULONG NumberOfMapRegisters);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalGetInterruptTranslator)(IN INTERFACE_TYPE ParentInterfaceType,
- IN ULONG ParentBusNumber,
- IN INTERFACE_TYPE BridgeInterfaceType,
- IN USHORT Size,
- IN USHORT Version,
- OUT PTRANSLATOR_INTERFACE Translator,
- OUT PULONG BridgeBusNumber);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalStartMirroring)(VOID);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalEndMirroring)(IN ULONG PassNumber);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalMirrorPhysicalMemory)(IN PHYSICAL_ADDRESS PhysicalAddress,
- IN LARGE_INTEGER NumberOfBytes);
-
-typedef NTSTATUS STDCALL_FUNC
-(*pHalMirrorVerify)(IN PHYSICAL_ADDRESS PhysicalAddress,
- IN LARGE_INTEGER NumberOfBytes);
-
-typedef VOID STDCALL_FUNC
-(*pHalEndOfBoot)(VOID);
-
-
-typedef struct {
- ULONG Version;
- pHalQuerySystemInformation HalQuerySystemInformation;
- pHalSetSystemInformation HalSetSystemInformation;
- pHalQueryBusSlots HalQueryBusSlots;
- ULONG Spare1;
- pHalExamineMBR HalExamineMBR;
- pHalIoAssignDriveLetters HalIoAssignDriveLetters;
- pHalIoReadPartitionTable HalIoReadPartitionTable;
- pHalIoSetPartitionInformation HalIoSetPartitionInformation;
- pHalIoWritePartitionTable HalIoWritePartitionTable;
-
- pHalHandlerForBus HalReferenceHandlerForBus;
- pHalReferenceBusHandler HalReferenceBusHandler;
- pHalReferenceBusHandler HalDereferenceBusHandler;
-
- pHalInitPnpDriver HalInitPnpDriver;
- pHalInitPowerManagement HalInitPowerManagement;
-
- pHalGetDmaAdapter HalGetDmaAdapter;
- pHalGetInterruptTranslator HalGetInterruptTranslator;
-
- pHalStartMirroring HalStartMirroring;
- pHalEndMirroring HalEndMirroring;
- pHalMirrorPhysicalMemory HalMirrorPhysicalMemory;
- pHalEndOfBoot HalEndOfBoot;
- pHalMirrorVerify HalMirrorVerify;
-
-} HAL_DISPATCH, *PHAL_DISPATCH;
-
-#ifdef __NTOSKRNL__
-extern HAL_DISPATCH EXPORTED HalDispatchTable;
-#else
-extern PHAL_DISPATCH IMPORTED HalDispatchTable;
-#endif
-
-#endif /* !__USE_W32API */
-
-#ifndef __USE_W32API
-#ifdef __NTOSKRNL__
-#define HALDISPATCH (&HalDispatchTable)
-#else
-#define HALDISPATCH ((PHAL_DISPATCH)&HalDispatchTable)
-#endif
-
-
-#define HAL_DISPATCH_VERSION 3
-#define HalDispatchTableVersion HALDISPATCH->Version
-#define HalQuerySystemInformation HALDISPATCH->HalQuerySystemInformation
-#define HalSetSystemInformation HALDISPATCH->HalSetSystemInformation
-#define HalQueryBusSlots HALDISPATCH->HalQueryBusSlots
-#define HalDeviceControl HALDISPATCH->HalDeviceControl
-#define HalExamineMBR HALDISPATCH->HalExamineMBR
-#define HalIoAssignDriveLetters HALDISPATCH->HalIoAssignDriveLetters
-#define HalIoReadPartitionTable HALDISPATCH->HalIoReadPartitionTable
-#define HalIoSetPartitionInformation HALDISPATCH->HalIoSetPartitionInformation
-#define HalIoWritePartitionTable HALDISPATCH->HalIoWritePartitionTable
-#define HalReferenceHandlerForBus HALDISPATCH->HalReferenceHandlerForBus
-#define HalReferenceBusHandler HALDISPATCH->HalReferenceBusHandler
-#define HalDereferenceBusHandler HALDISPATCH->HalDereferenceBusHandler
-
-
-#endif /* !__USE_W32API */
-
-/* Hal private dispatch table */
-
-typedef struct _HAL_PRIVATE_DISPATCH
-{
- ULONG Version;
-} HAL_PRIVATE_DISPATCH, *PHAL_PRIVATE_DISPATCH;
-
-#ifdef __NTOSKRNL__
-extern HAL_PRIVATE_DISPATCH EXPORTED HalPrivateDispatchTable;
-#else
-extern PHAL_PRIVATE_DISPATCH IMPORTED HalPrivateDispatchTable;
-#endif
-
-#define HAL_PRIVATE_DISPATCH_VERSION 1
-
-
-
-/*
- * Kernel debugger section
- */
-
-typedef struct _KD_PORT_INFORMATION
-{
- ULONG ComPort;
- ULONG BaudRate;
- ULONG BaseAddress;
-} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
-
-
-#ifdef __NTHAL__
-extern ULONG EXPORTED KdComPortInUse;
-#else
-extern ULONG IMPORTED KdComPortInUse;
-#endif
-
-#endif /* __INCLUDE_DDK_HALTYPES_H */
-
-/* EOF */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/heap.h
- * PURPOSE: Heap declarations used by all the parts of the
- * system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-#ifndef __INCLUDE_HEAP_H
-#define __INCLUDE_HEAP_H
-
-#ifndef __USE_W32API
-
-#define HEAP_NO_SERIALIZE (1)
-#define HEAP_GROWABLE (2)
-#define HEAP_GENERATE_EXCEPTIONS (4)
-#define HEAP_ZERO_MEMORY (8)
-#define HEAP_REALLOC_IN_PLACE_ONLY (16)
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_HEAP_H */
+++ /dev/null
-#ifndef __INCLUDE_DDK_KDFUNCS_H
-#define __INCLUDE_DDK_KDFUNCS_H
-/* $Id$ */
-
-#ifndef __USE_W32API
-
-#ifdef __GNUC__
-
-#if defined(__NTOSKRNL__)
-extern BOOLEAN KdDebuggerEnabled __declspec(dllexport);
-extern BOOLEAN KdDebuggerNotPresent __declspec(dllexport);
-#else
-extern BOOLEAN KdDebuggerEnabled __declspec(dllimport);
-extern BOOLEAN KdDebuggerNotPresent __declspec(dllimport);
-#endif
-
-#else /* __GNUC__ */
-/* Microsft-style */
-
-#if defined(__NTOSKRNL__)
-extern __declspec(dllexport) BOOLEAN KdDebuggerEnabled;
-extern __declspec(dllexport) BOOLEAN KdDebuggerNotPresent;
-#else
-extern __declspec(dllimport) BOOLEAN KdDebuggerEnabled;
-extern __declspec(dllimport) BOOLEAN KdDebuggerNotPresent;
-#endif
-
-#endif /* __GNUC__ */
-
-#endif /* __USE_W32API */
-
-BYTE
-STDCALL
-KdPollBreakIn (
- VOID
- );
-
-BOOLEAN
-STDCALL
-KdPortInitialize (
- PKD_PORT_INFORMATION PortInformation,
- DWORD Unknown1,
- DWORD Unknown2
- );
-
-BOOLEAN
-STDCALL
-KdPortInitializeEx (
- PKD_PORT_INFORMATION PortInformation,
- DWORD Unknown1,
- DWORD Unknown2
- );
-
-BOOLEAN
-STDCALL
-KdPortGetByte (
- PUCHAR ByteRecieved
- );
-
-BOOLEAN
-STDCALL
-KdPortGetByteEx (
- PKD_PORT_INFORMATION PortInformation,
- PUCHAR ByteRecieved
- );
-
-BOOLEAN
-STDCALL
-KdPortPollByte (
- PUCHAR ByteRecieved
- );
-
-BOOLEAN
-STDCALL
-KdPortPollByteEx (
- PKD_PORT_INFORMATION PortInformation,
- PUCHAR ByteRecieved
- );
-
-VOID
-STDCALL
-KdPortPutByte (
- UCHAR ByteToSend
- );
-
-VOID
-STDCALL
-KdPortPutByteEx (
- PKD_PORT_INFORMATION PortInformation,
- UCHAR ByteToSend
- );
-
-VOID
-STDCALL
-KdPortRestore (
- VOID
- );
-
-VOID
-STDCALL
-KdPortSave (
- VOID
- );
-
-BOOLEAN
-STDCALL
-KdPortDisableInterrupts(
- VOID
- );
-
-BOOLEAN
-STDCALL
-KdPortEnableInterrupts(
- VOID
- );
-
-#endif /* __INCLUDE_DDK_KDFUNCS_H */
+++ /dev/null
-/*
- This file was added by Andrew Greenwood. So, if it messes anything up,
- you know who to call...
-*/
-
-#ifndef __INCLUDE_NTOS_KEFUNCS_H
-#define __INCLUDE_NTOS_KEFUNCS_H
-
-#define KEBUGCHECK(a) DbgPrint("KeBugCheck (0x%X) at %s:%i\n", a, __FILE__,__LINE__), KeBugCheck(a)
-#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx (0x%X, 0x%X, 0x%X, 0x%X, 0x%X) at %s:%i\n", a, b, c, d, e, __FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e)
-
-#include <arc/arc.h>
-
-#ifdef __NTOSKRNL__
-extern CHAR EXPORTED KeNumberProcessors;
-extern LOADER_PARAMETER_BLOCK EXPORTED KeLoaderBlock;
-extern ULONG EXPORTED KeDcacheFlushCount;
-extern ULONG EXPORTED KeIcacheFlushCount;
-extern KAFFINITY EXPORTED KeActiveProcessors;
-extern ULONG EXPORTED KiDmaIoCoherency; /* RISC Architectures only */
-extern ULONG EXPORTED KeMaximumIncrement;
-extern ULONG EXPORTED KeMinimumIncrement;
-#else
-extern CHAR IMPORTED KeNumberProcessors;
-extern KAFFINITY IMPORTED KeActiveProcessors;
-extern LOADER_PARAMETER_BLOCK IMPORTED KeLoaderBlock;
-extern ULONG EXPORTED KeDcacheFlushCount;
-extern ULONG EXPORTED KeIcacheFlushCount;
-extern ULONG IMPORTED KiDmaIoCoherency; /* RISC Architectures only */
-extern ULONG IMPORTED KeMaximumIncrement;
-extern ULONG IMPORTED KeMinimumIncrement;
-#endif
-
-/* io permission map has a 8k size
- * Each bit in the IOPM corresponds to an io port byte address. The bitmap
- * is initialized to allow IO at any port. [ all bits set ].
- */
-typedef struct _IOPM
-{
- UCHAR Bitmap[8192];
-} IOPM, *PIOPM;
-
-typedef struct _CONFIGURATION_COMPONENT_DATA
-{
- struct _CONFIGURATION_COMPONENT_DATA *Parent;
- struct _CONFIGURATION_COMPONENT_DATA *Child;
- struct _CONFIGURATION_COMPONENT_DATA *Sibling;
- CONFIGURATION_COMPONENT Component;
-} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA;
-
-VOID STDCALL
-KeCapturePersistentThreadState(
- IN PVOID CurrentThread,
- IN ULONG Setting1,
- IN ULONG Setting2,
- IN ULONG Setting3,
- IN ULONG Setting4,
- IN ULONG Setting5,
- IN PVOID ThreadState);
-
-BOOLEAN STDCALL
-KeConnectInterrupt(
- PKINTERRUPT InterruptObject);
-
-BOOLEAN STDCALL
-KeDisconnectInterrupt(
- PKINTERRUPT InterruptObject);
-
-VOID STDCALL
-KeDrainApcQueue(
- VOID);
-
-VOID STDCALL
-KeEnterKernelDebugger(
- VOID);
-
-PCONFIGURATION_COMPONENT_DATA STDCALL
-KeFindConfigurationNextEntry(
- IN PCONFIGURATION_COMPONENT_DATA Child,
- IN CONFIGURATION_CLASS Class,
- IN CONFIGURATION_TYPE Type,
- IN PULONG ComponentKey OPTIONAL,
- IN PCONFIGURATION_COMPONENT_DATA *NextLink);
-
-PCONFIGURATION_COMPONENT_DATA STDCALL
-KeFindConfigurationEntry(
- IN PCONFIGURATION_COMPONENT_DATA Child,
- IN CONFIGURATION_CLASS Class,
- IN CONFIGURATION_TYPE Type,
- IN PULONG ComponentKey OPTIONAL);
-
-VOID STDCALL
-KeFlushEntireTb(
- IN BOOLEAN Unknown,
- IN BOOLEAN CurrentCpuOnly);
-
-struct _KPROCESS*
-STDCALL
-KeGetCurrentProcess(
- VOID
-);
-
-VOID STDCALL
-KeFlushWriteBuffer(
- VOID);
-
-VOID STDCALL
-KeInitializeApc(
- IN PKAPC Apc,
- IN PKTHREAD Thread,
- IN KAPC_ENVIRONMENT TargetEnvironment,
- IN PKKERNEL_ROUTINE KernelRoutine,
- IN PKRUNDOWN_ROUTINE RundownRoutine,
- IN PKNORMAL_ROUTINE NormalRoutine,
- IN KPROCESSOR_MODE Mode,
- IN PVOID Context);
-
-VOID STDCALL
-KeInitializeInterrupt(
- PKINTERRUPT InterruptObject,
- PKSERVICE_ROUTINE ServiceRoutine,
- PVOID ServiceContext,
- PKSPIN_LOCK SpinLock,
- ULONG Vector,
- KIRQL Irql,
- KIRQL SynchronizeIrql,
- KINTERRUPT_MODE InterruptMode,
- BOOLEAN ShareVector,
- CHAR ProcessorNumber,
- BOOLEAN FloatingSave);
-
-BOOLEAN STDCALL
-KeInsertQueueApc(
- PKAPC Apc,
- PVOID SystemArgument1,
- PVOID SystemArgument2,
- KPRIORITY PriorityBoost);
-
-BOOLEAN STDCALL
-KeIsAttachedProcess(
- VOID);
-
-BOOLEAN STDCALL
-KeIsExecutingDpc(
- VOID);
-
-VOID STDCALL
-KeRevertToUserAffinityThread(
- VOID);
-
-BOOLEAN STDCALL
-KeRemoveSystemServiceTable(
- IN ULONG TableIndex);
-
-NTSTATUS STDCALL
-KeSetAffinityThread(
- PKTHREAD Thread,
- KAFFINITY Affinity);
-
-VOID STDCALL
-KeSetDmaIoCoherency(
- IN ULONG Coherency);
-
-VOID STDCALL
-KeSetEventBoostPriority(
- IN PKEVENT Event,
- IN PKTHREAD *Thread OPTIONAL);
-
-VOID STDCALL
-KeSetProfileIrql(
- IN KIRQL ProfileIrql);
-
-VOID STDCALL
-KeSetSystemAffinityThread(
- IN KAFFINITY Affinity);
-
-VOID STDCALL
-KeTerminateThread(
- IN KPRIORITY Increment);
-
-NTSTATUS STDCALL
-KeUserModeCallback(
- IN ULONG FunctionID,
- IN PVOID InputBuffer,
- IN ULONG InputLength,
- OUT PVOID *OutputBuffer,
- OUT PULONG OutputLength);
-
-NTSTATUS STDCALL
-KeRaiseUserException(
- IN NTSTATUS ExceptionCode);
-
-/*
- * FUNCTION: Provides the kernel with a new access map for a driver
- * ARGUMENTS:
- * NewMap: = If FALSE the kernel's map is set to all disabled. If TRUE
- * the kernel disables access to a particular port.
- * IoPortMap = Caller supplies storage for the io permission map.
- * REMARKS
- * Each bit in the IOPM corresponds to an io port byte address. The bitmap
- * is initialized to allow IO at any port. [ all bits set ]. The IOPL determines
- * the minium privilege level required to perform IO prior to checking the permission map.
- */
-BOOL STDCALL
-Ke386SetIoAccessMap(
- ULONG NewMap,
- PULONG IoPermissionMap);
-
-/*
- * FUNCTION: Queries the io permission map.
- * ARGUMENTS:
- * NewMap: = If FALSE the kernel's map is set to all disabled. If TRUE
- * the kernel disables access to a particular port.
- * IoPortMap = Caller supplies storage for the io permission map.
- * REMARKS
- * Each bit in the IOPM corresponds to an io port byte address. The bitmap
- * is initialized to allow IO at any port. [ all bits set ]. The IOPL determines
- * the minium privilege level required to perform IO prior to checking the permission map.
- */
-BOOL STDCALL
-Ke386QueryIoAccessMap(
- ULONG NewMap,
- PULONG IoPermissionMap);
-
-/* Set the process IOPL. */
-BOOL STDCALL
-Ke386IoSetAccessProcess(
- struct _EPROCESS *Process,
- BOOL EnableIo);
-
-NTSTATUS STDCALL
-KeI386FlatToGdtSelector(
- IN ULONG Base,
- IN USHORT Length,
- IN USHORT Selector);
-
-/* Releases a set of Global Descriptor Table Selectors. */
-NTSTATUS STDCALL
-KeI386ReleaseGdtSelectors(
- OUT PULONG SelArray,
- IN ULONG NumOfSelectors);
-
-/* Allocates a set of Global Descriptor Table Selectors. */
-NTSTATUS STDCALL
-KeI386AllocateGdtSelectors(
- OUT PULONG SelArray,
- IN ULONG NumOfSelectors);
-
-VOID FASTCALL
-KiAcquireSpinLock(
- PKSPIN_LOCK SpinLock);
-
-VOID STDCALL
-KiCoprocessorError(
- VOID);
-
-VOID STDCALL
-KiDispatchInterrupt(
- VOID);
-
-NTSTATUS STDCALL
-KeRaiseUserException(
- IN NTSTATUS ExceptionCode);
-
-VOID FASTCALL
-KiReleaseSpinLock(
- PKSPIN_LOCK SpinLock);
-
-VOID STDCALL
-KiUnexpectedInterrupt(
- VOID);
-
-/* REACTOS SPECIFIC */
-
-VOID STDCALL
-KeRosDumpStackFrames(
- PULONG Frame,
- ULONG FrameCount);
-
-ULONG STDCALL
-KeRosGetStackFrames(
- PULONG Frames,
- ULONG FrameCount);
-
-#endif /* __INCLUDE_NTOS_KEFUNCS_H */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/keyboard.h
- * PURPOSE: Keyboard declarations used by all the parts of the
- * system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_KEYBOARD_H
-#define __INCLUDE_KEYBOARD_H
-
-#include <ntos/types.h>
-
-/* Virtual Key codes */
-#define VK_0 (48)
-#define VK_1 (49)
-#define VK_2 (50)
-#define VK_3 (51)
-#define VK_4 (52)
-#define VK_5 (53)
-#define VK_6 (54)
-#define VK_7 (55)
-#define VK_8 (56)
-#define VK_9 (57)
-#define VK_A (65)
-#define VK_B (66)
-#define VK_C (67)
-#define VK_D (68)
-#define VK_E (69)
-#define VK_F (70)
-#define VK_G (71)
-#define VK_H (72)
-#define VK_I (73)
-#define VK_J (74)
-#define VK_K (75)
-#define VK_L (76)
-#define VK_M (77)
-#define VK_N (78)
-#define VK_O (79)
-#define VK_P (80)
-#define VK_Q (81)
-#define VK_R (82)
-#define VK_S (83)
-#define VK_T (84)
-#define VK_U (85)
-#define VK_V (86)
-#define VK_W (87)
-#define VK_X (88)
-#define VK_Y (89)
-#define VK_Z (90)
-
-#ifndef __USE_W32API
-
-/* KEY_EVENT_RECORD structure */
-#define CAPSLOCK_ON (128)
-#define ENHANCED_KEY (256)
-#define LEFT_ALT_PRESSED (2)
-#define LEFT_CTRL_PRESSED (8)
-#define NUMLOCK_ON (32)
-#define RIGHT_ALT_PRESSED (1)
-#define RIGHT_CTRL_PRESSED (4)
-#define SCROLLLOCK_ON (64)
-#define SHIFT_PRESSED (16)
-
-/* MOUSE_EVENT_RECORD structure */
-#define FROM_LEFT_1ST_BUTTON_PRESSED (1)
-#define RIGHTMOST_BUTTON_PRESSED (2)
-#define FROM_LEFT_2ND_BUTTON_PRESSED (4)
-#define FROM_LEFT_3RD_BUTTON_PRESSED (8)
-#define FROM_LEFT_4TH_BUTTON_PRESSED (16)
-#define DOUBLE_CLICK (2)
-#define MOUSE_MOVED (1)
-
-/* INPUT_RECORD structure */
-#define KEY_EVENT (1)
-#define MOUSE_EVENT (2)
-#define WINDOW_BUFFER_SIZE_EVENT (4)
-#define MENU_EVENT (8)
-#define FOCUS_EVENT (16)
-
-
-#include <pshpack1.h>
-
-typedef struct _KEY_EVENT_RECORD
-{
- BOOL bKeyDown;
- WORD wRepeatCount;
- WORD wVirtualKeyCode;
- WORD wVirtualScanCode;
- union
- {
- WCHAR UnicodeChar;
- CHAR AsciiChar;
- } uChar;
- DWORD dwControlKeyState;
-} KEY_EVENT_RECORD;
-
-#include <poppack.h>
-
-
-typedef struct _MOUSE_EVENT_RECORD
-{
- COORD dwMousePosition;
- DWORD dwButtonState;
- DWORD dwControlKeyState;
- DWORD dwEventFlags;
-} MOUSE_EVENT_RECORD;
-
-typedef struct _WINDOW_BUFFER_SIZE_RECORD
-{
- COORD dwSize;
-} WINDOW_BUFFER_SIZE_RECORD;
-
-typedef struct _MENU_EVENT_RECORD
-{
- UINT dwCommandId;
-} MENU_EVENT_RECORD, *PMENU_EVENT_RECORD;
-
-typedef struct _FOCUS_EVENT_RECORD
-{
- BOOL bSetFocus;
-} FOCUS_EVENT_RECORD;
-
-typedef struct _INPUT_RECORD
-{
- WORD EventType;
- union
- {
-#ifndef __cplus_plus
- /* this will be the wrong size in c++ */
- KEY_EVENT_RECORD KeyEvent;
-#endif
- MOUSE_EVENT_RECORD MouseEvent;
- WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
- MENU_EVENT_RECORD MenuEvent;
- FOCUS_EVENT_RECORD FocusEvent;
- } Event;
-} INPUT_RECORD, *PINPUT_RECORD;
-
-/* Virtual Key codes */
-#define VK_LBUTTON (1)
-#define VK_RBUTTON (2)
-#define VK_CANCEL (3)
-#define VK_MBUTTON (4)
-#define VK_BACK (8)
-#define VK_TAB (9)
-#define VK_CLEAR (12)
-#define VK_RETURN (13)
-#define VK_SHIFT (16)
-#define VK_CONTROL (17)
-#define VK_MENU (18)
-#define VK_PAUSE (19)
-#define VK_CAPITAL (20)
-#define VK_ESCAPE (27)
-#define VK_SPACE (32)
-#define VK_PRIOR (33)
-#define VK_NEXT (34)
-#define VK_END (35)
-#define VK_HOME (36)
-#define VK_LEFT (37)
-#define VK_UP (38)
-#define VK_RIGHT (39)
-#define VK_DOWN (40)
-#define VK_SELECT (41)
-#define VK_PRINT (42)
-#define VK_EXECUTE (43)
-#define VK_SNAPSHOT (44)
-#define VK_INSERT (45)
-#define VK_DELETE (46)
-#define VK_HELP (47)
-#define VK_LWIN (91)
-#define VK_RWIN (92)
-#define VK_APPS (93)
-#define VK_SLEEP (95)
-#define VK_NUMPAD0 (96)
-#define VK_NUMPAD1 (97)
-#define VK_NUMPAD2 (98)
-#define VK_NUMPAD3 (99)
-#define VK_NUMPAD4 (100)
-#define VK_NUMPAD5 (101)
-#define VK_NUMPAD6 (102)
-#define VK_NUMPAD7 (103)
-#define VK_NUMPAD8 (104)
-#define VK_NUMPAD9 (105)
-#define VK_MULTIPLY (106)
-#define VK_ADD (107)
-#define VK_SEPARATOR (108)
-#define VK_SUBTRACT (109)
-#define VK_DECIMAL (110)
-#define VK_DIVIDE (111)
-#define VK_F1 (112)
-#define VK_F2 (113)
-#define VK_F3 (114)
-#define VK_F4 (115)
-#define VK_F5 (116)
-#define VK_F6 (117)
-#define VK_F7 (118)
-#define VK_F8 (119)
-#define VK_F9 (120)
-#define VK_F10 (121)
-#define VK_F11 (122)
-#define VK_F12 (123)
-#define VK_F13 (124)
-#define VK_F14 (125)
-#define VK_F15 (126)
-#define VK_F16 (127)
-#define VK_F17 (128)
-#define VK_F18 (129)
-#define VK_F19 (130)
-#define VK_F20 (131)
-#define VK_F21 (132)
-#define VK_F22 (133)
-#define VK_F23 (134)
-#define VK_F24 (135)
-
-/* GetAsyncKeyState */
-#define VK_NUMLOCK (144)
-#define VK_SCROLL (145)
-#define VK_LSHIFT (160)
-#define VK_LCONTROL (162)
-#define VK_LMENU (164)
-#define VK_RSHIFT (161)
-#define VK_RCONTROL (163)
-#define VK_RMENU (165)
-
-#define VK_BROWSER_BACK (166)
-#define VK_BROWSER_FORWARD (167)
-#define VK_BROWSER_REFRESH (168)
-#define VK_BROWSER_STOP (169)
-#define VK_BROWSER_SEARCH (170)
-#define VK_BROWSER_FAVORITES (171)
-#define VK_BROWSER_HOME (172)
-#define VK_VOLUME_MUTE (173)
-#define VK_VOLUME_DOWN (174)
-#define VK_VOLUME_UP (175)
-#define VK_MEDIA_NEXT_TRACK (176)
-#define VK_MEDIA_PREV_TRACK (177)
-#define VK_MEDIA_STOP (178)
-#define VK_MEDIA_PLAY_PAUSE (179)
-#define VK_LAUNCH_MAIL (180)
-#define VK_LAUNCH_MEDIA_SELECT (181)
-#define VK_LAUNCH_APP1 (182)
-#define VK_LAUNCH_APP2 (183)
-
-#define VK_PROCESSKEY (229)
-#define VK_ICO_CLEAR (230)
-
-/* Fujitsu/OASYS keys */
-#define VK_OEM_FJ_JISHO (146) /* 'Dictionary' key */
-#define VK_OEM_FJ_MASSHOU (147) /* 'Unregister word' key */
-#define VK_OEM_FJ_TOUROKU (148) /* 'Register word' key */
-#define VK_OEM_FJ_LOYA (149) /* 'Left OYAYUBI' key */
-#define VK_OEM_FJ_ROYA (150) /* 'Right OYAYUBI' key */
-
-/* Nokia/Ericsson keys */
-#define VK_OEM_RESET (223)
-#define VK_OEM_JUMP (234)
-#define VK_OEM_PA1 (235)
-#define VK_OEM_PA2 (236)
-#define VK_OEM_PA3 (237)
-#define VK_OEM_WSCTRL (238)
-#define VK_OEM_CUSEL (239)
-#define VK_OEM_ATTN (240)
-#define VK_OEM_FINISH (241)
-#define VK_OEM_COPY (242)
-#define VK_OEM_AUTO (243)
-#define VK_OEM_ENLW (244)
-#define VK_OEM_BACKTAB (245)
-#define VK_ATTN (246)
-#define VK_CRSEL (247)
-#define VK_EXSEL (248)
-#define VK_EREOF (249)
-#define VK_PLAY (250)
-#define VK_ZOOM (251)
-#define VK_NONAME (252)
-#define VK_PA1 (253)
-#define VK_OEM_CLEAR (254)
-
-#define VK_OEM_NEC_EQUAL (146) /* = key on numpad */
-
-#define VK_OEM_1 (186) /* ';:' for US */
-#define VK_OEM_PLUS (187) /* '+' any country */
-#define VK_OEM_COMMA (188) /* ',' any country */
-#define VK_OEM_MINUS (189) /* '-' any country */
-#define VK_OEM_PERIOD (190) /* '.' any country */
-#define VK_OEM_2 (191) /* '/?' for US */
-#define VK_OEM_3 (192) /* '`~' for US */
-
-#define VK_OEM_4 (219) /* '[{' for US */
-#define VK_OEM_5 (220) /* '\|' for US */
-#define VK_OEM_6 (221) /* ']}' for US */
-#define VK_OEM_7 (222) /* ''"' for US */
-#define VK_OEM_8 (223)
-
-#define VK_OEM_AX (225) /* AX key on Japanese AX keyboard */
-#define VK_OEM_102 (226) /* <> or | on RT 102-key keyboard */
-#define VK_ICO_HELP (227) /* Help key on ICO */
-#define VK_ICO_00 (228) /* 00 key on ICO */
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_KEYBOARD_H */
-
-
-
+++ /dev/null
-/* \r
- * FIXME: *** NDK ***\r
- */\r
-\r
-#ifndef __INCLUDE_NTOS_KRNLTYPES_H\r
-#define __INCLUDE_NTOS_KRNLTYPES_H\r
-\r
-#define DOE_UNLOAD_PENDING 0x1\r
-#define DOE_DELETE_PENDING 0x2\r
-#define DOE_REMOVE_PENDING 0x4\r
-#define DOE_REMOVE_PROCESSED 0x8\r
-#define DOE_START_PENDING 0x10\r
-\r
-extern POBJECT_TYPE EXPORTED ExMutantObjectType;\r
-extern POBJECT_TYPE EXPORTED ExTimerType;\r
-\r
-/*\r
- * PURPOSE: Special timer associated with each device\r
- */\r
-typedef struct _IO_TIMER {\r
- USHORT Type; /* Every IO Object has a Type */\r
- USHORT TimerEnabled; /* Tells us if the Timer is enabled or not */\r
- LIST_ENTRY IoTimerList; /* List of other Timers on the system */\r
- PIO_TIMER_ROUTINE TimerRoutine; /* The associated timer routine */\r
- PVOID Context; /* Context */\r
- PDEVICE_OBJECT DeviceObject; /* Driver that owns this IO Timer */\r
-} IO_TIMER, *PIO_TIMER;\r
-\r
-typedef struct _EX_QUEUE_WORKER_INFO {\r
- UCHAR QueueDisabled:1;\r
- UCHAR MakeThreadsAsNecessary:1;\r
- UCHAR WaitMode:1;\r
- ULONG WorkerCount:29;\r
-} EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;\r
-\r
-typedef struct _EX_WORK_QUEUE {\r
- KQUEUE WorkerQueue;\r
- ULONG DynamicThreadCount;\r
- ULONG WorkItemsProcessed;\r
- ULONG WorkItemsProcessedLastPass;\r
- ULONG QueueDepthLastPass;\r
- EX_QUEUE_WORKER_INFO Info; \r
-} EX_WORK_QUEUE, *PEX_WORK_QUEUE;\r
-\r
-typedef struct _KDPC_DATA \r
-{\r
- LIST_ENTRY DpcListHead;\r
- ULONG DpcLock;\r
- ULONG DpcQueueDepth;\r
- ULONG DpcCount;\r
-} KDPC_DATA, *PKDPC_DATA;\r
-\r
-typedef struct _KTRAP_FRAME \r
-{\r
- PVOID DebugEbp;\r
- PVOID DebugEip;\r
- PVOID DebugArgMark;\r
- PVOID DebugPointer;\r
- PVOID TempCs;\r
- PVOID TempEip;\r
- ULONG Dr0;\r
- ULONG Dr1;\r
- ULONG Dr2;\r
- ULONG Dr3;\r
- ULONG Dr6;\r
- ULONG Dr7;\r
- USHORT Gs;\r
- USHORT Reserved1;\r
- USHORT Es;\r
- USHORT Reserved2;\r
- USHORT Ds;\r
- USHORT Reserved3;\r
- ULONG Edx;\r
- ULONG Ecx;\r
- ULONG Eax;\r
- ULONG PreviousMode;\r
- PVOID ExceptionList;\r
- USHORT Fs;\r
- USHORT Reserved4;\r
- ULONG Edi;\r
- ULONG Esi;\r
- ULONG Ebx;\r
- ULONG Ebp;\r
- ULONG ErrorCode;\r
- ULONG Eip;\r
- ULONG Cs;\r
- ULONG Eflags;\r
- ULONG Esp;\r
- USHORT Ss;\r
- USHORT Reserved5;\r
- USHORT V86_Es;\r
- USHORT Reserved6;\r
- USHORT V86_Ds;\r
- USHORT Reserved7;\r
- USHORT V86_Fs;\r
- USHORT Reserved8;\r
- USHORT V86_Gs;\r
- USHORT Reserved9;\r
-} KTRAP_FRAME, *PKTRAP_FRAME;\r
-\r
-typedef struct _PP_LOOKASIDE_LIST \r
-{\r
- struct _GENERAL_LOOKASIDE *P;\r
- struct _GENERAL_LOOKASIDE *L;\r
-} PP_LOOKASIDE_LIST, *PPP_LOOKASIDE_LIST;\r
-\r
-typedef enum _PP_NPAGED_LOOKASIDE_NUMBER\r
-{\r
- LookasideSmallIrpList = 0,\r
- LookasideLargeIrpList = 1,\r
- LookasideMdlList = 2,\r
- LookasideCreateInfoList = 3,\r
- LookasideNameBufferList = 4,\r
- LookasideTwilightList = 5,\r
- LookasideCompletionList = 6,\r
- LookasideMaximumList = 7\r
-} PP_NPAGED_LOOKASIDE_NUMBER;\r
-\r
-typedef enum _KOBJECTS {\r
- EventNotificationObject = 0,\r
- EventSynchronizationObject = 1,\r
- MutantObject = 2,\r
- ProcessObject = 3,\r
- QueueObject = 4,\r
- SemaphoreObject = 5,\r
- ThreadObject = 6,\r
- GateObject = 7,\r
- TimerNotificationObject = 8,\r
- TimerSynchronizationObject = 9,\r
- Spare2Object = 10,\r
- Spare3Object = 11,\r
- Spare4Object = 12,\r
- Spare5Object = 13,\r
- Spare6Object = 14,\r
- Spare7Object = 15,\r
- Spare8Object = 16,\r
- Spare9Object = 17,\r
- ApcObject = 18,\r
- DpcObject = 19,\r
- DeviceQueueObject = 20,\r
- EventPairObject = 21,\r
- InterruptObject = 22,\r
- ProfileObject = 23,\r
- ThreadedDpcObject = 24,\r
- MaximumKernelObject = 25\r
-} KOBJECTS;\r
-\r
-typedef struct _M128 {\r
- ULONGLONG Low;\r
- LONGLONG High;\r
-} M128, *PM128;\r
-\r
-typedef struct _KEXCEPTION_FRAME {\r
- ULONG64 P1Home;\r
- ULONG64 P2Home;\r
- ULONG64 P3Home;\r
- ULONG64 P4Home;\r
- ULONG64 P5;\r
- ULONG64 InitialStack;\r
- M128 Xmm6;\r
- M128 Xmm7;\r
- M128 Xmm8;\r
- M128 Xmm9;\r
- M128 Xmm10;\r
- M128 Xmm11;\r
- M128 Xmm12;\r
- M128 Xmm13;\r
- M128 Xmm14;\r
- M128 Xmm15;\r
- ULONG64 TrapFrame;\r
- ULONG64 CallbackStack;\r
- ULONG64 OutputBuffer;\r
- ULONG64 OutputLength;\r
- UCHAR ExceptionRecord[64];\r
- ULONG64 Fill1;\r
- ULONG64 Rbp;\r
- ULONG64 Rbx;\r
- ULONG64 Rdi;\r
- ULONG64 Rsi;\r
- ULONG64 R12;\r
- ULONG64 R13;\r
- ULONG64 R14;\r
- ULONG64 R15;\r
- ULONG64 Return;\r
-} KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;\r
-\r
-typedef struct _KEVENT_PAIR\r
-{\r
- CSHORT Type;\r
- CSHORT Size;\r
- KEVENT LowEvent;\r
- KEVENT HighEvent;\r
-} KEVENT_PAIR, *PKEVENT_PAIR;\r
-\r
-typedef struct _RUNDOWN_DESCRIPTOR {\r
- ULONG_PTR References;\r
- KEVENT RundownEvent;\r
-} RUNDOWN_DESCRIPTOR, *PRUNDOWN_DESCRIPTOR;\r
-\r
-#endif /* __INCLUDE_NTOS_KRNLTYPES_H */\r
-\r
+++ /dev/null
-/* $Id$ */
-
-#ifndef __INCLUDE_DDK_LDRTYPES_H
-#define __INCLUDE_DDK_LDRTYPES_H
-
-typedef struct _LDR_RESOURCE_INFO
-{
- ULONG Type;
- ULONG Name;
- ULONG Language;
-} LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
-
-#define RESOURCE_TYPE_LEVEL 0
-#define RESOURCE_NAME_LEVEL 1
-#define RESOURCE_LANGUAGE_LEVEL 2
-#define RESOURCE_DATA_LEVEL 3
-
-#endif /* __INCLUDE_DDK_LDRTYPES_H */
+++ /dev/null
-#ifndef max
-#define max(a, b) (((a) > (b)) ? (a) : (b))
-#endif
-
-#ifndef min
-#define min(a, b) (((a) < (b)) ? (a) : (b))
-#endif
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/mm.h
- * PURPOSE: Memory managment declarations used by all the parts of the
- * system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_MM_H
-#define __INCLUDE_MM_H
-
-#ifndef __USE_W32API
-
-#define SEC_BASED (0x00200000)
-#define SEC_NO_CHANGE (0x00400000)
-#define SEC_FILE (0x00800000)
-#define SEC_IMAGE (0x01000000)
-#define SEC_VLM (0x02000000)
-#define SEC_RESERVE (0x04000000)
-#define SEC_COMMIT (0x08000000)
-#define SEC_NOCACHE (0x10000000)
-#define PAGE_NOACCESS (1)
-#define PAGE_READONLY (2)
-#define PAGE_READWRITE (4)
-#define PAGE_WRITECOPY (8)
-#define PAGE_EXECUTE (16)
-#define PAGE_EXECUTE_READ (32)
-#define PAGE_EXECUTE_READWRITE (64)
-#define PAGE_EXECUTE_WRITECOPY (128)
-#define PAGE_GUARD (256)
-#define PAGE_NOCACHE (512)
-#define PAGE_WRITECOMBINE (1024)
-#define MEM_COMMIT (4096)
-#define MEM_FREE (65536)
-#define MEM_RESERVE (8192)
-#define MEM_IMAGE (16777216)
-#define MEM_MAPPED (262144)
-#define MEM_PRIVATE (131072)
-#define MEM_DECOMMIT (16384)
-#define MEM_RELEASE (32768)
-#define MEM_TOP_DOWN (1048576)
-#define EXCEPTION_GUARD_PAGE (0x80000001L)
-#define SECTION_EXTEND_SIZE (0x10)
-#define SECTION_MAP_EXECUTE (0x8)
-#define SECTION_MAP_READ (0x4)
-#define SECTION_MAP_WRITE (0x2)
-#define SECTION_QUERY (0x1)
-#define SECTION_ALL_ACCESS (0xf001fL)
-
-#define FILE_MAP_ALL_ACCESS (0xf001fL)
-#define FILE_MAP_READ (4)
-#define FILE_MAP_WRITE (2)
-#define FILE_MAP_COPY (1)
-
-#else /* __USE_W32API */
-
-#include <ddk/ntifs.h>
-
-#endif /* __USE_W32API */
-
-#define PAGE_ROUND_UP(x) ( (((ULONG_PTR)x)%PAGE_SIZE) ? ((((ULONG_PTR)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG_PTR)x) )
-#define PAGE_ROUND_DOWN(x) (((ULONG_PTR)x)&(~(PAGE_SIZE-1)))
-
-#endif /* __INCLUDE_MM_H */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ntdef.h
- * PURPOSE: Defines used by all the parts of the system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-#ifndef __INCLUDE_NTDEF_H
-#define __INCLUDE_NTDEF_H
-
-#ifndef __USE_W32API
-#define MAXIMUM_WAIT_OBJECTS (64)
-#endif
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define TYPE_ALIGNMENT(t) __alignof(t)
-#elif defined(__GNUC__)
-# define TYPE_ALIGNMENT(t) __alignof__(t)
-#else
-# define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
-#endif
-
-#ifdef _WIN64
-# define PROBE_ALIGNMENT(_s) \
- (TYPE_ALIGNMENT(_s) > TYPE_ALIGNMENT(DWORD) ? \
- TYPE_ALIGNMENT(_s) : TYPE_ALIGNMENT(DWORD))
-# define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(DWORD)
-#else
-# define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(DWORD)
-#endif
-
-
-#if defined(_MSC_VER)
- #define Const64(a) (a##i64)
- static __inline LARGE_INTEGER MK_LARGE_INTEGER(__int64 i)
- {
- LARGE_INTEGER li;
- li.QuadPart = i;
- return li;
- }
- #define INIT_LARGE_INTEGER(a) {{(ULONG)a, (LONG)(a>>32)}}
-#elif defined (__GNUC__)
- #define Const64(a) (a##LL)
- #define MK_LARGE_INTEGER(a) ((LARGE_INTEGER)(LONGLONG)(a))
- #define INIT_LARGE_INTEGER(a) MK_LARGE_INTEGER(Const64(a))
-#endif
-
-#define LargeInteger0 MK_LARGE_INTEGER(0)
-
-
-/* Compile time asserts */
-#define C_ASSERT(e) do{extern char __C_ASSERT__[(e)?1:-1]; (void)__C_ASSERT__;}while(0)
-
-
-/* Helpers for easy conversion to system time units (100ns) */
-#define ABSOLUTE_TIME(wait) (wait)
-#define RELATIVE_TIME(wait) (-(wait))
-#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100)
-#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000))
-#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000))
-#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000))
-#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60))
-#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60))
-
-
-
-
-/* Helpers for enumarating lists */
-#define LIST_FOR_EACH(entry, head) \
- for((entry) = (head)->Flink; (entry) != (head); (entry) = (entry)->Flink)
-
-/*
-Safe version which saves pointer to the next entry so the current ptr->field entry
-can be unlinked without corrupting the list. NOTE: Never unlink tmp_entry!!!!!!!!!
-*/
-#define LIST_FOR_EACH_SAFE(tmp_entry, head, ptr, type, field) \
- for ((tmp_entry)=(head)->Flink; (tmp_entry)!=(head) && \
- ((ptr) = CONTAINING_RECORD(tmp_entry,type,field)) && \
- ((tmp_entry) = (tmp_entry)->Flink); )
-
-
-#ifndef __USE_W32API
-
-#define ANYSIZE_ARRAY (1)
-
-#define DELETE (0x00010000L)
-#define READ_CONTROL (0x00020000L)
-#define WRITE_DAC (0x00040000L)
-#define WRITE_OWNER (0x00080000L)
-#define SYNCHRONIZE (0x00100000L)
-
-#define DUPLICATE_CLOSE_SOURCE (1)
-#define DUPLICATE_SAME_ACCESS (2)
-
-#define INVALID_HANDLE_VALUE ((HANDLE)-1)
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_NTDEF_H */
+++ /dev/null
-#ifndef _INCLUDE_DDK_OBTYPES_H
-#define _INCLUDE_DDK_OBTYPES_H
-/* $Id$ */
-struct _DIRECTORY_OBJECT;
-struct _OBJECT_ATTRIBUTES;
-
-#ifndef __USE_W32API
-
-typedef struct _OBJECT_HANDLE_INFORMATION
-{
- ULONG HandleAttributes;
- ACCESS_MASK GrantedAccess;
-} OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION;
-
-
-typedef struct _OBJECT_BASIC_INFORMATION
-{
- ULONG Attributes;
- ACCESS_MASK GrantedAccess;
- ULONG HandleCount;
- ULONG PointerCount;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG Reserved[3];
- ULONG NameInformationLength;
- ULONG TypeInformationLength;
- ULONG SecurityDescriptorLength;
- LARGE_INTEGER CreateTime;
-} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
-
-
-typedef struct _OBJECT_NAME_INFORMATION
-{
- UNICODE_STRING Name;
-} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
-
-
-typedef struct _OBJECT_TYPE_INFORMATION {
- UNICODE_STRING TypeName;
- ULONG TotalNumberOfObjects;
- ULONG TotalNumberOfHandles;
- ULONG TotalPagedPoolUsage;
- ULONG TotalNonPagedPoolUsage;
- ULONG TotalNamePoolUsage;
- ULONG TotalHandleTableUsage;
- ULONG PeakNumberOfObjects;
- ULONG PeakNumberOfHandles;
- ULONG PeakPagedPoolUsage;
- ULONG PeakNonPagedPoolUsage;
- ULONG PeakNamePoolUsage;
- ULONG PeakHandleTableUsage;
- ULONG InvalidAttributes;
- GENERIC_MAPPING GenericMapping;
- ULONG ValidAccessMask;
- BOOLEAN SecurityRequired;
- BOOLEAN MaintainHandleCount;
- ULONG PoolType;
- ULONG DefaultPagedPoolCharge;
- ULONG DefaultNonPagedPoolCharge;
-} OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
-
-
-typedef struct _OBJECT_ALL_TYPES_INFORMATION
-{
- ULONG NumberOfTypes;
- OBJECT_TYPE_INFORMATION TypeInformation[1];
-} OBJECT_ALL_TYPES_INFORMATION, *POBJECT_ALL_TYPES_INFORMATION;
-
-
-typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFORMATION
-{
- BOOLEAN Inherit;
- BOOLEAN ProtectFromClose;
-} OBJECT_HANDLE_ATTRIBUTE_INFORMATION, *POBJECT_HANDLE_ATTRIBUTE_INFORMATION;
-
-
-typedef struct _OBJECT_TYPE *POBJECT_TYPE;
-
-
-typedef struct _OBJECT_ATTRIBUTES
-{
- ULONG Length;
- HANDLE RootDirectory;
- PUNICODE_STRING ObjectName;
- ULONG Attributes;
- PVOID SecurityDescriptor;
- PVOID SecurityQualityOfService;
-} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
-
-#endif
-
-typedef struct _HANDLE_TABLE_ENTRY_INFO {
- ULONG AuditMask;
-} HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
-
-typedef struct _HANDLE_TABLE_ENTRY {
- union {
- PVOID Object;
- ULONG_PTR ObAttributes;
- PHANDLE_TABLE_ENTRY_INFO InfoTable;
- ULONG_PTR Value;
- } u1;
- union {
- ULONG GrantedAccess;
- USHORT GrantedAccessIndex;
- LONG NextFreeTableEntry;
- } u2;
-} HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
-
-typedef struct _HANDLE_TABLE
-{
- ULONG Flags;
- LONG HandleCount;
- PHANDLE_TABLE_ENTRY **Table;
- PEPROCESS QuotaProcess;
- HANDLE UniqueProcessId;
- LONG FirstFreeTableEntry;
- LONG NextIndexNeedingPool;
- ERESOURCE HandleTableLock;
- LIST_ENTRY HandleTableList;
- KEVENT HandleContentionEvent;
-} HANDLE_TABLE;
-
-#ifndef __USE_W32API
-
-typedef struct _HANDLE_TABLE *PHANDLE_TABLE;
-
-/*
- * FIXME: These will eventually become centerfold in the compliant Ob Manager
- * For now, they are only here so Device Map is properly defined before the header
- * changes
- */
-typedef struct _OBJECT_DIRECTORY_ENTRY {
- struct _OBJECT_DIRECTORY_ENTRY *ChainLink;
- PVOID Object;
- ULONG HashValue;
-} OBJECT_DIRECTORY_ENTRY, *POBJECT_DIRECTORY_ENTRY;
-
-#define NUMBER_HASH_BUCKETS 37
-typedef struct _OBJECT_DIRECTORY {
- struct _OBJECT_DIRECTORY_ENTRY *HashBuckets[NUMBER_HASH_BUCKETS];
- struct _EX_PUSH_LOCK *Lock;
- struct _DEVICE_MAP *DeviceMap;
- ULONG SessionId;
-} OBJECT_DIRECTORY, *POBJECT_DIRECTORY;
-
-#endif /* __USE_W32API */
-
-typedef struct _DEVICE_MAP {
- POBJECT_DIRECTORY DosDevicesDirectory;
- POBJECT_DIRECTORY GlobalDosDevicesDirectory;
- ULONG ReferenceCount;
- ULONG DriveMap;
- UCHAR DriveType[32];
-} DEVICE_MAP, *PDEVICE_MAP;
-
-extern POBJECT_TYPE ObDirectoryType;
-extern PDEVICE_MAP ObSystemDeviceMap;
-
-#endif /* ndef _INCLUDE_DDK_OBTYPES_H */
+++ /dev/null
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ntos/port.h
- * PURPOSE: Port declarations used by all the parts of the
- * system
- * PROGRAMMER: Eric Kohl <ekokl@rz-online.de>
- * UPDATE HISTORY:
- * 02/02/2001: Created
- */
-
-#ifndef __INCLUDE_PORT_H
-#define __INCLUDE_PORT_H
-
-/* Port Object Access */
-
-#define PORT_ALL_ACCESS (0x1)
-
-#include <ddk/ntifs.h>
-
-#endif /* __INCLUDE_PORT_H */
-
-/* EOF */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ntos/ps.h
- * PURPOSE: Process/thread declarations used by all the parts of the
- * system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_PS_H
-#define __INCLUDE_PS_H
-
-#include <napi/teb.h>
-
-#define THREAD_READ (0x020048L)
-#define THREAD_WRITE (0x020037L)
-#define THREAD_EXECUTE (0x120000L)
-
-#define PROCESS_READ (0x020410L)
-#define PROCESS_WRITE (0x020bebL)
-#define PROCESS_EXECUTE (0x120000L)
-
-/* Thread priorities */
-#define THREAD_PRIORITY_BELOW_NORMAL (-1)
-#define THREAD_PRIORITY_IDLE (-15)
-#define THREAD_PRIORITY_LOWEST (-2)
-
-/* Process priority classes */
-#define PROCESS_PRIORITY_CLASS_HIGH (4) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_IDLE (0) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_NORMAL (2) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_REALTIME (5) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL (1) /* FIXME */
-#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL (3) /* FIXME */
-
-/* Job access rights */
-#define JOB_OBJECT_ASSIGN_PROCESS (1)
-#define JOB_OBJECT_SET_ATTRIBUTES (2)
-#define JOB_OBJECT_QUERY (4)
-#define JOB_OBJECT_TERMINATE (8)
-#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES (16)
-#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
-
-/* Thread access rights */
-#define THREAD_ALERT (0x0004L)
-
-#ifndef __USE_W32API
-
-/* Thread access rights */
-#define THREAD_TERMINATE (0x0001L)
-#define THREAD_SUSPEND_RESUME (0x0002L)
-#define THREAD_GET_CONTEXT (0x0008L)
-#define THREAD_SET_CONTEXT (0x0010L)
-#define THREAD_SET_INFORMATION (0x0020L)
-#define THREAD_QUERY_INFORMATION (0x0040L)
-#define THREAD_SET_THREAD_TOKEN (0x0080L)
-#define THREAD_IMPERSONATE (0x0100L)
-#define THREAD_DIRECT_IMPERSONATION (0x0200L)
-
-#define THREAD_ALL_ACCESS (0x1f03ffL)
-
-/* Process access rights */
-#define PROCESS_TERMINATE (0x0001L)
-#define PROCESS_CREATE_THREAD (0x0002L)
-#define PROCESS_SET_SESSIONID (0x0004L)
-#define PROCESS_VM_OPERATION (0x0008L)
-#define PROCESS_VM_READ (0x0010L)
-#define PROCESS_VM_WRITE (0x0020L)
-#define PROCESS_DUP_HANDLE (0x0040L)
-#define PROCESS_CREATE_PROCESS (0x0080L)
-#define PROCESS_SET_QUOTA (0x0100L)
-#define PROCESS_SET_INFORMATION (0x0200L)
-#define PROCESS_QUERY_INFORMATION (0x0400L)
-#define PROCESS_SUSPEND_RESUME (0x0800L)
-
-#define PROCESS_ALL_ACCESS (0x1f0fffL)
-
-/* Thread priorities */
-#define THREAD_PRIORITY_ABOVE_NORMAL (1)
-#define THREAD_PRIORITY_HIGHEST (2)
-#define THREAD_PRIORITY_NORMAL (0)
-#define THREAD_PRIORITY_TIME_CRITICAL (15)
-#define THREAD_PRIORITY_ERROR_RETURN (2147483647)
-
-/* CreateProcess */
-#define CREATE_DEFAULT_ERROR_MODE (67108864)
-#define CREATE_NEW_CONSOLE (16)
-#define CREATE_NEW_PROCESS_GROUP (512)
-#define CREATE_SEPARATE_WOW_VDM (2048)
-#define CREATE_SUSPENDED (4)
-#define CREATE_UNICODE_ENVIRONMENT (1024)
-#define DEBUG_PROCESS (1)
-#define DEBUG_ONLY_THIS_PROCESS (2)
-#define DETACHED_PROCESS (8)
-#define HIGH_PRIORITY_CLASS (128)
-#define IDLE_PRIORITY_CLASS (64)
-#define NORMAL_PRIORITY_CLASS (32)
-#define REALTIME_PRIORITY_CLASS (256)
-#define BELOW_NORMAL_PRIORITY_CLASS (16384)
-#define ABOVE_NORMAL_PRIORITY_CLASS (32768)
-
-/* ResumeThread / SuspendThread */
-#define MAXIMUM_SUSPEND_COUNT (0x7f)
-
-#endif /* !__USE_W32API */
-
-#ifdef NTOS_MODE_KERNEL
-
-#ifdef __NTOSKRNL__
-#ifdef __GNUC__
-extern struct _EPROCESS* EXPORTED PsInitialSystemProcess;
-extern POBJECT_TYPE EXPORTED PsProcessType;
-extern POBJECT_TYPE EXPORTED PsThreadType;
-#else /* __GNUC__ */
-/* Microsft-style */
-extern EXPORTED struct _EPROCESS* PsInitialSystemProcess;
-extern EXPORTED POBJECT_TYPE PsProcessType;
-extern EXPORTED POBJECT_TYPE PsThreadType;
-#endif /* __GNUC__ */
-#else /* __NTOSKRNL__ */
-#ifdef __GNUC__ // robd
-extern struct _EPROCESS* IMPORTED PsInitialSystemProcess;
-extern POBJECT_TYPE IMPORTED PsProcessType;
-extern POBJECT_TYPE IMPORTED PsThreadType;
-#endif
-#endif
-
-typedef NTSTATUS
-(STDCALL *PW32_PROCESS_CALLBACK)(struct _EPROCESS *Process,
- BOOLEAN Create);
-
-typedef NTSTATUS
-(STDCALL *PW32_THREAD_CALLBACK)(struct _ETHREAD *Thread,
- BOOLEAN Create);
-
-struct _EJOB;
-
-NTSTATUS STDCALL
-PsCreateSystemProcess (PHANDLE ProcessHandle,
- ACCESS_MASK DesiredAccess,
- POBJECT_ATTRIBUTES ObjectAttributes);
-
-
-NTSTATUS STDCALL PsCreateWin32Process(struct _EPROCESS* Process);
-
-NTSTATUS STDCALL PsCreateWin32Thread(struct _ETHREAD* Thread);
-
-
-NTSTATUS
-STDCALL PsChargeProcessNonPagedPoolQuota (
- IN PEPROCESS Process,
- IN ULONG_PTR Amount
- );
-
-
-NTSTATUS
-STDCALL PsChargeProcessPagedPoolQuota (
- IN PEPROCESS Process,
- IN ULONG_PTR Amount
- );
-
-
-ULONG
-STDCALL PsGetCurrentProcessSessionId (
- VOID
- );
-
-
-KPROCESSOR_MODE
-STDCALL PsGetCurrentThreadPreviousMode (
- VOID
- );
-
-
-PVOID
-STDCALL PsGetCurrentThreadStackBase (
- VOID
- );
-
-
-PVOID
-STDCALL PsGetCurrentThreadStackLimit (
- VOID
- );
-
-
-PVOID
-STDCALL PsGetJobLock(
- struct _EJOB* Job
- );
-
-
-PVOID
-STDCALL PsGetJobSessionId(
- struct _EJOB* Job
- );
-
-
-ULONG
-STDCALL PsGetJobUIRestrictionsClass(
- struct _EJOB* Job
- );
-
-
-LONGLONG
-STDCALL PsGetProcessCreateTimeQuadPart(
- PEPROCESS Process
- );
-
-
-PVOID
-STDCALL PsGetProcessDebugPort(
- PEPROCESS Process
- );
-
-
-BOOLEAN
-STDCALL PsGetProcessExitProcessCalled(
- PEPROCESS Process
- );
-
-
-NTSTATUS
-STDCALL PsGetProcessExitStatus(
- PEPROCESS Process
- );
-
-
-HANDLE
-STDCALL PsGetProcessId(
- PEPROCESS Process
- );
-
-
-LPSTR
-STDCALL PsGetProcessImageFileName(
- PEPROCESS Process
- );
-
-
-HANDLE
-STDCALL PsGetProcessInheritedFromUniqueProcessId(
- PEPROCESS Process
- );
-
-
-struct _EJOB*
-STDCALL PsGetProcessJob(
- PEPROCESS Process
- );
-
-
-PPEB
-STDCALL PsGetProcessPeb(
- PEPROCESS Process
- );
-
-
-ULONG
-STDCALL PsGetProcessPriorityClass(
- PEPROCESS Process
- );
-
-
-PVOID
-STDCALL PsGetProcessSectionBaseAddress(
- PEPROCESS Process
- );
-
-
-PVOID
-STDCALL PsGetProcessSecurityPort(
- PEPROCESS Process
- );
-
-
-HANDLE
-STDCALL PsGetProcessSessionId(
- PEPROCESS Process
- );
-
-
-PVOID
-STDCALL PsGetProcessWin32Process(
- PEPROCESS Process
- );
-
-
-PVOID
-STDCALL PsGetProcessWin32WindowStation(
- PEPROCESS Process
- );
-
-
-ULONG
-STDCALL PsGetThreadFreezeCount(
- struct _ETHREAD* Thread
- );
-
-
-BOOLEAN
-STDCALL PsGetThreadHardErrorsAreDisabled(
- struct _ETHREAD* Thread
- );
-
-
-HANDLE
-STDCALL PsGetThreadId(
- struct _ETHREAD* Thread
- );
-
-
-PEPROCESS
-STDCALL PsGetThreadProcess(
- struct _ETHREAD* Thread
- );
-
-
-HANDLE
-STDCALL PsGetThreadProcessId(
- struct _ETHREAD* Thread
- );
-
-
-HANDLE
-STDCALL PsGetThreadSessionId(
- struct _ETHREAD* Thread
- );
-
-
-PTEB
-STDCALL PsGetThreadTeb(
- struct _ETHREAD* Thread
- );
-
-
-PVOID
-STDCALL PsGetThreadWin32Thread(
- struct _ETHREAD* Thread
- );
-
-
-BOOLEAN
-STDCALL PsIsProcessBeingDebugged(
- PEPROCESS Process
- );
-
-
-BOOLEAN
-STDCALL PsIsThreadImpersonating(
- struct _ETHREAD* Thread
- );
-
-
-VOID
-STDCALL PsReturnProcessNonPagedPoolQuota(
- IN PEPROCESS Process,
- IN ULONG_PTR Amount
- );
-
-
-VOID
-STDCALL PsReturnProcessPagedPoolQuota(
- IN PEPROCESS Process,
- IN ULONG_PTR Amount
- );
-
-
-VOID
-STDCALL
-PsRevertThreadToSelf(
- IN struct _ETHREAD* Thread
- );
-
-
-VOID
-STDCALL PsSetJobUIRestrictionsClass(
- struct _EJOB* Job,
- ULONG UIRestrictionsClass
- );
-
-
-ULONG
-STDCALL PsSetLegoNotifyRoutine(
- PVOID LegoNotifyRoutine
- );
-
-
-VOID
-STDCALL PsSetProcessPriorityClass(
- PEPROCESS Process,
- ULONG PriorityClass
- );
-
-
-VOID
-STDCALL PsSetProcessSecurityPort(
- PEPROCESS Process,
- PVOID SecurityPort
- );
-
-
-VOID
-STDCALL PsSetProcessWin32Process(
- PEPROCESS Process,
- PVOID Win32Process
- );
-
-
-VOID
-STDCALL PsSetProcessWin32WindowStation(
- PEPROCESS Process,
- PVOID WindowStation
- );
-
-
-VOID
-STDCALL PsSetThreadHardErrorsAreDisabled(
- struct _ETHREAD* Thread,
- BOOLEAN HardErrorsAreDisabled
- );
-
-
-VOID
-STDCALL PsSetThreadWin32Thread(
- struct _ETHREAD* Thread,
- PVOID Win32Thread
- );
-
-
-struct _W32_OBJECT_CALLBACK;
-
-
-VOID STDCALL
-STDCALL PsEstablishWin32Callouts (PW32_PROCESS_CALLBACK W32ProcessCallback,
- PW32_THREAD_CALLBACK W32ThreadCallback,
- struct _W32_OBJECT_CALLBACK *W32ObjectCallback,
- PVOID Param4,
- ULONG W32ThreadSize,
- ULONG W32ProcessSize);
-
-
-NTSTATUS STDCALL PsLookupProcessByProcessId(IN HANDLE ProcessId,
- OUT PEPROCESS *Process);
-
-
-NTSTATUS STDCALL PsLookupProcessThreadByCid(IN PCLIENT_ID Cid,
- OUT PEPROCESS *Process OPTIONAL,
- OUT struct _ETHREAD **Thread);
- /* OUT PETHREAD *Thread); */
-
-NTSTATUS STDCALL PsLookupThreadByThreadId(IN HANDLE ThreadId,
- OUT struct _ETHREAD **Thread);
- /* OUT PETHREAD *Thread); */
-
-#endif /* NTOS_MODE_KERNEL */
-
-#endif /* __INCLUDE_PS_H */
+++ /dev/null
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ntos/registry.h
- * PURPOSE: Registry declarations used by all the parts of the
- * system
- * PROGRAMMER: Eric Kohl <ekohl@rz-online.de>
- * UPDATE HISTORY:
- * 25/01/2001: Created
- */
-
-#ifndef __INCLUDE_NTOS_REGISTRY_H
-#define __INCLUDE_NTOS_REGISTRY_H
-
-#ifndef __USE_W32API
-
-/* Key access rights */
-#define KEY_QUERY_VALUE (1)
-#define KEY_SET_VALUE (2)
-#define KEY_CREATE_SUB_KEY (4)
-#define KEY_ENUMERATE_SUB_KEYS (8)
-#define KEY_NOTIFY (16)
-#define KEY_CREATE_LINK (32)
-
-#define KEY_READ (0x20019L)
-#define KEY_WRITE (0x20006L)
-#define KEY_EXECUTE (0x20019L)
-#define KEY_ALL_ACCESS (0xf003fL)
-
-/* Key create options */
-#define REG_OPTION_NON_VOLATILE (0x0L)
-#define REG_OPTION_VOLATILE (0x1L)
-#define REG_OPTION_CREATE_LINK (0x2L)
-#define REG_OPTION_BACKUP_RESTORE (0x8L)
-#define REG_OPTION_OPEN_LINK (0x8L)
-
-/* Key load/restore options */
-#define REG_WHOLE_HIVE_VOLATILE (0x1L)
-#define REG_REFRESH_HIVE (0x2L)
-#define REG_NO_LAZY_FLUSH (0x4L)
-#define REG_FORCE_RESTORE (0x8L)
-
-/* Key create/open disposition */
-#define REG_CREATED_NEW_KEY (0x1L)
-#define REG_OPENED_EXISTING_KEY (0x2L)
-
-/* Value types */
-#define REG_NONE (0)
-#define REG_SZ (1)
-#define REG_EXPAND_SZ (2)
-#define REG_BINARY (3)
-#define REG_DWORD (4)
-#define REG_DWORD_LITTLE_ENDIAN (4)
-#define REG_DWORD_BIG_ENDIAN (5)
-#define REG_LINK (6)
-#define REG_MULTI_SZ (7)
-#define REG_RESOURCE_LIST (8)
-#define REG_FULL_RESOURCE_DESCRIPTOR (9)
-#define REG_RESOURCE_REQUIREMENTS_LIST (10)
-
-#endif /* !__USE_W32API */
-
-#endif /* __INCLUDE_NTOS_REGISTRY_H */
+++ /dev/null
-/* $Id$
- *
- */
-#ifndef __DDK_RTL_H
-#define __DDK_RTL_H
-
-/* RTLP Functions */
-#include <rosrtl/string.h>
-
-#if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined (__NTAPP__)
-
-#include <stddef.h>
-#include <stdarg.h>
-
-#endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
-
-#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
-#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
-
-#ifndef __USE_W32API
-
-/*
- * PURPOSE: Flags for RtlQueryRegistryValues
- */
-#define RTL_QUERY_REGISTRY_SUBKEY (0x00000001)
-#define RTL_QUERY_REGISTRY_TOPKEY (0x00000002)
-#define RTL_QUERY_REGISTRY_REQUIRED (0x00000004)
-#define RTL_QUERY_REGISTRY_NOVALUE (0x00000008)
-#define RTL_QUERY_REGISTRY_NOEXPAND (0x00000010)
-#define RTL_QUERY_REGISTRY_DIRECT (0x00000020)
-#define RTL_QUERY_REGISTRY_DELETE (0x00000040)
-
-
-/*
- * PURPOSE: Flags used by RtlIsTextUnicode and IsTextUnicode
- */
-#define IS_TEXT_UNICODE_ASCII16 (0x00000001)
-#define IS_TEXT_UNICODE_REVERSE_ASCII16 (0x00000010)
-#define IS_TEXT_UNICODE_STATISTICS (0x00000002)
-#define IS_TEXT_UNICODE_REVERSE_STATISTICS (0x00000020)
-#define IS_TEXT_UNICODE_CONTROLS (0x00000004)
-#define IS_TEXT_UNICODE_REVERSE_CONTROLS (0x00000040)
-#define IS_TEXT_UNICODE_SIGNATURE (0x00000008)
-#define IS_TEXT_UNICODE_REVERSE_SIGNATURE (0x00000080)
-#define IS_TEXT_UNICODE_ILLEGAL_CHARS (0x00000100)
-#define IS_TEXT_UNICODE_ODD_LENGTH (0x00000200)
-#define IS_TEXT_UNICODE_NULL_BYTES (0x00001000)
-#define IS_TEXT_UNICODE_UNICODE_MASK (0x0000000F)
-#define IS_TEXT_UNICODE_REVERSE_MASK (0x000000F0)
-#define IS_TEXT_UNICODE_NOT_UNICODE_MASK (0x00000F00)
-#define IS_TEXT_UNICODE_NOT_ASCII_MASK (0x0000F000)
-
-/*
- * VOID
- * InitializeObjectAttributes (
- * POBJECT_ATTRIBUTES InitializedAttributes,
- * PUNICODE_STRING ObjectName,
- * ULONG Attributes,
- * HANDLE RootDirectory,
- * PSECURITY_DESCRIPTOR SecurityDescriptor
- * );
- *
- * FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
- * subsequent call to ZwCreateXXX or ZwOpenXXX
- * ARGUMENTS:
- * InitializedAttributes (OUT) = Caller supplied storage for the
- * object attributes
- * ObjectName = Full path name for object
- * Attributes = Attributes for the object
- * RootDirectory = Where the object should be placed or NULL
- * SecurityDescriptor = Ignored
- */
-#define InitializeObjectAttributes(p,n,a,r,s) \
-{ \
- (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
- (p)->ObjectName = n; \
- (p)->Attributes = a; \
- (p)->RootDirectory = r; \
- (p)->SecurityDescriptor = s; \
- (p)->SecurityQualityOfService = NULL; \
-}
-
-
-/*
- * VOID
- * InitializeListHead (
- * PLIST_ENTRY ListHead
- * );
- *
- * FUNCTION: Initializes a double linked list
- * ARGUMENTS:
- * ListHead = Caller supplied storage for the head of the list
- */
-static __inline VOID
-InitializeListHead(
- IN PLIST_ENTRY ListHead)
-{
- ListHead->Flink = ListHead->Blink = ListHead;
-}
-
-
-/*
- * VOID
- * InsertHeadList (
- * PLIST_ENTRY ListHead,
- * PLIST_ENTRY Entry
- * );
- *
- * FUNCTION: Inserts an entry in a double linked list
- * ARGUMENTS:
- * ListHead = Head of the list
- * Entry = Entry to insert
- */
-static __inline VOID
-InsertHeadList(
- IN PLIST_ENTRY ListHead,
- IN PLIST_ENTRY Entry)
-{
- PLIST_ENTRY OldFlink;
- OldFlink = ListHead->Flink;
- Entry->Flink = OldFlink;
- Entry->Blink = ListHead;
- OldFlink->Blink = Entry;
- ListHead->Flink = Entry;
-}
-
-
-/*
- * VOID
- * InsertTailList (
- * PLIST_ENTRY ListHead,
- * PLIST_ENTRY Entry
- * );
- *
- * FUNCTION:
- * Inserts an entry in a double linked list
- *
- * ARGUMENTS:
- * ListHead = Head of the list
- * Entry = Entry to insert
- */
-static __inline VOID
-InsertTailList(
- IN PLIST_ENTRY ListHead,
- IN PLIST_ENTRY Entry)
-{
- PLIST_ENTRY OldBlink;
- OldBlink = ListHead->Blink;
- Entry->Flink = ListHead;
- Entry->Blink = OldBlink;
- OldBlink->Flink = Entry;
- ListHead->Blink = Entry;
-}
-
-/*
- * BOOLEAN
- * IsListEmpty (
- * PLIST_ENTRY ListHead
- * );
- *
- * FUNCTION:
- * Checks if a double linked list is empty
- *
- * ARGUMENTS:
- * ListHead = Head of the list
-*/
-#define IsListEmpty(ListHead) \
- ((ListHead)->Flink == (ListHead))
-
-
-/*
- * PSINGLE_LIST_ENTRY
- * PopEntryList (
- * PSINGLE_LIST_ENTRY ListHead
- * );
- *
- * FUNCTION:
- * Removes an entry from the head of a single linked list
- *
- * ARGUMENTS:
- * ListHead = Head of the list
- *
- * RETURNS:
- * The removed entry
- */
-#define PopEntryList(ListHead) \
- (ListHead)->Next; \
- { \
- PSINGLE_LIST_ENTRY _FirstEntry; \
- _FirstEntry = (ListHead)->Next; \
- if (_FirstEntry != NULL) \
- (ListHead)->Next = _FirstEntry->Next; \
- }
-
-#define RtlCopyMemory(Destination,Source,Length) \
- memcpy((Destination),(Source),(Length))
-
-#define PushEntryList(_ListHead, _Entry) \
- (_Entry)->Next = (_ListHead)->Next; \
- (_ListHead)->Next = (_Entry); \
-
-/*
- *BOOLEAN
- *RemoveEntryList (
- * PLIST_ENTRY Entry
- * );
- *
- * FUNCTION:
- * Removes an entry from a double linked list
- *
- * ARGUMENTS:
- * ListEntry = Entry to remove
- */
-static __inline BOOLEAN
-RemoveEntryList(
- IN PLIST_ENTRY Entry)
-{
- PLIST_ENTRY OldFlink;
- PLIST_ENTRY OldBlink;
-
- OldFlink = Entry->Flink;
- OldBlink = Entry->Blink;
- OldFlink->Blink = OldBlink;
- OldBlink->Flink = OldFlink;
- return (OldFlink == OldBlink);
-}
-
-
-/*
- * PLIST_ENTRY
- * RemoveHeadList (
- * PLIST_ENTRY ListHead
- * );
- *
- * FUNCTION:
- * Removes the head entry from a double linked list
- *
- * ARGUMENTS:
- * ListHead = Head of the list
- *
- * RETURNS:
- * The removed entry
- */
-static __inline PLIST_ENTRY
-RemoveHeadList(
- IN PLIST_ENTRY ListHead)
-{
- PLIST_ENTRY Flink;
- PLIST_ENTRY Entry;
-
- Entry = ListHead->Flink;
- Flink = Entry->Flink;
- ListHead->Flink = Flink;
- Flink->Blink = ListHead;
- return Entry;
-}
-
-
-/*
- * PLIST_ENTRY
- * RemoveTailList (
- * PLIST_ENTRY ListHead
- * );
- *
- * FUNCTION:
- * Removes the tail entry from a double linked list
- *
- * ARGUMENTS:
- * ListHead = Head of the list
- *
- * RETURNS:
- * The removed entry
- */
-static __inline PLIST_ENTRY
-RemoveTailList(
- IN PLIST_ENTRY ListHead)
-{
- PLIST_ENTRY Blink;
- PLIST_ENTRY Entry;
-
- Entry = ListHead->Blink;
- Blink = Entry->Blink;
- ListHead->Blink = Blink;
- Blink->Flink = ListHead;
- return Entry;
-}
-
-/*
- * BOOLEAN
- * IsXstEntry (
- * PLIST_ENTRY ListHead,
- * PLIST_ENTRY Entry
- * );
-*/
-#define IsFirstEntry(ListHead, Entry) ((ListHead)->Flink == Entry)
-
-#define IsLastEntry(ListHead, Entry) ((ListHead)->Blink == Entry)
-
-#define RtlEqualMemory(Destination,Source,Length) (!memcmp((Destination), (Source), (Length)))
-
-NTSTATUS
-STDCALL
-RtlCreateUserThread (
- IN HANDLE ProcessHandle,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN BOOLEAN CreateSuspended,
- IN LONG StackZeroBits,
- IN OUT PULONG StackReserve,
- IN OUT PULONG StackCommit,
- IN PTHREAD_START_ROUTINE StartAddress,
- IN PVOID Parameter,
- IN OUT PHANDLE ThreadHandle,
- IN OUT PCLIENT_ID ClientId
- );
-
-NTSTATUS
-STDCALL
-RtlAppendUnicodeToString (
- PUNICODE_STRING Destination,
- PCWSTR Source
- );
-
-SIZE_T STDCALL
-RtlCompareMemory(IN const VOID *Source1,
- IN const VOID *Source2,
- IN SIZE_T Length);
-
-BOOLEAN
-STDCALL
-RtlEqualUnicodeString (
- PUNICODE_STRING String1,
- PUNICODE_STRING String2,
- BOOLEAN CaseInSensitive
- );
-
-NTSTATUS
-STDCALL
-RtlQueryRegistryValues (
- IN ULONG RelativeTo,
- IN PCWSTR Path,
- IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
- IN PVOID Context,
- IN PVOID Environment
- );
-
-NTSTATUS
-STDCALL
-RtlWriteRegistryValue (
- ULONG RelativeTo,
- PCWSTR Path,
- PCWSTR ValueName,
- ULONG ValueType,
- PVOID ValueData,
- ULONG ValueLength
- );
-
-NTSTATUS STDCALL
-RtlDeleteRegistryValue(IN ULONG RelativeTo,
- IN PCWSTR Path,
- IN PCWSTR ValueName);
-
-VOID STDCALL
-RtlMoveMemory (PVOID Destination, CONST VOID* Source, ULONG Length);
-
-BOOLEAN STDCALL
-RtlEqualLuid(IN PLUID Luid1,
- IN PLUID Luid2);
-
-VOID
-STDCALL
-RtlFillMemory (
- PVOID Destination,
- ULONG Length,
- UCHAR Fill
- );
-
-VOID STDCALL
-RtlZeroMemory (PVOID Destination, ULONG Length);
-
-#else /* __USE_W32API */
-
-#include <ddk/ntifs.h>
-
-#endif /* __USE_W32API */
-
-/*
- * FIFO versions are slower but ensures that entries with equal SortField value
- * are placed in FIFO order (assuming that entries are removed from Head).
- */
-
-#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
-{\
- PLIST_ENTRY current;\
-\
- current = (ListHead)->Flink;\
- while (current != (ListHead))\
- {\
- if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
- (NewEntry)->SortField)\
- {\
- break;\
- }\
- current = current->Flink;\
- }\
-\
- InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-
-#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
-{\
- PLIST_ENTRY current;\
-\
- current = (ListHead)->Flink;\
- while (current != (ListHead))\
- {\
- if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
- (NewEntry)->SortField)\
- {\
- break;\
- }\
- current = current->Flink;\
- }\
-\
- InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-
-#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
-{\
- PLIST_ENTRY current;\
-\
- current = (ListHead)->Flink;\
- while (current != (ListHead))\
- {\
- if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
- (NewEntry)->SortField)\
- {\
- break;\
- }\
- current = current->Flink;\
- }\
-\
- InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-
-#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
-{\
- PLIST_ENTRY current;\
-\
- current = (ListHead)->Flink;\
- while (current != (ListHead))\
- {\
- if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
- (NewEntry)->SortField)\
- {\
- break;\
- }\
- current = current->Flink;\
- }\
-\
- InsertTailList(current, &((NewEntry)->ListEntryField));\
-}
-
-/*
- * PURPOSE: Used with RtlCheckRegistryKey, RtlCreateRegistryKey,
- * RtlDeleteRegistryKey
- */
-#define RTL_REGISTRY_ABSOLUTE 0
-#define RTL_REGISTRY_SERVICES 1
-#define RTL_REGISTRY_CONTROL 2
-#define RTL_REGISTRY_WINDOWS_NT 3
-#define RTL_REGISTRY_DEVICEMAP 4
-#define RTL_REGISTRY_USER 5
-#define RTL_REGISTRY_MAXIMUM 6
-
-#define RTL_REGISTRY_HANDLE 0x40000000
-#define RTL_REGISTRY_OPTIONAL 0x80000000
-
-
-#define SHORT_SIZE (sizeof(USHORT))
-#define SHORT_MASK (SHORT_SIZE-1)
-#define LOWBYTE_MASK 0x00FF
-
-#define FIRSTBYTE(Value) ((Value) & LOWBYTE_MASK)
-#define SECONDBYTE(Value) (((Value) >> 8) & LOWBYTE_MASK)
-#define THIRDBYTE(Value) (((Value) >> 16) & LOWBYTE_MASK)
-#define FOURTHBYTE(Value) (((Value) >> 24) & LOWBYTE_MASK)
-
-/* FIXME: reverse byte-order on big-endian machines (e.g. MIPS) */
-#define SHORT_LEAST_SIGNIFICANT_BIT 0
-#define SHORT_MOST_SIGNIFICANT_BIT 1
-
-#define LONG_LEAST_SIGNIFICANT_BIT 0
-#define LONG_3RD_MOST_SIGNIFICANT_BIT 1
-#define LONG_2RD_MOST_SIGNIFICANT_BIT 2
-#define LONG_MOST_SIGNIFICANT_BIT 3
-
-
-#define NLS_ANSI_CODE_PAGE NlsAnsiCodePage
-#define NLS_LEAD_BYTE_INFO NlsLeadByteInfo
-#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
-#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
-
-#if defined(__NTOSKRNL__) || defined(__NTDLL__)
-extern USHORT EXPORTED NlsAnsiCodePage;
-extern PUSHORT EXPORTED NlsLeadByteInfo;
-extern BOOLEAN EXPORTED NlsMbCodePageTag;
-extern BOOLEAN EXPORTED NlsMbOemCodePageTag;
-extern PUSHORT EXPORTED NlsOemLeadByteInfo;
-#else
-extern USHORT IMPORTED NlsAnsiCodePage;
-extern PUSHORT IMPORTED NlsLeadByteInfo;
-extern BOOLEAN IMPORTED NlsMbCodePageTag;
-extern BOOLEAN IMPORTED NlsMbOemCodePageTag;
-extern PUSHORT IMPORTED NlsOemLeadByteInfo;
-#endif /* __NTOSKRNL__ || __NTDLL__ */
-
-/*
-VOID
-PushEntryList (
- PSINGLE_LIST_ENTRY ListHead,
- PSINGLE_LIST_ENTRY Entry
- );
-*/
-/*
-#define PushEntryList(ListHead,Entry) \
- (Entry)->Next = (ListHead)->Next; \
- (ListHead)->Next = (Entry)
-*/
-
-
-NTSTATUS STDCALL
-RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD,
- PSECURITY_DESCRIPTOR_RELATIVE RelSD,
- PULONG BufferLength);
-
-NTSTATUS STDCALL
-RtlAddAccessAllowedAce (PACL Acl,
- ULONG Revision,
- ACCESS_MASK AccessMask,
- PSID Sid);
-
-NTSTATUS
-STDCALL
-RtlAddAccessAllowedAceEx(
- IN OUT PACL pAcl,
- IN DWORD dwAceRevision,
- IN DWORD AceFlags,
- IN DWORD AccessMask,
- IN PSID pSid);
-
-
-NTSTATUS STDCALL
-RtlAddAccessDeniedAce (PACL Acl,
- ULONG Revision,
- ACCESS_MASK AccessMask,
- PSID Sid);
-
-NTSTATUS STDCALL
-RtlAddAce (PACL Acl,
- ULONG Revision,
- ULONG StartingIndex,
- PACE AceList,
- ULONG AceListLength);
-
-NTSTATUS STDCALL
-RtlAddAtomToAtomTable (IN PRTL_ATOM_TABLE AtomTable,
- IN PWSTR AtomName,
- OUT PRTL_ATOM Atom);
-
-NTSTATUS STDCALL
-RtlAddAuditAccessAce (PACL Acl,
- ULONG Revision,
- ACCESS_MASK AccessMask,
- PSID Sid,
- BOOLEAN Success,
- BOOLEAN Failure);
-
-NTSTATUS STDCALL
-RtlAddRange (IN OUT PRTL_RANGE_LIST RangeList,
- IN ULONGLONG Start,
- IN ULONGLONG End,
- IN UCHAR Attributes,
- IN ULONG Flags, /* RTL_RANGE_LIST_ADD_... flags */
- IN PVOID UserData OPTIONAL,
- IN PVOID Owner OPTIONAL);
-
-NTSTATUS STDCALL
-RtlAllocateAndInitializeSid (IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
- IN UCHAR SubAuthorityCount,
- IN ULONG SubAuthority0,
- IN ULONG SubAuthority1,
- IN ULONG SubAuthority2,
- IN ULONG SubAuthority3,
- IN ULONG SubAuthority4,
- IN ULONG SubAuthority5,
- IN ULONG SubAuthority6,
- IN ULONG SubAuthority7,
- OUT PSID *Sid);
-
-PVOID STDCALL
-RtlAllocateHeap (
- HANDLE Heap,
- ULONG Flags,
- ULONG Size
- );
-
-WCHAR STDCALL
-RtlAnsiCharToUnicodeChar (IN CHAR AnsiChar);
-
-ULONG
-STDCALL
-RtlAnsiStringToUnicodeSize (
- PANSI_STRING AnsiString
- );
-
-NTSTATUS
-STDCALL
-RtlAnsiStringToUnicodeString (
- PUNICODE_STRING DestinationString,
- PANSI_STRING SourceString,
- BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlAppendAsciizToString(
- PSTRING Destination,
- PCSZ Source
- );
-
-NTSTATUS
-STDCALL
-RtlAppendStringToString (
- PSTRING Destination,
- PSTRING Source
- );
-
-NTSTATUS
-STDCALL
-RtlAppendUnicodeStringToString (
- PUNICODE_STRING Destination,
- PUNICODE_STRING Source
- );
-
-BOOLEAN STDCALL
-RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess,
- ACCESS_MASK DesiredAccess);
-
-BOOLEAN STDCALL
-RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess,
- ACCESS_MASK DesiredAccess);
-
-BOOLEAN
-STDCALL
-RtlAreBitsClear (
- PRTL_BITMAP BitMapHeader,
- ULONG StartingIndex,
- ULONG Length
- );
-
-BOOLEAN
-STDCALL
-RtlAreBitsSet (
- PRTL_BITMAP BitMapHeader,
- ULONG StartingIndex,
- ULONG Length
- );
-
-VOID
-STDCALL
-RtlAssert (
- PVOID FailedAssertion,
- PVOID FileName,
- ULONG LineNumber,
- PCHAR Message
- );
-
-VOID
-STDCALL
-RtlCaptureContext (
- OUT PCONTEXT ContextRecord
- );
-
-USHORT
-STDCALL
-RtlCaptureStackBackTrace (
- IN ULONG FramesToSkip,
- IN ULONG FramesToCapture,
- OUT PVOID *BackTrace,
- OUT PULONG BackTraceHash OPTIONAL
- );
-
-
-
-NTSTATUS
-STDCALL
-RtlCharToInteger (
- PCSZ String,
- ULONG Base,
- PULONG Value
- );
-
-NTSTATUS
-STDCALL
-RtlCheckRegistryKey (
- ULONG RelativeTo,
- PWSTR Path
- );
-
-VOID
-STDCALL
-RtlClearAllBits (
- IN PRTL_BITMAP BitMapHeader
- );
-
-VOID
-STDCALL
-RtlClearBit (
- PRTL_BITMAP BitMapHeader,
- ULONG BitNumber
- );
-
-VOID
-STDCALL
-RtlClearBits (
- IN PRTL_BITMAP BitMapHeader,
- IN ULONG StartingIndex,
- IN ULONG NumberToClear
- );
-
-ULONG STDCALL
-RtlCompactHeap (
- HANDLE Heap,
- ULONG Flags
- );
-
-LONG
-STDCALL
-RtlCompareString (
- PSTRING String1,
- PSTRING String2,
- BOOLEAN CaseInsensitive
- );
-
-LONG
-STDCALL
-RtlCompareUnicodeString (
- PUNICODE_STRING String1,
- PUNICODE_STRING String2,
- BOOLEAN CaseInsensitive
- );
-
-NTSTATUS STDCALL
-RtlCompressBuffer(IN USHORT CompressionFormatAndEngine,
- IN PUCHAR UncompressedBuffer,
- IN ULONG UncompressedBufferSize,
- OUT PUCHAR CompressedBuffer,
- IN ULONG CompressedBufferSize,
- IN ULONG UncompressedChunkSize,
- OUT PULONG FinalCompressedSize,
- IN PVOID WorkSpace);
-
-NTSTATUS STDCALL
-RtlCompressChunks(IN PUCHAR UncompressedBuffer,
- IN ULONG UncompressedBufferSize,
- OUT PUCHAR CompressedBuffer,
- IN ULONG CompressedBufferSize,
- IN OUT PCOMPRESSED_DATA_INFO CompressedDataInfo,
- IN ULONG CompressedDataInfoLength,
- IN PVOID WorkSpace);
-
-LARGE_INTEGER STDCALL
-RtlConvertLongToLargeInteger (IN LONG SignedInteger);
-
-NTSTATUS STDCALL
-RtlConvertSidToUnicodeString (IN OUT PUNICODE_STRING String,
- IN PSID Sid,
- IN BOOLEAN AllocateString);
-
-LARGE_INTEGER STDCALL
-RtlConvertUlongToLargeInteger (IN ULONG UnsignedInteger);
-
-#if 0
-VOID
-RtlCopyBytes (
- PVOID Destination,
- CONST VOID * Source,
- ULONG Length
- );
-
-VOID
-RtlCopyMemory (
- VOID * Destination,
- CONST VOID * Source,
- ULONG Length
- );
-#endif
-
-#define RtlCopyBytes RtlCopyMemory
-
-VOID STDCALL
-RtlCopyLuid(IN PLUID LuidDest,
- IN PLUID LuidSrc);
-
-VOID STDCALL
-RtlCopyLuidAndAttributesArray(ULONG Count,
- PLUID_AND_ATTRIBUTES Src,
- PLUID_AND_ATTRIBUTES Dest);
-
-NTSTATUS STDCALL
-RtlCopyRangeList (OUT PRTL_RANGE_LIST CopyRangeList,
- IN PRTL_RANGE_LIST RangeList);
-
-NTSTATUS STDCALL
-RtlCopySid(ULONG BufferLength,
- PSID Dest,
- PSID Src);
-
-NTSTATUS STDCALL
-RtlCopySidAndAttributesArray(ULONG Count,
- PSID_AND_ATTRIBUTES Src,
- ULONG SidAreaSize,
- PSID_AND_ATTRIBUTES Dest,
- PVOID SidArea,
- PVOID* RemainingSidArea,
- PULONG RemainingSidAreaSize);
-
-VOID STDCALL
-RtlCopyString(PSTRING DestinationString,
- PSTRING SourceString);
-
-VOID STDCALL
-RtlCopyUnicodeString(PUNICODE_STRING DestinationString,
- PUNICODE_STRING SourceString);
-
-NTSTATUS STDCALL
-RtlCreateAcl (PACL Acl,
- ULONG AclSize,
- ULONG AclRevision);
-
-NTSTATUS STDCALL
-RtlCreateAtomTable(IN ULONG TableSize,
- IN OUT PRTL_ATOM_TABLE *AtomTable);
-
-HANDLE
-STDCALL
-RtlCreateHeap (
- ULONG Flags,
- PVOID BaseAddress,
- ULONG SizeToReserve, /* dwMaximumSize */
- ULONG SizeToCommit, /* dwInitialSize */
- PVOID Unknown,
- PRTL_HEAP_DEFINITION Definition
- );
-
-NTSTATUS STDCALL
-RtlCreateRegistryKey (ULONG RelativeTo,
- PWSTR Path);
-
-NTSTATUS STDCALL
-RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- ULONG Revision);
-
-NTSTATUS STDCALL
-RtlCreateSecurityDescriptorRelative (PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
- ULONG Revision);
-
-NTSTATUS
-STDCALL
-RtlCreateSystemVolumeInformationFolder(
- IN PUNICODE_STRING VolumeRootPath
- );
-
-BOOLEAN STDCALL
-RtlCreateUnicodeString (OUT PUNICODE_STRING Destination,
- IN PCWSTR Source);
-
-BOOLEAN STDCALL
-RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
- IN PCSZ Source);
-
-NTSTATUS
-STDCALL
-RtlCustomCPToUnicodeN (
- IN PCPTABLEINFO CustomCP,
- PWCHAR UnicodeString,
- ULONG UnicodeSize,
- PULONG ResultSize,
- PCHAR CustomString,
- ULONG CustomSize
- );
-
-BOOLEAN STDCALL
-RtlCutoverTimeToSystemTime(IN PTIME_FIELDS CutoverTimeFields,
- OUT PLARGE_INTEGER SystemTime,
- IN PLARGE_INTEGER CurrentTime,
- IN BOOLEAN ThisYearsCutoverOnly);
-
-NTSTATUS STDCALL
-RtlDecompressBuffer(IN USHORT CompressionFormat,
- OUT PUCHAR UncompressedBuffer,
- IN ULONG UncompressedBufferSize,
- IN PUCHAR CompressedBuffer,
- IN ULONG CompressedBufferSize,
- OUT PULONG FinalUncompressedSize);
-
-NTSTATUS STDCALL
-RtlDecompressChunks(OUT PUCHAR UncompressedBuffer,
- IN ULONG UncompressedBufferSize,
- IN PUCHAR CompressedBuffer,
- IN ULONG CompressedBufferSize,
- IN PUCHAR CompressedTail,
- IN ULONG CompressedTailSize,
- IN PCOMPRESSED_DATA_INFO CompressedDataInfo);
-
-NTSTATUS STDCALL
-RtlDecompressFragment(IN USHORT CompressionFormat,
- OUT PUCHAR UncompressedFragment,
- IN ULONG UncompressedFragmentSize,
- IN PUCHAR CompressedBuffer,
- IN ULONG CompressedBufferSize,
- IN ULONG FragmentOffset,
- OUT PULONG FinalUncompressedSize,
- IN PVOID WorkSpace);
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlDelete (
- PRTL_SPLAY_LINKS Links
- );
-
-NTSTATUS STDCALL
-RtlDeleteAce (PACL Acl,
- ULONG AceIndex);
-
-NTSTATUS STDCALL
-RtlDeleteAtomFromAtomTable (IN PRTL_ATOM_TABLE AtomTable,
- IN RTL_ATOM Atom);
-
-BOOLEAN
-STDCALL
-RtlDeleteElementGenericTable (
- PRTL_GENERIC_TABLE Table,
- PVOID Buffer
- );
-
-BOOLEAN
-STDCALL
-RtlDeleteElementGenericTableAvl (
- PRTL_AVL_TABLE Table,
- PVOID Buffer
- );
-
-VOID
-STDCALL
-RtlDeleteNoSplay (
- PRTL_SPLAY_LINKS Links,
- PRTL_SPLAY_LINKS *Root
- );
-
-
-NTSTATUS STDCALL
-RtlDeleteOwnersRanges (IN OUT PRTL_RANGE_LIST RangeList,
- IN PVOID Owner);
-
-NTSTATUS STDCALL
-RtlDeleteRange (IN OUT PRTL_RANGE_LIST RangeList,
- IN ULONGLONG Start,
- IN ULONGLONG End,
- IN PVOID Owner);
-
-NTSTATUS STDCALL
-RtlDescribeChunk(IN USHORT CompressionFormat,
- IN OUT PUCHAR *CompressedBuffer,
- IN PUCHAR EndOfCompressedBufferPlus1,
- OUT PUCHAR *ChunkBuffer,
- OUT PULONG ChunkSize);
-
-NTSTATUS STDCALL
-RtlDestroyAtomTable (IN PRTL_ATOM_TABLE AtomTable);
-
-HANDLE STDCALL
-RtlDestroyHeap (HANDLE hheap);
-
-NTSTATUS
-STDCALL
-RtlDispatchException(
- PEXCEPTION_RECORD pExcptRec,
- CONTEXT * pContext
- );
-
-
-NTSTATUS
-STDCALL
-RtlDowncaseUnicodeString (
- IN OUT PUNICODE_STRING DestinationString,
- IN PUNICODE_STRING SourceString,
- IN BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlEmptyAtomTable (
- IN PRTL_ATOM_TABLE AtomTable,
- IN BOOLEAN DeletePinned
- );
-
-LARGE_INTEGER
-STDCALL
-RtlEnlargedIntegerMultiply (
- LONG Multiplicand,
- LONG Multiplier
- );
-
-ULONG
-STDCALL
-RtlEnlargedUnsignedDivide (
- ULARGE_INTEGER Dividend,
- ULONG Divisor,
- PULONG Remainder
- );
-
-LARGE_INTEGER
-STDCALL
-RtlEnlargedUnsignedMultiply (
- ULONG Multiplicand,
- ULONG Multiplier
- );
-
-PVOID
-STDCALL
-RtlEnumerateGenericTable (
- PRTL_GENERIC_TABLE Table,
- BOOLEAN Restart
- );
-
-PVOID
-STDCALL
-RtlEnumerateGenericTableAvl (
- PRTL_AVL_TABLE Table,
- BOOLEAN Restart
- );
-
-PVOID
-STDCALL
-RtlEnumerateGenericTableLikeADirectory (
- IN PRTL_AVL_TABLE Table,
- IN PRTL_AVL_MATCH_FUNCTION MatchFunction,
- IN PVOID MatchData,
- IN ULONG NextFlag,
- IN OUT PVOID *RestartKey,
- IN OUT PULONG DeleteCount,
- IN OUT PVOID Buffer
- );
-
-PVOID
-STDCALL
-RtlEnumerateGenericTableWithoutSplaying (
- PRTL_GENERIC_TABLE Table,
- PVOID *RestartKey
- );
-
-PVOID
-STDCALL
-RtlEnumerateGenericTableWithoutSplayingAvl (
- PRTL_AVL_TABLE Table,
- PVOID *RestartKey
- );
-
-BOOLEAN STDCALL
-RtlEqualPrefixSid (PSID Sid1,
- PSID Sid2);
-
-BOOLEAN STDCALL
-RtlEqualSid (PSID Sid1,
- PSID Sid2);
-
-BOOLEAN
-STDCALL
-RtlEqualString (
- PSTRING String1,
- PSTRING String2,
- BOOLEAN CaseInSensitive
- );
-
-LARGE_INTEGER
-STDCALL
-RtlExtendedIntegerMultiply (
- LARGE_INTEGER Multiplicand,
- LONG Multiplier
- );
-
-LARGE_INTEGER
-STDCALL
-RtlExtendedLargeIntegerDivide (
- LARGE_INTEGER Dividend,
- ULONG Divisor,
- PULONG Remainder
- );
-
-LARGE_INTEGER
-STDCALL
-RtlExtendedMagicDivide (
- LARGE_INTEGER Dividend,
- LARGE_INTEGER MagicDivisor,
- CCHAR ShiftCount
- );
-
-VOID
-STDCALL
-RtlFillMemoryUlong (
- PVOID Destination,
- ULONG Length,
- ULONG Fill
- );
-
-ULONG
-STDCALL
-RtlFindClearBits (
- PRTL_BITMAP BitMapHeader,
- ULONG NumberToFind,
- ULONG HintIndex
- );
-
-ULONG
-STDCALL
-RtlFindClearBitsAndSet (
- PRTL_BITMAP BitMapHeader,
- ULONG NumberToFind,
- ULONG HintIndex
- );
-
-ULONG
-STDCALL
-RtlFindClearRuns (
- PRTL_BITMAP BitMapHeader,
- PRTL_BITMAP_RUN RunArray,
- ULONG SizeOfRunArray,
- BOOLEAN LocateLongestRuns
- );
-
-ULONG
-STDCALL
-RtlFindLastBackwardRunClear (
- IN PRTL_BITMAP BitMapHeader,
- IN ULONG FromIndex,
- IN PULONG StartingRunIndex
- );
-
-ULONG
-STDCALL
-RtlFindNextForwardRunClear (
- IN PRTL_BITMAP BitMapHeader,
- IN ULONG FromIndex,
- IN PULONG StartingRunIndex
- );
-
-
-PUNICODE_PREFIX_TABLE_ENTRY
-STDCALL
-RtlFindUnicodePrefix (
- PUNICODE_PREFIX_TABLE PrefixTable,
- PUNICODE_STRING FullName,
- ULONG CaseInsensitiveIndex
- );
-
-ULONG
-STDCALL
-RtlFindFirstRunClear (
- PRTL_BITMAP BitMapHeader,
- PULONG StartingIndex
- );
-
-ULONG
-STDCALL
-RtlFindFirstRunSet (
- PRTL_BITMAP BitMapHeader,
- PULONG StartingIndex
- );
-
-CCHAR STDCALL
-RtlFindLeastSignificantBit (IN ULONGLONG Set);
-
-ULONG
-STDCALL
-RtlFindLongestRunClear (
- PRTL_BITMAP BitMapHeader,
- PULONG StartingIndex
- );
-
-ULONG
-STDCALL
-RtlFindLongestRunSet (
- PRTL_BITMAP BitMapHeader,
- PULONG StartingIndex
- );
-
-NTSTATUS
-STDCALL
-RtlFindMessage (
- IN PVOID BaseAddress,
- IN ULONG Type,
- IN ULONG Language,
- IN ULONG MessageId,
- OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry
- );
-
-CCHAR STDCALL
-RtlFindMostSignificantBit (IN ULONGLONG Set);
-
-NTSTATUS STDCALL
-RtlFindRange (IN PRTL_RANGE_LIST RangeList,
- IN ULONGLONG Minimum,
- IN ULONGLONG Maximum,
- IN ULONG Length,
- IN ULONG Alignment,
- IN ULONG Flags,
- IN UCHAR AttributeAvailableMask,
- IN PVOID Context OPTIONAL,
- IN PRTL_CONFLICT_RANGE_CALLBACK Callback OPTIONAL,
- OUT PULONGLONG Start);
-
-ULONG
-STDCALL
-RtlFindSetBits (
- PRTL_BITMAP BitMapHeader,
- ULONG NumberToFind,
- ULONG HintIndex
- );
-
-ULONG
-STDCALL
-RtlFindSetBitsAndClear (
- PRTL_BITMAP BitMapHeader,
- ULONG NumberToFind,
- ULONG HintIndex
- );
-
-BOOLEAN STDCALL
-RtlFirstFreeAce (PACL Acl,
- PACE* Ace);
-
-NTSTATUS STDCALL
-RtlFormatCurrentUserKeyPath (IN OUT PUNICODE_STRING KeyPath);
-
-VOID STDCALL
-RtlFreeAnsiString (IN PANSI_STRING AnsiString);
-
-BOOLEAN
-STDCALL
-RtlFreeHeap (
- HANDLE Heap,
- ULONG Flags,
- PVOID Address
- );
-
-VOID STDCALL
-RtlFreeOemString (IN POEM_STRING OemString);
-
-VOID STDCALL
-RtlFreeRangeList (IN PRTL_RANGE_LIST RangeList);
-
-PVOID STDCALL
-RtlFreeSid (PSID Sid);
-
-VOID STDCALL
-RtlFreeUnicodeString (IN PUNICODE_STRING UnicodeString);
-
-VOID STDCALL
-RtlGenerate8dot3Name (IN PUNICODE_STRING Name,
- IN BOOLEAN AllowExtendedCharacters,
- IN OUT PGENERATE_NAME_CONTEXT Context,
- OUT PUNICODE_STRING Name8dot3);
-
-NTSTATUS STDCALL
-RtlGetAce (PACL Acl,
- ULONG AceIndex,
- PACE *Ace);
-
-VOID
-STDCALL
-RtlGetCallersAddress(
- OUT PVOID *CallersAddress,
- OUT PVOID *CallersCaller
- );
-
-NTSTATUS STDCALL
-RtlGetCompressionWorkSpaceSize (IN USHORT CompressionFormatAndEngine,
- OUT PULONG CompressBufferAndWorkSpaceSize,
- OUT PULONG CompressFragmentWorkSpaceSize);
-
-NTSTATUS STDCALL
-RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- PSECURITY_DESCRIPTOR_CONTROL Control,
- PULONG Revision);
-
-NTSTATUS STDCALL
-RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- PBOOLEAN DaclPresent,
- PACL* Dacl,
- PBOOLEAN DaclDefaulted);
-
-VOID STDCALL
-RtlGetDefaultCodePage (OUT PUSHORT AnsiCodePage,
- OUT PUSHORT OemCodePage);
-
-PVOID
-STDCALL
-RtlGetElementGenericTable(
- PRTL_GENERIC_TABLE Table,
- ULONG I
- );
-
-PVOID
-STDCALL
-RtlGetElementGenericTableAvl (
- PRTL_AVL_TABLE Table,
- ULONG I
- );
-
-NTSTATUS STDCALL
-RtlGetFirstRange (IN PRTL_RANGE_LIST RangeList,
- OUT PRTL_RANGE_LIST_ITERATOR Iterator,
- OUT PRTL_RANGE *Range);
-
-NTSTATUS STDCALL
-RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- PSID* Group,
- PBOOLEAN GroupDefaulted);
-
-NTSTATUS STDCALL
-RtlGetLastNtStatus(VOID);
-
-ULONG STDCALL
-RtlGetLastWin32Error(VOID);
-
-NTSTATUS STDCALL
-RtlGetNextRange (IN OUT PRTL_RANGE_LIST_ITERATOR Iterator,
- OUT PRTL_RANGE *Range,
- IN BOOLEAN MoveForwards);
-
-ULONG
-STDCALL
-RtlGetNtGlobalFlags (
- VOID
- );
-
-NTSTATUS STDCALL
-RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- PSID* Owner,
- PBOOLEAN OwnerDefaulted);
-
-NTSTATUS STDCALL
-RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- PBOOLEAN SaclPresent,
- PACL* Sacl,
- PBOOLEAN SaclDefaulted);
-
-BOOLEAN STDCALL
-RtlGetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,
- PUCHAR RMControl);
-
-NTSTATUS
-STDCALL
-RtlGetSetBootStatusData(
- HANDLE Filehandle,
- BOOLEAN WriteMode,
- DWORD DataClass,
- PVOID Buffer,
- ULONG BufferSize,
- DWORD DataClass2
- );
-
-NTSTATUS STDCALL
-RtlGUIDFromString (IN PUNICODE_STRING GuidString,
- OUT GUID* Guid);
-
-NTSTATUS
-STDCALL
-RtlHashUnicodeString(
- IN const UNICODE_STRING *String,
- IN BOOLEAN CaseInSensitive,
- IN ULONG HashAlgorithm,
- OUT PULONG HashValue
- );
-
-PSID_IDENTIFIER_AUTHORITY STDCALL
-RtlIdentifierAuthoritySid (PSID Sid);
-
-PVOID
-STDCALL
-RtlImageDirectoryEntryToData (
- PVOID BaseAddress,
- BOOLEAN bFlag,
- ULONG Directory,
- PULONG Size
- );
-
-PIMAGE_NT_HEADERS
-STDCALL
-RtlImageNtHeader (
- IN PVOID BaseAddress
- );
-
-PIMAGE_SECTION_HEADER
-STDCALL
-RtlImageRvaToSection (
- PIMAGE_NT_HEADERS NtHeader,
- PVOID BaseAddress,
- ULONG Rva
- );
-
-ULONG
-STDCALL
-RtlImageRvaToVa (
- PIMAGE_NT_HEADERS NtHeader,
- PVOID BaseAddress,
- ULONG Rva,
- PIMAGE_SECTION_HEADER *SectionHeader
- );
-
-VOID
-STDCALL
-RtlInitAnsiString (
- PANSI_STRING DestinationString,
- PCSZ SourceString
- );
-
-VOID
-STDCALL
-RtlInitCodePageTable (
- IN PUSHORT TableBase,
- OUT PCPTABLEINFO CodePageTable
- );
-
-VOID
-STDCALL
-RtlInitializeUnicodePrefix (
- PUNICODE_PREFIX_TABLE PrefixTable
- );
-
-NTSTATUS STDCALL
-RtlInitializeSid (PSID Sid,
- PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
- UCHAR SubAuthorityCount);
-
-VOID
-STDCALL
-RtlInitializeBitMap(
- IN PRTL_BITMAP BitMapHeader,
- IN PULONG BitMapBuffer,
- IN ULONG SizeOfBitMap);
-
-VOID
-STDCALL
-RtlInitNlsTables (
- IN PUSHORT AnsiTableBase,
- IN PUSHORT OemTableBase,
- IN PUSHORT CaseTableBase,
- OUT PNLSTABLEINFO NlsTable
- );
-
-VOID
-STDCALL
-RtlInitString (
- PSTRING DestinationString,
- PCSZ SourceString
- );
-
-VOID
-STDCALL
-RtlInitUnicodeString (
- PUNICODE_STRING DestinationString,
- PCWSTR SourceString
- );
-
-VOID
-STDCALL
-RtlInitializeBitMap (
- IN OUT PRTL_BITMAP BitMapHeader,
- IN PULONG BitMapBuffer,
- IN ULONG SizeOfBitMap
- );
-
-NTSTATUS
-STDCALL
-RtlInitializeContext (
- IN HANDLE ProcessHandle,
- OUT PCONTEXT ThreadContext,
- IN PVOID ThreadStartParam OPTIONAL,
- IN PTHREAD_START_ROUTINE ThreadStartAddress,
- IN PINITIAL_TEB InitialTeb
- );
-
-VOID
-STDCALL
-RtlInitializeGenericTable (
- PRTL_GENERIC_TABLE Table,
- PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine,
- PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine,
- PRTL_GENERIC_FREE_ROUTINE FreeRoutine,
- PVOID TableContext
- );
-
-VOID
-STDCALL
-RtlInitializeGenericTableAvl (
- PRTL_AVL_TABLE Table,
- PRTL_AVL_COMPARE_ROUTINE CompareRoutine,
- PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine,
- PRTL_AVL_FREE_ROUTINE FreeRoutine,
- PVOID TableContext
- );
-
-VOID STDCALL
-RtlInitializeRangeList (IN OUT PRTL_RANGE_LIST RangeList);
-
-PVOID
-STDCALL
-RtlInsertElementGenericTable (
- PRTL_GENERIC_TABLE Table,
- PVOID Buffer,
- ULONG BufferSize,
- PBOOLEAN NewElement OPTIONAL
- );
-
-PVOID
-STDCALL
-RtlInsertElementGenericTableAvl (
- PRTL_AVL_TABLE Table,
- PVOID Buffer,
- ULONG BufferSize,
- PBOOLEAN NewElement OPTIONAL
- );
-
-PVOID
-STDCALL
-RtlInsertElementGenericTableFull (
- PRTL_GENERIC_TABLE Table,
- PVOID Buffer,
- ULONG BufferSize,
- PBOOLEAN NewElement OPTIONAL,
- PVOID NodeOrParent,
- TABLE_SEARCH_RESULT SearchResult
- );
-
-PVOID
-STDCALL
-RtlInsertElementGenericTableFullAvl (
- PRTL_AVL_TABLE Table,
- PVOID Buffer,
- ULONG BufferSize,
- PBOOLEAN NewElement OPTIONAL,
- PVOID NodeOrParent,
- TABLE_SEARCH_RESULT SearchResult
- );
-
-BOOLEAN
-STDCALL
-RtlInsertUnicodePrefix (
- PUNICODE_PREFIX_TABLE PrefixTable,
- PUNICODE_STRING Prefix,
- PUNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry
- );
-
-NTSTATUS
-STDCALL
-RtlInt64ToUnicodeString (
- IN ULONGLONG Value,
- IN ULONG Base OPTIONAL,
- IN OUT PUNICODE_STRING String
- );
-
-NTSTATUS
-STDCALL
-RtlIntegerToChar (
- IN ULONG Value,
- IN ULONG Base,
- IN ULONG Length,
- IN OUT PCHAR String
- );
-
-NTSTATUS
-STDCALL
-RtlIntegerToUnicode(
- IN ULONG Value,
- IN ULONG Base OPTIONAL,
- IN ULONG Length OPTIONAL,
- IN OUT LPWSTR String
- );
-
-NTSTATUS
-STDCALL
-RtlIntegerToUnicodeString (
- IN ULONG Value,
- IN ULONG Base,
- IN OUT PUNICODE_STRING String
- );
-
-NTSTATUS STDCALL
-RtlInvertRangeList (OUT PRTL_RANGE_LIST InvertedRangeList,
- IN PRTL_RANGE_LIST RangeList);
-
-LPSTR
-STDCALL
-RtlIpv4AddressToStringA(
- PULONG IP,
- LPSTR Buffer
- );
-
-NTSTATUS
-STDCALL
-RtlIpv4AddressToStringExA(
- PULONG IP,
- PULONG Port,
- LPSTR Buffer,
- PULONG MaxSize
- );
-
-LPWSTR
-STDCALL
-RtlIpv4AddressToStringW(
- PULONG IP,
- LPWSTR Buffer
- );
-
-NTSTATUS
-STDCALL
-RtlIpv4AddressToStringExW(
- PULONG IP,
- PULONG Port,
- LPWSTR Buffer,
- PULONG MaxSize
- );
-
-NTSTATUS
-STDCALL
-RtlIpv4StringToAddressA(
- IN LPSTR IpString,
- IN ULONG Base,
- OUT PVOID PtrToIpAddr,
- OUT ULONG IpAddr
- );
-
-NTSTATUS
-STDCALL
-RtlIpv4StringToAddressExA(
- IN LPSTR IpString,
- IN ULONG Base,
- OUT PULONG IpAddr,
- OUT PULONG Port
- );
-
-NTSTATUS
-STDCALL
-RtlIpv4StringToAddressW(
- IN LPWSTR IpString,
- IN ULONG Base,
- OUT PVOID PtrToIpAddr,
- OUT ULONG IpAddr
- );
-
-NTSTATUS
-STDCALL
-RtlIpv4StringToAddressExW(
- IN LPWSTR IpString,
- IN ULONG Base,
- OUT PULONG IpAddr,
- OUT PULONG Port
- );
-
-NTSTATUS
-STDCALL
-RtlIpv6AddressToStringA(
- PULONG IP,
- LPSTR Buffer
- );
-
-NTSTATUS
-STDCALL
-RtlIpv6AddressToStringExA(
- PULONG IP,
- PULONG Port,
- LPSTR Buffer,
- PULONG MaxSize
- );
-
-NTSTATUS
-STDCALL
-RtlIpv6AddressToStringW(
- PULONG IP,
- LPWSTR Buffer
- );
-
-NTSTATUS
-STDCALL
-RtlIpv6AddressToStringExW(
- PULONG IP,
- PULONG Port,
- LPWSTR Buffer,
- PULONG MaxSize
- );
-
-NTSTATUS
-STDCALL
-RtlIpv6StringToAddressA(
- IN LPSTR IpString,
- IN ULONG Base,
- OUT PVOID PtrToIpAddr,
- OUT ULONG IpAddr
- );
-
-NTSTATUS
-STDCALL
-RtlIpv6StringToAddressExA(
- IN LPSTR IpString,
- IN ULONG Base,
- OUT PULONG IpAddr,
- OUT PULONG Port
- );
-
-NTSTATUS
-STDCALL
-RtlIpv6StringToAddressW(
- IN LPWSTR IpString,
- IN ULONG Base,
- OUT PVOID PtrToIpAddr,
- OUT ULONG IpAddr
- );
-
-NTSTATUS
-STDCALL
-RtlIpv6StringToAddressExW(
- IN LPWSTR IpString,
- IN ULONG Base,
- OUT PULONG IpAddr,
- OUT PULONG Port
- );
-
-BOOLEAN
-STDCALL
-RtlIsGenericTableEmpty (
- PRTL_GENERIC_TABLE Table
- );
-
-BOOLEAN
-STDCALL
-RtlIsGenericTableEmptyAvl (
- PRTL_AVL_TABLE Table
- );
-
-
-BOOLEAN STDCALL
-RtlIsNameLegalDOS8Dot3 (IN PUNICODE_STRING UnicodeName,
- IN PANSI_STRING AnsiName,
- OUT PBOOLEAN SpacesFound);
-
-NTSTATUS STDCALL
-RtlIsRangeAvailable (IN PRTL_RANGE_LIST RangeList,
- IN ULONGLONG Start,
- IN ULONGLONG End,
- IN ULONG Flags,
- IN UCHAR AttributeAvailableMask,
- IN PVOID Context OPTIONAL,
- IN PRTL_CONFLICT_RANGE_CALLBACK Callback OPTIONAL,
- OUT PBOOLEAN Available);
-
-ULONG
-STDCALL
-RtlIsTextUnicode (
- PVOID Buffer,
- ULONG Length,
- ULONG *Flags
- );
-
-BOOLEAN
-STDCALL
-RtlIsValidOemCharacter (
- IN PWCHAR Char
- );
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerAdd (
- LARGE_INTEGER Addend1,
- LARGE_INTEGER Addend2
- );
-
-/*
- * VOID
- * RtlLargeIntegerAnd (
- * PLARGE_INTEGER Result,
- * LARGE_INTEGER Source,
- * LARGE_INTEGER Mask
- * );
- */
-#define RtlLargeIntegerAnd(Result, Source, Mask) \
-{ \
- Result.HighPart = Source.HighPart & Mask.HighPart; \
- Result.LowPart = Source.LowPart & Mask.LowPart; \
-}
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerArithmeticShift (
- LARGE_INTEGER LargeInteger,
- CCHAR ShiftCount
- );
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerDivide (
- LARGE_INTEGER Dividend,
- LARGE_INTEGER Divisor,
- PLARGE_INTEGER Remainder
- );
-
-/*
- * BOOLEAN
- * RtlLargeIntegerEqualTo (
- * LARGE_INTEGER Operand1,
- * LARGE_INTEGER Operand2
- * );
- */
-#define RtlLargeIntegerEqualTo(X,Y) \
- (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerEqualToZero (
- * LARGE_INTEGER Operand
- * );
- */
-#define RtlLargeIntegerEqualToZero(X) \
- (!((X).LowPart | (X).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerGreaterThan (
- * LARGE_INTEGER Operand1,
- * LARGE_INTEGER Operand2
- * );
- */
-#define RtlLargeIntegerGreaterThan(X,Y) \
- ((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
- ((X).HighPart > (Y).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerGreaterThanOrEqualTo (
- * LARGE_INTEGER Operand1,
- * LARGE_INTEGER Operand2
- * );
- */
-#define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
- ((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
- ((X).HighPart > (Y).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerGreaterThanOrEqualToZero (
- * LARGE_INTEGER Operand1
- * );
- */
-#define RtlLargeIntegerGreaterOrEqualToZero(X) \
- ((X).HighPart >= 0)
-
-/*
- * BOOLEAN
- * RtlLargeIntegerGreaterThanZero (
- * LARGE_INTEGER Operand1
- * );
- */
-#define RtlLargeIntegerGreaterThanZero(X) \
- ((((X).HighPart == 0) && ((X).LowPart > 0)) || \
- ((X).HighPart > 0 ))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerLessThan (
- * LARGE_INTEGER Operand1,
- * LARGE_INTEGER Operand2
- * );
- */
-#define RtlLargeIntegerLessThan(X,Y) \
- ((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
- ((X).HighPart < (Y).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerLessThanOrEqualTo (
- * LARGE_INTEGER Operand1,
- * LARGE_INTEGER Operand2
- * );
- */
-#define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
- ((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
- ((X).HighPart < (Y).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerLessThanOrEqualToZero (
- * LARGE_INTEGER Operand
- * );
- */
-#define RtlLargeIntegerLessOrEqualToZero(X) \
- (((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerLessThanZero (
- * LARGE_INTEGER Operand
- * );
- */
-#define RtlLargeIntegerLessThanZero(X) \
- (((X).HighPart < 0))
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerNegate (
- LARGE_INTEGER Subtrahend
- );
-
-/*
- * BOOLEAN
- * RtlLargeIntegerNotEqualTo (
- * LARGE_INTEGER Operand1,
- * LARGE_INTEGER Operand2
- * );
- */
-#define RtlLargeIntegerNotEqualTo(X,Y) \
- ((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
-
-/*
- * BOOLEAN
- * RtlLargeIntegerNotEqualToZero (
- * LARGE_INTEGER Operand
- * );
- */
-#define RtlLargeIntegerNotEqualToZero(X) \
- (((X).LowPart | (X).HighPart))
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerShiftLeft (
- LARGE_INTEGER LargeInteger,
- CCHAR ShiftCount
- );
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerShiftRight (
- LARGE_INTEGER LargeInteger,
- CCHAR ShiftCount
- );
-
-LARGE_INTEGER
-STDCALL
-RtlLargeIntegerSubtract (
- LARGE_INTEGER Minuend,
- LARGE_INTEGER Subtrahend
- );
-
-ULONG STDCALL
-RtlLengthRequiredSid (UCHAR SubAuthorityCount);
-
-ULONG STDCALL
-RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-ULONG STDCALL
-RtlLengthSid (PSID Sid);
-
-NTSTATUS
-STDCALL
-RtlLockBootStatusData(
- HANDLE Filehandle
- );
-
-BOOLEAN STDCALL
-RtlLockHeap (IN HANDLE Heap);
-
-NTSTATUS STDCALL
-RtlLookupAtomInAtomTable (IN PRTL_ATOM_TABLE AtomTable,
- IN PWSTR AtomName,
- OUT PRTL_ATOM Atom);
-
-PVOID
-STDCALL
-RtlLookupElementGenericTable (
- PRTL_GENERIC_TABLE Table,
- PVOID Buffer
- );
-
-PVOID
-STDCALL
-RtlLookupElementGenericTableAvl (
- PRTL_AVL_TABLE Table,
- PVOID Buffer
- );
-
-PVOID
-STDCALL
-RtlLookupElementGenericTableFull (
- PRTL_GENERIC_TABLE Table,
- PVOID Buffer,
- OUT PVOID *NodeOrParent,
- OUT TABLE_SEARCH_RESULT *SearchResult
- );
-
-PVOID
-STDCALL
-RtlLookupElementGenericTableFullAvl (
- PRTL_AVL_TABLE Table,
- PVOID Buffer,
- OUT PVOID *NodeOrParent,
- OUT TABLE_SEARCH_RESULT *SearchResult
- );
-
-NTSTATUS STDCALL
-RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD,
- PSECURITY_DESCRIPTOR_RELATIVE RelSD,
- PULONG BufferLength);
-
-VOID STDCALL
-RtlMapGenericMask (PACCESS_MASK AccessMask,
- PGENERIC_MAPPING GenericMapping);
-
-NTSTATUS
-STDCALL
-RtlMapSecurityErrorToNtStatus(
- IN ULONG SecurityError
- );
-
-NTSTATUS STDCALL
-RtlMergeRangeLists (OUT PRTL_RANGE_LIST MergedRangeList,
- IN PRTL_RANGE_LIST RangeList1,
- IN PRTL_RANGE_LIST RangeList2,
- IN ULONG Flags);
-
-NTSTATUS
-STDCALL
-RtlMultiByteToUnicodeN (
- PWCHAR UnicodeString,
- ULONG UnicodeSize,
- PULONG ResultSize,
- const PCHAR MbString,
- ULONG MbSize
- );
-
-NTSTATUS
-STDCALL
-RtlMultiByteToUnicodeSize (
- PULONG UnicodeSize,
- PCHAR MbString,
- ULONG MbSize
- );
-
-PUNICODE_PREFIX_TABLE_ENTRY
-STDCALL
-RtlNextUnicodePrefix (
- PUNICODE_PREFIX_TABLE PrefixTable,
- BOOLEAN Restart
- );
-
-DWORD
-STDCALL
-RtlNtStatusToDosError (
- NTSTATUS StatusCode
- );
-
-DWORD
-STDCALL
-RtlNtStatusToDosErrorNoTeb (
- NTSTATUS StatusCode
- );
-
-int
-STDCALL
-RtlNtStatusToPsxErrno (
- NTSTATUS StatusCode
- );
-
-ULONG
-STDCALL
-RtlNumberGenericTableElements(
- PRTL_GENERIC_TABLE Table
- );
-
-ULONG
-STDCALL
-RtlNumberGenericTableElementsAvl (
- PRTL_AVL_TABLE Table
- );
-
-
-ULONG
-STDCALL
-RtlNumberOfClearBits (
- PRTL_BITMAP BitMapHeader
- );
-
-ULONG
-STDCALL
-RtlNumberOfSetBits (
- PRTL_BITMAP BitMapHeader
- );
-
-ULONG
-STDCALL
-RtlOemStringToUnicodeSize (
- POEM_STRING AnsiString
- );
-
-NTSTATUS
-STDCALL
-RtlOemStringToUnicodeString (
- PUNICODE_STRING DestinationString,
- POEM_STRING SourceString,
- BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlOemToUnicodeN(
- PWSTR UnicodeString,
- ULONG MaxBytesInUnicodeString,
- PULONG BytesInUnicodeString,
- IN PCHAR OemString,
- ULONG BytesInOemString
- );
-
-NTSTATUS STDCALL
-RtlPinAtomInAtomTable (
- IN PRTL_ATOM_TABLE AtomTable,
- IN RTL_ATOM Atom
- );
-
-VOID
-FASTCALL
-RtlPrefetchMemoryNonTemporal(
- IN PVOID Source,
- IN SIZE_T Length
- );
-
-BOOLEAN
-STDCALL
-RtlPrefixString (
- PANSI_STRING String1,
- PANSI_STRING String2,
- BOOLEAN CaseInsensitive
- );
-
-BOOLEAN
-STDCALL
-RtlPrefixUnicodeString (
- PUNICODE_STRING String1,
- PUNICODE_STRING String2,
- BOOLEAN CaseInsensitive
- );
-
-NTSTATUS
-STDCALL
-RtlQueryAtomInAtomTable (
- IN PRTL_ATOM_TABLE AtomTable,
- IN RTL_ATOM Atom,
- IN OUT PULONG RefCount OPTIONAL,
- IN OUT PULONG PinCount OPTIONAL,
- IN OUT PWSTR AtomName OPTIONAL,
- IN OUT PULONG NameLength OPTIONAL
- );
-
-NTSTATUS STDCALL
-RtlQueryInformationAcl (PACL Acl,
- PVOID Information,
- ULONG InformationLength,
- ACL_INFORMATION_CLASS InformationClass);
-
-NTSTATUS STDCALL
-RtlQueryTimeZoneInformation (IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation);
-
-VOID STDCALL
-RtlRaiseException (IN PEXCEPTION_RECORD ExceptionRecord);
-
-VOID STDCALL
-RtlRaiseStatus(NTSTATUS Status);
-
-ULONG STDCALL
-RtlRandom (PULONG Seed);
-
-ULONG
-STDCALL
-RtlRandomEx(
- PULONG Seed
- );
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlRealPredecessor (
- PRTL_SPLAY_LINKS Links
- );
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlRealSuccessor (
- PRTL_SPLAY_LINKS Links
- );
-
-PVOID STDCALL
-RtlReAllocateHeap (
- HANDLE Heap,
- ULONG Flags,
- PVOID Ptr,
- ULONG Size
- );
-
-VOID
-STDCALL
-RtlRemoveUnicodePrefix (
- PUNICODE_PREFIX_TABLE PrefixTable,
- PUNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry
- );
-
-NTSTATUS
-STDCALL
-RtlReserveChunk (
- IN USHORT CompressionFormat,
- IN OUT PUCHAR *CompressedBuffer,
- IN PUCHAR EndOfCompressedBufferPlus1,
- OUT PUCHAR *ChunkBuffer,
- IN ULONG ChunkSize
- );
-
-VOID STDCALL
-RtlResetRtlTranslations (IN PNLSTABLEINFO NlsTable);
-
-VOID STDCALL
-RtlRestoreLastWin32Error(IN ULONG Error);
-
-/*
- * VOID
- * RtlRetrieveUlong (
- * PULONG DestinationAddress,
- * PULONG SourceAddress
- * );
- */
-#define RtlRetrieveUlong(DestAddress,SrcAddress) \
- if ((ULONG_PTR)(SrcAddress) & LONG_MASK) \
- { \
- ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
- ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
- ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
- ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
- } \
- else \
- { \
- *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
- }
-
-/*
- * VOID
- * RtlRetrieveUshort (
- * PUSHORT DestinationAddress,
- * PUSHORT SourceAddress
- * );
- */
-#define RtlRetrieveUshort(DestAddress,SrcAddress) \
- if ((ULONG_PTR)(SrcAddress) & SHORT_MASK) \
- { \
- ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
- ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
- } \
- else \
- { \
- *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
- }
-
-VOID STDCALL
-RtlSecondsSince1970ToTime (ULONG SecondsSince1970,
- PLARGE_INTEGER Time);
-
-VOID STDCALL
-RtlSecondsSince1980ToTime (ULONG SecondsSince1980,
- PLARGE_INTEGER Time);
-
-NTSTATUS STDCALL
-RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR_RELATIVE RelSD,
- PSECURITY_DESCRIPTOR AbsSD,
- PULONG AbsSDSize,
- PACL Dacl,
- PULONG DaclSize,
- PACL Sacl,
- PULONG SaclSize,
- PSID Owner,
- PULONG OwnerSize,
- PSID Group,
- PULONG GroupSize);
-
-NTSTATUS
-STDCALL
-RtlSelfRelativeToAbsoluteSD2(
- PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
- PULONG BufferSize
- );
-
-VOID STDCALL
-RtlSetAllBits (IN PRTL_BITMAP BitMapHeader);
-
-NTSTATUS STDCALL
-RtlSetAttributesSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN SECURITY_DESCRIPTOR_CONTROL Control,
- OUT PULONG Revision);
-
-VOID
-STDCALL
-RtlSetBit (
- PRTL_BITMAP BitMapHeader,
- ULONG BitNumber
- );
-
-VOID
-STDCALL
-RtlSetBits (
- PRTL_BITMAP BitMapHeader,
- ULONG StartingIndex,
- ULONG NumberToSet
- );
-
-NTSTATUS STDCALL
-RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
- IN SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet);
-
-NTSTATUS STDCALL
-RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- BOOLEAN DaclPresent,
- PACL Dacl,
- BOOLEAN DaclDefaulted);
-
-NTSTATUS STDCALL
-RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- PSID Group,
- BOOLEAN GroupDefaulted);
-
-NTSTATUS STDCALL
-RtlSetInformationAcl (PACL Acl,
- PVOID Information,
- ULONG InformationLength,
- ACL_INFORMATION_CLASS InformationClass);
-
-VOID STDCALL
-RtlSetLastWin32Error(IN ULONG Error);
-
-VOID STDCALL
-RtlSetLastWin32ErrorAndNtStatusFromNtStatus(IN NTSTATUS Status);
-
-NTSTATUS STDCALL
-RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- PSID Owner,
- BOOLEAN OwnerDefaulted);
-
-NTSTATUS STDCALL
-RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor,
- BOOLEAN SaclPresent,
- PACL Sacl,
- BOOLEAN SaclDefaulted);
-
-VOID STDCALL
-RtlSetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,
- PUCHAR RMControl);
-
-NTSTATUS STDCALL
-RtlSetTimeZoneInformation (IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation);
-
-ULONG STDCALL
-RtlSizeHeap(
- IN PVOID HeapHandle,
- IN ULONG Flags,
- IN PVOID MemoryPointer
- );
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlSplay (
- PRTL_SPLAY_LINKS Links
- );
-
-/*
- * VOID
- * RtlStoreUlong (
- * PULONG Address,
- * ULONG Value
- * );
- */
-#define RtlStoreUlong(Address,Value) \
- if ((ULONG_PTR)(Address) & LONG_MASK) \
- { \
- ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
- ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
- ((PUCHAR)(Address))[LONG_2ND_MOST_SIGNIFICANT_BIT]=(UCHAR)(THIRDBYTE(Value)); \
- ((PUCHAR)(Address))[LONG_MOST_SIGNIFICANT_BIT]=(UCHAR)(FOURTHBYTE(Value)); \
- } \
- else \
- { \
- *((PULONG)(Address))=(ULONG)(Value); \
- }
-
-/*
- * VOID
- * RtlStoreUshort (
- * PUSHORT Address,
- * USHORT Value
- * );
- */
-#define RtlStoreUshort(Address,Value) \
- if ((ULONG_PTR)(Address) & SHORT_MASK) \
- { \
- ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
- ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
- } \
- else \
- { \
- *((PUSHORT)(Address))=(USHORT)(Value); \
- }
-
-NTSTATUS STDCALL
-RtlStringFromGUID (IN REFGUID Guid,
- OUT PUNICODE_STRING GuidString);
-
-PULONG STDCALL
-RtlSubAuthoritySid (PSID Sid,
- ULONG SubAuthority);
-
-PULONG STDCALL
-RtlSubAuthoritySid (PSID Sid,
- ULONG SubAuthority);
-
-PUCHAR STDCALL
-RtlSubAuthorityCountSid (PSID Sid);
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlSubtreePredecessor (
- PRTL_SPLAY_LINKS Links
- );
-
-PRTL_SPLAY_LINKS
-STDCALL
-RtlSubtreeSuccessor (
- PRTL_SPLAY_LINKS Links
- );
-
-BOOLEAN
-STDCALL
-RtlTestBit (
- PRTL_BITMAP BitMapHeader,
- ULONG BitNumber
- );
-
-
-BOOLEAN STDCALL
-RtlTimeFieldsToTime (PTIME_FIELDS TimeFields,
- PLARGE_INTEGER Time);
-
-BOOLEAN
-STDCALL
-RtlTimeToSecondsSince1970 (
- PLARGE_INTEGER Time,
- PULONG SecondsSince1970
- );
-
-BOOLEAN
-STDCALL
-RtlTimeToSecondsSince1980 (
- PLARGE_INTEGER Time,
- PULONG SecondsSince1980
- );
-
-VOID
-STDCALL
-RtlTimeToElapsedTimeFields(
- PLARGE_INTEGER Time,
- PTIME_FIELDS TimeFields
- );
-
-VOID
-STDCALL
-RtlTimeToTimeFields (
- PLARGE_INTEGER Time,
- PTIME_FIELDS TimeFields
- );
-
-
-ULONG FASTCALL
-RtlUlongByteSwap (IN ULONG Source);
-
-ULONGLONG FASTCALL
-RtlUlonglongByteSwap (IN ULONGLONG Source);
-
-ULONG
-STDCALL
-RtlUnicodeStringToAnsiSize (
- IN PUNICODE_STRING UnicodeString
- );
-
-NTSTATUS
-STDCALL
-RtlUnicodeStringToAnsiString (
- IN OUT PANSI_STRING DestinationString,
- IN PUNICODE_STRING SourceString,
- IN BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlUnicodeStringToInteger (
- IN PUNICODE_STRING String,
- IN ULONG Base,
- OUT PULONG Value
- );
-
-ULONG
-STDCALL
-RtlUnicodeStringToOemSize (
- IN PUNICODE_STRING UnicodeString
- );
-
-NTSTATUS
-STDCALL
-RtlUnicodeStringToCountedOemString (
- IN OUT POEM_STRING DestinationString,
- IN PUNICODE_STRING SourceString,
- IN BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlUnicodeStringToOemString (
- IN OUT POEM_STRING DestinationString,
- IN PUNICODE_STRING SourceString,
- IN BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlUnicodeToCustomCPN (
- IN PCPTABLEINFO CustomCP,
- PCHAR MbString,
- ULONG MbSize,
- PULONG ResultSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize
- );
-
-NTSTATUS
-STDCALL
-RtlUnicodeToMultiByteN (
- PCHAR MbString,
- ULONG MbSize,
- PULONG ResultSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize
- );
-
-NTSTATUS
-STDCALL
-RtlUnicodeToMultiByteSize (
- PULONG MbSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize
- );
-
-NTSTATUS
-STDCALL
-RtlUnicodeToOemN (
- PCHAR OemString,
- ULONG OemSize,
- PULONG ResultSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize
- );
-
-ULONG STDCALL
-RtlUniform (PULONG Seed);
-
-BOOLEAN STDCALL
-RtlUnlockHeap (IN HANDLE Heap);
-
-NTSTATUS
-STDCALL
-RtlUnlockBootStatusData(
- HANDLE Filehandle
- );
-
-VOID
-STDCALL
-RtlUnwind (
- PEXCEPTION_REGISTRATION RegistrationFrame,
- PVOID ReturnAddress,
- PEXCEPTION_RECORD ExceptionRecord,
- DWORD EaxValue
- );
-
-WCHAR
-STDCALL
-RtlUpcaseUnicodeChar (
- WCHAR Source
- );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeString (
- IN OUT PUNICODE_STRING DestinationString,
- IN PCUNICODE_STRING SourceString,
- IN BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeStringToAnsiString (
- IN OUT PANSI_STRING DestinationString,
- IN PUNICODE_STRING SourceString,
- IN BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeStringToCountedOemString (
- IN OUT POEM_STRING DestinationString,
- IN PUNICODE_STRING SourceString,
- IN BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeStringToOemString (
- IN OUT POEM_STRING DestinationString,
- IN PUNICODE_STRING SourceString,
- IN BOOLEAN AllocateDestinationString
- );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeToCustomCPN (
- IN PCPTABLEINFO CustomCP,
- PCHAR MbString,
- ULONG MbSize,
- PULONG ResultSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize
- );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeToMultiByteN (
- PCHAR MbString,
- ULONG MbSize,
- PULONG ResultSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize
- );
-
-NTSTATUS
-STDCALL
-RtlUpcaseUnicodeToOemN (
- PCHAR OemString,
- ULONG OemSize,
- PULONG ResultSize,
- PWCHAR UnicodeString,
- ULONG UnicodeSize
- );
-
-CHAR STDCALL
-RtlUpperChar (CHAR Source);
-
-VOID STDCALL
-RtlUpperString (PSTRING DestinationString,
- PSTRING SourceString);
-
-USHORT FASTCALL
-RtlUshortByteSwap (IN USHORT Source);
-
-BOOLEAN STDCALL
-RtlValidAcl (PACL Acl);
-
-BOOLEAN STDCALL
-RtlValidateHeap (
- HANDLE Heap,
- ULONG Flags,
- PVOID pmem
- );
-
-BOOLEAN
-STDCALL
-RtlValidRelativeSecurityDescriptor (
- IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
- IN ULONG SecurityDescriptorLength,
- IN SECURITY_INFORMATION RequiredInformation
- );
-
-BOOLEAN STDCALL
-RtlValidSecurityDescriptor (IN PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-BOOLEAN STDCALL
-RtlValidSid (IN PSID Sid);
-
-/*
-NTSTATUS
-STDCALL
-RtlVerifyVersionInfo(
- IN PRTL_OSVERSIONINFOEXW VersionInfo,
- IN ULONG TypeMask,
- IN ULONGLONG ConditionMask
- );
-*/
-
-NTSTATUS
-STDCALL
-RtlVolumeDeviceToDosName(
- IN PVOID VolumeDeviceObject,
- OUT PUNICODE_STRING DosName
- );
-
-ULONG
-STDCALL
-RtlWalkFrameChain (
- OUT PVOID *Callers,
- IN ULONG Count,
- IN ULONG Flags
- );
-
-BOOLEAN STDCALL
-RtlZeroHeap(
- IN PVOID HeapHandle,
- IN ULONG Flags
- );
-
-ULONG
-STDCALL
-RtlxAnsiStringToUnicodeSize (
- IN PANSI_STRING AnsiString
- );
-
-ULONG
-STDCALL
-RtlxOemStringToUnicodeSize (
- IN POEM_STRING OemString
- );
-
-ULONG
-STDCALL
-RtlxUnicodeStringToAnsiSize (
- IN PUNICODE_STRING UnicodeString
- );
-
-ULONG
-STDCALL
-RtlxUnicodeStringToOemSize (
- IN PUNICODE_STRING UnicodeString
- );
-
-/* Register io functions */
-
-UCHAR
-STDCALL
-READ_REGISTER_UCHAR (
- PUCHAR Register
- );
-
-USHORT
-STDCALL
-READ_REGISTER_USHORT (
- PUSHORT Register
- );
-
-ULONG
-STDCALL
-READ_REGISTER_ULONG (
- PULONG Register
- );
-
-VOID
-STDCALL
-READ_REGISTER_BUFFER_UCHAR (
- PUCHAR Register,
- PUCHAR Buffer,
- ULONG Count
- );
-
-VOID
-STDCALL
-READ_REGISTER_BUFFER_USHORT (
- PUSHORT Register,
- PUSHORT Buffer,
- ULONG Count
- );
-
-VOID
-STDCALL
-READ_REGISTER_BUFFER_ULONG (
- PULONG Register,
- PULONG Buffer,
- ULONG Count
- );
-
-VOID
-STDCALL
-WRITE_REGISTER_UCHAR (
- PUCHAR Register,
- UCHAR Value
- );
-
-VOID
-STDCALL
-WRITE_REGISTER_USHORT (
- PUSHORT Register,
- USHORT Value
- );
-
-VOID
-STDCALL
-WRITE_REGISTER_ULONG (
- PULONG Register,
- ULONG Value
- );
-
-VOID
-STDCALL
-WRITE_REGISTER_BUFFER_UCHAR (
- PUCHAR Register,
- PUCHAR Buffer,
- ULONG Count
- );
-
-VOID
-STDCALL
-WRITE_REGISTER_BUFFER_USHORT (
- PUSHORT Register,
- PUSHORT Buffer,
- ULONG Count
- );
-
-VOID
-STDCALL
-WRITE_REGISTER_BUFFER_ULONG (
- PULONG Register,
- PULONG Buffer,
- ULONG Count
- );
-
-
-/* functions exported from NTOSKRNL.EXE which are considered RTL */
-
-#if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
-
-char *_itoa (int value, char *string, int radix);
-wchar_t *_itow (int value, wchar_t *string, int radix);
-int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
-int _snwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, ...);
-int _stricmp(const char *s1, const char *s2);
-char * _strlwr(char *x);
-int _strnicmp(const char *s1, const char *s2, size_t n);
-char * _strnset(char* szToFill, int szFill, size_t sizeMaxFill);
-char * _strrev(char *s);
-char * _strset(char* szToFill, int szFill);
-char * _strupr(char *x);
-int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args);
-int _wcsicmp (const wchar_t* cs, const wchar_t* ct);
-wchar_t * _wcslwr (wchar_t *x);
-int _wcsnicmp (const wchar_t * cs,const wchar_t * ct,size_t count);
-wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
-wchar_t * _wcsrev(wchar_t *s);
-wchar_t *_wcsupr(wchar_t *x);
-
-int atoi(const char *str);
-long atol(const char *str);
-int isdigit(int c);
-int islower(int c);
-int isprint(int c);
-int isspace(int c);
-int isupper(int c);
-int isxdigit(int c);
-size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count);
-int mbtowc (wchar_t *wchar, const char *mbchar, size_t count);
-void * memchr(const void *s, int c, size_t n);
-void * memcpy(void *to, const void *from, size_t count);
-void * memmove(void *dest,const void *src, size_t count);
-void * memset(void *src, int val, size_t count);
-
-#if 0
-qsort
-#endif
-
-int rand(void);
-int sprintf(char * buf, const char *fmt, ...);
-void srand(unsigned seed);
-char * strcat(char *s, const char *append);
-char * strchr(const char *s, int c);
-int strcmp(const char *s1, const char *s2);
-char * strcpy(char *to, const char *from);
-size_t strlen(const char *str);
-char * strncat(char *dst, const char *src, size_t n);
-int strncmp(const char *s1, const char *s2, size_t n);
-char *strncpy(char *dst, const char *src, size_t n);
-char *strrchr(const char *s, int c);
-size_t strspn(const char *s1, const char *s2);
-char *strstr(const char *s, const char *find);
-int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
-int tolower(int c);
-int toupper(int c);
-wchar_t towlower(wchar_t c);
-wchar_t towupper(wchar_t c);
-int vsprintf(char *buf, const char *fmt, va_list args);
-wchar_t * wcscat(wchar_t *dest, const wchar_t *src);
-wchar_t * wcschr(const wchar_t *str, wchar_t ch);
-int wcscmp(const wchar_t *cs, const wchar_t *ct);
-wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2);
-size_t wcscspn(const wchar_t *str,const wchar_t *reject);
-size_t wcslen(const wchar_t *s);
-wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t count);
-int wcsncmp(const wchar_t *cs, const wchar_t *ct, size_t count);
-wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
-wchar_t * wcsrchr(const wchar_t *str, wchar_t ch);
-size_t wcsspn(const wchar_t *str,const wchar_t *accept);
-wchar_t *wcsstr(const wchar_t *s,const wchar_t *b);
-size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count);
-int wctomb (char *mbchar, wchar_t wchar);
-
-#endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
-
-#endif /* __DDK_RTL_H */
-
-
+++ /dev/null
-/* $Id$
- *
- */
-
-#ifndef __DDK_RTLTYPES_H
-#define __DDK_RTLTYPES_H
-
-#ifndef __USE_W32API
-
-#define COMPRESSION_FORMAT_NONE 0x0000
-#define COMPRESSION_FORMAT_DEFAULT 0x0001
-#define COMPRESSION_FORMAT_LZNT1 0x0002
-
-#define COMPRESSION_ENGINE_STANDARD 0x0000
-#define COMPRESSION_ENGINE_MAXIMUM 0x0100
-#define COMPRESSION_ENGINE_HIBER 0x0200
-/*
-#define VER_EQUAL 1
-#define VER_GREATER 2
-#define VER_GREATER_EQUAL 3
-#define VER_LESS 4
-#define VER_LESS_EQUAL 5
-#define VER_AND 6
-#define VER_OR 7
-
-#define VER_CONDITION_MASK 7
-#define VER_NUM_BITS_PER_CONDITION_MASK 3
-
-#define VER_MINORVERSION 0x0000001
-#define VER_MAJORVERSION 0x0000002
-#define VER_BUILDNUMBER 0x0000004
-#define VER_PLATFORMID 0x0000008
-#define VER_SERVICEPACKMINOR 0x0000010
-#define VER_SERVICEPACKMAJOR 0x0000020
-#define VER_SUITENAME 0x0000040
-#define VER_PRODUCT_TYPE 0x0000080
-
-#define VER_NT_WORKSTATION 0x0000001
-#define VER_NT_DOMAIN_CONTROLLER 0x0000002
-#define VER_NT_SERVER 0x0000003
-*/
-
-
-typedef struct _CONTROLLER_OBJECT
-{
- CSHORT Type;
- CSHORT Size;
- PVOID ControllerExtension;
- KDEVICE_QUEUE DeviceWaitQueue;
- ULONG Spare1;
- LARGE_INTEGER Spare2;
-} CONTROLLER_OBJECT, *PCONTROLLER_OBJECT;
-
-typedef struct _STRING
-{
- /*
- * Length in bytes of the string stored in buffer
- */
- USHORT Length;
-
- /*
- * Maximum length of the string
- */
- USHORT MaximumLength;
-
- /*
- * String
- */
- PCHAR Buffer;
-} STRING, *PSTRING;
-
-typedef STRING ANSI_STRING;
-typedef PSTRING PANSI_STRING;
-
-typedef STRING OEM_STRING;
-typedef PSTRING POEM_STRING;
-
-typedef struct _TIME_FIELDS
-{
- CSHORT Year;
- CSHORT Month;
- CSHORT Day;
- CSHORT Hour;
- CSHORT Minute;
- CSHORT Second;
- CSHORT Milliseconds;
- CSHORT Weekday;
-} TIME_FIELDS, *PTIME_FIELDS;
-
-typedef struct _RTL_BITMAP
-{
- ULONG SizeOfBitMap;
- PULONG Buffer;
-} RTL_BITMAP, *PRTL_BITMAP;
-
-typedef struct _RTL_BITMAP_RUN
-{
- ULONG StarttingIndex;
- ULONG NumberOfBits;
-} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
-
-#ifndef STDCALL_FUNC
-#define STDCALL_FUNC(a) (STDCALL a)
-#endif
-
-typedef NTSTATUS STDCALL_FUNC
-(*PRTL_QUERY_REGISTRY_ROUTINE) (PWSTR ValueName,
- ULONG ValueType,
- PVOID ValueData,
- ULONG ValueLength,
- PVOID Context,
- PVOID EntryContext);
-
-typedef struct _RTL_QUERY_REGISTRY_TABLE
-{
- PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
- ULONG Flags;
- PWSTR Name;
- PVOID EntryContext;
- ULONG DefaultType;
- PVOID DefaultData;
- ULONG DefaultLength;
-} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
-
-typedef struct _GENERATE_NAME_CONTEXT
-{
- USHORT Checksum;
- BOOLEAN CheckSumInserted;
- UCHAR NameLength;
- WCHAR NameBuffer[8];
- ULONG ExtensionLength;
- WCHAR ExtensionBuffer[4];
- ULONG LastIndexValue;
-} GENERATE_NAME_CONTEXT, *PGENERATE_NAME_CONTEXT;
-
-typedef struct _RTL_SPLAY_LINKS
-{
- struct _RTL_SPLAY_LINKS *Parent;
- struct _RTL_SPLAY_LINKS *LeftChild;
- struct _RTL_SPLAY_LINKS *RightChild;
-} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
-
-
-typedef struct _RTL_RANGE_LIST
-{
- LIST_ENTRY ListHead;
- ULONG Flags; /* RTL_RANGE_LIST_... flags */
- ULONG Count;
- ULONG Stamp;
-} RTL_RANGE_LIST, *PRTL_RANGE_LIST;
-
-#define RTL_RANGE_LIST_ADD_IF_CONFLICT 0x00000001
-#define RTL_RANGE_LIST_ADD_SHARED 0x00000002
-
-typedef struct _RTL_RANGE
-{
- ULONGLONG Start;
- ULONGLONG End;
- PVOID UserData;
- PVOID Owner;
- UCHAR Attributes;
- UCHAR Flags; /* RTL_RANGE_... flags */
-} RTL_RANGE, *PRTL_RANGE;
-
-#define RTL_RANGE_SHARED 0x01
-#define RTL_RANGE_CONFLICT 0x02
-
-typedef BOOLEAN
-(STDCALL *PRTL_CONFLICT_RANGE_CALLBACK) (PVOID Context,
- PRTL_RANGE 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 struct _INITIAL_TEB
-{
- PVOID StackBase;
- PVOID StackLimit;
- PVOID StackCommit;
- PVOID StackCommitMax;
- PVOID StackReserved;
-} INITIAL_TEB, *PINITIAL_TEB;
-
-#define MAXIMUM_LEADBYTES 12
-
-typedef struct _CPTABLEINFO
-{
- USHORT CodePage;
- USHORT MaximumCharacterSize; /* SBCS = 1, DBCS = 2 */
- USHORT DefaultChar;
- USHORT UniDefaultChar;
- USHORT TransDefaultChar;
- USHORT TransUniDefaultChar;
- USHORT DBCSCodePage;
- UCHAR LeadByte[MAXIMUM_LEADBYTES];
- PUSHORT MultiByteTable;
- PVOID WideCharTable;
- PUSHORT DBCSRanges;
- PUSHORT DBCSOffsets;
-} CPTABLEINFO, *PCPTABLEINFO;
-
-typedef struct _NLSTABLEINFO
-{
- CPTABLEINFO OemTableInfo;
- CPTABLEINFO AnsiTableInfo;
- PUSHORT UpperCaseTable;
- PUSHORT LowerCaseTable;
-} NLSTABLEINFO, *PNLSTABLEINFO;
-
-
-#else /* __USE_W32API */
-
-#include <ddk/ntifs.h>
-
-#endif /* __USE_W32API */
-
-typedef struct _RTL_HEAP_DEFINITION
-{
- ULONG Length;
- ULONG Unknown[11];
-} RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
-
-typedef struct _RTL_HANDLE_TABLE_ENTRY
-{
- ULONG Flags;
- struct _RTL_HANDLE_TABLE_ENTRY *NextFree;
-} RTL_HANDLE_TABLE_ENTRY, *PRTL_HANDLE_TABLE_ENTRY;
-typedef struct _RTL_HANDLE_TABLE
-{
- ULONG MaximumNumberOfHandles;
- ULONG SizeOfHandleTableEntry;
- ULONG Reserved[2];
- PRTL_HANDLE_TABLE_ENTRY FreeHandles;
- PRTL_HANDLE_TABLE_ENTRY CommittedHandles;
- PRTL_HANDLE_TABLE_ENTRY UnCommittedHandles;
- PRTL_HANDLE_TABLE_ENTRY MaxReservedHandles;
-} RTL_HANDLE_TABLE, *PRTL_HANDLE_TABLE;
-
-typedef struct _RTL_ATOM_TABLE_ENTRY
-{
- struct _RTL_ATOM_TABLE_ENTRY *HashLink;
- USHORT HandleIndex;
- USHORT Atom;
- USHORT ReferenceCount;
- UCHAR Flags;
- UCHAR NameLength;
- WCHAR Name[1];
-} RTL_ATOM_TABLE_ENTRY, *PRTL_ATOM_TABLE_ENTRY;
-
-typedef struct _RTL_ATOM_TABLE
-{
- ULONG Signature;
- union
- {
- RTL_CRITICAL_SECTION CriticalSection;
- FAST_MUTEX FastMutex;
- };
- union
- {
- RTL_HANDLE_TABLE RtlHandleTable;
- PHANDLE_TABLE ExHandleTable;
- };
- ULONG NumberOfBuckets;
- PRTL_ATOM_TABLE_ENTRY Buckets[1];
-} RTL_ATOM_TABLE, *PRTL_ATOM_TABLE;
-
-
-#include <pshpack1.h>
-
-typedef struct _NLS_FILE_HEADER
-{
- USHORT HeaderSize;
- USHORT CodePage;
- USHORT MaximumCharacterSize; /* SBCS = 1, DBCS = 2 */
- USHORT DefaultChar;
- USHORT UniDefaultChar;
- USHORT TransDefaultChar;
- USHORT TransUniDefaultChar;
- USHORT DBCSCodePage;
- UCHAR LeadByte[MAXIMUM_LEADBYTES];
-} NLS_FILE_HEADER, *PNLS_FILE_HEADER;
-
-#include <poppack.h>
-/*
-typedef struct _OSVERSIONINFOEXA {
- ULONG dwOSVersionInfoSize;
- ULONG dwMajorVersion;
- ULONG dwMinorVersion;
- ULONG dwBuildNumber;
- ULONG dwPlatformId;
- CHAR szCSDVersion [128];
- USHORT wServicePackMajor;
- USHORT wServicePackMinor;
- USHORT wSuiteMask;
- UCHAR wProductType;
- UCHAR wReserved;
-} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
-
-typedef struct _OSVERSIONINFOEXW {
- ULONG dwOSVersionInfoSize;
- ULONG dwMajorVersion;
- ULONG dwMinorVersion;
- ULONG dwBuildNumber;
- ULONG dwPlatformId;
- WCHAR szCSDVersion[128];
- USHORT wServicePackMajor;
- USHORT wServicePackMinor;
- USHORT wSuiteMask;
- UCHAR wProductType;
- UCHAR wReserved;
-} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW, RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW;
-
-*/
-typedef struct _RTL_MESSAGE_RESOURCE_ENTRY
-{
- USHORT Length;
- USHORT Flags;
- CHAR Text[1];
-} RTL_MESSAGE_RESOURCE_ENTRY, *PRTL_MESSAGE_RESOURCE_ENTRY;
-
-typedef struct _RTL_MESSAGE_RESOURCE_BLOCK
-{
- ULONG LowId;
- ULONG HighId;
- ULONG OffsetToEntries;
-} RTL_MESSAGE_RESOURCE_BLOCK, *PRTL_MESSAGE_RESOURCE_BLOCK;
-
-typedef struct _RTL_MESSAGE_RESOURCE_DATA
-{
- ULONG NumberOfBlocks;
- RTL_MESSAGE_RESOURCE_BLOCK Blocks[1];
-} RTL_MESSAGE_RESOURCE_DATA, *PRTL_MESSAGE_RESOURCE_DATA;
-
-typedef VOID
-(STDCALL *PRTL_BASE_PROCESS_START_ROUTINE)(PTHREAD_START_ROUTINE StartAddress,
- PVOID Parameter);
-
-
-typedef struct _UNICODE_PREFIX_TABLE_ENTRY {
- USHORT NodeTypeCode;
- USHORT NameLength;
- struct _UNICODE_PREFIX_TABLE_ENTRY *NextPrefixTree;
- struct _UNICODE_PREFIX_TABLE_ENTRY *CaseMatch;
- RTL_SPLAY_LINKS Links;
- PUNICODE_STRING Prefix;
-} UNICODE_PREFIX_TABLE_ENTRY;
-typedef UNICODE_PREFIX_TABLE_ENTRY *PUNICODE_PREFIX_TABLE_ENTRY;
-
-typedef struct _UNICODE_PREFIX_TABLE {
- USHORT NodeTypeCode;
- USHORT NameLength;
- PUNICODE_PREFIX_TABLE_ENTRY NextPrefixTree;
- PUNICODE_PREFIX_TABLE_ENTRY LastNextEntry;
-} UNICODE_PREFIX_TABLE;
-typedef UNICODE_PREFIX_TABLE *PUNICODE_PREFIX_TABLE;
-
-typedef enum _TABLE_SEARCH_RESULT{
- TableEmptyTree,
- TableFoundNode,
- TableInsertAsLeft,
- TableInsertAsRight
-} TABLE_SEARCH_RESULT;
-
-
-typedef enum _RTL_GENERIC_COMPARE_RESULTS {
- GenericLessThan,
- GenericGreaterThan,
- GenericEqual
-} RTL_GENERIC_COMPARE_RESULTS;
-
-struct _RTL_AVL_TABLE;
-
-typedef
-RTL_GENERIC_COMPARE_RESULTS
-(STDCALL *PRTL_AVL_COMPARE_ROUTINE) (
- struct _RTL_AVL_TABLE *Table,
- PVOID FirstStruct,
- PVOID SecondStruct
- );
-
-typedef
-PVOID
-(STDCALL *PRTL_AVL_ALLOCATE_ROUTINE) (
- struct _RTL_AVL_TABLE *Table,
- ULONG ByteSize
- );
-
-typedef
-VOID
-(STDCALL *PRTL_AVL_FREE_ROUTINE) (
- struct _RTL_AVL_TABLE *Table,
- PVOID Buffer
- );
-
-typedef
-NTSTATUS
-(STDCALL *PRTL_AVL_MATCH_FUNCTION) (
- struct _RTL_AVL_TABLE *Table,
- PVOID UserData,
- PVOID MatchData
- );
-
-typedef struct _RTL_BALANCED_LINKS {
- struct _RTL_BALANCED_LINKS *Parent;
- struct _RTL_BALANCED_LINKS *LeftChild;
- struct _RTL_BALANCED_LINKS *RightChild;
- CHAR Balance;
- UCHAR Reserved[3];
-} RTL_BALANCED_LINKS;
-
-typedef RTL_BALANCED_LINKS *PRTL_BALANCED_LINKS;
-
-typedef struct _RTL_AVL_TABLE {
- RTL_BALANCED_LINKS BalancedRoot;
- PVOID OrderedPointer;
- ULONG WhichOrderedElement;
- ULONG NumberGenericTableElements;
- ULONG DepthOfTree;
- PRTL_BALANCED_LINKS RestartKey;
- ULONG DeleteCount;
- PRTL_AVL_COMPARE_ROUTINE CompareRoutine;
- PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine;
- PRTL_AVL_FREE_ROUTINE FreeRoutine;
- PVOID TableContext;
-} RTL_AVL_TABLE;
-typedef RTL_AVL_TABLE *PRTL_AVL_TABLE;
-
-struct _RTL_GENERIC_TABLE;
-
-typedef
-RTL_GENERIC_COMPARE_RESULTS
-(STDCALL *PRTL_GENERIC_COMPARE_ROUTINE) (
- struct _RTL_GENERIC_TABLE *Table,
- PVOID FirstStruct,
- PVOID SecondStruct
- );
-
-typedef
-PVOID
-(STDCALL *PRTL_GENERIC_ALLOCATE_ROUTINE) (
- struct _RTL_GENERIC_TABLE *Table,
- ULONG ByteSize
- );
-
-typedef
-VOID
-(STDCALL *PRTL_GENERIC_FREE_ROUTINE) (
- struct _RTL_GENERIC_TABLE *Table,
- PVOID Buffer
- );
-
-
-typedef struct _RTL_GENERIC_TABLE {
- PRTL_SPLAY_LINKS TableRoot;
- LIST_ENTRY InsertOrderList;
- PLIST_ENTRY OrderedPointer;
- ULONG WhichOrderedElement;
- ULONG NumberGenericTableElements;
- PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine;
- PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine;
- PRTL_GENERIC_FREE_ROUTINE FreeRoutine;
- PVOID TableContext;
-} RTL_GENERIC_TABLE;
-typedef RTL_GENERIC_TABLE *PRTL_GENERIC_TABLE;
-
-typedef NTSTATUS
-(*PHEAP_ENUMERATION_ROUTINE)(IN PVOID HeapHandle,
- IN PVOID UserParam);
-
-
-#define RTL_RANGE_LIST_ADD_IF_CONFLICT 0x00000001
-#define RTL_RANGE_LIST_ADD_SHARED 0x00000002
-
-#define RTL_RANGE_LIST_SHARED_OK 0x00000001
-#define RTL_RANGE_LIST_NULL_CONFLICT_OK 0x00000002
-
-#define RTL_RANGE_LIST_MERGE_IF_CONFLICT RTL_RANGE_LIST_ADD_IF_CONFLICT
-
-typedef struct _RTL_RANGE {
- ULONGLONG Start;
- ULONGLONG End;
- PVOID UserData;
- PVOID Owner;
- UCHAR Attributes;
- UCHAR Flags;
-} RTL_RANGE, *PRTL_RANGE;
-
-#define RTL_RANGE_SHARED 0x01
-#define RTL_RANGE_CONFLICT 0x02
-
-typedef struct _RTL_RANGE_LIST {
- LIST_ENTRY ListHead;
- ULONG Flags;
- ULONG Count;
- ULONG Stamp;
-} RTL_RANGE_LIST, *PRTL_RANGE_LIST;
-
-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
-(STDCALL *PRTL_CONFLICT_RANGE_CALLBACK)(
- IN PVOID Context,
- IN PRTL_RANGE Range);
-
-#endif /* __DDK_RTLTYPES_H */
+++ /dev/null
-#ifndef __INCLUDE_SECURITY_H
-#define __INCLUDE_SECURITY_H
-
-#include <ntos/ntdef.h>
-#include <ntos/types.h>
-
-#ifndef __USE_W32API
-/* Privileges */
-#define SE_MIN_WELL_KNOWN_PRIVILEGE (2L)
-#define SE_CREATE_TOKEN_PRIVILEGE (2L)
-#define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE (3L)
-#define SE_LOCK_MEMORY_PRIVILEGE (4L)
-#define SE_INCREASE_QUOTA_PRIVILEGE (5L)
-#define SE_UNSOLICITED_INPUT_PRIVILEGE (6L) /* unused */
-#define SE_MACHINE_ACCOUNT_PRIVILEGE (6L)
-#define SE_TCB_PRIVILEGE (7L)
-#define SE_SECURITY_PRIVILEGE (8L)
-#define SE_TAKE_OWNERSHIP_PRIVILEGE (9L)
-#define SE_LOAD_DRIVER_PRIVILEGE (10L)
-#define SE_SYSTEM_PROFILE_PRIVILEGE (11L)
-#define SE_SYSTEMTIME_PRIVILEGE (12L)
-#define SE_PROF_SINGLE_PROCESS_PRIVILEGE (13L)
-#define SE_INC_BASE_PRIORITY_PRIVILEGE (14L)
-#define SE_CREATE_PAGEFILE_PRIVILEGE (15L)
-#define SE_CREATE_PERMANENT_PRIVILEGE (16L)
-#define SE_BACKUP_PRIVILEGE (17L)
-#define SE_RESTORE_PRIVILEGE (18L)
-#define SE_SHUTDOWN_PRIVILEGE (19L)
-#define SE_DEBUG_PRIVILEGE (20L)
-#define SE_AUDIT_PRIVILEGE (21L)
-#define SE_SYSTEM_ENVIRONMENT_PRIVILEGE (22L)
-#define SE_CHANGE_NOTIFY_PRIVILEGE (23L)
-#define SE_REMOTE_SHUTDOWN_PRIVILEGE (24L)
-#define SE_MAX_WELL_KNOWN_PRIVILEGE SE_REMOTE_SHUTDOWN_PRIVILEGE
-#endif
-/* TOKEN_GROUPS structure */
-#ifndef SE_GROUP_MANDATORY
-#define SE_GROUP_MANDATORY (0x1L)
-#define SE_GROUP_ENABLED_BY_DEFAULT (0x2L)
-#define SE_GROUP_ENABLED (0x4L)
-#define SE_GROUP_OWNER (0x8L)
-#define SE_GROUP_LOGON_ID (0xC0000000L)
-#endif
-
-#if 0
-/* Security descriptor control. */
-#define SECURITY_DESCRIPTOR_REVISION (1)
-#define SECURITY_DESCRIPTOR_MIN_LENGTH (20)
-#define SE_OWNER_DEFAULTED (0x0001)
-#define SE_GROUP_DEFAULTED (0x0002)
-#define SE_DACL_PRESENT (0x0004)
-#define SE_DACL_DEFAULTED (0x0008)
-#define SE_SACL_PRESENT (0x0010)
-#define SE_SACL_DEFAULTED (0x0020)
-#define SE_RM_CONTROL_VALID (0x4000)
-#define SE_SELF_RELATIVE (0x8000)
-#endif
-
-/* This is defined in the Win 32 API headers as something else: */
-#if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
-typedef ULONG ACCESS_MODE, *PACCESS_MODE;
-#endif
-
-#if 0
-typedef struct _ACE_HEADER
-{
- CHAR AceType;
- CHAR AceFlags;
- USHORT AceSize;
- ACCESS_MASK AccessMask;
-} ACE_HEADER, *PACE_HEADER;
-
-typedef struct
-{
- ACE_HEADER Header;
-} ACE, *PACE;
-#endif
-
-#ifdef __GNU__
-typedef struct _SECURITY_DESCRIPTOR_CONTEXT
-{
-} SECURITY_DESCRIPTOR_CONTEXT, *PSECURITY_DESCRIPTOR_CONTEXT;
-#endif
-
-
-#ifndef __USE_W32API
-
-#define SYSTEM_LUID { 0x3E7, 0x0 }
-#define ANONYMOUS_LOGON_LUID { 0x3e6, 0x0 }
-#define LOCALSERVICE_LUID { 0x3e5, 0x0 }
-#define NETWORKSERVICE_LUID { 0x3e4, 0x0 }
-
-/* SID Auhority */
-#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
-#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
-#define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
-#define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
-#define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
-#define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
-
-/* SID */
-#define SECURITY_NULL_RID (0L)
-#define SECURITY_WORLD_RID (0L)
-#define SECURITY_LOCAL_RID (0L)
-#define SECURITY_CREATOR_OWNER_RID (0L)
-#define SECURITY_CREATOR_GROUP_RID (0x1L)
-#define SECURITY_CREATOR_OWNER_SERVER_RID (0x2L)
-#define SECURITY_CREATOR_GROUP_SERVER_RID (0x3L)
-#define SECURITY_DIALUP_RID (0x1L)
-#define SECURITY_NETWORK_RID (0x2L)
-#define SECURITY_BATCH_RID (0x3L)
-#define SECURITY_INTERACTIVE_RID (0x4L)
-#define SECURITY_LOGON_IDS_RID (0x5L)
-#define SECURITY_LOGON_IDS_RID_COUNT (0x3L)
-#define SECURITY_SERVICE_RID (0x6L)
-#define SECURITY_ANONYMOUS_LOGON_RID (0x7L)
-#define SECURITY_PROXY_RID (0x8L)
-#define SECURITY_ENTERPRISE_CONTROLLERS_RID (0x9L)
-#define SECURITY_SERVER_LOGON_RID SECURITY_ENTERPRISE_CONTROLLERS_RID
-#define SECURITY_PRINCIPAL_SELF_RID (0xAL)
-#define SECURITY_AUTHENTICATED_USER_RID (0xBL)
-#define SECURITY_RESTRICTED_CODE_RID (0xCL)
-#define SECURITY_LOCAL_SYSTEM_RID (0x12L)
-#define SECURITY_NT_NON_UNIQUE_RID (0x15L)
-#define SECURITY_BUILTIN_DOMAIN_RID (0x20L)
-#define DOMAIN_USER_RID_ADMIN (0x1F4L)
-#define DOMAIN_USER_RID_GUEST (0x1F5L)
-#define DOMAIN_GROUP_RID_ADMINS (0x200L)
-#define DOMAIN_GROUP_RID_USERS (0x201L)
-#define DOMAIN_ALIAS_RID_ADMINS (0x220L)
-#define DOMAIN_ALIAS_RID_USERS (0x221L)
-#define DOMAIN_ALIAS_RID_GUESTS (0x222L)
-#define DOMAIN_ALIAS_RID_POWER_USERS (0x223L)
-#define DOMAIN_ALIAS_RID_ACCOUNT_OPS (0x224L)
-#define DOMAIN_ALIAS_RID_SYSTEM_OPS (0x225L)
-#define DOMAIN_ALIAS_RID_PRINT_OPS (0x226L)
-#define DOMAIN_ALIAS_RID_BACKUP_OPS (0x227L)
-#define DOMAIN_ALIAS_RID_REPLICATOR (0x228L)
-
-/* ACCESS_MASK */
-/* Generic rights */
-#define GENERIC_READ (0x80000000L)
-#define GENERIC_WRITE (0x40000000L)
-#define GENERIC_EXECUTE (0x20000000L)
-#define GENERIC_ALL (0x10000000L)
-#define MAXIMUM_ALLOWED (0x02000000L)
-#define ACCESS_SYSTEM_SECURITY (0x01000000L)
-
-/* Standard rights */
-#define STANDARD_RIGHTS_REQUIRED (0x000f0000L)
-#define STANDARD_RIGHTS_WRITE (0x00020000L)
-#define STANDARD_RIGHTS_READ (0x00020000L)
-#define STANDARD_RIGHTS_EXECUTE (0x00020000L)
-#define STANDARD_RIGHTS_ALL (0x001f0000L)
-#define SPECIFIC_RIGHTS_ALL (0x0000ffffL)
-
-/* Token rights */
-#define TOKEN_ASSIGN_PRIMARY (0x0001L)
-#define TOKEN_DUPLICATE (0x0002L)
-#define TOKEN_IMPERSONATE (0x0004L)
-#define TOKEN_QUERY (0x0008L)
-#define TOKEN_QUERY_SOURCE (0x0010L)
-#define TOKEN_ADJUST_PRIVILEGES (0x0020L)
-#define TOKEN_ADJUST_GROUPS (0x0040L)
-#define TOKEN_ADJUST_DEFAULT (0x0080L)
-#define TOKEN_ADJUST_SESSIONID (0x0100L)
-
-#define TOKEN_ALL_ACCESS (0xf01ffL)
-#define TOKEN_READ (0x20008L)
-#define TOKEN_WRITE (0x200e0L)
-#define TOKEN_EXECUTE (0x20000L)
-
-typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE, *PSECURITY_CONTEXT_TRACKING_MODE;
-
-#define SECURITY_STATIC_TRACKING (0)
-#define SECURITY_DYNAMIC_TRACKING (1)
-
-typedef ULONG SECURITY_INFORMATION, *PSECURITY_INFORMATION;
-
-#define OWNER_SECURITY_INFORMATION (0x1L)
-#define GROUP_SECURITY_INFORMATION (0x2L)
-#define DACL_SECURITY_INFORMATION (0x4L)
-#define SACL_SECURITY_INFORMATION (0x8L)
-
-typedef enum _TOKEN_INFORMATION_CLASS
-{
- TokenUser = 1,
- TokenGroups,
- TokenPrivileges,
- TokenOwner,
- TokenPrimaryGroup,
- TokenDefaultDacl,
- TokenSource,
- TokenType,
- TokenImpersonationLevel,
- TokenStatistics,
- TokenRestrictedSids,
- TokenSessionId,
- TokenGroupsAndPrivileges,
- TokenSessionReference,
- TokenSandBoxInert,
- TokenAuditPolicy,
- TokenOrigin
-} TOKEN_INFORMATION_CLASS;
-
-typedef enum _SECURITY_IMPERSONATION_LEVEL
-{
- SecurityAnonymous,
- SecurityIdentification,
- SecurityImpersonation,
- SecurityDelegation
-} SECURITY_IMPERSONATION_LEVEL, *PSECURITY_IMPERSONATION_LEVEL;
-
-typedef ULONG ACCESS_MASK, *PACCESS_MASK;
-typedef ULONG TOKEN_TYPE, *PTOKEN_TYPE;
-
-#define TokenPrimary ((TOKEN_TYPE)1)
-#define TokenImpersonation ((TOKEN_TYPE)2)
-
-typedef struct _SECURITY_QUALITY_OF_SERVICE
-{
- ULONG Length;
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
- SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
- BOOLEAN EffectiveOnly;
-} SECURITY_QUALITY_OF_SERVICE;
-
-typedef SECURITY_QUALITY_OF_SERVICE* PSECURITY_QUALITY_OF_SERVICE;
-
-typedef struct _ACE_HEADER
-{
- BYTE AceType;
- BYTE AceFlags;
- WORD AceSize;
-} ACE_HEADER, *PACE_HEADER;
-
-typedef struct _SID_IDENTIFIER_AUTHORITY
-{
- BYTE Value[6];
-} SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
-
-typedef struct _SID
-{
- UCHAR Revision;
- UCHAR SubAuthorityCount;
- SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
- ULONG SubAuthority[1];
-} SID, *PISID;
-
-typedef PVOID PSID;
-
-typedef struct _ACL
-{
- UCHAR AclRevision;
- UCHAR Sbz1;
- USHORT AclSize;
- USHORT AceCount;
- USHORT Sbz2;
-} ACL, *PACL;
-
-typedef struct _ACL_REVISION_INFORMATION
-{
- ULONG AclRevision;
-} ACL_REVISION_INFORMATION, *PACL_REVISION_INFORMATION;
-
-typedef struct _ACL_SIZE_INFORMATION
-{
- ULONG AceCount;
- ULONG AclBytesInUse;
- ULONG AclBytesFree;
-} ACL_SIZE_INFORMATION, *PACL_SIZE_INFORMATION;
-
-typedef enum _ACL_INFORMATION_CLASS
-{
- AclRevisionInformation = 1,
- AclSizeInformation
-} ACL_INFORMATION_CLASS;
-
-typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
-
-typedef struct _LUID
-{
- ULONG LowPart;
- LONG HighPart;
-} LUID, *PLUID;
-
-typedef struct _SECURITY_DESCRIPTOR
-{
- UCHAR Revision;
- UCHAR Sbz1;
- SECURITY_DESCRIPTOR_CONTROL Control;
- PSID Owner;
- PSID Group;
- PACL Sacl;
- PACL Dacl;
-} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
-
-typedef struct _SECURITY_DESCRIPTOR_RELATIVE
-{
- UCHAR Revision;
- UCHAR Sbz1;
- SECURITY_DESCRIPTOR_CONTROL Control;
- ULONG Owner;
- ULONG Group;
- ULONG Sacl;
- ULONG Dacl;
-} SECURITY_DESCRIPTOR_RELATIVE, *PSECURITY_DESCRIPTOR_RELATIVE;
-
-typedef struct _LUID_AND_ATTRIBUTES
-{
- LUID Luid;
- ULONG Attributes;
-} LUID_AND_ATTRIBUTES, *PLUID_AND_ATTRIBUTES;
-
-typedef struct _TOKEN_SOURCE
-{
- CHAR SourceName[8];
- LUID SourceIdentifier;
-} TOKEN_SOURCE, *PTOKEN_SOURCE;
-
-typedef struct _TOKEN_CONTROL
-{
- LUID TokenId;
- LUID AuthenticationId;
- LUID ModifiedId;
- TOKEN_SOURCE TokenSource;
-} TOKEN_CONTROL, *PTOKEN_CONTROL;
-
-typedef struct _SID_AND_ATTRIBUTES
-{
- PSID Sid;
- DWORD Attributes;
-} SID_AND_ATTRIBUTES, *PSID_AND_ATTRIBUTES;
-
-typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
-typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY;
-
-typedef struct _TOKEN_USER
-{
- SID_AND_ATTRIBUTES User;
-} TOKEN_USER, *PTOKEN_USER;
-
-typedef struct _TOKEN_PRIMARY_GROUP
-{
- PSID PrimaryGroup;
-} TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;
-
-typedef struct _TOKEN_GROUPS
-{
- DWORD GroupCount;
- SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
-} TOKEN_GROUPS, *PTOKEN_GROUPS, *LPTOKEN_GROUPS;
-
-typedef struct _TOKEN_GROUPS_AND_PRIVILEGES
-{
- ULONG SidCount;
- ULONG SidLength;
- PSID_AND_ATTRIBUTES Sids;
- ULONG RestrictedSidCount;
- ULONG RestrictedSidLength;
- PSID_AND_ATTRIBUTES RestrictedSids;
- ULONG PrivilegeCount;
- ULONG PrivilegeLength;
- PLUID_AND_ATTRIBUTES Privileges;
- LUID AuthenticationId;
-} TOKEN_GROUPS_AND_PRIVILEGES, *PTOKEN_GROUPS_AND_PRIVILEGES;
-
-typedef struct _TOKEN_PRIVILEGES
-{
- DWORD PrivilegeCount;
- LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
-} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES, *LPTOKEN_PRIVILEGES;
-
-typedef struct _TOKEN_OWNER
-{
- PSID Owner;
-} TOKEN_OWNER, *PTOKEN_OWNER;
-
-typedef struct _TOKEN_DEFAULT_DACL
-{
- PACL DefaultDacl;
-} TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;
-
-typedef struct _TOKEN_STATISTICS
-{
- LUID TokenId;
- LUID AuthenticationId;
- LARGE_INTEGER ExpirationTime;
- TOKEN_TYPE TokenType;
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
- DWORD DynamicCharged;
- DWORD DynamicAvailable;
- DWORD GroupCount;
- DWORD PrivilegeCount;
- LUID ModifiedId;
-} TOKEN_STATISTICS, *PTOKEN_STATISTICS;
-
-typedef struct _TOKEN_ORIGIN {
- LUID OriginatingLogonSession;
-} TOKEN_ORIGIN, *PTOKEN_ORIGIN;
-
-typedef struct _GENERIC_MAPPING
-{
- ACCESS_MASK GenericRead;
- ACCESS_MASK GenericWrite;
- ACCESS_MASK GenericExecute;
- ACCESS_MASK GenericAll;
-} GENERIC_MAPPING, *PGENERIC_MAPPING;
-
-typedef struct _PRIVILEGE_SET
-{
- DWORD PrivilegeCount;
- DWORD Control;
- LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY];
-} PRIVILEGE_SET, *PPRIVILEGE_SET, *LPPRIVILEGE_SET;
-
-#define INITIAL_PRIVILEGE_COUNT 3
-
-typedef struct _INITIAL_PRIVILEGE_SET
-{
- ULONG PrivilegeCount;
- ULONG Control;
- LUID_AND_ATTRIBUTES Privilege[INITIAL_PRIVILEGE_COUNT];
-} INITIAL_PRIVILEGE_SET, *PINITIAL_PRIVILEGE_SET;
-
-typedef struct _SECURITY_ATTRIBUTES
-{
- DWORD nLength;
- LPVOID lpSecurityDescriptor;
- BOOL bInheritHandle;
-} SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
-
-#else /* !__USE_W32API */
-
-typedef struct _ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION;
-typedef struct _ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION;
-
-#endif /* __USE_W32API */
-
-typedef struct
-{
- ACE_HEADER Header;
- ACCESS_MASK AccessMask;
-} ACE, *PACE;
-
-#endif /* __INCLUDE_SECURITY_H */
+++ /dev/null
-#ifndef _INCLUDE_NTOS_SEFUNCS_H\r
-#define _INCLUDE_NTOS_SEFUNCS_H\r
-\r
-NTSTATUS\r
-STDCALL\r
-SeCaptureSecurityDescriptor(\r
- IN PSECURITY_DESCRIPTOR OriginalSecurityDescriptor,\r
- IN KPROCESSOR_MODE CurrentMode,\r
- IN POOL_TYPE PoolType,\r
- IN BOOLEAN CaptureIfKernel,\r
- OUT PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor\r
- );\r
-\r
-VOID\r
-STDCALL\r
-SeCloseObjectAuditAlarm(\r
- IN PVOID Object,\r
- IN HANDLE Handle,\r
- IN BOOLEAN PerformAction\r
- );\r
-\r
-NTSTATUS\r
-STDCALL\r
-SeCreateAccessState(\r
- PACCESS_STATE AccessState,\r
- PAUX_DATA AuxData,\r
- ACCESS_MASK Access,\r
- PGENERIC_MAPPING GenericMapping\r
- );\r
-\r
-VOID STDCALL\r
-SeDeleteAccessState(IN PACCESS_STATE AccessState);\r
-\r
-VOID\r
-STDCALL\r
-SePrivilegeObjectAuditAlarm(\r
- IN HANDLE Handle,\r
- IN PSECURITY_SUBJECT_CONTEXT SubjectContext,\r
- IN ACCESS_MASK DesiredAccess,\r
- IN PPRIVILEGE_SET Privileges,\r
- IN BOOLEAN AccessGranted,\r
- IN KPROCESSOR_MODE CurrentMode\r
- );\r
-\r
-NTSTATUS\r
-STDCALL\r
-SeReleaseSecurityDescriptor(\r
- IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor,\r
- IN KPROCESSOR_MODE CurrentMode,\r
- IN BOOLEAN CaptureIfKernelMode\r
- );\r
-\r
-SECURITY_IMPERSONATION_LEVEL STDCALL\r
-SeTokenImpersonationLevel(IN PACCESS_TOKEN Token);\r
-\r
-BOOLEAN\r
-STDCALL\r
-SeTokenIsWriteRestricted(\r
- IN PACCESS_TOKEN Token\r
- );\r
-\r
-#endif /* _INCLUDE_NTOS_SEFUNCS_H */\r
-\r
+++ /dev/null
-
-#ifndef __NTOS_SERVICE_H
-#define __NTOS_SERVICE_H
-
-
-/* number of entries in the service descriptor tables */
-#define SSDT_MAX_ENTRIES 4
-
-
-#ifndef __USE_W32API
-
-/* System Service Dispatch Table */
-typedef PVOID (NTAPI * SSDT)(VOID);
-typedef SSDT * PSSDT;
-
-/* System Service Parameters Table */
-typedef UCHAR SSPT, *PSSPT;
-
-typedef struct t_KeServiceDescriptorTableEntry {
- PSSDT SSDT;
- PULONG ServiceCounterTable;
- ULONG NumberOfServices;
- PSSPT SSPT;
-
-} SSDT_ENTRY, *PSSDT_ENTRY;
-
-#endif /* __USE_W32API */
-
-
-/* --- NTOSKRNL.EXE --- */
-#if defined(__NTOSKRNL__)
-#ifdef __GNUC__
-extern
-SSDT_ENTRY
-KeServiceDescriptorTable[SSDT_MAX_ENTRIES] __declspec(dllexport);
-#else /* __GNUC__ */
-/* Microsft-style */
-extern
-__declspec(dllexport)
-SSDT_ENTRY
-KeServiceDescriptorTable[SSDT_MAX_ENTRIES];
-#endif /* __GNUC__ */
-#else /* __NTOSKRNL__ */
-#ifdef __GNUC__
-extern
-SSDT_ENTRY
-KeServiceDescriptorTable[SSDT_MAX_ENTRIES] __declspec(dllimport);
-#else /* __GNUC__ */
-/* Microsft-style */
-extern
-__declspec(dllimport)
-SSDT_ENTRY
-KeServiceDescriptorTable[SSDT_MAX_ENTRIES];
-#endif /* __GNUC__ */
-#endif /* __NTOSKRNL__ */
-
-extern
-SSDT_ENTRY
-KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES];
-
-
-#ifndef __USE_W32API
-
-BOOLEAN
-STDCALL
-KeAddSystemServiceTable (
- PSSDT SSDT,
- PULONG ServiceCounterTable,
- ULONG NumberOfServices,
- PSSPT SSPT,
- ULONG TableIndex
- );
-
-#endif /* __USE_W32API */
-
-#endif /* __NTOS_SERVICE_H */
-
+++ /dev/null
-#ifndef __INCLUDE_NTOS_SETYPES_H\r
-#define __INCLUDE_NTOS_SETYPES_H\r
-\r
-typedef struct _SEP_AUDIT_POLICY_CATEGORIES {\r
- UCHAR System:4;\r
- UCHAR Logon:4;\r
- UCHAR ObjectAccess:4;\r
- UCHAR PrivilegeUse:4;\r
- UCHAR DetailedTracking:4;\r
- UCHAR PolicyChange:4;\r
- UCHAR AccountManagement:4;\r
- UCHAR DirectoryServiceAccess:4;\r
- UCHAR AccountLogon:4;\r
-} SEP_AUDIT_POLICY_CATEGORIES, *PSEP_AUDIT_POLICY_CATEGORIES;\r
-\r
-typedef struct _SEP_AUDIT_POLICY_OVERLAY {\r
- ULONGLONG PolicyBits:36;\r
- UCHAR SetBit:1;\r
-} SEP_AUDIT_POLICY_OVERLAY, *PSEP_AUDIT_POLICY_OVERLAY;\r
-\r
-typedef struct _SEP_AUDIT_POLICY {\r
- union {\r
- SEP_AUDIT_POLICY_CATEGORIES PolicyElements;\r
- SEP_AUDIT_POLICY_OVERLAY PolicyOverlay;\r
- ULONGLONG Overlay;\r
- };\r
-} SEP_AUDIT_POLICY, *PSEP_AUDIT_POLICY;\r
- \r
-#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01\r
-typedef struct _TOKEN {\r
- TOKEN_SOURCE TokenSource; /* 0x00 */\r
- LUID TokenId; /* 0x10 */\r
- LUID AuthenticationId; /* 0x18 */\r
- LUID ParentTokenId; /* 0x20 */\r
- LARGE_INTEGER ExpirationTime; /* 0x28 */\r
- struct _ERESOURCE *TokenLock; /* 0x30 */\r
- SEP_AUDIT_POLICY AuditPolicy; /* 0x38 */\r
- LUID ModifiedId; /* 0x40 */\r
- ULONG SessionId; /* 0x48 */\r
- ULONG UserAndGroupCount; /* 0x4C */\r
- ULONG RestrictedSidCount; /* 0x50 */\r
- ULONG PrivilegeCount; /* 0x54 */\r
- ULONG VariableLength; /* 0x58 */\r
- ULONG DynamicCharged; /* 0x5C */\r
- ULONG DynamicAvailable; /* 0x60 */\r
- ULONG DefaultOwnerIndex; /* 0x64 */\r
- PSID_AND_ATTRIBUTES UserAndGroups; /* 0x68 */\r
- PSID_AND_ATTRIBUTES RestrictedSids; /* 0x6C */\r
- PSID PrimaryGroup; /* 0x70 */\r
- PLUID_AND_ATTRIBUTES Privileges; /* 0x74 */\r
- PULONG DynamicPart; /* 0x78 */\r
- PACL DefaultDacl; /* 0x7C */\r
- TOKEN_TYPE TokenType; /* 0x80 */\r
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; /* 0x84 */\r
- ULONG TokenFlags; /* 0x88 */\r
- BOOLEAN TokenInUse; /* 0x8C */\r
- PVOID ProxyData; /* 0x90 */\r
- PVOID AuditData; /* 0x94 */\r
- LUID OriginatingLogonSession; /* 0x98 */\r
- ULONG VariablePart; /* 0xA0 */\r
-} TOKEN, *PTOKEN;\r
-\r
-typedef struct _AUX_DATA\r
-{\r
- PPRIVILEGE_SET PrivilegeSet;\r
- GENERIC_MAPPING GenericMapping;\r
- ULONG Reserved;\r
-} AUX_DATA, *PAUX_DATA;\r
-\r
-#endif /* __INCLUDE_NTOS_SETYPES_H */\r
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ntos/synch.h
- * PURPOSE: Synchronization declarations used by all the parts of the
- * system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-#ifndef __INCLUDE_SYNCH_H
-#define __INCLUDE_SYNCH_H
-
-#ifndef __USE_W32API
-
-#define EVENT_ALL_ACCESS (0x1f0003L)
-#define EVENT_MODIFY_STATE (2)
-#define EVENT_QUERY_STATE (1)
-#define MUTEX_ALL_ACCESS (0x1f0001L)
-#define MUTANT_ALL_ACCESS (0x1f0001L)
-#define MUTANT_QUERY_STATE (1)
-#define SEMAPHORE_ALL_ACCESS (0x1f0003L)
-#define SEMAPHORE_QUERY_STATE (1)
-#define SEMAPHORE_MODIFY_STATE (2)
-#define TIMER_ALL_ACCESS (0x1f0003L)
-#define TIMER_QUERY_STATE (1)
-#define TIMER_MODIFY_STATE (2)
-#define IO_COMPLETION_QUERY_STATE (0x0001)
-#define IO_COMPLETION_MODIFY_STATE (0x0002)
-#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
-
-#endif /* !__USE_W32API */
-
-#define EVENT_PAIR_ALL_ACCESS (0x1f0000L)
-#define MUTEX_QUERY_STATE (1)
-
-#endif /* __INCLUDE_SYNCH_H */
+++ /dev/null
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/ntos/tape.h
- * PURPOSE: Tape drive definitions
- * PROGRAMMER: Eric Kohl
- */
-
-#ifndef __INCLUDE_TAPE_H
-#define __INCLUDE_TAPE_H
-
-
-#define IOCTL_TAPE_BASE FILE_DEVICE_TAPE
-
-#define IOCTL_TAPE_CHECK_VERIFY \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_CREATE_PARTITION \
- CTL_CODE(IOCTL_TAPE_BASE, 0x000a, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_TAPE_ERASE \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_TAPE_FIND_NEW_DEVICES \
- CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_GET_DRIVE_PARAMS \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_GET_MEDIA_PARAMS \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_GET_POSITION \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_GET_STATUS \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0009, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-#define IOCTL_TAPE_PREPARE \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_SET_DRIVE_PARAMS \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_TAPE_SET_MEDIA_PARAMS \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0008, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_SET_POSITION \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_TAPE_WRITE_MARKS \
- CTL_CODE(IOCTL_TAPE_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-
-#endif /* __INCLUDE_TAPE_H */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/time.h
- * PURPOSE: Time declarations used by all the parts of the system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * UPDATE HISTORY:
- * 27/06/00: Created
- */
-
-
-#ifndef __INCLUDE_NTOS_TIME_H
-#define __INCLUDE_NTOS_TIME_H
-
-#include <ntos/types.h>
-
-#ifndef __USE_W32API
-
-typedef struct _SYSTEMTIME
-{
- WORD wYear;
- WORD wMonth;
- WORD wDayOfWeek;
- WORD wDay;
- WORD wHour;
- WORD wMinute;
- WORD wSecond;
- WORD wMilliseconds;
-} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
-
-typedef struct _TIME_ZONE_INFORMATION
-{
- LONG Bias;
- WCHAR StandardName[32];
- SYSTEMTIME StandardDate;
- LONG StandardBias;
- WCHAR DaylightName[32];
- SYSTEMTIME DaylightDate;
- LONG DaylightBias;
-} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
-
-#else /* __USE_W32API */
-
-#include <ddk/ntapi.h>
-
-typedef LPTIME_ZONE_INFORMATION PTIME_ZONE_INFORMATION;
-
-#endif /* __USE_W32API */
-
-
-#endif /* __INCLUDE_NTOS_TIME_H */
+++ /dev/null
-/*
- *
- */
-
-#ifndef __INCLUDE_DDK_I386_TSS_H
-#define __INCLUDE_DDK_I386_TSS_H
-
-#define KTSS_ESP0 (0x4)
-#define KTSS_CR3 (0x1C)
-#define KTSS_EFLAGS (0x24)
-#define KTSS_IOMAPBASE (0x66)
-
-#ifndef __ASM__
-
-#include <pshpack1.h>
-
-typedef struct _KTSSNOIOPM
-{
- USHORT PreviousTask;
- USHORT Reserved1;
- ULONG Esp0;
- USHORT Ss0;
- USHORT Reserved2;
- ULONG Esp1;
- USHORT Ss1;
- USHORT Reserved3;
- ULONG Esp2;
- USHORT Ss2;
- USHORT Reserved4;
- ULONG Cr3;
- ULONG Eip;
- ULONG Eflags;
- ULONG Eax;
- ULONG Ecx;
- ULONG Edx;
- ULONG Ebx;
- ULONG Esp;
- ULONG Ebp;
- ULONG Esi;
- ULONG Edi;
- USHORT Es;
- USHORT Reserved5;
- USHORT Cs;
- USHORT Reserved6;
- USHORT Ss;
- USHORT Reserved7;
- USHORT Ds;
- USHORT Reserved8;
- USHORT Fs;
- USHORT Reserved9;
- USHORT Gs;
- USHORT Reserved10;
- USHORT Ldt;
- USHORT Reserved11;
- USHORT Trap;
- USHORT IoMapBase;
- /* no interrupt redirection map */
- UCHAR IoBitmap[1];
-} KTSSNOIOPM;
-
-
-typedef struct _KTSS
-{
- USHORT PreviousTask;
- USHORT Reserved1;
- ULONG Esp0;
- USHORT Ss0;
- USHORT Reserved2;
- ULONG Esp1;
- USHORT Ss1;
- USHORT Reserved3;
- ULONG Esp2;
- USHORT Ss2;
- USHORT Reserved4;
- ULONG Cr3;
- ULONG Eip;
- ULONG Eflags;
- ULONG Eax;
- ULONG Ecx;
- ULONG Edx;
- ULONG Ebx;
- ULONG Esp;
- ULONG Ebp;
- ULONG Esi;
- ULONG Edi;
- USHORT Es;
- USHORT Reserved5;
- USHORT Cs;
- USHORT Reserved6;
- USHORT Ss;
- USHORT Reserved7;
- USHORT Ds;
- USHORT Reserved8;
- USHORT Fs;
- USHORT Reserved9;
- USHORT Gs;
- USHORT Reserved10;
- USHORT Ldt;
- USHORT Reserved11;
- USHORT Trap;
- USHORT IoMapBase;
- /* no interrupt redirection map */
- UCHAR IoBitmap[8193];
-} KTSS;
-
-#include <poppack.h>
-
-#endif /* not __ASM__ */
-
-#endif /* __INCLUDE_DDK_I386_TSS_H */
+++ /dev/null
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: include/types.h
- * PURPOSE: Types used by all the parts of the system
- * PROGRAMMER: David Welch <welch@cwcom.net>
- * DEFINES: _WIN64: 64-bit architecture
- * _WIN32: 32-bit architecture (default)
- * UPDATE HISTORY:
- * 27/06/00: Created
- * 01/05/01: Portabillity changes
- */
-
-#ifndef __INCLUDE_TYPES_H
-#define __INCLUDE_TYPES_H
-
-#define EXPORTED __declspec(dllexport)
-#define IMPORTED __declspec(dllimport)
-
-#include <basetsd.h>
-
-#ifndef STDCALL_FUNC
-#define STDCALL_FUNC(a) (STDCALL a)
-#endif
-
-/* Fixed precision types */
-typedef signed char INT8, *PINT8;
-typedef unsigned char UINT8, *PUINT8;
-
-#ifndef __USE_W32API
-typedef signed short INT16, *PINT16;
-typedef unsigned short UINT16, *PUINT16;
-#endif
-
-
-/* Check VOID before defining CHAR, SHORT */
-#ifndef VOID
-#define VOID void
-typedef char CHAR;
-typedef short SHORT;
-#endif
-
-
-#ifndef __USE_W32API
-
-#ifdef i386
-#ifdef __GNUC__
-#define STDCALL __attribute__ ((stdcall))
-#define CDECL __attribute__ ((cdecl))
-#else
-#define STDCALL __stdcall
-#define CDECL __cdecl
-#endif
-#define CALLBACK STDCALL
-#define PASCAL WINAPI
-#else
-
-#ifdef __GNUC__
-#define STDCALL
-#define CDECL
-#define CALLBACK
-#define PASCAL
-#else
-#define STDCALL __stdcall
-#define CDECL __cdecl
-#define CALLBACK
-#define PASCAL
-#endif /*__GNUC__*/
-
-#endif /*i386*/
-
-typedef INT32 INT, *PINT;
-typedef LONG32 LONG, *PLONG;
-typedef unsigned long DWORD, *PDWORD;
-typedef UINT32 UINT, *PUINT;
-typedef unsigned long ULONG, *PULONG;
-
-#ifndef _WCHAR_T_
-#define _WCHAR_T_
-#define _WCHAR_T
-#define _WCHAR_T_DEFINED
-#ifndef __WCHAR_TYPE__
-#define __WCHAR_TYPE__ short unsigned int
-#endif
-
-#ifndef __cplusplus
-typedef __WCHAR_TYPE__ wchar_t;
-#endif /* C++ */
-
-#endif /* wchar_t not already defined */
-
-
-/* #ifndef __cplusplus
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-typedef unsigned short wchar_t;
-#endif
-#endif
-*/
-
-typedef unsigned char UCHAR;
-typedef unsigned short USHORT;
-typedef wchar_t WCHAR;
-typedef unsigned short WORD;
-typedef int BOOL;
-typedef unsigned char BOOLEAN;
-typedef BOOLEAN* PBOOLEAN;
-typedef wchar_t *LPWSTR;
-typedef wchar_t *PWSTR;
-typedef unsigned char *PUCHAR;
-typedef unsigned short *PUSHORT;
-typedef void *PVOID;
-typedef unsigned char BYTE;
-typedef void *LPVOID;
-typedef float *PFLOAT;
-typedef wchar_t *PWCH;
-typedef unsigned short *PWORD;
-
-typedef const void *LPCVOID;
-typedef BYTE *LPBYTE, *PBYTE;
-typedef BOOL *PBOOL;
-typedef DWORD LCID;
-typedef DWORD *PLCID;
-typedef const char *LPCSTR;
-typedef char *LPSTR;
-typedef const wchar_t *LPCWSTR;
-typedef CHAR *PCHAR;
-typedef CHAR *PCH;
-typedef void *HANDLE;
-typedef HANDLE *PHANDLE;
-typedef char CCHAR;
-typedef CCHAR *PCCHAR;
-typedef wchar_t *PWCHAR;
-typedef ULONG WAIT_TYPE;
-typedef USHORT CSHORT;
-typedef const wchar_t *PCWSTR;
-typedef char* PCSZ;
-typedef long long LONGLONG;
-typedef LONGLONG *PLONGLONG;
-typedef unsigned long long ULONGLONG;
-typedef ULONGLONG *PULONGLONG;
-
-typedef DWORD STDCALL_FUNC (*PTHREAD_START_ROUTINE) (LPVOID);
-
-
-typedef union _LARGE_INTEGER
-{
- struct
- {
- DWORD LowPart;
- LONG HighPart;
- } u;
-#ifdef ANONYMOUSUNIONS
- struct
- {
- DWORD LowPart;
- LONG HighPart;
- };
-#endif /* ANONYMOUSUNIONS */
- LONGLONG QuadPart;
-} LARGE_INTEGER, *PLARGE_INTEGER;
-
-typedef union _ULARGE_INTEGER
-{
- struct
- {
- DWORD LowPart;
- DWORD HighPart;
- } u;
-#ifdef ANONYMOUSUNIONS
- struct
- {
- DWORD LowPart;
- DWORD HighPart;
- };
-#endif /* ANONYMOUSUNIONS */
- ULONGLONG QuadPart;
-} ULARGE_INTEGER, *PULARGE_INTEGER;
-
-
-/*
- * Moved here by AG
- * typedef ULARGE_INTEGER TIME, *PTIME;
- */
-
-typedef struct _FILETIME
-{
- DWORD dwLowDateTime;
- DWORD dwHighDateTime;
-} FILETIME, *LPFILETIME, *PFILETIME;
-
-typedef struct _LIST_ENTRY
-{
- struct _LIST_ENTRY *Flink;
- struct _LIST_ENTRY *Blink;
-} LIST_ENTRY, *PLIST_ENTRY;
-
-typedef struct _SINGLE_LIST_ENTRY
-{
- struct _SINGLE_LIST_ENTRY *Next;
-} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
-
-#define SLIST_ENTRY SINGLE_LIST_ENTRY
-#define PSLIST_ENTRY PSINGLE_LIST_ENTRY
-
-typedef struct _UNICODE_STRING
-{
- USHORT Length;
- USHORT MaximumLength;
- PWSTR Buffer;
-} UNICODE_STRING, *PUNICODE_STRING;
-
-typedef const UNICODE_STRING* PCUNICODE_STRING;
-
-#define UNICODE_NULL ((WCHAR)0)
-
-typedef struct _FLOATING_SAVE_AREA
-{
- DWORD ControlWord;
- DWORD StatusWord;
- DWORD TagWord;
- DWORD ErrorOffset;
- DWORD ErrorSelector;
- DWORD DataOffset;
- DWORD DataSelector;
- BYTE RegisterArea[80];
- DWORD Cr0NpxState;
-} FLOATING_SAVE_AREA;
-
-typedef unsigned short RTL_ATOM;
-typedef unsigned short *PRTL_ATOM;
-
-#else /* __USE_W32API */
-
-#include <windows.h>
-
-#endif /* __USE_W32API */
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL ((void*)0)
-#endif /* __cplusplus */
-#endif /* NULL */
-
-#define CONST const
-
-#ifdef __PPC__
-#define CONTEXT_CONTROL 1L
-#define CONTEXT_FLOATING_POINT 2L
-#define CONTEXT_INTEGER 4L
-#define CONTEXT_DEBUG_REGISTERS 8L
-
-#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
-#define CONTEXT_DEBUGGER (CONTEXT_FULL)
-
-#else /* x86 */
-
-#define SIZE_OF_80387_REGISTERS 80
-
-/* Values for contextflags */
-#define CONTEXT_i386 0x10000
-
-#ifndef __USE_W32API
-
-#define CONTEXT_CONTROL (CONTEXT_i386 | 1)
-#define CONTEXT_INTEGER (CONTEXT_i386 | 2)
-#define CONTEXT_SEGMENTS (CONTEXT_i386 | 4)
-#define CONTEXT_FLOATING_POINT (CONTEXT_i386 | 8)
-#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | 0x10)
-#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386 | 0x20)
-#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS)
-
-#define MAXIMUM_SUPPORTED_EXTENSION 512
-
-#endif /* !__USE_W32API */
-
-/* our own invention */
-#define FLAG_TRACE_BIT 0x100
-#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
-
-#endif
-
-typedef struct _CONTEXT_X86
-{
- DWORD ContextFlags;
-
- DWORD Dr0;
- DWORD Dr1;
- DWORD Dr2;
- DWORD Dr3;
- DWORD Dr6;
- DWORD Dr7;
-
- FLOATING_SAVE_AREA FloatSave;
-
- DWORD SegGs;
- DWORD SegFs;
- DWORD SegEs;
- DWORD SegDs;
-
- DWORD Edi;
- DWORD Esi;
- DWORD Ebx;
- DWORD Edx;
- DWORD Ecx;
- DWORD Eax;
-
- DWORD Ebp;
- DWORD Eip;
- DWORD SegCs;
- DWORD EFlags;
- DWORD Esp;
- DWORD SegSs;
-
- BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
-} CONTEXT_X86, *PCONTEXT_X86, *LPCONTEXT_X86;
-
-typedef struct _CONTEXT_PPC
-{
- /* Floating point registers returned when CONTEXT_FLOATING_POINT is set */
- double Fpr0;
- double Fpr1;
- double Fpr2;
- double Fpr3;
- double Fpr4;
- double Fpr5;
- double Fpr6;
- double Fpr7;
- double Fpr8;
- double Fpr9;
- double Fpr10;
- double Fpr11;
- double Fpr12;
- double Fpr13;
- double Fpr14;
- double Fpr15;
- double Fpr16;
- double Fpr17;
- double Fpr18;
- double Fpr19;
- double Fpr20;
- double Fpr21;
- double Fpr22;
- double Fpr23;
- double Fpr24;
- double Fpr25;
- double Fpr26;
- double Fpr27;
- double Fpr28;
- double Fpr29;
- double Fpr30;
- double Fpr31;
- double Fpscr;
-
- /* Integer registers returned when CONTEXT_INTEGER is set. */
- DWORD Gpr0;
- DWORD Gpr1;
- DWORD Gpr2;
- DWORD Gpr3;
- DWORD Gpr4;
- DWORD Gpr5;
- DWORD Gpr6;
- DWORD Gpr7;
- DWORD Gpr8;
- DWORD Gpr9;
- DWORD Gpr10;
- DWORD Gpr11;
- DWORD Gpr12;
- DWORD Gpr13;
- DWORD Gpr14;
- DWORD Gpr15;
- DWORD Gpr16;
- DWORD Gpr17;
- DWORD Gpr18;
- DWORD Gpr19;
- DWORD Gpr20;
- DWORD Gpr21;
- DWORD Gpr22;
- DWORD Gpr23;
- DWORD Gpr24;
- DWORD Gpr25;
- DWORD Gpr26;
- DWORD Gpr27;
- DWORD Gpr28;
- DWORD Gpr29;
- DWORD Gpr30;
- DWORD Gpr31;
-
- DWORD Cr; /* Condition register */
- DWORD Xer; /* Fixed point exception register */
-
- /* The following are set when CONTEXT_CONTROL is set. */
- DWORD Msr; /* Machine status register */
- DWORD Iar; /* Instruction address register */
- DWORD Lr; /* Link register */
- DWORD Ctr; /* Control register */
-
- /* Control which context values are returned */
- DWORD ContextFlags;
- DWORD Fill[3];
-
- /* Registers returned if CONTEXT_DEBUG_REGISTERS is set. */
- DWORD Dr0; /* Breakpoint Register 1 */
- DWORD Dr1; /* Breakpoint Register 2 */
- DWORD Dr2; /* Breakpoint Register 3 */
- DWORD Dr3; /* Breakpoint Register 4 */
- DWORD Dr4; /* Breakpoint Register 5 */
- DWORD Dr5; /* Breakpoint Register 6 */
- DWORD Dr6; /* Debug Status Register */
- DWORD Dr7; /* Debug Control Register */
-} CONTEXT_PPC, *PCONTEXT_PPC, *LPCONTEXT_PPC;
-
-typedef struct value_ent
-{
- LPWSTR ve_valuename;
- DWORD ve_valuelen;
- DWORD ve_valueptr;
- DWORD ve_type;
-} WVALENT, *PWVALENT;
-
-/* #include "except.h" */
-
-#ifndef __USE_W32API
-
-typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
-
-#ifdef __i386__
-
-typedef CONTEXT_X86 CONTEXT;
-typedef PCONTEXT_X86 PCONTEXT;
-typedef LPCONTEXT_X86 LPCONTEXT;
-
-#else /* __ppc__ */
-
-typedef CONTEXT_PPC CONTEXT;
-typedef PCONTEXT_PPC PCONTEXT;
-typedef LPCONTEXT_PPC LPCONTEXT;
-
-#endif
-
-typedef WORD ATOM;
-
-typedef struct _COORD
-{
- SHORT X;
- SHORT Y;
-} COORD;
-
-typedef struct _SMALL_RECT
-{
- SHORT Left;
- SHORT Top;
- SHORT Right;
- SHORT Bottom;
-} SMALL_RECT, *PSMALL_RECT;
-
-#include "except.h"
-
-#else /* __USE_W32API */
-
-typedef LPTHREAD_START_ROUTINE PTHREAD_START_ROUTINE;
-
-#include <ddk/ntapi.h>
-
-#endif /* __USE_W32API */
-
-typedef struct _ADDRESS_RANGE
-{
- ULONG BaseAddrLow;
- ULONG BaseAddrHigh;
- ULONG LengthLow;
- ULONG LengthHigh;
- ULONG Type;
-} ADDRESS_RANGE, *PADDRESS_RANGE;
-
-#define MB_FLAGS_MEM_INFO (0x1)
-#define MB_FLAGS_BOOT_DEVICE (0x2)
-#define MB_FLAGS_COMMAND_LINE (0x4)
-#define MB_FLAGS_MODULE_INFO (0x8)
-#define MB_FLAGS_AOUT_SYMS (0x10)
-#define MB_FLAGS_ELF_SYMS (0x20)
-#define MB_FLAGS_MMAP_INFO (0x40)
-#define MB_FLAGS_DRIVES_INFO (0x80)
-#define MB_FLAGS_CONFIG_TABLE (0x100)
-#define MB_FLAGS_BOOT_LOADER_NAME (0x200)
-#define MB_FLAGS_APM_TABLE (0x400)
-#define MB_FLAGS_GRAPHICS_TABLE (0x800)
-#define MB_FLAGS_ACPI_TABLE (0x1000)
-
-typedef struct _LOADER_MODULE
-{
- ULONG ModStart;
- ULONG ModEnd;
- ULONG String;
- ULONG Reserved;
-} LOADER_MODULE, *PLOADER_MODULE;
-
-typedef struct _LOADER_PARAMETER_BLOCK
-{
- ULONG Flags;
- ULONG MemLower;
- ULONG MemHigher;
- ULONG BootDevice;
- ULONG CommandLine;
- ULONG ModsCount;
- ULONG ModsAddr;
- UCHAR Syms[12];
- ULONG MmapLength;
- ULONG MmapAddr;
- ULONG DrivesCount;
- ULONG DrivesAddr;
- ULONG ConfigTable;
- ULONG BootLoaderName;
- ULONG PageDirectoryStart;
- ULONG PageDirectoryEnd;
- ULONG KernelBase;
-} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK;
-
-typedef enum _KAPC_ENVIRONMENT
-{
- OriginalApcEnvironment,
- AttachedApcEnvironment,
- CurrentApcEnvironment
-} KAPC_ENVIRONMENT;
-
-/* FIXME: Are these official values ?? */
-#define STATUS_FS_QUERY_REQUIRED ((NTSTATUS)0xC1000001)
-#define STATUS_HANDLE_NOT_WAITABLE ((NTSTATUS)0xC1000002)
-#define STATUS_OBJECT_FILE_MISMATCH ((NTSTATUS)0xC1000003)
-#define STATUS_INVALID_PARAMETER_MAX ((NTSTATUS)0xC1000004)
-#define STATUS_CONFLICTING_ADDRESS ((NTSTATUS)0xC1000005)
-#define STATUS_NO_MEDIA_IN_DRIVE ((NTSTATUS)0xC1000006)
-
-#define NTSTAT_SEVERITY_SHIFT 30
-#define NTSTAT_SEVERITY_MASK 0x00000003
-#define NTSTAT_FACILITY_SHIFT 16
-#define NTSTAT_FACILITY_MASK 0x00000FFF
-#define NTSTAT_CUSTOMER_MASK 0x20000000
-
-#define NT_SEVERITY(StatCode) (((StatCode) >> NTSTAT_SEVERITY_SHIFT) & NTSTAT_SEVERITY_MASK)
-#define NT_FACILITY(StatCode) (((StatCode) >> NTSTAT_FACILITY_SHIFT) & NTSTAT_FACILITY_MASK)
-#define NT_CUSTOMER(StatCode) ((StatCode) & NTSTAT_CUSTOMER_MASK)
-
-#endif /* __INCLUDE_TYPES_H */
+++ /dev/null
-/* $Id$
- *
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * PURPOSE: System call definitions
- * FILE: include/ddk/zw.h
- * REVISION HISTORY:
- * ??/??/??: First few functions (David Welch)
- * ??/??/??: Complete implementation by Ariadne
- * 13/07/98: Reorganised things a bit (David Welch)
- * 04/08/98: Added some documentation (Ariadne)
- * 14/08/98: Added type TIME and change variable type from [1] to [0]
- * 14/09/98: Added for each Nt call a corresponding Zw Call
- * 09/08/03: Added ThreadEventPair routines
- */
-
-#ifndef __DDK_ZW_H
-#define __DDK_ZW_H
-
-#include <ntos/security.h>
-#include <ntos/zwtypes.h>
-#include <napi/npipe.h>
-
-#ifndef _RTLGETPROCESSHEAP_DEFINED_
-#define _RTLGETPROCESSHEAP_DEFINED_
-#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
-#endif
-
-// semaphore information
-
-typedef enum _SEMAPHORE_INFORMATION_CLASS
-{
- SemaphoreBasicInformation = 0
-} SEMAPHORE_INFORMATION_CLASS;
-
-typedef struct _SEMAPHORE_BASIC_INFORMATION
-{
- LONG CurrentCount;
- LONG MaximumCount;
-} SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
-
-// event information
-
-typedef enum _EVENT_INFORMATION_CLASS
-{
- EventBasicInformation = 0
-} EVENT_INFORMATION_CLASS;
-
-typedef struct _EVENT_BASIC_INFORMATION
-{
- EVENT_TYPE EventType;
- LONG EventState;
-} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
-
-// wmi trace event data
-typedef struct _FILE_USER_QUOTA_INFORMATION {
- ULONG NextEntryOffset;
- ULONG SidLength;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER QuotaUsed;
- LARGE_INTEGER QuotaThreshold;
- LARGE_INTEGER QuotaLimit;
- SID Sid[1];
-} FILE_USER_QUOTA_INFORMATION, *PFILE_USER_QUOTA_INFORMATION;
-
-
-//#define LCID ULONG
-//#define SECURITY_INFORMATION ULONG
-//typedef ULONG SECURITY_INFORMATION;
-
-#ifndef __USE_NT_LPC__
-NTSTATUS STDCALL
-NtAcceptConnectPort (OUT PHANDLE PortHandle,
- IN PVOID Context,
- IN PLPC_MESSAGE ServerReply,
- IN BOOLEAN AcceptIt,
- IN PLPC_SECTION_WRITE WriteMap,
- IN PLPC_SECTION_READ ReadMap);
-#else
-NTSTATUS STDCALL
-NtAcceptConnectPort (PHANDLE PortHandle,
- ULONG PortIdentifier,
- PLPC_MESSAGE ServerReply,
- BOOLEAN AcceptIt,
- PLPC_SECTION_WRITE WriteMap,
- PLPC_SECTION_READ ReadMap);
-#endif /* ndef __USE_NT_LPC__ */
-
-NTSTATUS
-STDCALL
-NtAddBootEntry(
- IN PUNICODE_STRING EntryName,
- IN PUNICODE_STRING EntryValue
- );
-
-NTSTATUS
-STDCALL
-ZwAddBootEntry(
- IN PUNICODE_STRING EntryName,
- IN PUNICODE_STRING EntryValue
- );
-
-/*
- * FUNCTION: Adjusts the groups in an access token
- * ARGUMENTS:
- * TokenHandle = Specifies the access token
- * ResetToDefault = If true the NewState parameter is ignored and the groups are set to
- * their default state, if false the groups specified in
- * NewState are set.
- * NewState =
- * BufferLength = Specifies the size of the buffer for the PreviousState.
- * PreviousState =
- * ReturnLength = Bytes written in PreviousState buffer.
- * REMARKS: The arguments map to the win32 AdjustTokenGroups
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtAdjustGroupsToken(
- IN HANDLE TokenHandle,
- IN BOOLEAN ResetToDefault,
- IN PTOKEN_GROUPS NewState,
- IN ULONG BufferLength,
- OUT PTOKEN_GROUPS PreviousState OPTIONAL,
- OUT PULONG ReturnLength
- );
-
-NTSTATUS
-STDCALL
-ZwAdjustGroupsToken(
- IN HANDLE TokenHandle,
- IN BOOLEAN ResetToDefault,
- IN PTOKEN_GROUPS NewState,
- IN ULONG BufferLength,
- OUT PTOKEN_GROUPS PreviousState,
- OUT PULONG ReturnLength
- );
-
-
-/*
- * FUNCTION:
- *
- * ARGUMENTS:
- * TokenHandle = Handle to the access token
- * DisableAllPrivileges = The resulting suspend count.
- NewState =
- BufferLength =
- PreviousState =
- ReturnLength =
- * REMARK:
- * The arguments map to the win32 AdjustTokenPrivileges
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtAdjustPrivilegesToken(
- IN HANDLE TokenHandle,
- IN BOOLEAN DisableAllPrivileges,
- IN PTOKEN_PRIVILEGES NewState,
- IN ULONG BufferLength,
- OUT PTOKEN_PRIVILEGES PreviousState,
- OUT PULONG ReturnLength
- );
-
-NTSTATUS
-STDCALL
-ZwAdjustPrivilegesToken(
- IN HANDLE TokenHandle,
- IN BOOLEAN DisableAllPrivileges,
- IN PTOKEN_PRIVILEGES NewState,
- IN ULONG BufferLength,
- OUT PTOKEN_PRIVILEGES PreviousState,
- OUT PULONG ReturnLength
- );
-
-
-/*
- * FUNCTION: Decrements a thread's suspend count and places it in an alerted
- * state.
- * ARGUMENTS:
- * ThreadHandle = Handle to the thread that should be resumed
- * SuspendCount = The resulting suspend count.
- * REMARK:
- * A thread is resumed if its suspend count is 0
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtAlertResumeThread(
- IN HANDLE ThreadHandle,
- OUT PULONG SuspendCount
- );
-
-NTSTATUS
-STDCALL
-ZwAlertResumeThread(
- IN HANDLE ThreadHandle,
- OUT PULONG SuspendCount
- );
-
-/*
- * FUNCTION: Puts the thread in a alerted state
- * ARGUMENTS:
- * ThreadHandle = Handle to the thread that should be alerted
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtAlertThread(
- IN HANDLE ThreadHandle
- );
-
-NTSTATUS
-STDCALL
-ZwAlertThread(
- IN HANDLE ThreadHandle
- );
-
-
-/*
- * FUNCTION: Allocates a locally unique id
- * ARGUMENTS:
- * LocallyUniqueId = Locally unique number
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtAllocateLocallyUniqueId(
- OUT LUID *LocallyUniqueId
- );
-
-NTSTATUS
-STDCALL
-ZwAllocateLocallyUniqueId(
- OUT PLUID Luid
- );
-
-/*
- * FUNCTION: Allocates a block of virtual memory in the process address space
- * ARGUMENTS:
- * ProcessHandle = The handle of the process which owns the virtual memory
- * BaseAddress = A pointer to the virtual memory allocated. If you supply a non zero
- * value the system will try to allocate the memory at the address supplied. It rounds
- * it down to a multiple if the page size.
- * ZeroBits = (OPTIONAL) You can specify the number of high order bits that must be zero, ensuring that
- * the memory will be allocated at a address below a certain value.
- * RegionSize = The number of bytes to allocate
- * AllocationType = Indicates the type of virtual memory you like to allocated,
- * can be one of the values : MEM_COMMIT, MEM_RESERVE, MEM_RESET, MEM_TOP_DOWN
- * Protect = Indicates the protection type of the pages allocated, can be a combination of
- * PAGE_READONLY, PAGE_READWRITE, PAGE_EXECUTE_READ,
- * PAGE_EXECUTE_READWRITE, PAGE_GUARD, PAGE_NOACCESS, PAGE_NOACCESS
- * REMARKS:
- * This function maps to the win32 VirtualAllocEx. Virtual memory is process based so the
- * protocol starts with a ProcessHandle. I splitted the functionality of obtaining the actual address and specifying
- * the start address in two parameters ( BaseAddress and StartAddress ) The NumberOfBytesAllocated specify the range
- * and the AllocationType and ProctectionType map to the other two parameters.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtAllocateVirtualMemory (
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN OUT PULONG RegionSize,
- IN ULONG AllocationType,
- IN ULONG Protect
- );
-
-NTSTATUS
-STDCALL
-ZwAllocateVirtualMemory (
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN OUT PULONG RegionSize,
- IN ULONG AllocationType,
- IN ULONG Protect);
-
-
-
-NTSTATUS
-STDCALL
-NtAssignProcessToJobObject(
- HANDLE JobHandle,
- HANDLE ProcessHandle);
-
-NTSTATUS
-STDCALL
-ZwAssignProcessToJobObject(
- HANDLE JobHandle,
- HANDLE ProcessHandle);
-
-/*
- * FUNCTION: Returns from a callback into user mode
- * ARGUMENTS:
- * RETURN Status
- */
-//FIXME: this function might need 3 parameters
-NTSTATUS STDCALL NtCallbackReturn(PVOID Result,
- ULONG ResultLength,
- NTSTATUS Status);
-
-NTSTATUS STDCALL ZwCallbackReturn(PVOID Result,
- ULONG ResultLength,
- NTSTATUS Status);
-
-/*
- * FUNCTION: Cancels a IO request
- * ARGUMENTS:
- * FileHandle = Handle to the file
- * IoStatusBlock =
- *
- * REMARKS:
- * This function maps to the win32 CancelIo.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCancelIoFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock
- );
-
-NTSTATUS
-STDCALL
-ZwCancelIoFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock
- );
-
-/*
- * FUNCTION: Sets the status of the event back to non-signaled
- * ARGUMENTS:
- * EventHandle = Handle to the event
- * REMARKS:
- * This function maps to win32 function ResetEvent.
- * RETURcNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtClearEvent(
- IN HANDLE EventHandle
- );
-
-NTSTATUS
-STDCALL
-ZwClearEvent(
- IN HANDLE EventHandle
- );
-
-NTSTATUS
-STDCALL
-NtCreateJobObject(
- PHANDLE JobHandle,
- ACCESS_MASK DesiredAccess,
- POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-NTSTATUS
-STDCALL
-ZwCreateJobObject(
- PHANDLE JobHandle,
- ACCESS_MASK DesiredAccess,
- POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-
-/*
- * FUNCTION: Closes an object handle
- * ARGUMENTS:
- * Handle = Handle to the object
- * REMARKS:
- * This function maps to the win32 function CloseHandle.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtClose(
- IN HANDLE Handle
- );
-
-NTSTATUS
-STDCALL
-ZwClose(
- IN HANDLE Handle
- );
-
-/*
- * FUNCTION: Generates an audit message when a handle to an object is dereferenced
- * ARGUMENTS:
- * SubsystemName =
- HandleId = Handle to the object
- GenerateOnClose =
- * REMARKS:
- * This function maps to the win32 function ObjectCloseAuditAlarm.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCloseObjectAuditAlarm(
- IN PUNICODE_STRING SubsystemName,
- IN PVOID HandleId,
- IN BOOLEAN GenerateOnClose
- );
-
-NTSTATUS
-STDCALL
-ZwCloseObjectAuditAlarm(
- IN PUNICODE_STRING SubsystemName,
- IN PVOID HandleId,
- IN BOOLEAN GenerateOnClose
- );
-
-
-NTSTATUS STDCALL
-NtCompleteConnectPort (HANDLE PortHandle);
-
-NTSTATUS STDCALL
-ZwCompleteConnectPort (HANDLE PortHandle);
-
-
-NTSTATUS STDCALL
-NtConnectPort (PHANDLE PortHandle,
- PUNICODE_STRING PortName,
- PSECURITY_QUALITY_OF_SERVICE SecurityQos,
- PLPC_SECTION_WRITE SectionInfo,
- PLPC_SECTION_READ MapInfo,
- PULONG MaxMessageSize,
- PVOID ConnectInfo,
- PULONG ConnectInfoLength);
-
-NTSTATUS STDCALL
-ZwConnectPort (PHANDLE PortHandle,
- PUNICODE_STRING PortName,
- PSECURITY_QUALITY_OF_SERVICE SecurityQos,
- PLPC_SECTION_WRITE SectionInfo,
- PLPC_SECTION_READ MapInfo,
- PULONG MaxMessageSize,
- PVOID ConnectInfo,
- PULONG ConnectInfoLength);
-
-/*
- * FUNCTION: Creates a directory object
- * ARGUMENTS:
- * DirectoryHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies access to the directory
- * ObjectAttribute = Initialized attributes for the object
- * REMARKS: This function maps to the win32 CreateDirectory. A directory is like a file so it needs a
- * handle, a access mask and a OBJECT_ATTRIBUTES structure to map the path name and the SECURITY_ATTRIBUTES.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateDirectoryObject(
- OUT PHANDLE DirectoryHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-NTSTATUS
-STDCALL
-ZwCreateDirectoryObject(
- OUT PHANDLE DirectoryHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-/*
- * FUNCTION: Creates an event object
- * ARGUMENTS:
- * EventHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies access to the event
- * ObjectAttribute = Initialized attributes for the object
- * ManualReset = manual-reset or auto-reset if true you have to reset the state of the event manually
- * using NtResetEvent/NtClearEvent. if false the system will reset the event to a non-signalled state
- * automatically after the system has rescheduled a thread waiting on the event.
- * InitialState = specifies the initial state of the event to be signaled ( TRUE ) or non-signalled (FALSE).
- * REMARKS: This function maps to the win32 CreateEvent. Demanding a out variable of type HANDLE,
- * a access mask and a OBJECT_ATTRIBUTES structure mapping to the SECURITY_ATTRIBUTES. ManualReset and InitialState are
- * both parameters aswell ( possibly the order is reversed ).
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateEvent(
- OUT PHANDLE EventHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN EVENT_TYPE EventType,
- IN BOOLEAN InitialState
- );
-
-NTSTATUS
-STDCALL
-ZwCreateEvent(
- OUT PHANDLE EventHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN EVENT_TYPE EventType,
- IN BOOLEAN InitialState
- );
-
-/*
- * FUNCTION: Creates an eventpair object
- * ARGUMENTS:
- * EventPairHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies access to the event
- * ObjectAttribute = Initialized attributes for the object
- */
-
-NTSTATUS
-STDCALL
-NtCreateEventPair(
- OUT PHANDLE EventPairHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-NTSTATUS
-STDCALL
-ZwCreateEventPair(
- OUT PHANDLE EventPairHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-
-/*
- * FUNCTION: Creates or opens a file, directory or device object.
- * ARGUMENTS:
- * FileHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the file can
- * be a combination of DELETE | FILE_READ_DATA ..
- * ObjectAttribute = Initialized attributes for the object, contains the rootdirectory and the filename
- * IoStatusBlock (OUT) = Caller supplied storage for the resulting status information, indicating if the
- * the file is created and opened or allready existed and is just opened.
- * FileAttributes = file attributes can be a combination of FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN ...
- * ShareAccess = can be a combination of the following: FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE
- * CreateDisposition = specifies what the behavior of the system if the file allready exists.
- * CreateOptions = specifies the behavior of the system on file creation.
- * EaBuffer (OPTIONAL) = Extended Attributes buffer, applies only to files and directories.
- * EaLength = Extended Attributes buffer size, applies only to files and directories.
- * REMARKS: This function maps to the win32 CreateFile.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateFile(
- OUT PHANDLE FileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PLARGE_INTEGER AllocationSize OPTIONAL,
- IN ULONG FileAttributes,
- IN ULONG ShareAccess,
- IN ULONG CreateDisposition,
- IN ULONG CreateOptions,
- IN PVOID EaBuffer OPTIONAL,
- IN ULONG EaLength
- );
-
-NTSTATUS
-STDCALL
-ZwCreateFile(
- OUT PHANDLE FileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PLARGE_INTEGER AllocationSize OPTIONAL,
- IN ULONG FileAttributes,
- IN ULONG ShareAccess,
- IN ULONG CreateDisposition,
- IN ULONG CreateOptions,
- IN PVOID EaBuffer OPTIONAL,
- IN ULONG EaLength
- );
-
-/*
- * FUNCTION: Creates or opens a file, directory or device object.
- * ARGUMENTS:
- * CompletionPort (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the port
- * IoStatusBlock =
- * NumberOfConcurrentThreads =
- * REMARKS: This function maps to the win32 CreateIoCompletionPort
- * RETURNS:
- * Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateIoCompletion(
- OUT PHANDLE IoCompletionHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN ULONG NumberOfConcurrentThreads
- );
-
-NTSTATUS
-STDCALL
-ZwCreateIoCompletion(
- OUT PHANDLE IoCompletionHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN ULONG NumberOfConcurrentThreads
- );
-
-/*
- * FUNCTION: Creates a registry key
- * ARGUMENTS:
- * KeyHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the key
- * It can have a combination of the following values:
- * KEY_READ | KEY_WRITE | KEY_EXECUTE | KEY_ALL_ACCESS
- * or
- * KEY_QUERY_VALUE The values of the key can be queried.
- * KEY_SET_VALUE The values of the key can be modified.
- * KEY_CREATE_SUB_KEYS The key may contain subkeys.
- * KEY_ENUMERATE_SUB_KEYS Subkeys can be queried.
- * KEY_NOTIFY
- * KEY_CREATE_LINK A symbolic link to the key can be created.
- * ObjectAttributes = The name of the key may be specified directly in the name field
- * of object attributes or relative to a key in rootdirectory.
- * TitleIndex = Might specify the position in the sequential order of subkeys.
- * Class = Specifies the kind of data, for example REG_SZ for string data. [ ??? ]
- * CreateOptions = Specifies additional options with which the key is created
- * REG_OPTION_VOLATILE The key is not preserved across boots.
- * REG_OPTION_NON_VOLATILE The key is preserved accross boots.
- * REG_OPTION_CREATE_LINK The key is a symbolic link to another key.
- * REG_OPTION_BACKUP_RESTORE Key is being opened or created for backup/restore operations.
- * Disposition = Indicates if the call to NtCreateKey resulted in the creation of a key it
- * can have the following values: REG_CREATED_NEW_KEY | REG_OPENED_EXISTING_KEY
- * RETURNS:
- * Status
- */
-
-NTSTATUS STDCALL
-NtCreateKey(OUT PHANDLE KeyHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN ULONG TitleIndex,
- IN PUNICODE_STRING Class OPTIONAL,
- IN ULONG CreateOptions,
- IN PULONG Disposition OPTIONAL);
-
-NTSTATUS STDCALL
-ZwCreateKey(OUT PHANDLE KeyHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN ULONG TitleIndex,
- IN PUNICODE_STRING Class OPTIONAL,
- IN ULONG CreateOptions,
- IN PULONG Disposition OPTIONAL);
-
-/*
- * FUNCTION: Creates a mail slot file
- * ARGUMENTS:
- * MailSlotFileHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the file
- * ObjectAttributes = Contains the name of the mailslotfile.
- * IoStatusBlock =
- * FileAttributes =
- * ShareAccess =
- * MaxMessageSize =
- * TimeOut =
- *
- * REMARKS: This funciton maps to the win32 function CreateMailSlot
- * RETURNS:
- * Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateMailslotFile(
- OUT PHANDLE MailSlotFileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG FileAttributes,
- IN ULONG ShareAccess,
- IN ULONG MaxMessageSize,
- IN PLARGE_INTEGER TimeOut
- );
-
-NTSTATUS
-STDCALL
-ZwCreateMailslotFile(
- OUT PHANDLE MailSlotFileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG FileAttributes,
- IN ULONG ShareAccess,
- IN ULONG MaxMessageSize,
- IN PLARGE_INTEGER TimeOut
- );
-
-/*
- * FUNCTION: Creates or opens a mutex
- * ARGUMENTS:
- * MutantHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the port
- * ObjectAttributes = Contains the name of the mutex.
- * InitialOwner = If true the calling thread acquires ownership
- * of the mutex.
- * REMARKS: This funciton maps to the win32 function CreateMutex
- * RETURNS:
- * Status
- */
-NTSTATUS
-STDCALL
-NtCreateMutant(
- OUT PHANDLE MutantHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN BOOLEAN InitialOwner
- );
-
-NTSTATUS
-STDCALL
-ZwCreateMutant(
- OUT PHANDLE MutantHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN BOOLEAN InitialOwner
- );
-
-/*
- * FUNCTION: Creates a named pipe
- * ARGUMENTS:
- * NamedPipeFileHandle (OUT) = Caller supplied storage for the
- * resulting handle
- * DesiredAccess = Specifies the type of access that the caller
- * requires to the file boject
- * ObjectAttributes = Points to a structure that specifies the
- * object attributes.
- * IoStatusBlock = Points to a variable that receives the final
- * completion status and information
- * ShareAccess = Specifies the limitations on sharing of the file.
- * This parameter can be zero or any compatible
- * combination of the following flags
- * FILE_SHARE_READ
- * FILE_SHARE_WRITE
- * CreateDisposition = Specifies what to do depending on whether
- * the file already exists. This must be one of
- * the following values
- * FILE_OPEN
- * FILE_CREATE
- * FILE_OPEN_IF
- * CreateOptions = Specifies the options to be applied when
- * creating or opening the file, as a compatible
- * combination of the following flags
- * FILE_WRITE_THROUGH
- * FILE_SYNCHRONOUS_IO_ALERT
- * FILE_SYNCHRONOUS_IO_NONALERT
- * TypeMessage = Specifies whether the data written to the pipe is
- * interpreted as a sequence of messages or as a
- * stream of bytes
- * ReadModeMessage = Specifies whether the data read from the pipe
- * is interpreted as a sequence of messages or as
- * a stream of bytes
- * NonBlocking = Specifies whether non-blocking mode is enabled
- * MaxInstances = Specifies the maximum number of instancs that can
- * be created for this pipe
- * InBufferSize = Specifies the number of bytes to reserve for the
- * input buffer
- * OutBufferSize = Specifies the number of bytes to reserve for the
- * output buffer
- * DefaultTimeout = Optionally points to a variable that specifies
- * the default timeout value in units of
- * 100-nanoseconds.
- * REMARKS: This funciton maps to the win32 function CreateNamedPipe
- * RETURNS:
- * Status
- */
-NTSTATUS STDCALL
-NtCreateNamedPipeFile (OUT PHANDLE NamedPipeFileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG ShareAccess,
- IN ULONG CreateDisposition,
- IN ULONG CreateOptions,
- IN ULONG NamedPipeType,
- IN ULONG ReadMode,
- IN ULONG CompletionMode,
- IN ULONG MaxInstances,
- IN ULONG InBufferSize,
- IN ULONG OutBufferSize,
- IN PLARGE_INTEGER DefaultTimeOut);
-
-NTSTATUS STDCALL
-ZwCreateNamedPipeFile (OUT PHANDLE NamedPipeFileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG ShareAccess,
- IN ULONG CreateDisposition,
- IN ULONG CreateOptions,
- IN ULONG NamedPipeType,
- IN ULONG ReadMode,
- IN ULONG CompletionMode,
- IN ULONG MaxInstances,
- IN ULONG InBufferSize,
- IN ULONG OutBufferSize,
- IN PLARGE_INTEGER DefaultTimeOut);
-
-
-NTSTATUS STDCALL
-NtCreatePort (PHANDLE PortHandle,
- POBJECT_ATTRIBUTES ObjectAttributes,
- ULONG MaxConnectInfoLength,
- ULONG MaxDataLength,
- ULONG NPMessageQueueSize OPTIONAL);
-
-NTSTATUS STDCALL
-NtCreatePort (PHANDLE PortHandle,
- POBJECT_ATTRIBUTES ObjectAttributes,
- ULONG MaxConnectInfoLength,
- ULONG MaxDataLength,
- ULONG NPMessageQueueSize OPTIONAL);
-
-
-/*
- * FUNCTION: Creates a process.
- * ARGUMENTS:
- * ProcessHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the process can
- * be a combinate of STANDARD_RIGHTS_REQUIRED| ..
- * ObjectAttribute = Initialized attributes for the object, contains the rootdirectory and the filename
- * ParentProcess = Handle to the parent process.
- * InheritObjectTable = Specifies to inherit the objects of the parent process if true.
- * SectionHandle = Handle to a section object to back the image file
- * DebugPort = Handle to a DebugPort if NULL the system default debug port will be used.
- * ExceptionPort = Handle to a exception port.
- * REMARKS:
- * This function maps to the win32 CreateProcess.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCreateProcess(
- OUT PHANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN HANDLE ParentProcess,
- IN BOOLEAN InheritObjectTable,
- IN HANDLE SectionHandle OPTIONAL,
- IN HANDLE DebugPort OPTIONAL,
- IN HANDLE ExceptionPort OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwCreateProcess(
- OUT PHANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN HANDLE ParentProcess,
- IN BOOLEAN InheritObjectTable,
- IN HANDLE SectionHandle OPTIONAL,
- IN HANDLE DebugPort OPTIONAL,
- IN HANDLE ExceptionPort OPTIONAL
- );
-
-/*
- * FUNCTION: Creates a section object.
- * ARGUMENTS:
- * SectionHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the desired access to the section can be a combination of STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_WRITE |
- * SECTION_MAP_READ | SECTION_MAP_EXECUTE.
- * ObjectAttribute = Initialized attributes for the object can be used to create a named section
- * MaxiumSize = Maximizes the size of the memory section. Must be non-NULL for a page-file backed section.
- * If value specified for a mapped file and the file is not large enough, file will be extended.
- * SectionPageProtection = Can be a combination of PAGE_READONLY | PAGE_READWRITE | PAGE_WRITEONLY | PAGE_WRITECOPY.
- * AllocationAttributes = can be a combination of SEC_IMAGE | SEC_RESERVE
- * FileHanlde = Handle to a file to create a section mapped to a file instead of a memory backed section.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateSection(
- OUT PHANDLE SectionHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN PLARGE_INTEGER MaximumSize OPTIONAL,
- IN ULONG SectionPageProtection OPTIONAL,
- IN ULONG AllocationAttributes,
- IN HANDLE FileHandle OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwCreateSection(
- OUT PHANDLE SectionHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN PLARGE_INTEGER MaximumSize OPTIONAL,
- IN ULONG SectionPageProtection OPTIONAL,
- IN ULONG AllocationAttributes,
- IN HANDLE FileHandle OPTIONAL
- );
-
-/*
- * FUNCTION: Creates a semaphore object for interprocess synchronization.
- * ARGUMENTS:
- * SemaphoreHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the semaphore.
- * ObjectAttribute = Initialized attributes for the object.
- * InitialCount = Not necessary zero, might be smaller than zero.
- * MaximumCount = Maxiumum count the semaphore can reach.
- * RETURNS: Status
- * REMARKS:
- * The semaphore is set to signaled when its count is greater than zero, and non-signaled when its count is zero.
- */
-
-//FIXME: should a semaphore's initial count allowed to be smaller than zero ??
-NTSTATUS
-STDCALL
-NtCreateSemaphore(
- OUT PHANDLE SemaphoreHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN LONG InitialCount,
- IN LONG MaximumCount
- );
-
-NTSTATUS
-STDCALL
-ZwCreateSemaphore(
- OUT PHANDLE SemaphoreHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN LONG InitialCount,
- IN LONG MaximumCount
- );
-
-/*
- * FUNCTION: Creates a symbolic link object
- * ARGUMENTS:
- * SymbolicLinkHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the thread.
- * ObjectAttributes = Initialized attributes for the object.
- * Name = Target name of the symbolic link
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCreateSymbolicLinkObject(
- OUT PHANDLE LinkHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PUNICODE_STRING LinkTarget
- );
-
-NTSTATUS
-STDCALL
-ZwCreateSymbolicLinkObject(
- OUT PHANDLE LinkHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PUNICODE_STRING LinkTarget
- );
-
-/*
- * FUNCTION: Creates a waitable timer.
- * ARGUMENTS:
- * TimerHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the timer.
- * ObjectAttributes = Initialized attributes for the object.
- * TimerType = Specifies if the timer should be reset manually.
- * REMARKS:
- * This function maps to the win32 CreateWaitableTimer. lpTimerAttributes and lpTimerName map to
- * corresponding fields in OBJECT_ATTRIBUTES structure.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCreateTimer(
- OUT PHANDLE TimerHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN TIMER_TYPE TimerType
- );
-
-NTSTATUS
-STDCALL
-ZwCreateTimer(
- OUT PHANDLE TimerHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN TIMER_TYPE TimerType
- );
-
-/*
- * FUNCTION: Creates a token.
- * ARGUMENTS:
- * TokenHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the process can
- * be a combinate of STANDARD_RIGHTS_REQUIRED| ..
- * ObjectAttribute = Initialized attributes for the object, contains the rootdirectory and the filename
- * TokenType =
- * AuthenticationId =
- * ExpirationTime =
- * TokenUser =
- * TokenGroups =
- * TokenPrivileges =
- * TokenOwner =
- * TokenPrimaryGroup =
- * TokenDefaultDacl =
- * TokenSource =
- * REMARKS:
- * This function does not map to a win32 function
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateToken(
- OUT PHANDLE TokenHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN TOKEN_TYPE TokenType,
- IN PLUID AuthenticationId,
- IN PLARGE_INTEGER ExpirationTime,
- IN PTOKEN_USER TokenUser,
- IN PTOKEN_GROUPS TokenGroups,
- IN PTOKEN_PRIVILEGES TokenPrivileges,
- IN PTOKEN_OWNER TokenOwner,
- IN PTOKEN_PRIMARY_GROUP TokenPrimaryGroup,
- IN PTOKEN_DEFAULT_DACL TokenDefaultDacl,
- IN PTOKEN_SOURCE TokenSource
- );
-
-NTSTATUS
-STDCALL
-ZwCreateToken(
- OUT PHANDLE TokenHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN TOKEN_TYPE TokenType,
- IN PLUID AuthenticationId,
- IN PLARGE_INTEGER ExpirationTime,
- IN PTOKEN_USER TokenUser,
- IN PTOKEN_GROUPS TokenGroups,
- IN PTOKEN_PRIVILEGES TokenPrivileges,
- IN PTOKEN_OWNER TokenOwner,
- IN PTOKEN_PRIMARY_GROUP TokenPrimaryGroup,
- IN PTOKEN_DEFAULT_DACL TokenDefaultDacl,
- IN PTOKEN_SOURCE TokenSource
- );
-
-/*
- * FUNCTION: Returns the callers thread TEB.
- * RETURNS: The resulting teb.
- */
-#if 0
- NT_TEB *
-STDCALL
-NtCurrentTeb(VOID
- );
-#endif
-
-
-NTSTATUS STDCALL
-NtCreateWaitablePort (PHANDLE PortHandle,
- POBJECT_ATTRIBUTES ObjectAttributes,
- ULONG MaxConnectInfoLength,
- ULONG MaxDataLength,
- ULONG NPMessageQueueSize OPTIONAL);
-
-NTSTATUS STDCALL
-ZwCreateWaitablePort (PHANDLE PortHandle,
- POBJECT_ATTRIBUTES ObjectAttributes,
- ULONG MaxConnectInfoLength,
- ULONG MaxDataLength,
- ULONG NPMessageQueueSize OPTIONAL);
-
-
-/*
- * FUNCTION: Deletes an atom from the global atom table
- * ARGUMENTS:
- * Atom = Identifies the atom to delete
- * REMARKS:
- * The function maps to the win32 GlobalDeleteAtom
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtDeleteAtom(
- IN RTL_ATOM Atom
- );
-
-NTSTATUS
-STDCALL
-ZwDeleteAtom(
- IN RTL_ATOM Atom
- );
-
-NTSTATUS
-STDCALL
-NtDeleteBootEntry(
- IN PUNICODE_STRING EntryName,
- IN PUNICODE_STRING EntryValue
- );
-
-NTSTATUS
-STDCALL
-ZwDeleteBootEntry(
- IN PUNICODE_STRING EntryName,
- IN PUNICODE_STRING EntryValue
- );
-
-/*
- * FUNCTION: Deletes a file or a directory
- * ARGUMENTS:
- * ObjectAttributes = Name of the file which should be deleted
- * REMARKS:
- * This system call is functionally equivalent to NtSetInformationFile
- * setting the disposition information.
- * The function maps to the win32 DeleteFile.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtDeleteFile(
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-NTSTATUS
-STDCALL
-ZwDeleteFile(
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-/*
- * FUNCTION: Deletes a registry key
- * ARGUMENTS:
- * KeyHandle = Handle of the key
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtDeleteKey(
- IN HANDLE KeyHandle
- );
-NTSTATUS
-STDCALL
-ZwDeleteKey(
- IN HANDLE KeyHandle
- );
-
-/*
- * FUNCTION: Generates a audit message when an object is deleted
- * ARGUMENTS:
- * SubsystemName = Spefies the name of the subsystem can be 'WIN32' or 'DEBUG'
- * HandleId= Handle to an audit object
- * GenerateOnClose = Value returned by NtAccessCheckAndAuditAlarm
- * REMARKS: This function maps to the win32 ObjectCloseAuditAlarm
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtDeleteObjectAuditAlarm (
- IN PUNICODE_STRING SubsystemName,
- IN PVOID HandleId,
- IN BOOLEAN GenerateOnClose
- );
-
-NTSTATUS
-STDCALL
-ZwDeleteObjectAuditAlarm (
- IN PUNICODE_STRING SubsystemName,
- IN PVOID HandleId,
- IN BOOLEAN GenerateOnClose
- );
-
-
-/*
- * FUNCTION: Deletes a value from a registry key
- * ARGUMENTS:
- * KeyHandle = Handle of the key
- * ValueName = Name of the value to delete
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtDeleteValueKey(
- IN HANDLE KeyHandle,
- IN PUNICODE_STRING ValueName
- );
-
-NTSTATUS
-STDCALL
-ZwDeleteValueKey(
- IN HANDLE KeyHandle,
- IN PUNICODE_STRING ValueName
- );
-/*
- * FUNCTION: Sends IOCTL to the io sub system
- * ARGUMENTS:
- * DeviceHandle = Points to the handle that is created by NtCreateFile
- * Event = Event to synchronize on STATUS_PENDING
- * ApcRoutine = Asynchroneous procedure callback
- * ApcContext = Callback context.
- * IoStatusBlock = Caller should supply storage for extra information..
- * IoControlCode = Contains the IO Control command. This is an
- * index to the structures in InputBuffer and OutputBuffer.
- * InputBuffer = Caller should supply storage for input buffer if IOTL expects one.
- * InputBufferSize = Size of the input bufffer
- * OutputBuffer = Caller should supply storage for output buffer if IOTL expects one.
- * OutputBufferSize = Size of the input bufffer
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-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
- );
-
-NTSTATUS
-STDCALL
-ZwDeviceIoControlFile(
- 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
- );
-/*
- * FUNCTION: Displays a string on the blue screen
- * ARGUMENTS:
- * DisplayString = The string to display
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtDisplayString(
- IN PUNICODE_STRING DisplayString
- );
-
-NTSTATUS
-STDCALL
-ZwDisplayString(
- IN PUNICODE_STRING DisplayString
- );
-
-
-NTSTATUS
-STDCALL
-NtEnumerateBootEntries(
- IN ULONG Unknown1,
- IN ULONG Unknown2
- );
-
-NTSTATUS
-STDCALL
-ZwEnumerateBootEntries(
- IN ULONG Unknown1,
- IN ULONG Unknown2
- );
-
-
-/*
- * FUNCTION: Returns information about the subkeys of an open key
- * ARGUMENTS:
- * KeyHandle = Handle of the key whose subkeys are to enumerated
- * Index = zero based index of the subkey for which information is
- * request
- * KeyInformationClass = Type of information returned
- * KeyInformation (OUT) = Caller allocated buffer for the information
- * about the key
- * Length = Length in bytes of the KeyInformation buffer
- * ResultLength (OUT) = Caller allocated storage which holds
- * the number of bytes of information retrieved
- * on return
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtEnumerateKey(
- IN HANDLE KeyHandle,
- IN ULONG Index,
- IN KEY_INFORMATION_CLASS KeyInformationClass,
- OUT PVOID KeyInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-NTSTATUS
-STDCALL
-ZwEnumerateKey(
- IN HANDLE KeyHandle,
- IN ULONG Index,
- IN KEY_INFORMATION_CLASS KeyInformationClass,
- OUT PVOID KeyInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-/*
- * FUNCTION: Returns information about the value entries of an open key
- * ARGUMENTS:
- * KeyHandle = Handle of the key whose value entries are to enumerated
- * Index = zero based index of the subkey for which information is
- * request
- * KeyInformationClass = Type of information returned
- * KeyInformation (OUT) = Caller allocated buffer for the information
- * about the key
- * Length = Length in bytes of the KeyInformation buffer
- * ResultLength (OUT) = Caller allocated storage which holds
- * the number of bytes of information retrieved
- * on return
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtEnumerateValueKey(
- IN HANDLE KeyHandle,
- IN ULONG Index,
- IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
- OUT PVOID KeyValueInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-NTSTATUS
-STDCALL
-ZwEnumerateValueKey(
- IN HANDLE KeyHandle,
- IN ULONG Index,
- IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
- OUT PVOID KeyValueInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-/*
- * FUNCTION: Flushes chached file data to disk
- * ARGUMENTS:
- * FileHandle = Points to the file
- * IoStatusBlock = Caller must supply storage to receive the result of the flush
- * buffers operation. The information field is set to number of bytes
- * flushed to disk.
- * RETURNS: Status
- * REMARKS:
- * This funciton maps to the win32 FlushFileBuffers
- */
-NTSTATUS
-STDCALL
-NtFlushBuffersFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock
- );
-
-NTSTATUS
-STDCALL
-ZwFlushBuffersFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock
- );
-
-/*
- * FUNCTION: Flushes a registry key to disk
- * ARGUMENTS:
- * KeyHandle = Points to the registry key handle
- * RETURNS: Status
- * REMARKS:
- * This funciton maps to the win32 RegFlushKey.
- */
-NTSTATUS
-STDCALL
-NtFlushKey(
- IN HANDLE KeyHandle
- );
-
-NTSTATUS
-STDCALL
-ZwFlushKey(
- IN HANDLE KeyHandle
- );
-
-/*
- * FUNCTION: Flushes the dirty pages to file
- * RETURNS: Status
- * FIXME: Not sure this does (how is the file specified)
- */
-NTSTATUS STDCALL NtFlushWriteBuffer(VOID);
-NTSTATUS STDCALL ZwFlushWriteBuffer(VOID);
-
- /*
- * FUNCTION: Frees a range of virtual memory
- * ARGUMENTS:
- * ProcessHandle = Points to the process that allocated the virtual
- * memory
- * BaseAddress = Points to the memory address, rounded down to a
- * multiple of the pagesize
- * RegionSize = Limits the range to free, rounded up to a multiple of
- * the paging size
- * FreeType = Can be one of the values: MEM_DECOMMIT, or MEM_RELEASE
- * RETURNS: Status
- */
-NTSTATUS STDCALL NtFreeVirtualMemory(IN HANDLE ProcessHandle,
- IN PVOID *BaseAddress,
- IN PULONG RegionSize,
- IN ULONG FreeType);
-NTSTATUS STDCALL ZwFreeVirtualMemory(IN HANDLE ProcessHandle,
- IN PVOID *BaseAddress,
- IN PULONG RegionSize,
- IN ULONG FreeType);
-
-/*
- * FUNCTION: Sends FSCTL to the filesystem
- * ARGUMENTS:
- * DeviceHandle = Points to the handle that is created by NtCreateFile
- * Event = Event to synchronize on STATUS_PENDING
- * ApcRoutine =
- * ApcContext =
- * IoStatusBlock = Caller should supply storage for
- * IoControlCode = Contains the File System Control command. This is an
- * index to the structures in InputBuffer and OutputBuffer.
- * FSCTL_GET_RETRIEVAL_POINTERS [Input/Output] RETRIEVAL_POINTERS_BUFFER
- * FSCTL_GET_VOLUME_BITMAP [Input] STARTING_LCN_INPUT_BUFFER
- * FSCTL_GET_VOLUME_BITMAP [Output] VOLUME_BITMAP_BUFFER
- * FSCTL_MOVE_FILE [Input] MOVE_FILE_DATA
- *
- * InputBuffer = Caller should supply storage for input buffer if FSCTL expects one.
- * InputBufferSize = Size of the input bufffer
- * OutputBuffer = Caller should supply storage for output buffer if FSCTL expects one.
- * OutputBufferSize = Size of the input bufffer
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_PENDING | STATUS_ACCESS_DENIED | STATUS_INSUFFICIENT_RESOURCES |
- * STATUS_INVALID_PARAMETER | STATUS_INVALID_DEVICE_REQUEST ]
- */
-NTSTATUS
-STDCALL
-NtFsControlFile(
- IN HANDLE DeviceHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG IoControlCode,
- IN PVOID InputBuffer,
- IN ULONG InputBufferSize,
- OUT PVOID OutputBuffer,
- IN ULONG OutputBufferSize
- );
-
-NTSTATUS
-STDCALL
-ZwFsControlFile(
- IN HANDLE DeviceHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG IoControlCode,
- IN PVOID InputBuffer,
- IN ULONG InputBufferSize,
- OUT PVOID OutputBuffer,
- IN ULONG OutputBufferSize
- );
-
-/*
- * FUNCTION: Retrieves the processor context of a thread
- * ARGUMENTS:
- * ThreadHandle = Handle to a thread
- * ThreadContext (OUT) = Caller allocated storage for the processor context
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtGetContextThread(
- IN HANDLE ThreadHandle,
- OUT PCONTEXT ThreadContext
- );
-
-NTSTATUS
-STDCALL
-ZwGetContextThread(
- IN HANDLE ThreadHandle,
- OUT PCONTEXT ThreadContext
- );
-
-
-NTSTATUS STDCALL
-NtImpersonateClientOfPort (HANDLE PortHandle,
- PLPC_MESSAGE ClientMessage);
-
-NTSTATUS STDCALL
-ZwImpersonateClientOfPort (HANDLE PortHandle,
- PLPC_MESSAGE ClientMessage);
-
-/*
- * FUNCTION: Sets a thread to impersonate another
- * ARGUMENTS:
- * ThreadHandle = Server thread that will impersonate a client.
- ThreadToImpersonate = Client thread that will be impersonated
- SecurityQualityOfService = Specifies the impersonation level.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtImpersonateThread(
- IN HANDLE ThreadHandle,
- IN HANDLE ThreadToImpersonate,
- IN PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
- );
-
-NTSTATUS
-STDCALL
-ZwImpersonateThread(
- IN HANDLE ThreadHandle,
- IN HANDLE ThreadToImpersonate,
- IN PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService
- );
-
-NTSTATUS
-STDCALL
-NtInitiatePowerAction (
- IN POWER_ACTION SystemAction,
- IN SYSTEM_POWER_STATE MinSystemState,
- IN ULONG Flags,
- IN BOOLEAN Asynchronous
-);
-
-NTSTATUS
-STDCALL
-ZwInitiatePowerAction (
- IN POWER_ACTION SystemAction,
- IN SYSTEM_POWER_STATE MinSystemState,
- IN ULONG Flags,
- IN BOOLEAN Asynchronous
-);
-/*
- * FUNCTION: Initializes the registry.
- * ARGUMENTS:
- * SetUpBoot = This parameter is true for a setup boot.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtInitializeRegistry(
- BOOLEAN SetUpBoot
- );
-NTSTATUS
-STDCALL
-ZwInitializeRegistry(
- BOOLEAN SetUpBoot
- );
-
-NTSTATUS
-STDCALL
-NtIsProcessInJob(
- IN HANDLE ProcessHandle, // ProcessHandle must grant PROCESS_QUERY_INFORMATION access.
- IN HANDLE JobHandle OPTIONAL // JobHandle must JOB_OBJECT_QUERY grant access. Defaults to the current process's job object.
- );
-
-NTSTATUS
-STDCALL
-ZwIsProcessInJob(
- IN HANDLE ProcessHandle, // ProcessHandle must grant PROCESS_QUERY_INFORMATION access.
- IN HANDLE JobHandle OPTIONAL // JobHandle must JOB_OBJECT_QUERY grant access. Defaults to the current process's job object.
- );
-
-NTSTATUS STDCALL
-NtListenPort (HANDLE PortHandle,
- PLPC_MESSAGE LpcMessage);
-
-NTSTATUS STDCALL
-ZwListenPort (HANDLE PortHandle,
- PLPC_MESSAGE LpcMessage);
-
-
-/*
- * FUNCTION: Loads a driver.
- * ARGUMENTS:
- * DriverServiceName = Name of the driver to load
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtLoadDriver(
- IN PUNICODE_STRING DriverServiceName
- );
-
-NTSTATUS
-STDCALL
-ZwLoadDriver(
- IN PUNICODE_STRING DriverServiceName
- );
-
-/*
- * FUNCTION: Locks a range of bytes in a file.
- * ARGUMENTS:
- * FileHandle = Handle to the file
- * Event = Should be null if apc is specified.
- * ApcRoutine = Asynchroneous Procedure Callback
- * ApcContext = Argument to the callback
- * IoStatusBlock (OUT) = Caller should supply storage for a structure containing
- * the completion status and information about the requested lock operation.
- * ByteOffset = Offset
- * Length = Number of bytes to lock.
- * Key = Special value to give other threads the possibility to unlock the file
- by supplying the key in a call to NtUnlockFile.
- * FailImmediatedly = If false the request will block untill the lock is obtained.
- * ExclusiveLock = Specifies whether a exclusive or a shared lock is obtained.
- * REMARK:
- This procedure maps to the win32 procedure LockFileEx. STATUS_PENDING is returned if the lock could
- not be obtained immediately, the device queue is busy and the IRP is queued.
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_PENDING | STATUS_ACCESS_DENIED | STATUS_INSUFFICIENT_RESOURCES |
- STATUS_INVALID_PARAMETER | STATUS_INVALID_DEVICE_REQUEST | STATUS_LOCK_NOT_GRANTED ]
-
- */
-NTSTATUS
-STDCALL
-NtLockFile(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PLARGE_INTEGER ByteOffset,
- IN PLARGE_INTEGER Length,
- IN PULONG Key,
- IN BOOLEAN FailImmediatedly,
- IN BOOLEAN ExclusiveLock
- );
-
-NTSTATUS
-STDCALL
-ZwLockFile(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PLARGE_INTEGER ByteOffset,
- IN PLARGE_INTEGER Length,
- IN PULONG Key,
- IN BOOLEAN FailImmediatedly,
- IN BOOLEAN ExclusiveLock
- );
-
-/*
- * FUNCTION: Makes temporary object that will be removed at next boot.
- * ARGUMENTS:
- * Handle = Handle to object
- * RETURNS: Status
- */
-
-
-NTSTATUS
-STDCALL
-NtMakePermanentObject(
- IN HANDLE ObjectHandle
- );
-
-NTSTATUS
-STDCALL
-ZwMakePermanentObject(
- IN HANDLE ObjectHandle
- );
-
-NTSTATUS
-STDCALL
-NtMakeTemporaryObject(
- IN HANDLE ObjectHandle
- );
-
-NTSTATUS
-STDCALL
-ZwMakeTemporaryObject(
- IN HANDLE ObjectHandle
- );
-/*
- * FUNCTION: Maps a view of a section into the virtual address space of a
- * process
- * ARGUMENTS:
- * SectionHandle = Handle of the section
- * ProcessHandle = Handle of the process
- * BaseAddress = Desired base address (or NULL) on entry
- * Actual base address of the view on exit
- * ZeroBits = Number of high order address bits that must be zero
- * CommitSize = Size in bytes of the initially committed section of
- * the view
- * SectionOffset = Offset in bytes from the beginning of the section
- * to the beginning of the view
- * ViewSize = Desired length of map (or zero to map all) on entry
- * Actual length mapped on exit
- * InheritDisposition = Specified how the view is to be shared with
- * child processes
- * AllocateType = Type of allocation for the pages
- * Protect = Protection for the committed region of the view
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtMapViewOfSection(
- IN HANDLE SectionHandle,
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN ULONG CommitSize,
- IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
- IN OUT PULONG ViewSize,
- IN SECTION_INHERIT InheritDisposition,
- IN ULONG AllocationType,
- IN ULONG AccessProtection
- );
-
-NTSTATUS
-STDCALL
-ZwMapViewOfSection(
- IN HANDLE SectionHandle,
- IN HANDLE ProcessHandle,
- IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN ULONG CommitSize,
- IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
- IN OUT PULONG ViewSize,
- IN SECTION_INHERIT InheritDisposition,
- IN ULONG AllocationType,
- IN ULONG AccessProtection
- );
-
-/*
- * FUNCTION: Installs a notify for the change of a directory's contents
- * ARGUMENTS:
- * FileHandle = Handle to the directory
- Event =
- * ApcRoutine = Start address
- * ApcContext = Delimits the range of virtual memory
- * for which the new access protection holds
- * IoStatusBlock = The new access proctection for the pages
- * Buffer = Caller supplies storage for resulting information --> FILE_NOTIFY_INFORMATION
- * BufferSize = Size of the buffer
- CompletionFilter = Can be one of the following values:
- FILE_NOTIFY_CHANGE_FILE_NAME
- FILE_NOTIFY_CHANGE_DIR_NAME
- FILE_NOTIFY_CHANGE_NAME ( FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME )
- FILE_NOTIFY_CHANGE_ATTRIBUTES
- FILE_NOTIFY_CHANGE_SIZE
- FILE_NOTIFY_CHANGE_LAST_WRITE
- FILE_NOTIFY_CHANGE_LAST_ACCESS
- FILE_NOTIFY_CHANGE_CREATION ( change of creation timestamp )
- FILE_NOTIFY_CHANGE_EA
- FILE_NOTIFY_CHANGE_SECURITY
- FILE_NOTIFY_CHANGE_STREAM_NAME
- FILE_NOTIFY_CHANGE_STREAM_SIZE
- FILE_NOTIFY_CHANGE_STREAM_WRITE
- WatchTree = If true the notify will be installed recursively on the targetdirectory and all subdirectories.
- *
- * REMARKS:
- * The function maps to the win32 FindFirstChangeNotification, FindNextChangeNotification
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtNotifyChangeDirectoryFile(
- 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 BufferSize,
- IN ULONG CompletionFilter,
- IN BOOLEAN WatchTree
- );
-
-NTSTATUS
-STDCALL
-ZwNotifyChangeDirectoryFile(
- 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 BufferSize,
- IN ULONG CompletionFilter,
- IN BOOLEAN WatchTree
- );
-
-/*
- * FUNCTION: Installs a notfication callback on registry changes
- * ARGUMENTS:
- KeyHandle = Handle to the registry key
- Event = Event that should be signalled on modification of the key
- ApcRoutine = Routine that should be called on modification of the key
- ApcContext = Argument to the ApcRoutine
- IoStatusBlock = ???
- CompletionFilter = Specifies the kind of notification the caller likes to receive.
- Can be a combination of the following values:
-
- REG_NOTIFY_CHANGE_NAME
- REG_NOTIFY_CHANGE_ATTRIBUTES
- REG_NOTIFY_CHANGE_LAST_SET
- REG_NOTIFY_CHANGE_SECURITY
-
-
- Asynchroneous = If TRUE the changes are reported by signalling an event if false
- the function will not return before a change occurs.
- ChangeBuffer = Will return the old value
- Length = Size of the change buffer
- WatchSubtree = Indicates if the caller likes to receive a notification of changes in
- sub keys or not.
- * REMARKS: If the key is closed the event is signalled aswell.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtNotifyChangeKey(
- IN HANDLE KeyHandle,
- IN HANDLE Event,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG CompletionFilter,
- IN BOOLEAN WatchSubtree,
- OUT PVOID Buffer,
- IN ULONG Length,
- IN BOOLEAN Asynchronous
- );
-
-NTSTATUS
-STDCALL
-ZwNotifyChangeKey(
- IN HANDLE KeyHandle,
- IN HANDLE Event,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG CompletionFilter,
- IN BOOLEAN WatchSubtree,
- OUT PVOID Buffer,
- IN ULONG Length,
- IN BOOLEAN Asynchronous
- );
-
-/*
- * FUNCTION: Opens an existing directory object
- * ARGUMENTS:
- * FileHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the directory
- * ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtOpenDirectoryObject(
- OUT PHANDLE FileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-NTSTATUS
-STDCALL
-ZwOpenDirectoryObject(
- OUT PHANDLE FileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-/*
- * FUNCTION: Opens an existing event
- * ARGUMENTS:
- * EventHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the event
- * ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenEvent(
- OUT PHANDLE EventHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-NTSTATUS
-STDCALL
-ZwOpenEvent(
- OUT PHANDLE EventHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-/*
- * FUNCTION: Opens an existing event pair
- * ARGUMENTS:
- * EventHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the event
- * ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtOpenEventPair(
- OUT PHANDLE EventPairHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-NTSTATUS
-STDCALL
-ZwOpenEventPair(
- OUT PHANDLE EventPairHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-/*
- * FUNCTION: Opens an existing file
- * ARGUMENTS:
- * FileHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the file
- * ObjectAttributes = Initialized attributes for the object
- * IoStatusBlock =
- * ShareAccess =
- * OpenOptions =
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenFile(
- OUT PHANDLE FileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG ShareAccess,
- IN ULONG OpenOptions
- );
-
-NTSTATUS
-STDCALL
-ZwOpenFile(
- OUT PHANDLE FileHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN ULONG ShareAccess,
- IN ULONG OpenOptions
- );
-
-/*
- * FUNCTION: Opens an existing io completion object
- * ARGUMENTS:
- * CompletionPort (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the io completion object
- * ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtOpenIoCompletion(
- OUT PHANDLE CompetionPort,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-NTSTATUS
-STDCALL
-ZwOpenIoCompletion(
- OUT PHANDLE CompetionPort,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-
-NTSTATUS
-STDCALL
-NtOpenJobObject(
- PHANDLE JobHandle,
- ACCESS_MASK DesiredAccess,
- POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-NTSTATUS
-STDCALL
-ZwOpenJobObject(
- PHANDLE JobHandle,
- ACCESS_MASK DesiredAccess,
- POBJECT_ATTRIBUTES ObjectAttributes
- );
-/*
- * FUNCTION: Opens an existing key in the registry
- * ARGUMENTS:
- * KeyHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the key
- * ObjectAttributes = Initialized attributes for the object
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenKey(
- OUT PHANDLE KeyHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-NTSTATUS
-STDCALL
-ZwOpenKey(
- OUT PHANDLE KeyHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-/*
- * FUNCTION: Opens an existing key in the registry
- * ARGUMENTS:
- * MutantHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the mutant
- * ObjectAttribute = Initialized attributes for the object
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenMutant(
- OUT PHANDLE MutantHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-NTSTATUS
-STDCALL
-ZwOpenMutant(
- OUT PHANDLE MutantHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-/*
- * FUNCTION: Opens an existing process
- * ARGUMENTS:
- * ProcessHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the process
- * ObjectAttribute = Initialized attributes for the object
- * ClientId = Identifies the process id to open
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenProcess (
- OUT PHANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PCLIENT_ID ClientId
- );
-NTSTATUS
-STDCALL
-ZwOpenProcess (
- OUT PHANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PCLIENT_ID ClientId
- );
-/*
- * FUNCTION: Opens an existing process
- * ARGUMENTS:
- * ProcessHandle = Handle of the process of which owns the token
- * DesiredAccess = Requested access to the token
- * TokenHandle (OUT) = Caller supplies storage for the resulting token.
- * REMARKS:
- This function maps to the win32
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtOpenProcessToken(
- IN HANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- OUT PHANDLE TokenHandle
- );
-
-NTSTATUS
-STDCALL
-ZwOpenProcessToken(
- IN HANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- OUT PHANDLE TokenHandle
- );
-
-
-NTSTATUS
-STDCALL
-NtOpenProcessTokenEx(
- IN HANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- IN ULONG HandleAttributes,
- OUT PHANDLE TokenHandle
- );
-
-
-NTSTATUS
-STDCALL
-ZwOpenProcessTokenEx(
- IN HANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- IN ULONG HandleAttributes,
- OUT PHANDLE TokenHandle
- );
-/*
- * FUNCTION: Opens an existing section object
- * ARGUMENTS:
- * KeyHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the key
- * ObjectAttribute = Initialized attributes for the object
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtOpenSection(
- OUT PHANDLE SectionHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-NTSTATUS
-STDCALL
-ZwOpenSection(
- OUT PHANDLE SectionHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-/*
- * FUNCTION: Opens an existing semaphore
- * ARGUMENTS:
- * SemaphoreHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the semaphore
- * ObjectAttribute = Initialized attributes for the object
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenSemaphore(
- OUT PHANDLE SemaphoreHandle,
- IN ACCESS_MASK DesiredAcces,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-NTSTATUS
-STDCALL
-ZwOpenSemaphore(
- OUT PHANDLE SemaphoreHandle,
- IN ACCESS_MASK DesiredAcces,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-/*
- * FUNCTION: Opens an existing symbolic link
- * ARGUMENTS:
- * SymbolicLinkHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the symbolic link
- * ObjectAttribute = Initialized attributes for the object
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenSymbolicLinkObject(
- OUT PHANDLE LinkHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-NTSTATUS
-STDCALL
-ZwOpenSymbolicLinkObject(
- OUT PHANDLE LinkHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-/*
- * FUNCTION: Opens an existing thread
- * ARGUMENTS:
- * ThreadHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the thread
- * ObjectAttribute = Initialized attributes for the object
- * ClientId = Identifies the thread to open.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenThread(
- OUT PHANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PCLIENT_ID ClientId
- );
-NTSTATUS
-STDCALL
-ZwOpenThread(
- OUT PHANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PCLIENT_ID ClientId
- );
-
-NTSTATUS
-STDCALL
-NtOpenThreadToken(
- IN HANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN BOOLEAN OpenAsSelf,
- OUT PHANDLE TokenHandle
- );
-
-NTSTATUS
-STDCALL
-ZwOpenThreadToken(
- IN HANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN BOOLEAN OpenAsSelf,
- OUT PHANDLE TokenHandle
- );
-
-NTSTATUS
-STDCALL
-NtOpenThreadTokenEx(
- IN HANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN BOOLEAN OpenAsSelf,
- IN ULONG HandleAttributes,
- OUT PHANDLE TokenHandle
- );
-
-
-NTSTATUS
-STDCALL
-ZwOpenThreadTokenEx(
- IN HANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN BOOLEAN OpenAsSelf,
- IN ULONG HandleAttributes,
- OUT PHANDLE TokenHandle
- );
-
-/*
- * FUNCTION: Opens an existing timer
- * ARGUMENTS:
- * TimerHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Requested access to the timer
- * ObjectAttribute = Initialized attributes for the object
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtOpenTimer(
- OUT PHANDLE TimerHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-NTSTATUS
-STDCALL
-ZwOpenTimer(
- OUT PHANDLE TimerHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes
- );
-
-/*
- * FUNCTION: Checks an access token for specific privileges
- * ARGUMENTS:
- * ClientToken = Handle to a access token structure
- * RequiredPrivileges = Specifies the requested privileges.
- * Result = Caller supplies storage for the result. If PRIVILEGE_SET_ALL_NECESSARY is
- set in the Control member of PRIVILEGES_SET Result
- will only be TRUE if all privileges are present in the access token.
- * RETURNS: Status
- */
-
-
-NTSTATUS
-STDCALL
-NtPowerInformation(
- IN POWER_INFORMATION_LEVEL PowerInformationLevel,
- IN PVOID InputBuffer OPTIONAL,
- IN ULONG InputBufferLength,
- OUT PVOID OutputBuffer OPTIONAL,
- IN ULONG OutputBufferLength
- );
-
-NTSTATUS
-STDCALL
-ZwPowerInformation(
- IN POWER_INFORMATION_LEVEL PowerInformationLevel,
- IN PVOID InputBuffer OPTIONAL,
- IN ULONG InputBufferLength,
- OUT PVOID OutputBuffer OPTIONAL,
- IN ULONG OutputBufferLength
- );
-
-NTSTATUS
-STDCALL
-NtPrivilegeCheck(
- IN HANDLE ClientToken,
- IN PPRIVILEGE_SET RequiredPrivileges,
- IN PBOOLEAN Result
- );
-
-NTSTATUS
-STDCALL
-ZwPrivilegeCheck(
- IN HANDLE ClientToken,
- IN PPRIVILEGE_SET RequiredPrivileges,
- IN PBOOLEAN Result
- );
-
-NTSTATUS
-STDCALL
-NtPrivilegedServiceAuditAlarm(
- IN PUNICODE_STRING SubsystemName,
- IN PUNICODE_STRING ServiceName,
- IN HANDLE ClientToken,
- IN PPRIVILEGE_SET Privileges,
- IN BOOLEAN AccessGranted
- );
-
-NTSTATUS
-STDCALL
-ZwPrivilegedServiceAuditAlarm(
- IN PUNICODE_STRING SubsystemName,
- IN PUNICODE_STRING ServiceName,
- IN HANDLE ClientToken,
- IN PPRIVILEGE_SET Privileges,
- IN BOOLEAN AccessGranted
- );
-
-NTSTATUS
-STDCALL
-NtPrivilegeObjectAuditAlarm(
- IN PUNICODE_STRING SubsystemName,
- IN PVOID HandleId,
- IN HANDLE ClientToken,
- IN ULONG DesiredAccess,
- IN PPRIVILEGE_SET Privileges,
- IN BOOLEAN AccessGranted
- );
-
-NTSTATUS
-STDCALL
-ZwPrivilegeObjectAuditAlarm(
- IN PUNICODE_STRING SubsystemName,
- IN PVOID HandleId,
- IN HANDLE ClientToken,
- IN ULONG DesiredAccess,
- IN PPRIVILEGE_SET Privileges,
- IN BOOLEAN AccessGranted
- );
-
-/*
- * FUNCTION: Entry point for native applications
- * ARGUMENTS:
- * Peb = Pointes to the Process Environment Block (PEB)
- * REMARKS:
- * Native applications should use this function instead of a main.
- * Calling proces should terminate itself.
- * RETURNS: Status
- */
-VOID STDCALL
-NtProcessStartup(
- IN PPEB Peb
- );
-
-
-/*
- * FUNCTION: Signals an event and resets it afterwards.
- * ARGUMENTS:
- * EventHandle = Handle to the event
- * PulseCount = Number of times the action is repeated
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtPulseEvent(
- IN HANDLE EventHandle,
- OUT PLONG PreviousState OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwPulseEvent(
- IN HANDLE EventHandle,
- OUT PLONG PreviousState OPTIONAL
- );
-
-/*
- * FUNCTION: Queries the attributes of a file
- * ARGUMENTS:
- * ObjectAttributes = Initialized attributes for the object
- * Buffer = Caller supplies storage for the attributes
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtQueryAttributesFile(
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PFILE_BASIC_INFORMATION FileInformation
- );
-
-NTSTATUS
-STDCALL
-ZwQueryAttributesFile(
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PFILE_BASIC_INFORMATION FileInformation
- );
-
-
-NTSTATUS
-STDCALL
-NtQueryBootEntryOrder(
- IN ULONG Unknown1,
- IN ULONG Unknown2
- );
-
-NTSTATUS
-STDCALL
-ZwQueryBootEntryOrder(
- IN ULONG Unknown1,
- IN ULONG Unknown2
- );
-
-NTSTATUS
-STDCALL
-NtQueryBootOptions(
- IN ULONG Unknown1,
- IN ULONG Unknown2
- );
-
-NTSTATUS
-STDCALL
-ZwQueryBootOptions(
- IN ULONG Unknown1,
- IN ULONG Unknown2
- );
-/*
- * FUNCTION: Queries the default locale id
- * ARGUMENTS:
- * UserProfile = Type of locale id
- * TRUE: thread locale id
- * FALSE: system locale id
- * DefaultLocaleId = Caller supplies storage for the locale id
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtQueryDefaultLocale(
- IN BOOLEAN UserProfile,
- OUT PLCID DefaultLocaleId
- );
-
-NTSTATUS
-STDCALL
-ZwQueryDefaultLocale(
- IN BOOLEAN UserProfile,
- OUT PLCID DefaultLocaleId
- );
-
-NTSTATUS
-STDCALL
-NtQueryDefaultUILanguage(
- PLANGID LanguageId
- );
-
-NTSTATUS
-STDCALL
-ZwQueryDefaultUILanguage(
- PLANGID LanguageId
- );
-
-/*
- * FUNCTION: Queries a directory file.
- * ARGUMENTS:
- * FileHandle = Handle to a directory file
- * EventHandle = Handle to the event signaled on completion
- * ApcRoutine = Asynchroneous procedure callback, called on completion
- * ApcContext = Argument to the apc.
- * IoStatusBlock = Caller supplies storage for extended status information.
- * FileInformation = Caller supplies storage for the resulting information.
- *
- * FileNameInformation FILE_NAMES_INFORMATION
- * FileDirectoryInformation FILE_DIRECTORY_INFORMATION
- * FileFullDirectoryInformation FILE_FULL_DIRECTORY_INFORMATION
- * FileBothDirectoryInformation FILE_BOTH_DIR_INFORMATION
- *
- * Length = Size of the storage supplied
- * FileInformationClass = Indicates the type of information requested.
- * ReturnSingleEntry = Specify true if caller only requests the first directory found.
- * FileName = Initial directory name to query, that may contain wild cards.
- * RestartScan = Number of times the action should be repeated
- * RETURNS: Status [ STATUS_SUCCESS, STATUS_ACCESS_DENIED, STATUS_INSUFFICIENT_RESOURCES,
- * STATUS_INVALID_PARAMETER, STATUS_INVALID_DEVICE_REQUEST, STATUS_BUFFER_OVERFLOW,
- * STATUS_INVALID_INFO_CLASS, STATUS_NO_SUCH_FILE, STATUS_NO_MORE_FILES ]
- */
-
-NTSTATUS
-STDCALL
-NtQueryDirectoryFile(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID FileInformation,
- IN ULONG Length,
- IN FILE_INFORMATION_CLASS FileInformationClass,
- IN BOOLEAN ReturnSingleEntry,
- IN PUNICODE_STRING FileName OPTIONAL,
- IN BOOLEAN RestartScan
- );
-
-NTSTATUS
-STDCALL
-ZwQueryDirectoryFile(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID FileInformation,
- IN ULONG Length,
- IN FILE_INFORMATION_CLASS FileInformationClass,
- IN BOOLEAN ReturnSingleEntry,
- IN PUNICODE_STRING FileName OPTIONAL,
- IN BOOLEAN RestartScan
- );
-
-/*
- * FUNCTION: Queries the extended attributes of a file
- * ARGUMENTS:
- * FileHandle = Handle to the event
- * IoStatusBlock = Number of times the action is repeated
- * Buffer
- * Length
- * ReturnSingleEntry
- * EaList
- * EaListLength
- * EaIndex
- * RestartScan
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtQueryEaFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID Buffer,
- IN ULONG Length,
- IN BOOLEAN ReturnSingleEntry,
- IN PVOID EaList OPTIONAL,
- IN ULONG EaListLength,
- IN PULONG EaIndex OPTIONAL,
- IN BOOLEAN RestartScan
- );
-
-NTSTATUS
-STDCALL
-ZwQueryEaFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID Buffer,
- IN ULONG Length,
- IN BOOLEAN ReturnSingleEntry,
- IN PVOID EaList OPTIONAL,
- IN ULONG EaListLength,
- IN PULONG EaIndex OPTIONAL,
- IN BOOLEAN RestartScan
- );
-
-/*
- * FUNCTION: Queries an event
- * ARGUMENTS:
- * EventHandle = Handle to the event
- * EventInformationClass = Index of the information structure
-
- EventBasicInformation EVENT_BASIC_INFORMATION
-
- * EventInformation = Caller supplies storage for the information structure
- * EventInformationLength = Size of the information structure
- * ReturnLength = Data written
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtQueryEvent(
- IN HANDLE EventHandle,
- IN EVENT_INFORMATION_CLASS EventInformationClass,
- OUT PVOID EventInformation,
- IN ULONG EventInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-NTSTATUS
-STDCALL
-ZwQueryEvent(
- IN HANDLE EventHandle,
- IN EVENT_INFORMATION_CLASS EventInformationClass,
- OUT PVOID EventInformation,
- IN ULONG EventInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-NTSTATUS STDCALL
-NtQueryFullAttributesFile(IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PFILE_NETWORK_OPEN_INFORMATION FileInformation);
-
-NTSTATUS STDCALL
-ZwQueryFullAttributesFile(IN POBJECT_ATTRIBUTES ObjectAttributes,
- OUT PFILE_NETWORK_OPEN_INFORMATION FileInformation);
-
-/*
- * FUNCTION: Queries the information of a file object.
- * ARGUMENTS:
- * FileHandle = Handle to the file object
- * IoStatusBlock = Caller supplies storage for extended information
- * on the current operation.
- * FileInformation = Storage for the new file information
- * Lenght = Size of the storage for the file information.
- * FileInformationClass = Indicates which file information is queried
-
- FileDirectoryInformation FILE_DIRECTORY_INFORMATION
- FileFullDirectoryInformation FILE_FULL_DIRECTORY_INFORMATION
- FileBothDirectoryInformation FILE_BOTH_DIRECTORY_INFORMATION
- FileBasicInformation FILE_BASIC_INFORMATION
- FileStandardInformation FILE_STANDARD_INFORMATION
- FileInternalInformation FILE_INTERNAL_INFORMATION
- FileEaInformation FILE_EA_INFORMATION
- FileAccessInformation FILE_ACCESS_INFORMATION
- FileNameInformation FILE_NAME_INFORMATION
- FileRenameInformation FILE_RENAME_INFORMATION
- FileLinkInformation
- FileNamesInformation FILE_NAMES_INFORMATION
- FileDispositionInformation FILE_DISPOSITION_INFORMATION
- FilePositionInformation FILE_POSITION_INFORMATION
- FileFullEaInformation FILE_FULL_EA_INFORMATION
- FileModeInformation FILE_MODE_INFORMATION
- FileAlignmentInformation FILE_ALIGNMENT_INFORMATION
- FileAllInformation FILE_ALL_INFORMATION
-
- FileEndOfFileInformation FILE_END_OF_FILE_INFORMATION
- FileAlternateNameInformation
- FileStreamInformation FILE_STREAM_INFORMATION
- FilePipeInformation
- FilePipeLocalInformation
- FilePipeRemoteInformation
- FileMailslotQueryInformation
- FileMailslotSetInformation
- FileCompressionInformation FILE_COMPRESSION_INFORMATION
- FileCopyOnWriteInformation
- FileCompletionInformation IO_COMPLETION_CONTEXT
- FileMoveClusterInformation
- FileOleClassIdInformation
- FileOleStateBitsInformation
- FileNetworkOpenInformation FILE_NETWORK_OPEN_INFORMATION
- FileObjectIdInformation
- FileOleAllInformation
- FileOleDirectoryInformation
- FileContentIndexInformation
- FileInheritContentIndexInformation
- FileOleInformation
- FileMaximumInformation
-
- * REMARK:
- * This procedure maps to the win32 GetShortPathName, GetLongPathName,
- GetFullPathName, GetFileType, GetFileSize, GetFileTime functions.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtQueryInformationFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID FileInformation,
- IN ULONG Length,
- IN FILE_INFORMATION_CLASS FileInformationClass
- );
-
-NTSTATUS
-STDCALL
-ZwQueryInformationFile(
- HANDLE FileHandle,
- PIO_STATUS_BLOCK IoStatusBlock,
- PVOID FileInformation,
- ULONG Length,
- FILE_INFORMATION_CLASS FileInformationClass
- );
-
-NTSTATUS
-STDCALL
-NtQueryInformationJobObject(
- HANDLE JobHandle,
- JOBOBJECTINFOCLASS JobInformationClass,
- PVOID JobInformation,
- ULONG JobInformationLength,
- PULONG ReturnLength
- );
-
-NTSTATUS
-STDCALL
-ZwQueryInformationJobObject(
- HANDLE JobHandle,
- JOBOBJECTINFOCLASS JobInformationClass,
- PVOID JobInformation,
- ULONG JobInformationLength,
- PULONG ReturnLength
- );
-
-NTSTATUS STDCALL
-NtQueryInformationPort (HANDLE PortHandle,
- CINT PortInformationClass,
- PVOID PortInformation,
- ULONG PortInformationLength,
- PULONG ReturnLength);
-
-#ifndef __USE_W32API
-NTSTATUS STDCALL
-ZwQueryInformationPort (HANDLE PortHandle,
- CINT PortInformationClass,
- PVOID PortInformation,
- ULONG PortInformationLength,
- PULONG ReturnLength);
-#endif
-
-/*
- * FUNCTION: Queries the information of a thread object.
- * ARGUMENTS:
- * ThreadHandle = Handle to the thread object
- * ThreadInformationClass = Index to a certain information structure
-
- ThreadBasicInformation THREAD_BASIC_INFORMATION
- ThreadTimes KERNEL_USER_TIMES
- ThreadPriority KPRIORITY
- ThreadBasePriority KPRIORITY
- ThreadAffinityMask KAFFINITY
- ThreadImpersonationToken
- ThreadDescriptorTableEntry
- ThreadEnableAlignmentFaultFixup
- ThreadEventPair
- ThreadQuerySetWin32StartAddress
- ThreadZeroTlsCell
- ThreadPerformanceCount
- ThreadAmILastThread BOOLEAN
- ThreadIdealProcessor ULONG
- ThreadPriorityBoost ULONG
- MaxThreadInfoClass
-
-
- * ThreadInformation = Caller supplies torage for the thread information
- * ThreadInformationLength = Size of the thread information structure
- * ReturnLength = Actual number of bytes written
-
- * REMARK:
- * This procedure maps to the win32 GetThreadTimes, GetThreadPriority,
- GetThreadPriorityBoost functions.
- * RETURNS: Status
-*/
-
-
-NTSTATUS
-STDCALL
-NtQueryInformationThread(
- IN HANDLE ThreadHandle,
- IN THREADINFOCLASS ThreadInformationClass,
- OUT PVOID ThreadInformation,
- IN ULONG ThreadInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwQueryInformationThread(
- IN HANDLE ThreadHandle,
- IN THREADINFOCLASS ThreadInformationClass,
- OUT PVOID ThreadInformation,
- IN ULONG ThreadInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-
-NTSTATUS
-STDCALL
-NtQueryInformationToken(
- IN HANDLE TokenHandle,
- IN TOKEN_INFORMATION_CLASS TokenInformationClass,
- OUT PVOID TokenInformation,
- IN ULONG TokenInformationLength,
- OUT PULONG ReturnLength
- );
-
-NTSTATUS
-STDCALL
-ZwQueryInformationToken(
- IN HANDLE TokenHandle,
- IN TOKEN_INFORMATION_CLASS TokenInformationClass,
- OUT PVOID TokenInformation,
- IN ULONG TokenInformationLength,
- OUT PULONG ReturnLength
- );
-
-NTSTATUS
-STDCALL
-NtQueryInstallUILanguage(
- PLANGID LanguageId
- );
-
-NTSTATUS
-STDCALL
-ZwQueryInstallUILanguage(
- PLANGID LanguageId
- );
-
-NTSTATUS
-STDCALL
-NtQueryIoCompletion(
- IN HANDLE IoCompletionHandle,
- IN IO_COMPLETION_INFORMATION_CLASS IoCompletionInformationClass,
- OUT PVOID IoCompletionInformation,
- IN ULONG IoCompletionInformationLength,
- OUT PULONG ResultLength OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwQueryIoCompletion(
- IN HANDLE IoCompletionHandle,
- IN IO_COMPLETION_INFORMATION_CLASS IoCompletionInformationClass,
- OUT PVOID IoCompletionInformation,
- IN ULONG IoCompletionInformationLength,
- OUT PULONG ResultLength OPTIONAL
- );
-
-/*
- * FUNCTION: Queries the information of a registry key object.
- * ARGUMENTS:
- KeyHandle = Handle to a registry key
- KeyInformationClass = Index to a certain information structure
- KeyInformation = Caller supplies storage for resulting information
- Length = Size of the supplied storage
- ResultLength = Bytes written
- */
-NTSTATUS
-STDCALL
-NtQueryKey(
- IN HANDLE KeyHandle,
- IN KEY_INFORMATION_CLASS KeyInformationClass,
- OUT PVOID KeyInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-NTSTATUS
-STDCALL
-ZwQueryKey(
- IN HANDLE KeyHandle,
- IN KEY_INFORMATION_CLASS KeyInformationClass,
- OUT PVOID KeyInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-
-
-NTSTATUS
-STDCALL
-NtQueryQuotaInformationFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID Buffer,
- IN ULONG Length,
- IN BOOLEAN ReturnSingleEntry,
- IN PVOID SidList OPTIONAL,
- IN ULONG SidListLength,
- IN PSID StartSid OPTIONAL,
- IN BOOLEAN RestartScan
- );
-
-
-NTSTATUS
-STDCALL
-ZwQueryQuotaInformationFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID Buffer,
- IN ULONG Length,
- IN BOOLEAN ReturnSingleEntry,
- IN PVOID SidList OPTIONAL,
- IN ULONG SidListLength,
- IN PSID StartSid OPTIONAL,
- IN BOOLEAN RestartScan
- );
-// draft
-
-NTSTATUS
-STDCALL
-NtQueryMultipleValueKey(
- IN HANDLE KeyHandle,
- IN OUT PKEY_VALUE_ENTRY ValueList,
- IN ULONG NumberOfValues,
- OUT PVOID Buffer,
- IN OUT PULONG Length,
- OUT PULONG ReturnLength
- );
-
-NTSTATUS
-STDCALL
-ZwQueryMultipleValueKey(
- IN HANDLE KeyHandle,
- IN OUT PKEY_VALUE_ENTRY ValueList,
- IN ULONG NumberOfValues,
- OUT PVOID Buffer,
- IN OUT PULONG Length,
- OUT PULONG ReturnLength
- );
-
-/*
- * FUNCTION: Queries the information of a mutant object.
- * ARGUMENTS:
- MutantHandle = Handle to a mutant
- MutantInformationClass = Index to a certain information structure
- MutantInformation = Caller supplies storage for resulting information
- Length = Size of the supplied storage
- ResultLength = Bytes written
- */
-NTSTATUS
-STDCALL
-NtQueryMutant(
- IN HANDLE MutantHandle,
- IN MUTANT_INFORMATION_CLASS MutantInformationClass,
- OUT PVOID MutantInformation,
- IN ULONG MutantInformationLength,
- OUT PULONG ResultLength OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwQueryMutant(
- IN HANDLE MutantHandle,
- IN MUTANT_INFORMATION_CLASS MutantInformationClass,
- OUT PVOID MutantInformation,
- IN ULONG MutantInformationLength,
- OUT PULONG ResultLength OPTIONAL
- );
-
-/*
- * FUNCTION: Queries the system ( high-resolution ) performance counter.
- * ARGUMENTS:
- * PerformanceCounter = Performance counter
- * PerformanceFrequency = Performance frequency
- * REMARKS:
- This procedure queries a tick count faster than 10ms ( The resolution for Intel®-based CPUs is about 0.8 microseconds.)
- This procedure maps to the win32 QueryPerformanceCounter, QueryPerformanceFrequency
- * RETURNS: Status
- *
-*/
-NTSTATUS
-STDCALL
-NtQueryPerformanceCounter(
- OUT PLARGE_INTEGER PerformanceCounter,
- OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwQueryPerformanceCounter(
- OUT PLARGE_INTEGER PerformanceCounter,
- OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL
- );
-
-/*
- * FUNCTION: Queries the information of a semaphore.
- * ARGUMENTS:
- * SemaphoreHandle = Handle to the semaphore object
- * SemaphoreInformationClass = Index to a certain information structure
-
- SemaphoreBasicInformation SEMAPHORE_BASIC_INFORMATION
-
- * SemaphoreInformation = Caller supplies storage for the semaphore information structure
- * Length = Size of the infomation structure
- */
-NTSTATUS
-STDCALL
-NtQuerySemaphore(
- IN HANDLE SemaphoreHandle,
- IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass,
- OUT PVOID SemaphoreInformation,
- IN ULONG Length,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwQuerySemaphore(
- IN HANDLE SemaphoreHandle,
- IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass,
- OUT PVOID SemaphoreInformation,
- IN ULONG Length,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-
-/*
- * FUNCTION: Queries the information of a symbolic link object.
- * ARGUMENTS:
- * SymbolicLinkHandle = Handle to the symbolic link object
- * LinkTarget = resolved name of link
- * DataWritten = size of the LinkName.
- * RETURNS: Status
- *
-*/
-NTSTATUS
-STDCALL
-NtQuerySymbolicLinkObject(
- IN HANDLE LinkHandle,
- OUT PUNICODE_STRING LinkTarget,
- OUT PULONG ResultLength OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwQuerySymbolicLinkObject(
- IN HANDLE LinkHandle,
- OUT PUNICODE_STRING LinkTarget,
- OUT PULONG ResultLength OPTIONAL
- );
-
-
-/*
- * FUNCTION: Queries a system environment variable.
- * ARGUMENTS:
- * Name = Name of the variable
- * Value (OUT) = value of the variable
- * Length = size of the buffer
- * ReturnLength = data written
- * RETURNS: Status
- *
-*/
-NTSTATUS
-STDCALL
-NtQuerySystemEnvironmentValue(
- IN PUNICODE_STRING VariableName,
- OUT PWCHAR ValueBuffer,
- IN ULONG ValueBufferLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwQuerySystemEnvironmentValue(
- IN PUNICODE_STRING VariableName,
- OUT PWCHAR ValueBuffer,
- IN ULONG ValueBufferLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-
-/*
- * FUNCTION: Queries the system information.
- * ARGUMENTS:
- * SystemInformationClass = Index to a certain information structure
-
- SystemTimeAdjustmentInformation SYSTEM_TIME_ADJUSTMENT
- SystemCacheInformation SYSTEM_CACHE_INFORMATION
- SystemConfigurationInformation CONFIGURATION_INFORMATION
-
- * SystemInformation = caller supplies storage for the information structure
- * Length = size of the structure
- ResultLength = Data written
- * RETURNS: Status
- *
-*/
-NTSTATUS
-STDCALL
-NtQuerySystemInformation(
- IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
- OUT PVOID SystemInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-NTSTATUS
-STDCALL
-ZwQuerySystemInformation(
- IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
- OUT PVOID SystemInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-/*
- * FUNCTION: Queries information about a timer
- * ARGUMENTS:
- * TimerHandle = Handle to the timer
- TimerValueInformationClass = Index to a certain information structure
- TimerValueInformation = Caller supplies storage for the information structure
- Length = Size of the information structure
- ResultLength = Data written
- * RETURNS: Status
- *
-*/
-NTSTATUS
-STDCALL
-NtQueryTimer(
- IN HANDLE TimerHandle,
- IN TIMER_INFORMATION_CLASS TimerInformationClass,
- OUT PVOID TimerInformation,
- IN ULONG TimerInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-NTSTATUS
-STDCALL
-ZwQueryTimer(
- IN HANDLE TimerHandle,
- IN TIMER_INFORMATION_CLASS TimerInformationClass,
- OUT PVOID TimerInformation,
- IN ULONG TimerInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-/*
- * FUNCTION: Queries the timer resolution
- * ARGUMENTS:
- * MinimumResolution (OUT) = Caller should supply storage for the resulting time.
- Maximum Resolution (OUT) = Caller should supply storage for the resulting time.
- ActualResolution (OUT) = Caller should supply storage for the resulting time.
- * RETURNS: Status
- *
-*/
-
-
-NTSTATUS
-STDCALL
-NtQueryTimerResolution (
- OUT PULONG MinimumResolution,
- OUT PULONG MaximumResolution,
- OUT PULONG ActualResolution
- );
-
-NTSTATUS
-STDCALL
-ZwQueryTimerResolution (
- OUT PULONG MinimumResolution,
- OUT PULONG MaximumResolution,
- OUT PULONG ActualResolution
- );
-
-/*
- * FUNCTION: Queries a registry key value
- * ARGUMENTS:
- * KeyHandle = Handle to the registry key
- ValueName = Name of the value in the registry key
- KeyValueInformationClass = Index to a certain information structure
-
- KeyValueBasicInformation = KEY_VALUE_BASIC_INFORMATION
- KeyValueFullInformation = KEY_FULL_INFORMATION
- KeyValuePartialInformation = KEY_VALUE_PARTIAL_INFORMATION
-
- KeyValueInformation = Caller supplies storage for the information structure
- Length = Size of the information structure
- ResultLength = Data written
- * RETURNS: Status
- *
-*/
-NTSTATUS
-STDCALL
-NtQueryValueKey(
- IN HANDLE KeyHandle,
- IN PUNICODE_STRING ValueName,
- IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
- OUT PVOID KeyValueInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-NTSTATUS
-STDCALL
-ZwQueryValueKey(
- IN HANDLE KeyHandle,
- IN PUNICODE_STRING ValueName,
- IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
- OUT PVOID KeyValueInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-/*
- * FUNCTION: Queries the volume information
- * ARGUMENTS:
- * FileHandle = Handle to a file object on the target volume
- * IoStatusBlock = Caller should supply storage for additional status information
- * ReturnLength = DataWritten
- * FsInformation = Caller should supply storage for the information structure.
- * Length = Size of the information structure
- * FsInformationClass = Index to a information structure
-
- FileFsVolumeInformation FILE_FS_VOLUME_INFORMATION
- FileFsLabelInformation FILE_FS_LABEL_INFORMATION
- FileFsSizeInformation FILE_FS_SIZE_INFORMATION
- FileFsDeviceInformation FILE_FS_DEVICE_INFORMATION
- FileFsAttributeInformation FILE_FS_ATTRIBUTE_INFORMATION
- FileFsControlInformation
- FileFsQuotaQueryInformation --
- FileFsQuotaSetInformation --
- FileFsMaximumInformation
-
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_INSUFFICIENT_RESOURCES | STATUS_INVALID_PARAMETER |
- STATUS_INVALID_DEVICE_REQUEST | STATUS_BUFFER_OVERFLOW ]
- *
-*/
-NTSTATUS
-STDCALL
-NtQueryVolumeInformationFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID FsInformation,
- IN ULONG Length,
- IN FS_INFORMATION_CLASS FsInformationClass
- );
-
-NTSTATUS
-STDCALL
-ZwQueryVolumeInformationFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID FsInformation,
- IN ULONG Length,
- IN FS_INFORMATION_CLASS FsInformationClass
- );
-// draft
-// FIXME: Should I specify if the apc is user or kernel mode somewhere ??
-/*
- * FUNCTION: Queues a (user) apc to a thread.
- * ARGUMENTS:
- ThreadHandle = Thread to which the apc is queued.
- ApcRoutine = Points to the apc routine
- NormalContext = Argument to Apc Routine
- * SystemArgument1 = Argument of the Apc Routine
- SystemArgument2 = Argument of the Apc Routine
- * REMARK: If the apc is queued against a thread of a different process than the calling thread
- the apc routine should be specified in the address space of the queued thread's process.
- * RETURNS: Status
-*/
-
-NTSTATUS
-STDCALL
-NtQueueApcThread(
- HANDLE ThreadHandle,
- PKNORMAL_ROUTINE ApcRoutine,
- PVOID NormalContext,
- PVOID SystemArgument1,
- PVOID SystemArgument2);
-
-NTSTATUS
-STDCALL
-ZwQueueApcThread(
- HANDLE ThreadHandle,
- PKNORMAL_ROUTINE ApcRoutine,
- PVOID NormalContext,
- PVOID SystemArgument1,
- PVOID SystemArgument2);
-
-
-/*
- * FUNCTION: Raises an exception
- * ARGUMENTS:
- * ExceptionRecord = Structure specifying the exception
- * Context = Context in which the excpetion is raised
- * IsDebugger =
- * RETURNS: Status
- *
-*/
-
-NTSTATUS
-STDCALL
-NtRaiseException(
- IN PEXCEPTION_RECORD ExceptionRecord,
- IN PCONTEXT Context,
- IN BOOLEAN SearchFrames
- );
-
-NTSTATUS
-STDCALL
-ZwRaiseException(
- IN PEXCEPTION_RECORD ExceptionRecord,
- IN PCONTEXT Context,
- IN BOOLEAN SearchFrames
- );
-
-/*
- * FUNCTION: Read a file
- * ARGUMENTS:
- * FileHandle = Handle of a file to read
- * Event = This event is signalled when the read operation completes
- * UserApcRoutine = Call back , if supplied Event should be NULL
- * UserApcContext = Argument to the callback
- * IoStatusBlock = Caller should supply storage for additional status information
- * Buffer = Caller should supply storage to receive the information
- * BufferLength = Size of the buffer
- * ByteOffset = Offset to start reading the file
- * Key = If a range is lock a matching key will allow the read to continue.
- * RETURNS: Status
- *
- */
-
-NTSTATUS
-STDCALL
-NtReadFile(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL,
- IN PVOID UserApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID Buffer,
- IN ULONG BufferLength,
- IN PLARGE_INTEGER ByteOffset OPTIONAL,
- IN PULONG Key OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwReadFile(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL,
- IN PVOID UserApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID Buffer,
- IN ULONG BufferLength,
- IN PLARGE_INTEGER ByteOffset OPTIONAL,
- IN PULONG Key OPTIONAL
- );
-/*
- * FUNCTION: Read a file using scattered io
- * ARGUMENTS:
- FileHandle = Handle of a file to read
- Event = This event is signalled when the read operation completes
- * UserApcRoutine = Call back , if supplied Event should be NULL
- UserApcContext = Argument to the callback
- IoStatusBlock = Caller should supply storage for additional status information
- BufferDescription = Caller should supply storage to receive the information
- BufferLength = Size of the buffer
- ByteOffset = Offset to start reading the file
- Key = Key = If a range is lock a matching key will allow the read to continue.
- * RETURNS: Status
- *
-*/
-NTSTATUS
-STDCALL
-NtReadFileScatter(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL,
- IN PVOID UserApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK UserIoStatusBlock,
- IN FILE_SEGMENT_ELEMENT BufferDescription[],
- IN ULONG BufferLength,
- IN PLARGE_INTEGER ByteOffset,
- IN PULONG Key OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwReadFileScatter(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL,
- IN PVOID UserApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK UserIoStatusBlock,
- IN FILE_SEGMENT_ELEMENT BufferDescription[],
- IN ULONG BufferLength,
- IN PLARGE_INTEGER ByteOffset,
- IN PULONG Key OPTIONAL
- );
-
-
-NTSTATUS STDCALL
-NtReadRequestData (HANDLE PortHandle,
- PLPC_MESSAGE Message,
- ULONG Index,
- PVOID Buffer,
- ULONG BufferLength,
- PULONG ReturnLength);
-
-NTSTATUS STDCALL
-ZwReadRequestData (HANDLE PortHandle,
- PLPC_MESSAGE Message,
- ULONG Index,
- PVOID Buffer,
- ULONG BufferLength,
- PULONG ReturnLength);
-
-
-/*
- * FUNCTION: Copies a range of virtual memory to a buffer
- * ARGUMENTS:
- * ProcessHandle = Specifies the process owning the virtual address space
- * BaseAddress = Points to the address of virtual memory to start the read
- * Buffer = Caller supplies storage to copy the virtual memory to.
- * NumberOfBytesToRead = Limits the range to read
- * NumberOfBytesRead = The actual number of bytes read.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtReadVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- OUT PVOID Buffer,
- IN ULONG NumberOfBytesToRead,
- OUT PULONG NumberOfBytesRead
- );
-NTSTATUS
-STDCALL
-ZwReadVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- OUT PVOID Buffer,
- IN ULONG NumberOfBytesToRead,
- OUT PULONG NumberOfBytesRead
- );
-
-
-/*
- * FUNCTION: Debugger can register for thread termination
- * ARGUMENTS:
- * TerminationPort = Port on which the debugger likes to be notified.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtRegisterThreadTerminatePort(
- HANDLE PortHandle
- );
-NTSTATUS
-STDCALL
-ZwRegisterThreadTerminatePort(
- HANDLE PortHandle
- );
-
-/*
- * FUNCTION: Releases a mutant
- * ARGUMENTS:
- * MutantHandle = Handle to the mutant
- * ReleaseCount =
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtReleaseMutant(
- IN HANDLE MutantHandle,
- IN PLONG PreviousCount OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwReleaseMutant(
- IN HANDLE MutantHandle,
- IN PLONG PreviousCount OPTIONAL
- );
-
-/*
- * FUNCTION: Releases a semaphore
- * ARGUMENTS:
- * SemaphoreHandle = Handle to the semaphore object
- * ReleaseCount = Number to decrease the semaphore count
- * PreviousCount = Previous semaphore count
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtReleaseSemaphore(
- IN HANDLE SemaphoreHandle,
- IN LONG ReleaseCount,
- OUT PLONG PreviousCount OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwReleaseSemaphore(
- IN HANDLE SemaphoreHandle,
- IN LONG ReleaseCount,
- OUT PLONG PreviousCount OPTIONAL
- );
-
-/*
- * FUNCTION: Removes an io completion
- * ARGUMENTS:
- * CompletionPort (OUT) = Caller supplied storage for the resulting handle
- * CompletionKey = Requested access to the key
- * IoStatusBlock = Caller provides storage for extended status information
- * CompletionStatus = Current status of the io operation.
- * WaitTime = Time to wait if ..
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtRemoveIoCompletion(
- IN HANDLE IoCompletionHandle,
- OUT PVOID *CompletionKey,
- OUT PVOID *CompletionContext,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PLARGE_INTEGER Timeout OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwRemoveIoCompletion(
- IN HANDLE IoCompletionHandle,
- OUT PVOID *CompletionKey,
- OUT PVOID *CompletionValue,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PLARGE_INTEGER Timeout OPTIONAL
- );
-
-/*
- * FUNCTION: Replaces one registry key with another
- * ARGUMENTS:
- * ObjectAttributes = Specifies the attributes of the key
- * Key = Handle to the key
- * ReplacedObjectAttributes = The function returns the old object attributes
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtReplaceKey(
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN HANDLE Key,
- IN POBJECT_ATTRIBUTES ReplacedObjectAttributes
- );
-NTSTATUS
-STDCALL
-ZwReplaceKey(
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN HANDLE Key,
- IN POBJECT_ATTRIBUTES ReplacedObjectAttributes
- );
-
-
-NTSTATUS STDCALL
-NtReplyPort (HANDLE PortHandle,
- PLPC_MESSAGE LpcReply);
-
-NTSTATUS STDCALL
-ZwReplyPort (HANDLE PortHandle,
- PLPC_MESSAGE LpcReply);
-
-
-NTSTATUS STDCALL
-NtReplyWaitReceivePort (HANDLE PortHandle,
- PULONG PortId,
- PLPC_MESSAGE MessageReply,
- PLPC_MESSAGE MessageRequest);
-
-NTSTATUS STDCALL
-ZwReplyWaitReceivePort (HANDLE PortHandle,
- PULONG PortId,
- PLPC_MESSAGE MessageReply,
- PLPC_MESSAGE MessageRequest);
-
-
-NTSTATUS STDCALL
-NtReplyWaitReplyPort (HANDLE PortHandle,
- PLPC_MESSAGE ReplyMessage);
-
-NTSTATUS STDCALL
-ZwReplyWaitReplyPort (HANDLE PortHandle,
- PLPC_MESSAGE ReplyMessage);
-
-
-NTSTATUS STDCALL
-NtRequestPort (HANDLE PortHandle,
- PLPC_MESSAGE LpcMessage);
-
-NTSTATUS STDCALL
-ZwRequestPort (HANDLE PortHandle,
- PLPC_MESSAGE LpcMessage);
-
-
-NTSTATUS STDCALL
-NtRequestWaitReplyPort (HANDLE PortHandle,
- PLPC_MESSAGE LpcReply,
- PLPC_MESSAGE LpcRequest);
-
-NTSTATUS STDCALL
-ZwRequestWaitReplyPort (HANDLE PortHandle,
- PLPC_MESSAGE LpcReply,
- PLPC_MESSAGE LpcRequest);
-
-/*
- * FUNCTION: Resets a event to a non signaled state
- * ARGUMENTS:
- * EventHandle = Handle to the event that should be reset
- * NumberOfWaitingThreads = The number of threads released.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtResetEvent(
- HANDLE EventHandle,
- OUT PLONG PreviousState OPTIONAL
- );
-NTSTATUS
-STDCALL
-ZwResetEvent(
- HANDLE EventHandle,
- OUT PLONG PreviousState OPTIONAL
- );
-//draft
-NTSTATUS
-STDCALL
-NtRestoreKey(
- HANDLE KeyHandle,
- HANDLE FileHandle,
- ULONG RestoreFlags
- );
-
-NTSTATUS
-STDCALL
-ZwRestoreKey(
- HANDLE KeyHandle,
- HANDLE FileHandle,
- ULONG RestoreFlags
- );
-/*
- * FUNCTION: Decrements a thread's resume count
- * ARGUMENTS:
- * ThreadHandle = Handle to the thread that should be resumed
- * ResumeCount = The resulting resume count.
- * REMARK:
- * A thread is resumed if its suspend count is 0. This procedure maps to
- * the win32 ResumeThread function. ( documentation about the the suspend count can be found here aswell )
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtResumeThread(
- IN HANDLE ThreadHandle,
- OUT PULONG SuspendCount OPTIONAL
- );
-NTSTATUS
-STDCALL
-ZwResumeThread(
- IN HANDLE ThreadHandle,
- OUT PULONG SuspendCount OPTIONAL
- );
-
-
-NTSTATUS
-STDCALL
-NtResumeProcess(
- IN HANDLE ProcessHandle
- );
-
-NTSTATUS
-STDCALL
-ZwResumeProcess(
- IN HANDLE ProcessHandle
- );
-
-/*
- * FUNCTION: Writes the content of a registry key to ascii file
- * ARGUMENTS:
- * KeyHandle = Handle to the key
- * FileHandle = Handle of the file
- * REMARKS:
- This function maps to the Win32 RegSaveKey.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtSaveKey(
- IN HANDLE KeyHandle,
- IN HANDLE FileHandle
- );
-NTSTATUS
-STDCALL
-ZwSaveKey(
- IN HANDLE KeyHandle,
- IN HANDLE FileHandle
- );
-
-NTSTATUS
-STDCALL
-NtSaveKeyEx(
- IN HANDLE KeyHandle,
- IN HANDLE FileHandle,
- IN ULONG Flags // REG_STANDARD_FORMAT, etc..
- );
-
-NTSTATUS
-STDCALL
-ZwSaveKeyEx(
- IN HANDLE KeyHandle,
- IN HANDLE FileHandle,
- IN ULONG Flags // REG_STANDARD_FORMAT, etc..
- );
-
-NTSTATUS
-STDCALL
-NtSetBootEntryOrder(
- IN ULONG Unknown1,
- IN ULONG Unknown2
- );
-
-NTSTATUS
-STDCALL
-ZwSetBootEntryOrder(
- IN ULONG Unknown1,
- IN ULONG Unknown2
- );
-
-NTSTATUS
-STDCALL
-NtSetBootOptions(
- ULONG Unknown1,
- ULONG Unknown2
- );
-
-NTSTATUS
-STDCALL
-ZwSetBootOptions(
- ULONG Unknown1,
- ULONG Unknown2
- );
-
-
-/*
- * FUNCTION: Sets the context of a specified thread.
- * ARGUMENTS:
- * ThreadHandle = Handle to the thread
- * ThreadContext = The processor context.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtSetContextThread(
- IN HANDLE ThreadHandle,
- IN PCONTEXT ThreadContext
- );
-NTSTATUS
-STDCALL
-ZwSetContextThread(
- IN HANDLE ThreadHandle,
- IN PCONTEXT ThreadContext
- );
-
-/*
- * FUNCTION: Sets the default locale id
- * ARGUMENTS:
- * UserProfile = Type of locale id
- * TRUE: thread locale id
- * FALSE: system locale id
- * DefaultLocaleId = Locale id
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtSetDefaultLocale(
- IN BOOLEAN UserProfile,
- IN LCID DefaultLocaleId
- );
-
-NTSTATUS
-STDCALL
-ZwSetDefaultLocale(
- IN BOOLEAN UserProfile,
- IN LCID DefaultLocaleId
- );
-
-NTSTATUS
-STDCALL
-NtSetDefaultUILanguage(
- LANGID LanguageId
- );
-
-NTSTATUS
-STDCALL
-ZwSetDefaultUILanguage(
- LANGID LanguageId
- );
-/*
- * FUNCTION: Sets the default hard error port
- * ARGUMENTS:
- * PortHandle = Handle to the port
- * NOTE: The hard error port is used for first change exception handling
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtSetDefaultHardErrorPort(
- IN HANDLE PortHandle
- );
-NTSTATUS
-STDCALL
-ZwSetDefaultHardErrorPort(
- IN HANDLE PortHandle
- );
-
-/*
- * FUNCTION: Sets the extended attributes of a file.
- * ARGUMENTS:
- * FileHandle = Handle to the file
- * IoStatusBlock = Storage for a resulting status and information
- * on the current operation.
- * EaBuffer = Extended Attributes buffer.
- * EaBufferSize = Size of the extended attributes buffer
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtSetEaFile(
- IN HANDLE FileHandle,
- IN PIO_STATUS_BLOCK IoStatusBlock,
- PVOID EaBuffer,
- ULONG EaBufferSize
- );
-NTSTATUS
-STDCALL
-ZwSetEaFile(
- IN HANDLE FileHandle,
- IN PIO_STATUS_BLOCK IoStatusBlock,
- PVOID EaBuffer,
- ULONG EaBufferSize
- );
-
-//FIXME: should I return the event state ?
-
-/*
- * FUNCTION: Sets the event to a signalled state.
- * ARGUMENTS:
- * EventHandle = Handle to the event
- * NumberOfThreadsReleased = The number of threads released
- * REMARK:
- * This procedure maps to the win32 SetEvent function.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtSetEvent(
- IN HANDLE EventHandle,
- OUT PLONG PreviousState OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwSetEvent(
- IN HANDLE EventHandle,
- OUT PLONG PreviousState OPTIONAL
- );
-
-/*
- * FUNCTION: Sets the high part of an event pair
- * ARGUMENTS:
- EventPair = Handle to the event pair
- * RETURNS: Status
-*/
-
-NTSTATUS
-STDCALL
-NtSetHighEventPair(
- IN HANDLE EventPairHandle
- );
-
-NTSTATUS
-STDCALL
-ZwSetHighEventPair(
- IN HANDLE EventPairHandle
- );
-/*
- * FUNCTION: Sets the high part of an event pair and wait for the low part
- * ARGUMENTS:
- EventPair = Handle to the event pair
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetHighWaitLowEventPair(
- IN HANDLE EventPairHandle
- );
-NTSTATUS
-STDCALL
-ZwSetHighWaitLowEventPair(
- IN HANDLE EventPairHandle
- );
-
-/*
- * FUNCTION: Sets the information of a file object.
- * ARGUMENTS:
- * FileHandle = Handle to the file object
- * IoStatusBlock = Caller supplies storage for extended information
- * on the current operation.
- * FileInformation = Storage for the new file information
- * Lenght = Size of the new file information.
- * FileInformationClass = Indicates to a certain information structure
-
- FileNameInformation FILE_NAME_INFORMATION
- FileRenameInformation FILE_RENAME_INFORMATION
- FileStreamInformation FILE_STREAM_INFORMATION
- * FileCompletionInformation IO_COMPLETION_CONTEXT
-
- * REMARK:
- * This procedure maps to the win32 SetEndOfFile, SetFileAttributes,
- * SetNamedPipeHandleState, SetMailslotInfo functions.
- * RETURNS: Status
- */
-
-
-NTSTATUS
-STDCALL
-NtSetInformationFile(
- IN HANDLE FileHandle,
- IN PIO_STATUS_BLOCK IoStatusBlock,
- IN PVOID FileInformation,
- IN ULONG Length,
- IN FILE_INFORMATION_CLASS FileInformationClass
- );
-NTSTATUS
-STDCALL
-ZwSetInformationFile(
- IN HANDLE FileHandle,
- IN PIO_STATUS_BLOCK IoStatusBlock,
- IN PVOID FileInformation,
- IN ULONG Length,
- IN FILE_INFORMATION_CLASS FileInformationClass
- );
-
-NTSTATUS
-STDCALL
-NtSetInformationJobObject(
- HANDLE JobHandle,
- JOBOBJECTINFOCLASS JobInformationClass,
- PVOID JobInformation,
- ULONG JobInformationLength
- );
-
-NTSTATUS
-STDCALL
-ZwSetInformationJobObject(
- HANDLE JobHandle,
- JOBOBJECTINFOCLASS JobInformationClass,
- PVOID JobInformation,
- ULONG JobInformationLength
- );
-/*
- * FUNCTION: Changes a set of thread specific parameters
- * ARGUMENTS:
- * ThreadHandle = Handle to the thread
- * ThreadInformationClass = Index to the set of parameters to change.
- * Can be one of the following values:
- *
- * ThreadBasicInformation THREAD_BASIC_INFORMATION
- * ThreadPriority KPRIORITY //???
- * ThreadBasePriority KPRIORITY
- * ThreadAffinityMask KAFFINITY //??
- * ThreadImpersonationToken ACCESS_TOKEN
- * ThreadIdealProcessor ULONG
- * ThreadPriorityBoost ULONG
- *
- * ThreadInformation = Caller supplies storage for parameters to set.
- * ThreadInformationLength = Size of the storage supplied
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetInformationThread(
- IN HANDLE ThreadHandle,
- IN THREADINFOCLASS ThreadInformationClass,
- IN PVOID ThreadInformation,
- IN ULONG ThreadInformationLength
- );
-NTSTATUS
-STDCALL
-ZwSetInformationThread(
- IN HANDLE ThreadHandle,
- IN THREADINFOCLASS ThreadInformationClass,
- IN PVOID ThreadInformation,
- IN ULONG ThreadInformationLength
- );
-
-/*
- * FUNCTION: Changes a set of token specific parameters
- * ARGUMENTS:
- * TokenHandle = Handle to the token
- * TokenInformationClass = Index to a certain information structure.
- * Can be one of the following values:
- *
- TokenUser TOKEN_USER
- TokenGroups TOKEN_GROUPS
- TokenPrivileges TOKEN_PRIVILEGES
- TokenOwner TOKEN_OWNER
- TokenPrimaryGroup TOKEN_PRIMARY_GROUP
- TokenDefaultDacl TOKEN_DEFAULT_DACL
- TokenSource TOKEN_SOURCE
- TokenType TOKEN_TYPE
- TokenImpersonationLevel TOKEN_IMPERSONATION_LEVEL
- TokenStatistics TOKEN_STATISTICS
- *
- * TokenInformation = Caller supplies storage for information structure.
- * TokenInformationLength = Size of the information structure
- * RETURNS: Status
-*/
-
-NTSTATUS
-STDCALL
-NtSetInformationToken(
- IN HANDLE TokenHandle,
- IN TOKEN_INFORMATION_CLASS TokenInformationClass,
- OUT PVOID TokenInformation,
- IN ULONG TokenInformationLength
- );
-
-NTSTATUS
-STDCALL
-ZwSetInformationToken(
- IN HANDLE TokenHandle,
- IN TOKEN_INFORMATION_CLASS TokenInformationClass,
- OUT PVOID TokenInformation,
- IN ULONG TokenInformationLength
- );
-
-
-/*
- * FUNCTION: Sets an io completion
- * ARGUMENTS:
- * CompletionPort =
- * CompletionKey =
- * IoStatusBlock =
- * NumberOfBytesToTransfer =
- * NumberOfBytesTransferred =
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetIoCompletion(
- IN HANDLE IoCompletionPortHandle,
- IN PVOID CompletionKey,
- IN PVOID CompletionContext,
- IN NTSTATUS CompletionStatus,
- IN ULONG CompletionInformation
- );
-
-NTSTATUS
-STDCALL
-ZwSetIoCompletion(
- IN HANDLE IoCompletionPortHandle,
- IN PVOID CompletionKey,
- IN PVOID CompletionContext,
- IN NTSTATUS CompletionStatus,
- IN ULONG CompletionInformation
- );
-
-/*
- * FUNCTION: Set properties for profiling
- * ARGUMENTS:
- * Interval =
- * ClockSource =
- * RETURNS: Status
- *
- */
-
-NTSTATUS
-STDCALL
-NtSetIntervalProfile(
- ULONG Interval,
- KPROFILE_SOURCE ClockSource
- );
-
-NTSTATUS
-STDCALL
-ZwSetIntervalProfile(
- ULONG Interval,
- KPROFILE_SOURCE ClockSource
- );
-
-
-/*
- * FUNCTION: Sets the low part of an event pair
- * ARGUMENTS:
- EventPair = Handle to the event pair
- * RETURNS: Status
-*/
-
-NTSTATUS
-STDCALL
-NtSetLowEventPair(
- HANDLE EventPair
- );
-NTSTATUS
-STDCALL
-ZwSetLowEventPair(
- HANDLE EventPair
- );
-/*
- * FUNCTION: Sets the low part of an event pair and wait for the high part
- * ARGUMENTS:
- EventPair = Handle to the event pair
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetLowWaitHighEventPair(
- HANDLE EventPair
- );
-NTSTATUS
-STDCALL
-ZwSetLowWaitHighEventPair(
- HANDLE EventPair
- );
-
-/* NtSetLowWaitHighThread effectively invokes NtSetLowWaitHighEventPair on the
- * event pair of the thread.
- */
-NTSTATUS
-STDCALL
-NtSetLowWaitHighThread(
- VOID
- );
-/* ZwSetLowWaitHighThread effectively invokes ZwSetLowWaitHighEventPair on the
- * event pair of the thread.
- */
-NTSTATUS
-STDCALL
-ZwSetLowWaitHighThread(
- VOID
- );
-
-/* NtSetHighWaitLowThread effectively invokes NtSetHighWaitLowEventPair on the
- * event pair of the thread.
- */
-NTSTATUS
-STDCALL
-NtSetHighWaitLowThread(
- VOID
- );
-
-/* ZwSetHighWaitLowThread effectively invokes ZwSetHighWaitLowEventPair on the
- * event pair of the thread.
- */
-NTSTATUS
-STDCALL
-ZwSetHighWaitLowThread(
- VOID
- );
-
-NTSTATUS
-STDCALL
-NtSetQuotaInformationFile(
- HANDLE FileHandle,
- PIO_STATUS_BLOCK IoStatusBlock,
- PFILE_USER_QUOTA_INFORMATION Buffer,
- ULONG BufferLength
- );
-
-NTSTATUS
-STDCALL
-ZwSetQuotaInformationFile(
- HANDLE FileHandle,
- PIO_STATUS_BLOCK IoStatusBlock,
- PFILE_USER_QUOTA_INFORMATION Buffer,
- ULONG BufferLength
- );
-
-NTSTATUS
-STDCALL
-NtSetSecurityObject(
- IN HANDLE Handle,
- IN SECURITY_INFORMATION SecurityInformation,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor
- );
-
-NTSTATUS
-STDCALL
-ZwSetSecurityObject(
- IN HANDLE Handle,
- IN SECURITY_INFORMATION SecurityInformation,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor
- );
-
-
-/*
- * FUNCTION: Sets a system environment variable
- * ARGUMENTS:
- * ValueName = Name of the environment variable
- * Value = Value of the environment variable
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetSystemEnvironmentValue(
- IN PUNICODE_STRING VariableName,
- IN PUNICODE_STRING Value
- );
-NTSTATUS
-STDCALL
-ZwSetSystemEnvironmentValue(
- IN PUNICODE_STRING VariableName,
- IN PUNICODE_STRING Value
- );
-/*
- * FUNCTION: Sets system parameters
- * ARGUMENTS:
- * SystemInformationClass = Index to a particular set of system parameters
- * Can be one of the following values:
- *
- * SystemTimeAdjustmentInformation SYSTEM_TIME_ADJUSTMENT
- *
- * SystemInformation = Structure containing the parameters.
- * SystemInformationLength = Size of the structure.
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetSystemInformation(
- IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
- IN PVOID SystemInformation,
- IN ULONG SystemInformationLength
- );
-
-NTSTATUS
-STDCALL
-ZwSetSystemInformation(
- IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
- IN PVOID SystemInformation,
- IN ULONG SystemInformationLength
- );
-
-/*
- * FUNCTION: Sets the system time
- * ARGUMENTS:
- * SystemTime = Old System time
- * NewSystemTime = New System time
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetSystemTime(
- IN PLARGE_INTEGER SystemTime,
- IN PLARGE_INTEGER NewSystemTime OPTIONAL
- );
-NTSTATUS
-STDCALL
-ZwSetSystemTime(
- IN PLARGE_INTEGER SystemTime,
- IN PLARGE_INTEGER NewSystemTime OPTIONAL
- );
-
-/*
- * FUNCTION: Sets the frequency of the system timer
- * ARGUMENTS:
- * RequestedResolution =
- * SetOrUnset =
- * ActualResolution =
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetTimerResolution(
- IN ULONG DesiredResolution,
- IN BOOLEAN SetResolution,
- OUT PULONG CurrentResolution
- );
-NTSTATUS
-STDCALL
-ZwSetTimerResolution(
- IN ULONG DesiredResolution,
- IN BOOLEAN SetResolution,
- OUT PULONG CurrentResolution
- );
-
-/*
- * FUNCTION: Sets the value of a registry key
- * ARGUMENTS:
- * KeyHandle = Handle to a registry key
- * ValueName = Name of the value entry to change
- * TitleIndex = pointer to a structure containing the new volume information
- * Type = Type of the registry key. Can be one of the values:
- * REG_BINARY Unspecified binary data
- * REG_DWORD A 32 bit value
- * REG_DWORD_LITTLE_ENDIAN Same as REG_DWORD
- * REG_DWORD_BIG_ENDIAN A 32 bit value whose least significant byte is at the highest address
- * REG_EXPAND_SZ A zero terminated wide character string with unexpanded environment variables ( "%PATH%" )
- * REG_LINK A zero terminated wide character string referring to a symbolic link.
- * REG_MULTI_SZ A series of zero-terminated strings including a additional trailing zero
- * REG_NONE Unspecified type
- * REG_SZ A wide character string ( zero terminated )
- * REG_RESOURCE_LIST ??
- * REG_RESOURCE_REQUIREMENTS_LIST ??
- * REG_FULL_RESOURCE_DESCRIPTOR ??
- * Data = Contains the data for the registry key.
- * DataSize = size of the data.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtSetValueKey(
- IN HANDLE KeyHandle,
- IN PUNICODE_STRING ValueName,
- IN ULONG TitleIndex OPTIONAL,
- IN ULONG Type,
- IN PVOID Data,
- IN ULONG DataSize
- );
-NTSTATUS
-STDCALL
-ZwSetValueKey(
- IN HANDLE KeyHandle,
- IN PUNICODE_STRING ValueName,
- IN ULONG TitleIndex OPTIONAL,
- IN ULONG Type,
- IN PVOID Data,
- IN ULONG DataSize
- );
-
-/*
- * FUNCTION: Sets the volume information.
- * ARGUMENTS:
- * FileHandle = Handle to the file
- * IoStatusBlock = Caller should supply storage for additional status information
- * VolumeInformation = pointer to a structure containing the new volume information
- * Length = size of the structure.
- * VolumeInformationClass = specifies the particular volume information to set
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtSetVolumeInformationFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PVOID FsInformation,
- IN ULONG Length,
- IN FS_INFORMATION_CLASS FsInformationClass
- );
-
-NTSTATUS
-STDCALL
-ZwSetVolumeInformationFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PVOID FsInformation,
- IN ULONG Length,
- IN FS_INFORMATION_CLASS FsInformationClass
- );
-
-/*
- * FUNCTION: Shuts the system down
- * ARGUMENTS:
- * Action = Specifies the type of shutdown, it can be one of the following values:
- * ShutdownNoReboot, ShutdownReboot, ShutdownPowerOff
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtShutdownSystem(
- IN SHUTDOWN_ACTION Action
- );
-
-NTSTATUS
-STDCALL
-ZwShutdownSystem(
- IN SHUTDOWN_ACTION Action
- );
-
-/*
- * FUNCTION: Signals an object and wait for an other one.
- * ARGUMENTS:
- * ObjectHandleToSignal = Handle to the object that should be signaled
- * WaitableObjectHandle = Handle to the object that should be waited for
- * Alertable = True if the wait is alertable
- * TimeOut = The time to wait
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtSignalAndWaitForSingleObject(
- IN HANDLE ObjectHandleToSignal,
- IN HANDLE WaitableObjectHandle,
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER TimeOut OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-NtSignalAndWaitForSingleObject(
- IN HANDLE ObjectHandleToSignal,
- IN HANDLE WaitableObjectHandle,
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER TimeOut OPTIONAL
- );
-
-/*
- * FUNCTION: Starts profiling
- * ARGUMENTS:
- * ProfileHandle = Handle to the profile
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtStartProfile(
- HANDLE ProfileHandle
- );
-
-NTSTATUS
-STDCALL
-ZwStartProfile(
- HANDLE ProfileHandle
- );
-
-/*
- * FUNCTION: Stops profiling
- * ARGUMENTS:
- * ProfileHandle = Handle to the profile
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtStopProfile(
- HANDLE ProfileHandle
- );
-
-NTSTATUS
-STDCALL
-ZwStopProfile(
- HANDLE ProfileHandle
- );
-
-/* --- PROCESS MANAGEMENT --- */
-
-//--NtSystemDebugControl
-/*
- * FUNCTION: Terminates the execution of a process.
- * ARGUMENTS:
- * ThreadHandle = Handle to the process
- * ExitStatus = The exit status of the process to terminate with.
- * REMARKS
- * Native applications should kill themselves using this function.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtTerminateProcess(
- IN HANDLE ProcessHandle OPTIONAL,
- IN NTSTATUS ExitStatus
- );
-NTSTATUS
-STDCALL
-ZwTerminateProcess(
- IN HANDLE ProcessHandle OPTIONAL,
- IN NTSTATUS ExitStatus
- );
-
-NTSTATUS
-STDCALL
-NtTerminateJobObject(
- HANDLE JobHandle,
- NTSTATUS ExitStatus
- );
-
-NTSTATUS
-STDCALL
-ZwTerminateJobObject(
- HANDLE JobHandle,
- NTSTATUS ExitStatus
- );
-
-NTSTATUS
-STDCALL
-NtTraceEvent(
- IN ULONG TraceHandle,
- IN ULONG Flags,
- IN ULONG TraceHeaderLength,
- IN struct _EVENT_TRACE_HEADER* TraceHeader
- );
-
-NTSTATUS
-STDCALL
-ZwTraceEvent(
- IN ULONG TraceHandle,
- IN ULONG Flags,
- IN ULONG TraceHeaderLength,
- IN struct _EVENT_TRACE_HEADER* TraceHeader
- );
-
-NTSTATUS
-STDCALL
-NtTranslateFilePath(
- ULONG Unknown1,
- ULONG Unknown2,
- ULONG Unknown3
- );
-
-
-NTSTATUS
-STDCALL
-ZwTranslateFilePath(
- ULONG Unknown1,
- ULONG Unknown2,
- ULONG Unknown3
- );
-/*
- * FUNCTION: Unloads a driver.
- * ARGUMENTS:
- * DriverServiceName = Name of the driver to unload
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtUnloadDriver(
- IN PUNICODE_STRING DriverServiceName
- );
-NTSTATUS
-STDCALL
-ZwUnloadDriver(
- IN PUNICODE_STRING DriverServiceName
- );
-
-/*
- * FUNCTION: Unmaps a piece of virtual memory backed by a file.
- * ARGUMENTS:
- * ProcessHandle = Handle to the process
- * BaseAddress = The address where the mapping begins
- * REMARK:
- This procedure maps to the win32 UnMapViewOfFile
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtUnmapViewOfSection(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress
- );
-NTSTATUS
-STDCALL
-ZwUnmapViewOfSection(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress
- );
-
-
-NTSTATUS STDCALL
-NtWriteRequestData (HANDLE PortHandle,
- PLPC_MESSAGE Message,
- ULONG Index,
- PVOID Buffer,
- ULONG BufferLength,
- PULONG ReturnLength);
-
-NTSTATUS STDCALL
-ZwWriteRequestData (HANDLE PortHandle,
- PLPC_MESSAGE Message,
- ULONG Index,
- PVOID Buffer,
- ULONG BufferLength,
- PULONG ReturnLength);
-
-
-/*
- * FUNCTION: Writes a range of virtual memory
- * ARGUMENTS:
- * ProcessHandle = The handle to the process owning the address space.
- * BaseAddress = The points to the address to write to
- * Buffer = Pointer to the buffer to write
- * NumberOfBytesToWrite = Offset to the upper boundary to write
- * NumberOfBytesWritten = Total bytes written
- * REMARKS:
- * This function maps to the win32 WriteProcessMemory
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtWriteVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- IN PVOID Buffer,
- IN ULONG NumberOfBytesToWrite,
- OUT PULONG NumberOfBytesWritten
- );
-
-NTSTATUS
-STDCALL
-ZwWriteVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- IN PVOID Buffer,
- IN ULONG NumberOfBytesToWrite,
- OUT PULONG NumberOfBytesWritten
- );
-
-
-/*
- * FUNCTION: Waits for an object to become signalled.
- * ARGUMENTS:
- * ObjectHandle = The object handle
- * Alertable = If true the wait is alertable.
- * TimeOut = The maximum wait time.
- * REMARKS:
- * This function maps to the win32 WaitForSingleObjectEx.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtWaitForSingleObject (
- IN HANDLE ObjectHandle,
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER TimeOut OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwWaitForSingleObject (
- IN HANDLE ObjectHandle,
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER TimeOut OPTIONAL
- );
-
-/* --- EVENT PAIR OBJECT --- */
-
-/*
- * FUNCTION: Waits for the high part of an eventpair to become signalled
- * ARGUMENTS:
- * EventPairHandle = Handle to the event pair.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtWaitHighEventPair(
- IN HANDLE EventPairHandle
- );
-
-NTSTATUS
-STDCALL
-ZwWaitHighEventPair(
- IN HANDLE EventPairHandle
- );
-
-/*
- * FUNCTION: Waits for the low part of an eventpair to become signalled
- * ARGUMENTS:
- * EventPairHandle = Handle to the event pair.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtWaitLowEventPair(
- IN HANDLE EventPairHandle
- );
-
-NTSTATUS
-STDCALL
-ZwWaitLowEventPair(
- IN HANDLE EventPairHandle
- );
-
-/* --- FILE MANAGEMENT --- */
-
-/*
- * FUNCTION: Unlocks a range of bytes in a file.
- * ARGUMENTS:
- * FileHandle = Handle to the file
- * IoStatusBlock = Caller should supply storage for a structure containing
- * the completion status and information about the requested unlock operation.
- The information field is set to the number of bytes unlocked.
- * ByteOffset = Offset to start the range of bytes to unlock
- * Length = Number of bytes to unlock.
- * Key = Special value to enable other threads to unlock a file than the
- thread that locked the file. The key supplied must match with the one obtained
- in a previous call to NtLockFile.
- * REMARK:
- This procedure maps to the win32 procedure UnlockFileEx. STATUS_PENDING is returned if the lock could
- not be obtained immediately, the device queue is busy and the IRP is queued.
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_PENDING | STATUS_ACCESS_DENIED | STATUS_INSUFFICIENT_RESOURCES |
- STATUS_INVALID_PARAMETER | STATUS_INVALID_DEVICE_REQUEST | STATUS_RANGE_NOT_LOCKED ]
- */
-NTSTATUS
-STDCALL
-NtUnlockFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PLARGE_INTEGER ByteOffset,
- IN PLARGE_INTEGER Lenght,
- OUT PULONG Key OPTIONAL
- );
-NTSTATUS
-STDCALL
-ZwUnlockFile(
- IN HANDLE FileHandle,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PLARGE_INTEGER ByteOffset,
- IN PLARGE_INTEGER Lenght,
- OUT PULONG Key OPTIONAL
- );
-
-/*
- * FUNCTION: Writes data to a file
- * ARGUMENTS:
- * FileHandle = The handle a file ( from NtCreateFile )
- * Event = Specifies a event that will become signalled when the write operation completes.
- * ApcRoutine = Asynchroneous Procedure Callback [ Should not be used by device drivers ]
- * ApcContext = Argument to the Apc Routine
- * IoStatusBlock = Caller should supply storage for a structure containing the completion status and information about the requested write operation.
- * Buffer = Caller should supply storage for a buffer that will contain the information to be written to file.
- * Length = Size in bytest of the buffer
- * ByteOffset = Points to a file offset. If a combination of Length and BytesOfSet is past the end-of-file mark the file will be enlarged.
- * BytesOffset is ignored if the file is created with FILE_APPEND_DATA in the DesiredAccess. BytesOffset is also ignored if
- * the file is created with CreateOptions flags FILE_SYNCHRONOUS_IO_ALERT or FILE_SYNCHRONOUS_IO_NONALERT set, in that case a offset
- * should be created by specifying FILE_USE_FILE_POINTER_POSITION.
- * Key = Unused
- * REMARKS:
- * This function maps to the win32 WriteFile.
- * Callers to NtWriteFile should run at IRQL PASSIVE_LEVEL.
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_PENDING | STATUS_ACCESS_DENIED | STATUS_INSUFFICIENT_RESOURCES
- STATUS_INVALID_PARAMETER | STATUS_INVALID_DEVICE_REQUEST | STATUS_FILE_LOCK_CONFLICT ]
- */
-NTSTATUS
-STDCALL
-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,
- IN PULONG Key OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwWriteFile(
- 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 ,
- IN PULONG Key OPTIONAL
- );
-
-/*
- * FUNCTION: Writes a file
- * ARGUMENTS:
- * FileHandle = The handle of the file
- * Event =
- * ApcRoutine = Asynchroneous Procedure Callback [ Should not be used by device drivers ]
- * ApcContext = Argument to the Apc Routine
- * IoStatusBlock = Caller should supply storage for a structure containing the completion status and information about the requested write operation.
- * BufferDescription = Caller should supply storage for a buffer that will contain the information to be written to file.
- * BufferLength = Size in bytest of the buffer
- * ByteOffset = Points to a file offset. If a combination of Length and BytesOfSet is past the end-of-file mark the file will be enlarged.
- * BytesOffset is ignored if the file is created with FILE_APPEND_DATA in the DesiredAccess. BytesOffset is also ignored if
- * the file is created with CreateOptions flags FILE_SYNCHRONOUS_IO_ALERT or FILE_SYNCHRONOUS_IO_NONALERT set, in that case a offset
- * should be created by specifying FILE_USE_FILE_POINTER_POSITION. Use FILE_WRITE_TO_END_OF_FILE to write to the EOF.
- * Key = If a matching key [ a key provided at NtLockFile ] is provided the write operation will continue even if a byte range is locked.
- * REMARKS:
- * This function maps to the win32 WriteFile.
- * Callers to NtWriteFile should run at IRQL PASSIVE_LEVEL.
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_PENDING | STATUS_ACCESS_DENIED | STATUS_INSUFFICIENT_RESOURCES
- STATUS_INVALID_PARAMETER | STATUS_INVALID_DEVICE_REQUEST | STATUS_FILE_LOCK_CONFLICT ]
- */
-
-NTSTATUS
-STDCALL
-NtWriteFileGather(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN FILE_SEGMENT_ELEMENT BufferDescription[],
- IN ULONG BufferLength,
- IN PLARGE_INTEGER ByteOffset,
- IN PULONG Key OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwWriteFileGather(
- IN HANDLE FileHandle,
- IN HANDLE Event OPTIONAL,
- IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
- IN PVOID ApcContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN FILE_SEGMENT_ELEMENT BufferDescription[],
- IN ULONG BufferLength,
- IN PLARGE_INTEGER ByteOffset,
- IN PULONG Key OPTIONAL
- );
-
-
-/* --- THREAD MANAGEMENT --- */
-
-/*
- * FUNCTION: Increments a thread's resume count
- * ARGUMENTS:
- * ThreadHandle = Handle to the thread that should be resumed
- * PreviousSuspendCount = The resulting/previous suspend count.
- * REMARK:
- * A thread will be suspended if its suspend count is greater than 0. This procedure maps to
- * the win32 SuspendThread function. ( documentation about the the suspend count can be found here aswell )
- * The suspend count is not increased if it is greater than MAXIMUM_SUSPEND_COUNT.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtSuspendThread(
- IN HANDLE ThreadHandle,
- OUT PULONG PreviousSuspendCount OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwSuspendThread(
- IN HANDLE ThreadHandle,
- OUT PULONG PreviousSuspendCount OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-NtSuspendProcess(
- IN HANDLE ProcessHandle
- );
-
-NTSTATUS
-STDCALL
-ZwSuspendProcess(
- IN HANDLE ProcessHandle
- );
-
-/*
- * FUNCTION: Terminates the execution of a thread.
- * ARGUMENTS:
- * ThreadHandle = Handle to the thread
- * ExitStatus = The exit status of the thread to terminate with.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtTerminateThread(
- IN HANDLE ThreadHandle ,
- IN NTSTATUS ExitStatus
- );
-NTSTATUS
-STDCALL
-ZwTerminateThread(
- IN HANDLE ThreadHandle ,
- IN NTSTATUS ExitStatus
- );
-/*
- * FUNCTION: Tests to see if there are any pending alerts for the calling thread
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtTestAlert(
- VOID
- );
-NTSTATUS
-STDCALL
-ZwTestAlert(
- VOID
- );
-
-/*
- * FUNCTION: Yields the callers thread.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtYieldExecution(
- VOID
- );
-
-NTSTATUS
-STDCALL
-ZwYieldExecution(
- VOID
- );
-
-/* --- POWER MANAGEMENT --- */
-
-#ifndef __USE_W32API
-NTSTATUS STDCALL
-NtSetSystemPowerState(IN POWER_ACTION SystemAction,
- IN SYSTEM_POWER_STATE MinSystemState,
- IN ULONG Flags);
-#endif
-
-/* --- DEBUG SUBSYSTEM --- */
-
-NTSTATUS STDCALL
-NtSystemDebugControl(DEBUG_CONTROL_CODE ControlCode,
- PVOID InputBuffer,
- ULONG InputBufferLength,
- PVOID OutputBuffer,
- ULONG OutputBufferLength,
- PULONG ReturnLength);
-
-/* --- VIRTUAL DOS MACHINE (VDM) --- */
-
-NTSTATUS
-STDCALL
-NtVdmControl (ULONG ControlCode, PVOID ControlData);
-
-
-/* --- WIN32 --- */
-
-NTSTATUS STDCALL
-NtW32Call(IN ULONG RoutineIndex,
- IN PVOID Argument,
- IN ULONG ArgumentLength,
- OUT PVOID* Result OPTIONAL,
- OUT PULONG ResultLength OPTIONAL);
-
-/* --- CHANNELS --- */
-
-NTSTATUS
-STDCALL
-NtCreateChannel (
- VOID
- );
-
-NTSTATUS
-STDCALL
-NtListenChannel (
- VOID
- );
-
-NTSTATUS
-STDCALL
-NtOpenChannel (
- VOID
- );
-
-NTSTATUS
-STDCALL
-NtReplyWaitSendChannel (
- VOID
- );
-
-NTSTATUS
-STDCALL
-NtSendWaitReplyChannel (
- VOID
- );
-
-NTSTATUS
-STDCALL
-NtSetContextChannel (
- VOID
- );
-
-/* --- MISCELLANEA --- */
-
-//NTSTATUS STDCALL NtSetLdtEntries(VOID);
-NTSTATUS
-STDCALL
-NtSetLdtEntries (ULONG Selector1,
- LDT_ENTRY LdtEntry1,
- ULONG Selector2,
- LDT_ENTRY LdtEntry2);
-
-/*
- * FUNCTION: Checks a clients access rights to a object
- * ARGUMENTS:
- * SecurityDescriptor = Security information against which the access is checked
- * ClientToken = Represents a client
- * DesiredAcces =
- * GenericMapping =
- * PrivilegeSet =
- * ReturnLength = Bytes written
- * GrantedAccess =
- * AccessStatus = Indicates if the ClientToken allows the requested access
- * REMARKS: The arguments map to the win32 AccessCheck
- * Gary Nebbett is wrong:
- * The 7th argument is a PACCESS_MASK, not a PULONG.
- * The 8th argument is a PNTSTATUS, not a PBOOLEAN.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtAccessCheck(
- IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN HANDLE ClientToken,
- IN ACCESS_MASK DesiredAcces,
- IN PGENERIC_MAPPING GenericMapping,
- OUT PPRIVILEGE_SET PrivilegeSet,
- OUT PULONG ReturnLength,
- OUT PACCESS_MASK GrantedAccess,
- OUT PNTSTATUS AccessStatus
- );
-
-NTSTATUS
-STDCALL
-ZwAccessCheck(
- IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN HANDLE ClientToken,
- IN ACCESS_MASK DesiredAcces,
- IN PGENERIC_MAPPING GenericMapping,
- OUT PPRIVILEGE_SET PrivilegeSet,
- OUT PULONG ReturnLength,
- OUT PACCESS_MASK GrantedAccess,
- OUT PNTSTATUS AccessStatus
- );
-
-NTSTATUS
-STDCALL
-RtlOpenCurrentUser(
- IN ACCESS_MASK DesiredAccess,
- OUT PHANDLE KeyHandle);
-
-/*
- * FUNCTION: Checks a clients access rights to a object and issues a audit a alarm. ( it logs the access )
- * ARGUMENTS:
- * SubsystemName = Specifies the name of the subsystem, can be "WIN32" or "DEBUG"
- * ObjectHandle =
- * ObjectTypeName =
- * ObjectName =
- * SecurityDescriptor =
- * DesiredAcces =
- * GenericMapping =
- * ObjectCreation =
- * GrantedAccess =
- * AccessStatus =
- * GenerateOnClose =
- * REMARKS: The arguments map to the win32 AccessCheck
- * RETURNS: Status
- */
-
-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
- );
-
-/*
- * FUNCTION: Cancels a timer
- * ARGUMENTS:
- * TimerHandle = Handle to the timer
- * CurrentState = Specifies the state of the timer when cancelled.
- * REMARKS:
- * The arguments to this function map to the function CancelWaitableTimer.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCancelTimer(
- IN HANDLE TimerHandle,
- OUT PBOOLEAN CurrentState OPTIONAL
- );
-
-/*
- * FUNCTION: Continues a thread with the specified context
- * ARGUMENTS:
- * Context = Specifies the processor context
- * IrqLevel = Specifies the Interupt Request Level to continue with. Can
- * be PASSIVE_LEVEL or APC_LEVEL
- * REMARKS
- * NtContinue can be used to continue after an exception or apc.
- * RETURNS: Status
- */
-//FIXME This function might need another parameter
-
-NTSTATUS
-STDCALL
-NtContinue(
- IN PCONTEXT Context,
- IN BOOLEAN TestAlert
- );
-
-/*
- * FUNCTION: Creates a paging file.
- * ARGUMENTS:
- * FileName = Name of the pagefile
- * InitialSize = Specifies the initial size in bytes
- * MaximumSize = Specifies the maximum size in bytes
- * Reserved = Reserved for future use
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCreatePagingFile(
- IN PUNICODE_STRING FileName,
- IN PLARGE_INTEGER InitialSize,
- IN PLARGE_INTEGER MaxiumSize,
- IN ULONG Reserved
- );
-
-
-/*
- * FUNCTION: Creates a profile
- * ARGUMENTS:
- * ProfileHandle (OUT) = Caller supplied storage for the resulting handle
- * ObjectAttribute = Initialized attributes for the object
- * ImageBase = Start address of executable image
- * ImageSize = Size of the image
- * Granularity = Bucket size
- * Buffer = Caller supplies buffer for profiling info
- * ProfilingSize = Buffer size
- * ClockSource = Specify 0 / FALSE ??
- * ProcessorMask = A value of -1 indicates disables per processor profiling,
- otherwise bit set for the processor to profile.
- * REMARKS:
- * This function maps to the win32 CreateProcess.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtCreateProfile(OUT PHANDLE ProfileHandle,
- IN HANDLE Process OPTIONAL,
- IN PVOID ImageBase,
- IN ULONG ImageSize,
- IN ULONG BucketSize,
- IN PVOID Buffer,
- IN ULONG BufferSize,
- IN KPROFILE_SOURCE ProfileSource,
- IN KAFFINITY Affinity);
-
-/*
- * FUNCTION: Creates a user mode thread
- * ARGUMENTS:
- * ThreadHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the thread.
- * ObjectAttributes = Initialized attributes for the object.
- * ProcessHandle = Handle to the threads parent process.
- * ClientId (OUT) = Caller supplies storage for returned process id and thread id.
- * ThreadContext = Initial processor context for the thread.
- * InitialTeb = Initial user mode stack context for the thread.
- * CreateSuspended = Specifies if the thread is ready for scheduling
- * REMARKS:
- * This function maps to the win32 function CreateThread.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtCreateThread(
- OUT PHANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN HANDLE ProcessHandle,
- OUT PCLIENT_ID ClientId,
- IN PCONTEXT ThreadContext,
- IN PINITIAL_TEB InitialTeb,
- IN BOOLEAN CreateSuspended
- );
-
-/*
- * FUNCTION: Delays the execution of the calling thread.
- * ARGUMENTS:
- * Alertable = If TRUE the thread is alertable during is wait period
- * Interval = Specifies the interval to wait.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtDelayExecution(
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER DelayInterval
- );
-
-/*
- * FUNCTION: Extends a section
- * ARGUMENTS:
- * SectionHandle = Handle to the section
- * NewMaximumSize = Adjusted size
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtExtendSection(
- IN HANDLE SectionHandle,
- IN PLARGE_INTEGER NewMaximumSize
- );
-
-/*
- * FUNCTION: Flushes a the processors instruction cache
- * ARGUMENTS:
- * ProcessHandle = Points to the process owning the cache
- * BaseAddress = // might this be a image address ????
- * NumberOfBytesToFlush =
- * RETURNS: Status
- * REMARKS:
- * This funciton is used by debuggers
- */
-NTSTATUS
-STDCALL
-NtFlushInstructionCache(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- IN UINT NumberOfBytesToFlush
- );
-
-/*
- * FUNCTION: Flushes virtual memory to file
- * ARGUMENTS:
- * ProcessHandle = Points to the process that allocated the virtual memory
- * BaseAddress = Points to the memory address
- * NumberOfBytesToFlush = Limits the range to flush,
- * NumberOfBytesFlushed = Actual number of bytes flushed
- * RETURNS: Status
- * REMARKS:
- * Check return status on STATUS_NOT_MAPPED_DATA
- */
-NTSTATUS
-STDCALL
-NtFlushVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- IN ULONG NumberOfBytesToFlush,
- OUT PULONG NumberOfBytesFlushed OPTIONAL
- );
-
-/*
- * FUNCTION: Retrieves the uptime of the system
- * ARGUMENTS:
- * UpTime = Number of clock ticks since boot.
- * RETURNS: Status
- */
-ULONG
-STDCALL
-NtGetTickCount(
- VOID
- );
-
-/*
- * FUNCTION: Loads a registry key.
- * ARGUMENTS:
- * KeyObjectAttributes = Key to be loaded
- * FileObjectAttributes = File to load the key from
- * REMARK:
- * This procedure maps to the win32 procedure RegLoadKey
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtLoadKey(
- IN POBJECT_ATTRIBUTES KeyObjectAttributes,
- IN POBJECT_ATTRIBUTES FileObjectAttributes
- );
-
-
-/*
- * FUNCTION: Locks a range of virtual memory.
- * ARGUMENTS:
- * ProcessHandle = Handle to the process
- * BaseAddress = Lower boundary of the range of bytes to lock.
- * NumberOfBytesLock = Offset to the upper boundary.
- * NumberOfBytesLocked (OUT) = Number of bytes actually locked.
- * REMARK:
- This procedure maps to the win32 procedure VirtualLock.
- * RETURNS: Status [STATUS_SUCCESS | STATUS_WAS_LOCKED ]
- */
-NTSTATUS
-STDCALL
-NtLockVirtualMemory(
- HANDLE ProcessHandle,
- PVOID BaseAddress,
- ULONG NumberOfBytesToLock,
- PULONG NumberOfBytesLocked
- );
-
-NTSTATUS
-STDCALL
-NtOpenObjectAuditAlarm(
- IN PUNICODE_STRING SubsystemName,
- IN PVOID HandleId,
- IN PUNICODE_STRING ObjectTypeName,
- IN PUNICODE_STRING ObjectName,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN HANDLE ClientToken,
- IN ULONG DesiredAccess,
- IN ULONG GrantedAccess,
- IN PPRIVILEGE_SET Privileges,
- IN BOOLEAN ObjectCreation,
- IN BOOLEAN AccessGranted,
- OUT PBOOLEAN GenerateOnClose
- );
-
-/*
- * FUNCTION: Set the access protection of a range of virtual memory
- * ARGUMENTS:
- * ProcessHandle = Handle to process owning the virtual address space
- * BaseAddress = Start address
- * NumberOfBytesToProtect = Delimits the range of virtual memory
- * for which the new access protection holds
- * NewAccessProtection = The new access proctection for the pages
- * OldAccessProtection = Caller should supply storage for the old
- * access protection
- *
- * REMARKS:
- * The function maps to the win32 VirtualProtectEx
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtProtectVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID *BaseAddress,
- IN ULONG *NumberOfBytesToProtect,
- IN ULONG NewAccessProtection,
- OUT PULONG OldAccessProtection
- );
-
-/*
- * FUNCTION: Query information about the content of a directory object
- * ARGUMENTS:
- DirectoryHandle =
- Buffer = Buffer must be large enough to hold the name strings too
- ReturnSingleEntry = If TRUE :return the index of the next object in this directory in ObjectIndex
- If FALSE: return the number of objects in this directory in ObjectIndex
- RestartScan = If TRUE: ignore input value of ObjectIndex always start at index 0
- If FALSE use input value of ObjectIndex
- Context = zero based index of object in the directory depends on GetNextIndex and IgnoreInputIndex
- ReturnLength = Actual size of the ObjectIndex ???
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtQueryDirectoryObject(
- IN HANDLE DirectoryHandle,
- OUT PVOID Buffer,
- IN ULONG BufferLength,
- IN BOOLEAN ReturnSingleEntry,
- IN BOOLEAN RestartScan,
- IN OUT PULONG Context,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-/*
- * FUNCTION: Query the interval and the clocksource for profiling
- * ARGUMENTS:
- Interval =
- ClockSource =
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtQueryIntervalProfile(
- IN KPROFILE_SOURCE ProfileSource,
- OUT PULONG Interval
- );
-
-/*
- * FUNCTION: Queries the information of a section object.
- * ARGUMENTS:
- * SectionHandle = Handle to the section link object
- * SectionInformationClass = Index to a certain information structure
- * SectionInformation (OUT)= Caller supplies storage for resulting information
- * Length = Size of the supplied storage
- * ResultLength = Data written
- * RETURNS: Status
- *
-*/
-NTSTATUS
-STDCALL
-NtQuerySection(
- IN HANDLE SectionHandle,
- IN SECTION_INFORMATION_CLASS SectionInformationClass,
- OUT PVOID SectionInformation,
- IN ULONG SectionInformationLength,
- OUT PULONG ResultLength OPTIONAL
- );
-
-/*
- * FUNCTION: Queries the virtual memory information.
- * ARGUMENTS:
- ProcessHandle = Process owning the virtual address space
- BaseAddress = Points to the page where the information is queried for.
- * VirtualMemoryInformationClass = Index to a certain information structure
-
- MemoryBasicInformation MEMORY_BASIC_INFORMATION
-
- * VirtualMemoryInformation = caller supplies storage for the information structure
- * Length = size of the structure
- ResultLength = Data written
- * RETURNS: Status
- *
-*/
-
-NTSTATUS
-STDCALL
-NtQueryVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID Address,
- IN IN CINT VirtualMemoryInformationClass,
- OUT PVOID VirtualMemoryInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-/*
- * FUNCTION: Raises a hard error (stops the system)
- * ARGUMENTS:
- * Status = Status code of the hard error
- * NumberOfParameters = Number of (optional) parameters in Parameters
- * UnicodeStringParameterMask = (optional) string parameter, one per error code
- * Parameters = An Array of pointers for use in the error message string
- * ResponseOption = Specifies the type of the message box
- * Response = Specifies the user's response
- * RETURNS: Status
- *
- */
-
-NTSTATUS
-STDCALL
-NtRaiseHardError(
- IN NTSTATUS ErrorStatus,
- IN ULONG NumberOfParameters,
- IN PUNICODE_STRING UnicodeStringParameterMask OPTIONAL,
- IN PVOID *Parameters,
- IN HARDERROR_RESPONSE_OPTION ResponseOption,
- OUT PHARDERROR_RESPONSE Response
- );
-
-/*
- * FUNCTION: Sets the information of a registry key.
- * ARGUMENTS:
- * KeyHandle = Handle to the registry key
- * KeyInformationClass = Index to the a certain information structure.
- * Can be one of the following values:
- *
- * KeyLastWriteTimeInformation KEY_LAST_WRITE_TIME_INFORMATION
- *
- * KeyInformation = Storage for the new information
- * KeyInformationLength = Size of the information strucure
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-NtSetInformationKey(
- IN HANDLE KeyHandle,
- IN KEY_SET_INFORMATION_CLASS KeyInformationClass,
- IN PVOID KeyInformation,
- IN ULONG KeyInformationLength
- );
-
-/*
- * FUNCTION: Changes a set of object specific parameters
- * ARGUMENTS:
- * ObjectHandle =
- * ObjectInformationClass = Index to the set of parameters to change.
-
- ObjectHandleInformation OBJECT_HANDLE_ATTRIBUTE_INFORMATION
-
-
- * ObjectInformation = Caller supplies storage for parameters to set.
- * Length = Size of the storage supplied
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetInformationObject(
- IN HANDLE ObjectHandle,
- IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
- IN PVOID ObjectInformation,
- IN ULONG Length
- );
-
-/*
- * FUNCTION: Sets the characteristics of a timer
- * ARGUMENTS:
- * TimerHandle = Handle to the timer
- * DueTime = Time before the timer becomes signalled for the first time.
- * TimerApcRoutine = Completion routine can be called on time completion
- * TimerContext = Argument to the completion routine
- * Resume = Specifies if the timer should repeated after completing one cycle
- * Period = Cycle of the timer
- * REMARKS: This routine maps to the win32 SetWaitableTimer.
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetTimer(
- IN HANDLE TimerHandle,
- IN PLARGE_INTEGER DueTime,
- IN PTIMER_APC_ROUTINE TimerApcRoutine OPTIONAL,
- IN PVOID TimerContext OPTIONAL,
- IN BOOLEAN ResumeTimer,
- IN LONG Period OPTIONAL,
- OUT PBOOLEAN PreviousState OPTIONAL
- );
-
-/*
- * FUNCTION: Unloads a registry key.
- * ARGUMENTS:
- * KeyHandle = Handle to the registry key
- * REMARK:
- * This procedure maps to the win32 procedure RegUnloadKey
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtUnloadKey(
- IN POBJECT_ATTRIBUTES KeyObjectAttributes
- );
-
-/*
- * FUNCTION: Unlocks a range of virtual memory.
- * ARGUMENTS:
- * ProcessHandle = Handle to the process
- * BaseAddress = Lower boundary of the range of bytes to unlock.
- * NumberOfBytesToUnlock = Offset to the upper boundary to unlock.
- * NumberOfBytesUnlocked (OUT) = Number of bytes actually unlocked.
- * REMARK:
- This procedure maps to the win32 procedure VirtualUnlock
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_PAGE_WAS_ULOCKED ]
- */
-NTSTATUS
-STDCALL
-NtUnlockVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- IN ULONG NumberOfBytesToUnlock,
- OUT PULONG NumberOfBytesUnlocked OPTIONAL
- );
-
-/*
- * FUNCTION: Waits for multiple objects to become signalled.
- * ARGUMENTS:
- * ObjectCount = The number of objects
- * ObjectsArray = The array of object handles
- * WaitType = Can be one of the values UserMode or KernelMode
- * Alertable = If true the wait is alertable.
- * TimeOut = The maximum wait time.
- * REMARKS:
- * This function maps to the win32 WaitForMultipleObjectEx.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtWaitForMultipleObjects (
- IN ULONG ObjectCount,
- IN PHANDLE ObjectsArray,
- IN WAIT_TYPE WaitType,
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER TimeOut OPTIONAL
- );
-
-
-
-
-
-#ifndef __USE_W32API
-
-/*
- * FUNCTION: Continues a thread with the specified context
- * ARGUMENTS:
- * Context = Specifies the processor context
- * IrqLevel = Specifies the Interupt Request Level to continue with. Can
- * be PASSIVE_LEVEL or APC_LEVEL
- * REMARKS
- * NtContinue can be used to continue after an exception or apc.
- * RETURNS: Status
- */
-//FIXME This function might need another parameter
-
-NTSTATUS STDCALL ZwContinue(IN PCONTEXT Context, IN CINT IrqLevel);
-
-/*
- * FUNCTION: Retrieves the system time
- * ARGUMENTS:
- * CurrentTime (OUT) = Caller should supply storage for the resulting time.
- * RETURNS: Status
- *
-*/
-
-NTSTATUS
-STDCALL
-ZwQuerySystemTime (
- OUT PLARGE_INTEGER CurrentTime
- );
-
-/*
- * FUNCTION: Copies a handle from one process space to another
- * ARGUMENTS:
- * SourceProcessHandle = The source process owning the handle. The source process should have opened
- * the SourceHandle with PROCESS_DUP_HANDLE access.
- * SourceHandle = The handle to the object.
- * TargetProcessHandle = The destination process owning the handle
- * TargetHandle (OUT) = Caller should supply storage for the duplicated handle.
- * DesiredAccess = The desired access to the handle.
- * InheritHandle = Indicates wheter the new handle will be inheritable or not.
- * Options = Specifies special actions upon duplicating the handle. Can be
- * one of the values DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS.
- * DUPLICATE_CLOSE_SOURCE specifies that the source handle should be
- * closed after duplicating. DUPLICATE_SAME_ACCESS specifies to ignore
- * the DesiredAccess paramter and just grant the same access to the new
- * handle.
- * RETURNS: Status
- * REMARKS: This function maps to the win32 DuplicateHandle.
- */
-
-NTSTATUS
-STDCALL
-NtDuplicateObject(
- IN HANDLE SourceProcessHandle,
- IN HANDLE SourceHandle,
- IN HANDLE TargetProcessHandle,
- OUT PHANDLE TargetHandle,
- IN ACCESS_MASK DesiredAccess,
- IN BOOLEAN InheritHandle,
- IN ULONG Options
- );
-
-NTSTATUS
-STDCALL
-ZwDuplicateObject(
- IN HANDLE SourceProcessHandle,
- IN PHANDLE SourceHandle,
- IN HANDLE TargetProcessHandle,
- OUT PHANDLE TargetHandle,
- IN ACCESS_MASK DesiredAccess,
- IN BOOLEAN InheritHandle,
- IN ULONG Options
- );
-
-/*
- * FUNCTION: Checks a clients access rights to a object and issues a audit a alarm. ( it logs the access )
- * ARGUMENTS:
- * SubsystemName = Specifies the name of the subsystem, can be "WIN32" or "DEBUG"
- * ObjectHandle =
- * ObjectTypeName =
- * ObjectName =
- * SecurityDescriptor =
- * DesiredAcces =
- * GenericMapping =
- * ObjectCreation =
- * GrantedAccess =
- * AccessStatus =
- * GenerateOnClose =
- * REMARKS: The arguments map to the win32 AccessCheck
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-ZwAccessCheckAndAuditAlarm(
- 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
- );
-
-/*
- * FUNCTION: Adds an atom to the global atom table
- * ARGUMENTS:
- * AtomName = The string to add to the atom table.
- * AtomNameLength = Length of the atom name
- * Atom (OUT) = Caller supplies storage for the resulting atom.
- * REMARKS: The arguments map to the win32 add GlobalAddAtom.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtAddAtom(
- IN PWSTR AtomName,
- IN ULONG AtomNameLength,
- IN OUT PRTL_ATOM Atom
- );
-
-
-NTSTATUS
-STDCALL
-ZwAddAtom(
- IN PWSTR AtomName,
- IN ULONG AtomNameLength,
- IN OUT PRTL_ATOM Atom
- );
-
-NTSTATUS
-STDCALL
-NtAllocateUuids(
- OUT PULARGE_INTEGER Time,
- OUT PULONG Range,
- OUT PULONG Sequence,
- OUT PUCHAR Seed
- );
-
-NTSTATUS
-STDCALL
-ZwAllocateUuids(
- OUT PULARGE_INTEGER Time,
- OUT PULONG Range,
- OUT PULONG Sequence,
- OUT PUCHAR Seed
- );
-
-NTSTATUS
-STDCALL
-ZwCancelTimer(
- IN HANDLE TimerHandle,
- OUT ULONG ElapsedTime
- );
-
-/*
- * FUNCTION: Creates a paging file.
- * ARGUMENTS:
- * FileName = Name of the pagefile
- * InitialSize = Specifies the initial size in bytes
- * MaximumSize = Specifies the maximum size in bytes
- * Reserved = Reserved for future use
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwCreatePagingFile(
- IN PUNICODE_STRING FileName,
- IN PLARGE_INTEGER InitialSize,
- IN PLARGE_INTEGER MaxiumSize,
- IN ULONG Reserved
- );
-
-/*
- * FUNCTION: Creates a user mode thread
- * ARGUMENTS:
- * ThreadHandle (OUT) = Caller supplied storage for the resulting handle
- * DesiredAccess = Specifies the allowed or desired access to the thread.
- * ObjectAttributes = Initialized attributes for the object.
- * ProcessHandle = Handle to the threads parent process.
- * ClientId (OUT) = Caller supplies storage for returned process id and thread id.
- * ThreadContext = Initial processor context for the thread.
- * InitialTeb = Initial user mode stack context for the thread.
- * CreateSuspended = Specifies if the thread is ready for scheduling
- * REMARKS:
- * This function maps to the win32 function CreateThread.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwCreateThread(
- OUT PHANDLE ThreadHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN HANDLE ProcessHandle,
- OUT PCLIENT_ID ClientId,
- IN PCONTEXT ThreadContext,
- IN PINITIAL_TEB InitialTeb,
- IN BOOLEAN CreateSuspended
- );
-
-NTSTATUS
-STDCALL
-NtDuplicateToken(
- IN HANDLE ExistingToken,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN BOOLEAN EffectiveOnly,
- IN TOKEN_TYPE TokenType,
- OUT PHANDLE NewToken
- );
-
-NTSTATUS
-STDCALL
-ZwDuplicateToken(
- IN HANDLE ExistingToken,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN BOOLEAN EffectiveOnly,
- IN TOKEN_TYPE TokenType,
- OUT PHANDLE NewToken
- );
-
-/*
- * FUNCTION: Finds a atom
- * ARGUMENTS:
- * AtomName = Name to search for.
- * AtomNameLength = Length of the atom name
- * Atom = Caller supplies storage for the resulting atom
- * RETURNS: Status
- * REMARKS:
- * This funciton maps to the win32 GlobalFindAtom
- */
-NTSTATUS
-STDCALL
-NtFindAtom(
- IN PWSTR AtomName,
- IN ULONG AtomNameLength,
- OUT PRTL_ATOM Atom OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwFindAtom(
- IN PWSTR AtomName,
- IN ULONG AtomNameLength,
- OUT PRTL_ATOM Atom OPTIONAL
- );
-
-/*
- * FUNCTION: Flushes a the processors instruction cache
- * ARGUMENTS:
- * ProcessHandle = Points to the process owning the cache
- * BaseAddress = // might this be a image address ????
- * NumberOfBytesToFlush =
- * RETURNS: Status
- * REMARKS:
- * This funciton is used by debuggers
- */
-NTSTATUS
-STDCALL
-ZwFlushInstructionCache(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- IN UINT NumberOfBytesToFlush
- );
-
-/*
- * FUNCTION: Flushes virtual memory to file
- * ARGUMENTS:
- * ProcessHandle = Points to the process that allocated the virtual memory
- * BaseAddress = Points to the memory address
- * NumberOfBytesToFlush = Limits the range to flush,
- * NumberOfBytesFlushed = Actual number of bytes flushed
- * RETURNS: Status
- * REMARKS:
- * Check return status on STATUS_NOT_MAPPED_DATA
- */
-NTSTATUS
-STDCALL
-ZwFlushVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- IN ULONG NumberOfBytesToFlush,
- OUT PULONG NumberOfBytesFlushed OPTIONAL
- );
-
-/*
- * FUNCTION: Retrieves the uptime of the system
- * ARGUMENTS:
- * UpTime = Number of clock ticks since boot.
- * RETURNS: Status
- */
-ULONG
-STDCALL
-ZwGetTickCount(
- VOID
- );
-
-/*
- * FUNCTION: Loads a registry key.
- * ARGUMENTS:
- * KeyObjectAttributes = Key to be loaded
- * FileObjectAttributes = File to load the key from
- * REMARK:
- * This procedure maps to the win32 procedure RegLoadKey
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwLoadKey(
- IN POBJECT_ATTRIBUTES KeyObjectAttributes,
- IN POBJECT_ATTRIBUTES FileObjectAttributes
- );
-
-/*
- * FUNCTION: Locks a range of virtual memory.
- * ARGUMENTS:
- * ProcessHandle = Handle to the process
- * BaseAddress = Lower boundary of the range of bytes to lock.
- * NumberOfBytesLock = Offset to the upper boundary.
- * NumberOfBytesLocked (OUT) = Number of bytes actually locked.
- * REMARK:
- This procedure maps to the win32 procedure VirtualLock.
- * RETURNS: Status [STATUS_SUCCESS | STATUS_WAS_LOCKED ]
- */
-NTSTATUS
-STDCALL
-ZwLockVirtualMemory(
- HANDLE ProcessHandle,
- PVOID BaseAddress,
- ULONG NumberOfBytesToLock,
- PULONG NumberOfBytesLocked
- );
-
-NTSTATUS
-STDCALL
-ZwOpenObjectAuditAlarm(
- IN PUNICODE_STRING SubsystemName,
- IN PVOID HandleId,
- IN PUNICODE_STRING ObjectTypeName,
- IN PUNICODE_STRING ObjectName,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN HANDLE ClientToken,
- IN ULONG DesiredAccess,
- IN ULONG GrantedAccess,
- IN PPRIVILEGE_SET Privileges,
- IN BOOLEAN ObjectCreation,
- IN BOOLEAN AccessGranted,
- OUT PBOOLEAN GenerateOnClose
- );
-
-/*
- * FUNCTION: Set the access protection of a range of virtual memory
- * ARGUMENTS:
- * ProcessHandle = Handle to process owning the virtual address space
- * BaseAddress = Start address
- * NumberOfBytesToProtect = Delimits the range of virtual memory
- * for which the new access protection holds
- * NewAccessProtection = The new access proctection for the pages
- * OldAccessProtection = Caller should supply storage for the old
- * access protection
- *
- * REMARKS:
- * The function maps to the win32 VirtualProtectEx
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwProtectVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID *BaseAddress,
- IN ULONG *NumberOfBytesToProtect,
- IN ULONG NewAccessProtection,
- OUT PULONG OldAccessProtection
- );
-
-NTSTATUS
-STDCALL
-NtQueryInformationAtom(
- IN RTL_ATOM Atom,
- IN ATOM_INFORMATION_CLASS AtomInformationClass,
- OUT PVOID AtomInformation,
- IN ULONG AtomInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwQueryInformationAtom(
- IN RTL_ATOM Atom,
- IN ATOM_INFORMATION_CLASS AtomInformationClass,
- OUT PVOID AtomInformation,
- IN ULONG AtomInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-/*
- * FUNCTION: Query information about the content of a directory object
- * ARGUMENTS:
- DirectoryHandle =
- Buffer = Buffer must be large enough to hold the name strings too
- ReturnSingleEntry = If TRUE :return the index of the next object in this directory in ObjectIndex
- If FALSE: return the number of objects in this directory in ObjectIndex
- RestartScan = If TRUE: ignore input value of ObjectIndex always start at index 0
- If FALSE use input value of ObjectIndex
- Context = zero based index of object in the directory depends on GetNextIndex and IgnoreInputIndex
- ReturnLength = Actual size of the ObjectIndex ???
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwQueryDirectoryObject(
- IN HANDLE DirectoryHandle,
- OUT PVOID Buffer,
- IN ULONG BufferLength,
- IN BOOLEAN ReturnSingleEntry,
- IN BOOLEAN RestartScan,
- IN OUT PULONG Context,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-/*
- * FUNCTION: Queries the information of a process object.
- * ARGUMENTS:
- * ProcessHandle = Handle to the process object
- * ProcessInformation = Index to a certain information structure
-
- ProcessBasicInformation PROCESS_BASIC_INFORMATION
- ProcessQuotaLimits QUOTA_LIMITS
- ProcessIoCounters IO_COUNTERS
- ProcessVmCounters VM_COUNTERS
- ProcessTimes KERNEL_USER_TIMES
- ProcessBasePriority KPRIORITY
- ProcessRaisePriority KPRIORITY
- ProcessDebugPort HANDLE
- ProcessExceptionPort HANDLE
- ProcessAccessToken PROCESS_ACCESS_TOKEN
- ProcessLdtInformation LDT_ENTRY ??
- ProcessLdtSize ULONG
- ProcessDefaultHardErrorMode ULONG
- ProcessIoPortHandlers // kernel mode only
- ProcessPooledUsageAndLimits POOLED_USAGE_AND_LIMITS
- ProcessWorkingSetWatch PROCESS_WS_WATCH_INFORMATION
- ProcessUserModeIOPL (I/O Privilege Level)
- ProcessEnableAlignmentFaultFixup BOOLEAN
- ProcessPriorityClass ULONG
- ProcessWx86Information ULONG
- ProcessHandleCount ULONG
- ProcessAffinityMask ULONG
- ProcessPooledQuotaLimits QUOTA_LIMITS
- MaxProcessInfoClass
-
- * ProcessInformation = Caller supplies storage for the process information structure
- * ProcessInformationLength = Size of the process information structure
- * ReturnLength = Actual number of bytes written
-
- * REMARK:
- * This procedure maps to the win32 GetProcessTimes, GetProcessVersion,
- GetProcessWorkingSetSize, GetProcessPriorityBoost, GetProcessAffinityMask, GetPriorityClass,
- GetProcessShutdownParameters functions.
- * RETURNS: Status
-*/
-
-NTSTATUS
-STDCALL
-NtQueryInformationProcess(
- IN HANDLE ProcessHandle,
- IN PROCESSINFOCLASS ProcessInformationClass,
- OUT PVOID ProcessInformation,
- IN ULONG ProcessInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-ZwQueryInformationProcess(
- IN HANDLE ProcessHandle,
- IN PROCESSINFOCLASS ProcessInformationClass,
- OUT PVOID ProcessInformation,
- IN ULONG ProcessInformationLength,
- OUT PULONG ReturnLength OPTIONAL
- );
-
-/*
- * FUNCTION: Query the interval and the clocksource for profiling
- * ARGUMENTS:
- Interval =
- ClockSource =
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwQueryIntervalProfile(
- IN KPROFILE_SOURCE ProfileSource,
- OUT PULONG Interval
- );
-
-/*
- * FUNCTION: Queries the information of a object.
- * ARGUMENTS:
- ObjectHandle = Handle to a object
- ObjectInformationClass = Index to a certain information structure
-
- ObjectBasicInformation OBJECT_BASIC_INFORMATION
- ObjectNameInformation OBJECT_NAME_INFORMATION
- ObjectTypeInformation OBJECT_TYPE_INFORMATION
- ObjectAllTypesInformation OBJECT_ALL_TYPES_INFORMATION
- ObjectHandleInformation OBJECT_HANDLE_ATTRIBUTES_INFORMATION
-
- ObjectInformation = Caller supplies storage for resulting information
- Length = Size of the supplied storage
- ResultLength = Bytes written
- */
-
-NTSTATUS
-STDCALL
-ZwQueryObject(
- IN HANDLE ObjectHandle,
- IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
- OUT PVOID ObjectInformation,
- IN ULONG Length,
- OUT PULONG ResultLength OPTIONAL
- );
-
-NTSTATUS
-STDCALL
-NtQuerySecurityObject(
- IN HANDLE Handle,
- IN SECURITY_INFORMATION SecurityInformation,
- OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-NTSTATUS
-STDCALL
-ZwQuerySecurityObject(
- IN HANDLE Handle,
- IN SECURITY_INFORMATION SecurityInformation,
- OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-/*
- * FUNCTION: Queries the virtual memory information.
- * ARGUMENTS:
- ProcessHandle = Process owning the virtual address space
- BaseAddress = Points to the page where the information is queried for.
- * VirtualMemoryInformationClass = Index to a certain information structure
-
- MemoryBasicInformation MEMORY_BASIC_INFORMATION
-
- * VirtualMemoryInformation = caller supplies storage for the information structure
- * Length = size of the structure
- ResultLength = Data written
- * RETURNS: Status
- *
-*/
-
-NTSTATUS
-STDCALL
-ZwQueryVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID Address,
- IN IN CINT VirtualMemoryInformationClass,
- OUT PVOID VirtualMemoryInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
- );
-
-/*
- * FUNCTION: Raises a hard error (stops the system)
- * ARGUMENTS:
- * Status = Status code of the hard error
- * NumberOfParameters = Number of (optional) parameters in Parameters
- * UnicodeStringParameterMask = (optional) string parameter, one per error code
- * Parameters = An Array of pointers for use in the error message string
- * ResponseOption = Specifies the type of the message box
- * Response = Specifies the user's response
- * RETURNS: Status
- *
- */
-
-NTSTATUS
-STDCALL
-ZwRaiseHardError(
- IN NTSTATUS ErrorStatus,
- IN ULONG NumberOfParameters,
- IN PUNICODE_STRING UnicodeStringParameterMask OPTIONAL,
- IN PVOID *Parameters,
- IN HARDERROR_RESPONSE_OPTION ResponseOption,
- OUT PHARDERROR_RESPONSE Response
- );
-
-/*
- * FUNCTION: Sets the information of a registry key.
- * ARGUMENTS:
- * KeyHandle = Handle to the registry key
- * KeyInformationClass = Index to the a certain information structure.
- Can be one of the following values:
-
- * KeyLastWriteTimeInformation KEY_LAST_WRITE_TIME_INFORMATION
-
- KeyInformation = Storage for the new information
- * KeyInformationLength = Size of the information strucure
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-ZwSetInformationKey(
- IN HANDLE KeyHandle,
- IN KEY_SET_INFORMATION_CLASS KeyInformationClass,
- IN PVOID KeyInformation,
- IN ULONG KeyInformationLength
- );
-
-/*
- * FUNCTION: Changes a set of object specific parameters
- * ARGUMENTS:
- * ObjectHandle =
- * ObjectInformationClass = Index to the set of parameters to change.
-
- ObjectHandleInformation OBJECT_HANDLE_ATTRIBUTE_INFORMATION
-
-
- * ObjectInformation = Caller supplies storage for parameters to set.
- * Length = Size of the storage supplied
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-ZwSetInformationObject(
- IN HANDLE ObjectHandle,
- IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
- IN PVOID ObjectInformation,
- IN ULONG Length
- );
-
-/*
- * FUNCTION: Changes a set of process specific parameters
- * ARGUMENTS:
- * ProcessHandle = Handle to the process
- * ProcessInformationClass = Index to a information structure.
- *
- * ProcessBasicInformation PROCESS_BASIC_INFORMATION
- * ProcessQuotaLimits QUOTA_LIMITS
- * ProcessBasePriority KPRIORITY
- * ProcessRaisePriority KPRIORITY
- * ProcessDebugPort HANDLE
- * ProcessExceptionPort HANDLE
- * ProcessAccessToken PROCESS_ACCESS_TOKEN
- * ProcessDefaultHardErrorMode ULONG
- * ProcessPriorityClass ULONG
- * ProcessAffinityMask KAFFINITY //??
- *
- * ProcessInformation = Caller supplies storage for information to set.
- * ProcessInformationLength = Size of the information structure
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-NtSetInformationProcess(
- IN HANDLE ProcessHandle,
- IN PROCESSINFOCLASS ProcessInformationClass,
- IN PVOID ProcessInformation,
- IN ULONG ProcessInformationLength
- );
-
-NTSTATUS
-STDCALL
-ZwSetInformationProcess(
- IN HANDLE ProcessHandle,
- IN PROCESSINFOCLASS ProcessInformationClass,
- IN PVOID ProcessInformation,
- IN ULONG ProcessInformationLength
- );
-
-/*
- * FUNCTION: Sets the characteristics of a timer
- * ARGUMENTS:
- * TimerHandle = Handle to the timer
- * DueTime = Time before the timer becomes signalled for the first time.
- * TimerApcRoutine = Completion routine can be called on time completion
- * TimerContext = Argument to the completion routine
- * Resume = Specifies if the timer should repeated after completing one cycle
- * Period = Cycle of the timer
- * REMARKS: This routine maps to the win32 SetWaitableTimer.
- * RETURNS: Status
-*/
-NTSTATUS
-STDCALL
-ZwSetTimer(
- IN HANDLE TimerHandle,
- IN PLARGE_INTEGER DueTime,
- IN PTIMER_APC_ROUTINE TimerApcRoutine OPTIONAL,
- IN PVOID TimerContext OPTIONAL,
- IN BOOLEAN ResumeTimer,
- IN LONG Period OPTIONAL,
- OUT PBOOLEAN PreviousState OPTIONAL
- );
-
-NTSTATUS STDCALL
-NtSetUuidSeed(IN PUCHAR Seed);
-
-NTSTATUS STDCALL
-ZwSetUuidSeed(IN PUCHAR Seed);
-
-/*
- * FUNCTION: Unloads a registry key.
- * ARGUMENTS:
- * KeyHandle = Handle to the registry key
- * REMARK:
- * This procedure maps to the win32 procedure RegUnloadKey
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwUnloadKey(
- IN POBJECT_ATTRIBUTES KeyObjectAttributes
- );
-
-/*
- * FUNCTION: Unlocks a range of virtual memory.
- * ARGUMENTS:
- * ProcessHandle = Handle to the process
- * BaseAddress = Lower boundary of the range of bytes to unlock.
- * NumberOfBytesToUnlock = Offset to the upper boundary to unlock.
- * NumberOfBytesUnlocked (OUT) = Number of bytes actually unlocked.
- * REMARK:
- This procedure maps to the win32 procedure VirtualUnlock
- * RETURNS: Status [ STATUS_SUCCESS | STATUS_PAGE_WAS_ULOCKED ]
- */
-NTSTATUS
-STDCALL
-ZwUnlockVirtualMemory(
- IN HANDLE ProcessHandle,
- IN PVOID BaseAddress,
- IN ULONG NumberOfBytesToUnlock,
- OUT PULONG NumberOfBytesUnlocked OPTIONAL
- );
-
-/*
- * FUNCTION: Waits for multiple objects to become signalled.
- * ARGUMENTS:
- * ObjectCount = The number of objects
- * ObjectsArray = The array of object handles
- * WaitType = Can be one of the values UserMode or KernelMode
- * Alertable = If true the wait is alertable.
- * TimeOut = The maximum wait time.
- * REMARKS:
- * This function maps to the win32 WaitForMultipleObjectEx.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwWaitForMultipleObjects (
- IN ULONG ObjectCount,
- IN PHANDLE ObjectsArray,
- IN WAIT_TYPE WaitType,
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER TimeOut OPTIONAL
- );
-
-/*
- * FUNCTION: Creates a profile
- * ARGUMENTS:
- * ProfileHandle (OUT) = Caller supplied storage for the resulting handle
- * ObjectAttribute = Initialized attributes for the object
- * ImageBase = Start address of executable image
- * ImageSize = Size of the image
- * Granularity = Bucket size
- * Buffer = Caller supplies buffer for profiling info
- * ProfilingSize = Buffer size
- * ClockSource = Specify 0 / FALSE ??
- * ProcessorMask = A value of -1 indicates disables per processor profiling,
- otherwise bit set for the processor to profile.
- * REMARKS:
- * This function maps to the win32 CreateProcess.
- * RETURNS: Status
- */
-
-NTSTATUS
-STDCALL
-ZwCreateProfile(
- OUT PHANDLE ProfileHandle,
- IN HANDLE Process OPTIONAL,
- IN PVOID ImageBase,
- IN ULONG ImageSize,
- IN ULONG BucketSize,
- IN PVOID Buffer,
- IN ULONG BufferSize,
- IN KPROFILE_SOURCE ProfileSource,
- IN KAFFINITY Affinity
- );
-
-/*
- * FUNCTION: Delays the execution of the calling thread.
- * ARGUMENTS:
- * Alertable = If TRUE the thread is alertable during is wait period
- * Interval = Specifies the interval to wait.
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwDelayExecution(
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER DelayInterval
- );
-
-/*
- * FUNCTION: Extends a section
- * ARGUMENTS:
- * SectionHandle = Handle to the section
- * NewMaximumSize = Adjusted size
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-ZwExtendSection(
- IN HANDLE SectionHandle,
- IN PLARGE_INTEGER NewMaximumSize
- );
-
-/*
- * FUNCTION: Queries the information of a section object.
- * ARGUMENTS:
- * SectionHandle = Handle to the section link object
- * SectionInformationClass = Index to a certain information structure
- * SectionInformation (OUT)= Caller supplies storage for resulting information
- * Length = Size of the supplied storage
- * ResultLength = Data written
- * RETURNS: Status
- *
-*/
-NTSTATUS
-STDCALL
-ZwQuerySection(
- IN HANDLE SectionHandle,
- IN SECTION_INFORMATION_CLASS SectionInformationClass,
- OUT PVOID SectionInformation,
- IN ULONG SectionInformationLength,
- OUT PULONG ResultLength OPTIONAL
- );
-
-typedef struct _SECTION_IMAGE_INFORMATION
-{
- ULONG_PTR EntryPoint;
- ULONG Unknown1;
- ULONG_PTR StackReserve;
- ULONG_PTR StackCommit;
- ULONG Subsystem;
- USHORT MinorSubsystemVersion;
- USHORT MajorSubsystemVersion;
- ULONG Unknown2;
- ULONG Characteristics;
- USHORT ImageNumber;
- BOOLEAN Executable;
- UCHAR Unknown3;
- ULONG Unknown4[3];
-} SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
-
-#endif /* !__USE_W32API */
-
-struct _PLUGPLAY_EVENT_BLOCK;
-NTSTATUS
-STDCALL
-NtGetPlugPlayEvent(
- ULONG Reserved1,
- ULONG Reserved2,
- struct _PLUGPLAY_EVENT_BLOCK *Buffer,
- ULONG BufferSize
-);
-
-NTSTATUS
-STDCALL
-NtPlugPlayControl(
- ULONG ControlCode,
- PVOID Buffer,
- ULONG BufferSize
-);
-
-/*
- * FUNCTION: Loads a registry key.
- * ARGUMENTS:
- * KeyObjectAttributes = Key to be loaded
- * FileObjectAttributes = File to load the key from
- * Flags = ???
- * REMARK:
- * This procedure maps to the win32 procedure RegLoadKey
- * RETURNS: Status
- */
-NTSTATUS
-STDCALL
-NtLoadKey2(
- IN POBJECT_ATTRIBUTES KeyObjectAttributes,
- IN POBJECT_ATTRIBUTES FileObjectAttributes,
- IN ULONG Flags
- );
-
-NTSTATUS
-STDCALL
-ZwLoadKey2(
- IN POBJECT_ATTRIBUTES KeyObjectAttributes,
- IN POBJECT_ATTRIBUTES FileObjectAttributes,
- IN ULONG Flags
- );
-
-/*
- * FUNCTION: Retrieves the system time
- * ARGUMENTS:
- * CurrentTime (OUT) = Caller should supply storage for the resulting time.
- * RETURNS: Status
- *
-*/
-
-NTSTATUS
-STDCALL
-NtQuerySystemTime (
- OUT PLARGE_INTEGER CurrentTime
- );
-
-/*
- * FUNCTION: Queries the information of a object.
- * ARGUMENTS:
- ObjectHandle = Handle to a object
- ObjectInformationClass = Index to a certain information structure
-
- ObjectBasicInformation OBJECT_BASIC_INFORMATION
- ObjectNameInformation OBJECT_NAME_INFORMATION
- ObjectTypeInformation OBJECT_TYPE_INFORMATION
- ObjectAllTypesInformation OBJECT_ALL_TYPES_INFORMATION
- ObjectHandleInformation OBJECT_HANDLE_ATTRIBUTE_INFORMATION
-
- ObjectInformation = Caller supplies storage for resulting information
- Length = Size of the supplied storage
- ResultLength = Bytes written
- */
-
-NTSTATUS
-STDCALL
-NtQueryObject(
- IN HANDLE ObjectHandle,
- IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
- OUT PVOID ObjectInformation,
- IN ULONG Length,
- OUT PULONG ResultLength OPTIONAL
- );
-
-/* BEGIN REACTOS ONLY */
-
-BOOLEAN STDCALL
-ExInitializeBinaryTree(IN PBINARY_TREE Tree,
- IN PKEY_COMPARATOR Compare,
- IN BOOLEAN UseNonPagedPool);
-
-VOID STDCALL
-ExDeleteBinaryTree(IN PBINARY_TREE Tree);
-
-VOID STDCALL
-ExInsertBinaryTree(IN PBINARY_TREE Tree,
- IN PVOID Key,
- IN PVOID Value);
-
-BOOLEAN STDCALL
-ExSearchBinaryTree(IN PBINARY_TREE Tree,
- IN PVOID Key,
- OUT PVOID * Value);
-
-BOOLEAN STDCALL
-ExRemoveBinaryTree(IN PBINARY_TREE Tree,
- IN PVOID Key,
- IN PVOID * Value);
-
-BOOLEAN STDCALL
-ExTraverseBinaryTree(IN PBINARY_TREE Tree,
- IN TRAVERSE_METHOD Method,
- IN PTRAVERSE_ROUTINE Routine,
- IN PVOID Context);
-
-BOOLEAN STDCALL
-ExInitializeSplayTree(IN PSPLAY_TREE Tree,
- IN PKEY_COMPARATOR Compare,
- IN BOOLEAN Weighted,
- IN BOOLEAN UseNonPagedPool);
-
-VOID STDCALL
-ExDeleteSplayTree(IN PSPLAY_TREE Tree);
-
-VOID STDCALL
-ExInsertSplayTree(IN PSPLAY_TREE Tree,
- IN PVOID Key,
- IN PVOID Value);
-
-BOOLEAN STDCALL
-ExSearchSplayTree(IN PSPLAY_TREE Tree,
- IN PVOID Key,
- OUT PVOID * Value);
-
-BOOLEAN STDCALL
-ExRemoveSplayTree(IN PSPLAY_TREE Tree,
- IN PVOID Key,
- IN PVOID * Value);
-
-BOOLEAN STDCALL
-ExWeightOfSplayTree(IN PSPLAY_TREE Tree,
- OUT PULONG Weight);
-
-BOOLEAN STDCALL
-ExTraverseSplayTree(IN PSPLAY_TREE Tree,
- IN TRAVERSE_METHOD Method,
- IN PTRAVERSE_ROUTINE Routine,
- IN PVOID Context);
-
-BOOLEAN STDCALL
-ExInitializeHashTable(IN PHASH_TABLE HashTable,
- IN ULONG HashTableSize,
- IN PKEY_COMPARATOR Compare OPTIONAL,
- IN BOOLEAN UseNonPagedPool);
-
-VOID STDCALL
-ExDeleteHashTable(IN PHASH_TABLE HashTable);
-
-VOID STDCALL
-ExInsertHashTable(IN PHASH_TABLE HashTable,
- IN PVOID Key,
- IN ULONG KeyLength,
- IN PVOID Value);
-
-BOOLEAN STDCALL
-ExSearchHashTable(IN PHASH_TABLE HashTable,
- IN PVOID Key,
- IN ULONG KeyLength,
- OUT PVOID * Value);
-
-BOOLEAN STDCALL
-ExRemoveHashTable(IN PHASH_TABLE HashTable,
- IN PVOID Key,
- IN ULONG KeyLength,
- IN PVOID * Value);
-
-/* END REACTOS ONLY */
-
-#endif /* __DDK_ZW_H */
+++ /dev/null
-#ifndef __INCLUDE_NTOS_ZWTYPES_H
-#define __INCLUDE_NTOS_ZWTYPES_H
-
-#ifndef __USE_W32API
-
-typedef unsigned short LANGID;
-typedef LANGID *PLANGID;
-
-typedef struct _LDT_ENTRY {
- WORD LimitLow;
- WORD BaseLow;
- union {
- struct {
- BYTE BaseMid;
- BYTE Flags1;
- BYTE Flags2;
- BYTE 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;
- } Bits;
- } HighWord;
-} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
-
-typedef enum _DEBUG_CONTROL_CODE
-{
- DebugGetTraceInformation = 1,
- DebugSetInternalBreakpoint,
- DebugSetSpecialCall,
- DebugClearSpecialCalls,
- DebugQuerySpecialCalls,
- DebugDbgBreakPoint,
- DebugDbgLoadSymbols
-} DEBUG_CONTROL_CODE;
-
-typedef enum _KPROFILE_SOURCE
-{
- ProfileTime
-} KPROFILE_SOURCE;
-
-
-// file disposition values
-
-#define FILE_SUPERSEDE 0x0000
-#define FILE_OPEN 0x0001
-#define FILE_CREATE 0x0002
-#define FILE_OPEN_IF 0x0003
-#define FILE_OVERWRITE 0x0004
-#define FILE_OVERWRITE_IF 0x0005
-#define FILE_MAXIMUM_DISPOSITION 0x0005
-
-// job query / set information class
-
-typedef enum _JOBOBJECTINFOCLASS { // Q S
- JobObjectBasicAccountingInformation = 1, // Y N
- JobObjectBasicLimitInformation, // Y Y
- JobObjectBasicProcessIdList, // Y N
- JobObjectBasicUIRestrictions, // Y Y
- JobObjectSecurityLimitInformation, // Y Y
- JobObjectEndOfJobTimeInformation, // N Y
- JobObjectAssociateCompletionPortInformation, // N Y
- JobObjectBasicAndIoAccountingInformation, // Y N
- JobObjectExtendedLimitInformation, // Y Y
-} JOBOBJECTINFOCLASS;
-
-// system information
-// {Nt|Zw}{Query|Set}SystemInformation
-// (GN means Gary Nebbet in "NT/W2K Native API Reference")
-
-typedef
-enum _SYSTEM_INFORMATION_CLASS
-{
- SystemInformationClassMin = 0,
- SystemBasicInformation = 0, /* Q */
-
- SystemProcessorInformation = 1, /* Q */
-
- SystemPerformanceInformation = 2, /* Q */
-
- SystemTimeOfDayInformation = 3, /* Q */
-
- SystemPathInformation = 4, /* Q (checked build only) */
- SystemNotImplemented1 = 4, /* Q (GN) */
-
- SystemProcessInformation = 5, /* Q */
- SystemProcessesAndThreadsInformation = 5, /* Q (GN) */
-
- SystemCallCountInfoInformation = 6, /* Q */
- SystemCallCounts = 6, /* Q (GN) */
-
- SystemDeviceInformation = 7, /* Q */
-// It conflicts with symbol in ntoskrnl/io/resource.c
-// SystemConfigurationInformation = 7, /* Q (GN) */
-
- SystemProcessorPerformanceInformation = 8, /* Q */
- SystemProcessorTimes = 8, /* Q (GN) */
-
- SystemFlagsInformation = 9, /* QS */
- SystemGlobalFlag = 9, /* QS (GN) */
-
- SystemCallTimeInformation = 10,
- SystemNotImplemented2 = 10, /* (GN) */
-
- SystemModuleInformation = 11, /* Q */
-
- SystemLocksInformation = 12, /* Q */
- SystemLockInformation = 12, /* Q (GN) */
-
- SystemStackTraceInformation = 13,
- SystemNotImplemented3 = 13, /* Q (GN) */
-
- SystemPagedPoolInformation = 14,
- SystemNotImplemented4 = 14, /* Q (GN) */
-
- SystemNonPagedPoolInformation = 15,
- SystemNotImplemented5 = 15, /* Q (GN) */
-
- SystemHandleInformation = 16, /* Q */
-
- SystemObjectInformation = 17, /* Q */
-
- SystemPageFileInformation = 18, /* Q */
- SystemPagefileInformation = 18, /* Q (GN) */
-
- SystemVdmInstemulInformation = 19, /* Q */
- SystemInstructionEmulationCounts = 19, /* Q (GN) */
-
- SystemVdmBopInformation = 20,
- SystemInvalidInfoClass1 = 20, /* (GN) */
-
- SystemFileCacheInformation = 21, /* QS */
- SystemCacheInformation = 21, /* QS (GN) */
-
- SystemPoolTagInformation = 22, /* Q (checked build only) */
-
- SystemInterruptInformation = 23, /* Q */
- SystemProcessorStatistics = 23, /* Q (GN) */
-
- SystemDpcBehaviourInformation = 24, /* QS */
- SystemDpcInformation = 24, /* QS (GN) */
-
- SystemFullMemoryInformation = 25,
- SystemNotImplemented6 = 25, /* (GN) */
-
- SystemLoadImage = 26, /* S (callable) (GN) */
-
- SystemUnloadImage = 27, /* S (callable) (GN) */
-
- SystemTimeAdjustmentInformation = 28, /* QS */
- SystemTimeAdjustment = 28, /* QS (GN) */
-
- SystemSummaryMemoryInformation = 29,
- SystemNotImplemented7 = 29, /* (GN) */
-
- SystemNextEventIdInformation = 30,
- SystemNotImplemented8 = 30, /* (GN) */
-
- SystemEventIdsInformation = 31,
- SystemNotImplemented9 = 31, /* (GN) */
-
- SystemCrashDumpInformation = 32, /* Q */
-
- SystemExceptionInformation = 33, /* Q */
-
- SystemCrashDumpStateInformation = 34, /* Q */
-
- SystemKernelDebuggerInformation = 35, /* Q */
-
- SystemContextSwitchInformation = 36, /* Q */
-
- SystemRegistryQuotaInformation = 37, /* QS */
-
- SystemLoadAndCallImage = 38, /* S (GN) */
-
- SystemPrioritySeparation = 39, /* S */
-
- SystemPlugPlayBusInformation = 40,
- SystemNotImplemented10 = 40, /* Q (GN) */
-
- SystemDockInformation = 41,
- SystemNotImplemented11 = 41, /* Q (GN) */
-
- SystemPowerInformation = 42,
- SystemInvalidInfoClass2 = 42, /* (GN) */
-
- SystemProcessorSpeedInformation = 43,
- SystemInvalidInfoClass3 = 43, /* (GN) */
-
- SystemCurrentTimeZoneInformation = 44, /* QS */
- SystemTimeZoneInformation = 44, /* QS (GN) */
-
- SystemLookasideInformation = 45, /* Q */
-
- SystemSetTimeSlipEvent = 46, /* S (GN) */
-
- SystemCreateSession = 47, /* S (GN) */
-
- SystemDeleteSession = 48, /* S (GN) */
-
- SystemInvalidInfoClass4 = 49, /* (GN) */
-
- SystemRangeStartInformation = 50, /* Q (GN) */
-
- SystemVerifierInformation = 51, /* QS (GN) */
-
- SystemAddVerifier = 52, /* S (GN) */
-
- SystemSessionProcessesInformation = 53, /* Q (GN) */
- SystemInformationClassMax
-
-} SYSTEM_INFORMATION_CLASS;
-
-// SystemBasicInformation (0)
-// Modified by Andrew Greenwood (15th July 2003) to match Win 32 API headers
-typedef
-struct _SYSTEM_BASIC_INFORMATION
-{
- ULONG Unknown;
- ULONG MaximumIncrement;
- ULONG PhysicalPageSize;
- ULONG NumberOfPhysicalPages;
- ULONG LowestPhysicalPage;
- ULONG HighestPhysicalPage;
- ULONG AllocationGranularity;
- ULONG LowestUserAddress;
- ULONG HighestUserAddress;
- KAFFINITY ActiveProcessors;
- CCHAR NumberProcessors;
-} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
-
-// SystemProcessorInformation (1)
-// Modified by Andrew Greenwood (15th July 2003) to match Win 32 API headers
-typedef struct _SYSTEM_PROCESSOR_INFORMATION {
- USHORT ProcessorArchitecture;
- USHORT ProcessorLevel;
- USHORT ProcessorRevision;
- USHORT Unknown;
- ULONG FeatureBits;
-} SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
-
-// SystemPerformanceInfo (2)
-// Modified by Andrew Greenwood (15th July 2003) to match Win 32 API headers
-typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER ReadTransferCount;
- LARGE_INTEGER WriteTransferCount;
- LARGE_INTEGER OtherTransferCount;
- ULONG ReadOperationCount;
- ULONG WriteOperationCount;
- ULONG OtherOperationCount;
- ULONG AvailablePages;
- ULONG TotalCommittedPages;
- ULONG TotalCommitLimit;
- ULONG PeakCommitment;
- ULONG PageFaults;
- ULONG WriteCopyFaults;
- ULONG TransitionFaults;
- ULONG CacheTransitionFaults;
- ULONG DemandZeroFaults;
- ULONG PagesRead;
- ULONG PageReadIos;
- ULONG CacheReads;
- ULONG CacheIos;
- ULONG PagefilePagesWritten;
- ULONG PagefilePageWriteIos;
- ULONG MappedFilePagesWritten;
- ULONG MappedFilePageWriteIos;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG PagedPoolAllocs;
- ULONG PagedPoolFrees;
- ULONG NonPagedPoolAllocs;
- ULONG NonPagedPoolFrees;
- ULONG TotalFreeSystemPtes;
- ULONG SystemCodePage;
- ULONG TotalSystemDriverPages;
- ULONG TotalSystemCodePages;
- ULONG SmallNonPagedLookasideListAllocateHits;
- ULONG SmallPagedLookasideListAllocateHits;
- ULONG Reserved3;
- ULONG MmSystemCachePage;
- ULONG PagedPoolPage;
- ULONG SystemDriverPage;
- ULONG FastReadNoWait;
- ULONG FastReadWait;
- ULONG FastReadResourceMiss;
- ULONG FastReadNotPossible;
- ULONG FastMdlReadNoWait;
- ULONG FastMdlReadWait;
- ULONG FastMdlReadResourceMiss;
- ULONG FastMdlReadNotPossible;
- ULONG MapDataNoWait;
- ULONG MapDataWait;
- ULONG MapDataNoWaitMiss;
- ULONG MapDataWaitMiss;
- ULONG PinMappedDataCount;
- ULONG PinReadNoWait;
- ULONG PinReadWait;
- ULONG PinReadNoWaitMiss;
- ULONG PinReadWaitMiss;
- ULONG CopyReadNoWait;
- ULONG CopyReadWait;
- ULONG CopyReadNoWaitMiss;
- ULONG CopyReadWaitMiss;
- ULONG MdlReadNoWait;
- ULONG MdlReadWait;
- ULONG MdlReadNoWaitMiss;
- ULONG MdlReadWaitMiss;
- ULONG ReadAheadIos;
- ULONG LazyWriteIos;
- ULONG LazyWritePages;
- ULONG DataFlushes;
- ULONG DataPages;
- ULONG ContextSwitches;
- ULONG FirstLevelTbFills;
- ULONG SecondLevelTbFills;
- ULONG SystemCalls;
-} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
-
-/*#ifndef __USE_W32API*/
-
-// SystemProcessThreadInfo (5)
-typedef struct _SYSTEM_THREAD_INFORMATION
-{
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER CreateTime;
- ULONG WaitTime;
- PVOID StartAddress;
- CLIENT_ID ClientId;
- KPRIORITY Priority;
- LONG BasePriority;
- ULONG ContextSwitches;
- ULONG ThreadState;
- ULONG WaitReason;
-} SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
-
-typedef struct _SYSTEM_PROCESS_INFORMATION
-{
- ULONG NextEntryOffset;
- ULONG NumberOfThreads;
- LARGE_INTEGER SpareLi1;
- LARGE_INTEGER SpareLi2;
- LARGE_INTEGER SpareLi3;
- LARGE_INTEGER CreateTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER KernelTime;
- UNICODE_STRING ImageName;
- KPRIORITY BasePriority;
- HANDLE UniqueProcessId;
- HANDLE InheritedFromUniqueProcessId;
- ULONG HandleCount;
- ULONG SessionId;
- ULONG PageDirectoryFrame;
-
- /*
- * This part corresponds to VM_COUNTERS_EX.
- * NOTE: *NOT* THE SAME AS VM_COUNTERS!
- */
- ULONG PeakVirtualSize;
- ULONG VirtualSize;
- ULONG PageFaultCount;
- ULONG PeakWorkingSetSize;
- ULONG WorkingSetSize;
- ULONG QuotaPeakPagedPoolUsage;
- ULONG QuotaPagedPoolUsage;
- ULONG QuotaPeakNonPagedPoolUsage;
- ULONG QuotaNonPagedPoolUsage;
- ULONG PagefileUsage;
- ULONG PeakPagefileUsage;
- ULONG PrivateUsage;
-
- /* This part corresponds to IO_COUNTERS */
- LARGE_INTEGER ReadOperationCount;
- LARGE_INTEGER WriteOperationCount;
- LARGE_INTEGER OtherOperationCount;
- LARGE_INTEGER ReadTransferCount;
- LARGE_INTEGER WriteTransferCount;
- LARGE_INTEGER OtherTransferCount;
-
- /* Finally, the array of Threads */
- SYSTEM_THREAD_INFORMATION TH[1];
-} SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
-
-/*#endif */
-
-// SystemModuleInformation (11)
-typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY {
- ULONG Unknown1;
- ULONG Unknown2;
- PVOID Base;
- ULONG Size;
- ULONG Flags;
- USHORT Index;
- /* Length of module name not including the path, this
- field contains valid value only for NTOSKRNL module */
- USHORT NameLength;
- USHORT LoadCount;
- USHORT PathLength;
- CHAR ImageName[256];
-} SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
-
-typedef struct _SYSTEM_MODULE_INFORMATION {
- ULONG Count;
- SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
-} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
-
-// SystemHandleInformation (16)
-// (see ontypes.h)
-typedef
-struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
-{
- USHORT UniqueProcessId;
- USHORT CreatorBackTraceIndex;
- UCHAR ObjectTypeIndex;
- UCHAR HandleAttributes;
- USHORT HandleValue;
- PVOID Object;
- ULONG GrantedAccess;
-
-} SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;
-
-typedef
-struct _SYSTEM_HANDLE_INFORMATION
-{
- ULONG NumberOfHandles;
- SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
-
-} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
-
-// SystemObjectInformation (17)
-typedef
-struct _SYSTEM_OBJECT_TYPE_INFORMATION
-{
- ULONG NextEntryOffset;
- ULONG ObjectCount;
- ULONG HandleCount;
- ULONG TypeNumber;
- ULONG InvalidAttributes;
- GENERIC_MAPPING GenericMapping;
- ACCESS_MASK ValidAccessMask;
- POOL_TYPE PoolType;
- UCHAR Unknown;
- UNICODE_STRING Name;
-
-} SYSTEM_OBJECT_TYPE_INFORMATION, *PSYSTEM_OBJECT_TYPE_INFORMATION;
-
-typedef
-struct _SYSTEM_OBJECT_INFORMATION
-{
- ULONG NextEntryOffset;
- PVOID Object;
- ULONG CreatorProcessId;
- USHORT Unknown;
- USHORT Flags;
- ULONG PointerCount;
- ULONG HandleCount;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG ExclusiveProcessId;
- PSECURITY_DESCRIPTOR SecurityDescriptor;
- UNICODE_STRING Name;
-
-} SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
-
-// SystemPageFileInformation (18)
-typedef
-struct _SYSTEM_PAGEFILE_INFORMATION
-{
- ULONG NextEntryOffset;
- ULONG TotalSize;
- ULONG TotalInUse;
- ULONG PeakUsage;
- UNICODE_STRING PageFileName;
-
-} SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
-
-// SystemCacheInformation (21)
-typedef
-struct _SYSTEM_CACHE_INFORMATION
-{
- ULONG CurrentSize;
- ULONG PeakSize;
- ULONG PageFaultCount;
- ULONG MinimumWorkingSet;
- ULONG MaximumWorkingSet;
- ULONG TransitionSharedPages;
- ULONG TransitionSharedPagesPeak;
- ULONG Unused[2];
-
-} SYSTEM_CACHE_INFORMATION;
-
-// SystemInterruptInformation (23)
-typedef
-struct _SYSTEM_INTERRUPT_INFORMATION
-{
- ULONG ContextSwitches;
- ULONG DpcCount;
- ULONG DpcRate;
- ULONG TimeIncrement;
- ULONG DpcBypassCount;
- ULONG ApcBypassCount;
-
-} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
-
-// SystemDpcInformation (24)
-typedef
-struct _SYSTEM_DPC_INFORMATION
-{
- ULONG Unused;
- ULONG KiMaximumDpcQueueDepth;
- ULONG KiMinimumDpcRate;
- ULONG KiAdjustDpcThreshold;
- ULONG KiIdealDpcRate;
-
-} SYSTEM_DPC_INFORMATION, *PSYSTEM_DPC_INFORMATION;
-
-// SystemLoadImage (26)
-typedef struct _SYSTEM_LOAD_IMAGE
-{
- UNICODE_STRING ModuleName;
- PVOID ModuleBase;
- PVOID SectionPointer;
- PVOID EntryPoint;
- PVOID ExportDirectory;
-} SYSTEM_LOAD_IMAGE, *PSYSTEM_LOAD_IMAGE;
-
-// SystemUnloadImage (27)
-typedef struct _SYSTEM_UNLOAD_IMAGE
-{
- PVOID ModuleBase;
-} SYSTEM_UNLOAD_IMAGE, *PSYSTEM_UNLOAD_IMAGE;
-
-// SystemTimeAdjustmentInformation (28)
-typedef
-struct _SYSTEM_QUERY_TIME_ADJUSTMENT
-{
- ULONG TimeAdjustment;
- ULONG MaximumIncrement;
- BOOLEAN TimeSynchronization;
-
-} SYSTEM_QUERY_TIME_ADJUSTMENT, *PSYSTEM_QUERY_TIME_ADJUSTMENT;
-
-typedef
-struct _SYSTEM_SET_TIME_ADJUSTMENT
-{
- ULONG TimeAdjustment;
- BOOLEAN TimeSynchronization;
-
-} SYSTEM_SET_TIME_ADJUSTMENT, *PSYSTEM_SET_TIME_ADJUSTMENT;
-
-// atom information
-
-typedef enum _ATOM_INFORMATION_CLASS
-{
- AtomBasicInformation = 0,
- AtomTableInformation = 1,
-} ATOM_INFORMATION_CLASS;
-
-typedef struct _ATOM_BASIC_INFORMATION
-{
- USHORT UsageCount;
- USHORT Flags;
- USHORT NameLength;
- WCHAR Name[1];
-} ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
-
-// SystemLoadAndCallImage(38)
-typedef struct _SYSTEM_LOAD_AND_CALL_IMAGE
-{
- UNICODE_STRING ModuleName;
-} SYSTEM_LOAD_AND_CALL_IMAGE, *PSYSTEM_LOAD_AND_CALL_IMAGE;
-
-// SystemRegistryQuotaInformation (37)
-typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
- ULONG RegistryQuotaAllowed;
- ULONG RegistryQuotaUsed;
- PVOID Reserved1;
-} SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
-
-
-// SystemTimeZoneInformation (44)
-typedef
-struct _SYSTEM_TIME_ZONE_INFORMATION
-{
- LONG Bias;
- WCHAR StandardName [32];
- TIME StandardDate;
- LONG StandardBias;
- WCHAR DaylightName [32];
- TIME DaylightDate;
- LONG DaylightBias;
-
-} SYSTEM_TIME_ZONE_INFORMATION, * PSYSTEM_TIME_ZONE_INFORMATION;
-
-// SystemLookasideInformation (45)
-typedef
-struct _SYSTEM_LOOKASIDE_INFORMATION
-{
- USHORT Depth;
- USHORT MaximumDepth;
- ULONG TotalAllocates;
- ULONG AllocatesMisses;
- ULONG TotalFrees;
- ULONG FreeMisses;
- POOL_TYPE Type;
- ULONG Tag;
- ULONG Size;
-
-} SYSTEM_LOOKASIDE_INFORMATION, * PSYSTEM_LOOKASIDE_INFORMATION;
-
-// SystemSetTimeSlipEvent (46)
-typedef
-struct _SYSTEM_SET_TIME_SLIP_EVENT
-{
- HANDLE TimeSlipEvent; /* IN */
-
-} SYSTEM_SET_TIME_SLIP_EVENT, * PSYSTEM_SET_TIME_SLIP_EVENT;
-
-// SystemCreateSession (47)
-// (available only on TSE/NT5+)
-typedef
-struct _SYSTEM_CREATE_SESSION
-{
- ULONG SessionId; /* OUT */
-
-} SYSTEM_CREATE_SESSION, * PSYSTEM_CREATE_SESSION;
-
-// SystemDeleteSession (48)
-// (available only on TSE/NT5+)
-typedef
-struct _SYSTEM_DELETE_SESSION
-{
- ULONG SessionId; /* IN */
-
-} SYSTEM_DELETE_SESSION, * PSYSTEM_DELETE_SESSION;
-
-// SystemRangeStartInformation (50)
-typedef
-struct _SYSTEM_RANGE_START_INFORMATION
-{
- PVOID SystemRangeStart;
-
-} SYSTEM_RANGE_START_INFORMATION, * PSYSTEM_RANGE_START_INFORMATION;
-
-// SystemSessionProcessesInformation (53)
-// (available only on TSE/NT5+)
-typedef
-struct _SYSTEM_SESSION_PROCESSES_INFORMATION
-{
- ULONG SessionId;
- ULONG BufferSize;
- PVOID Buffer; /* same format as in SystemProcessInformation */
-
-} SYSTEM_SESSION_PROCESSES_INFORMATION, * PSYSTEM_SESSION_PROCESSES_INFORMATION;
-
-// memory information
-
-typedef enum _MEMORY_INFORMATION_CLASS {
- MemoryBasicInformation,
- MemoryWorkingSetList,
- MemorySectionName //,
- //MemoryBasicVlmInformation //???
-} MEMORY_INFORMATION_CLASS;
-
-typedef struct _MEMORY_BASIC_INFORMATION { // Information Class 0
- PVOID BaseAddress;
- PVOID AllocationBase;
- ULONG AllocationProtect;
- ULONG RegionSize;
- ULONG State;
- ULONG Protect;
- ULONG Type;
-} MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;
-
-typedef struct _MEMORY_WORKING_SET_LIST { // Information Class 1
- ULONG NumberOfPages;
- ULONG WorkingSetList[1];
-} MEMORY_WORKING_SET_LIST, *PMEMORY_WORKING_SET_LIST;
-
-// Information Class 2
-/*#define _MEMORY_SECTION_NAME_STATIC(__bufsize__) \
- { \
- UNICODE_STRING SectionFileName; \
- WCHAR NameBuffer[(__bufsize__)]; \
-}*/
-
-typedef struct
-{
- UNICODE_STRING SectionFileName;
- WCHAR NameBuffer[ANYSIZE_ARRAY];
-} MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
-
-// Information class 0
-typedef struct _PROCESS_BASIC_INFORMATION
-{
- NTSTATUS ExitStatus;
- PPEB PebBaseAddress;
- KAFFINITY AffinityMask;
- KPRIORITY BasePriority;
- HANDLE UniqueProcessId;
- HANDLE InheritedFromUniqueProcessId;
-} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
-
-// Information class 1
-typedef struct _QUOTA_LIMITS
-{
- ULONG PagedPoolLimit;
- ULONG NonPagedPoolLimit;
- SIZE_T MinimumWorkingSetSize;
- SIZE_T MaximumWorkingSetSize;
- ULONG PagefileLimit;
- TIME TimeLimit;
-} QUOTA_LIMITS, *PQUOTA_LIMITS;
-
-// Information class 2
-typedef struct _IO_COUNTERS
-{
- LARGE_INTEGER ReadOperationCount;
- LARGE_INTEGER WriteOperationCount;
- LARGE_INTEGER OtherOperationCount;
- LARGE_INTEGER ReadTransferCount;
- LARGE_INTEGER WriteTransferCount;
- LARGE_INTEGER OtherTransferCount;
-} IO_COUNTERS, *PIO_COUNTERS;
-
-// Information class 3
-typedef struct _VM_COUNTERS_
-{
- ULONG PeakVirtualSize;
- ULONG VirtualSize;
- ULONG PageFaultCount;
- ULONG PeakWorkingSetSize;
- ULONG WorkingSetSize;
- ULONG QuotaPeakPagedPoolUsage;
- ULONG QuotaPagedPoolUsage;
- ULONG QuotaPeakNonPagedPoolUsage;
- ULONG QuotaNonPagedPoolUsage;
- ULONG PagefileUsage;
- ULONG PeakPagefileUsage;
-} VM_COUNTERS, *PVM_COUNTERS;
-
-// 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;
-
-// Information class 9
-typedef struct _PROCESS_ACCESS_TOKEN
-{
- HANDLE Token;
- HANDLE Thread;
-} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
-
-// Information class 14
-typedef struct _POOLED_USAGE_AND_LIMITS_
-{
- ULONG PeakPagedPoolUsage;
- ULONG PagedPoolUsage;
- ULONG PagedPoolLimit;
- ULONG PeakNonPagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG NonPagedPoolLimit;
- ULONG PeakPagefileUsage;
- ULONG PagefileUsage;
- ULONG PagefileLimit;
-} POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS;
-
-// Information class 15
-typedef struct _PROCESS_WS_WATCH_INFORMATION
-{
- PVOID FaultingPc;
- PVOID FaultingVa;
-} PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
-
-// Information class 18
-typedef struct _PROCESS_PRIORITY_CLASS
-{
- BOOLEAN Foreground;
- UCHAR PriorityClass;
-} PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
-
-// Information 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;
-
-// Information class 24
-typedef struct _PROCESS_SESSION_INFORMATION
-{
- ULONG SessionId;
-} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
-
-// thread information
-
-// incompatible with MS NT
-
-typedef struct _THREAD_BASIC_INFORMATION
-{
- NTSTATUS ExitStatus;
- PVOID TebBaseAddress; // PNT_TIB (GN)
- CLIENT_ID ClientId;
- KAFFINITY AffinityMask;
- KPRIORITY Priority;
- KPRIORITY BasePriority;
-} THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
-
-
-// file information
-
-
-
-typedef struct _FILE_POSITION_INFORMATION
-{
- LARGE_INTEGER CurrentByteOffset;
-} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
-
-typedef struct _FILE_ALIGNMENT_INFORMATION
-{
- ULONG AlignmentRequirement;
-} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
-
-typedef struct _FILE_DISPOSITION_INFORMATION
-{
- BOOLEAN DoDeleteFile;
-} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
-
-typedef struct _FILE_END_OF_FILE_INFORMATION
-{
- LARGE_INTEGER EndOfFile;
-} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
-
-typedef struct _FILE_FULL_EA_INFORMATION
-{
- ULONG NextEntryOffset;
- UCHAR Flags;
- UCHAR EaNameLength;
- USHORT EaValueLength;
- CHAR EaName[1];
-} FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
-
-
-typedef struct _FILE_EA_INFORMATION {
- ULONG EaSize;
-} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
-
-
-typedef struct _FILE_GET_EA_INFORMATION {
- ULONG NextEntryOffset;
- UCHAR EaNameLength;
- CHAR EaName[0];
-} FILE_GET_EA_INFORMATION, *PFILE_GET_EA_INFORMATION;
-
-typedef struct _FILE_STREAM_INFORMATION {
- ULONG NextEntryOffset;
- ULONG StreamNameLength;
- LARGE_INTEGER StreamSize;
- LARGE_INTEGER StreamAllocationSize;
- WCHAR StreamName[0];
-} FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
-
-typedef struct _FILE_ALLOCATION_INFORMATION {
- LARGE_INTEGER AllocationSize;
-} FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
-
-typedef struct _FILE_NAME_INFORMATION {
- ULONG FileNameLength;
- WCHAR FileName[0];
-} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
-
-typedef struct _FILE_NAMES_INFORMATION
-{
- ULONG NextEntryOffset;
- ULONG FileIndex;
- ULONG FileNameLength;
- WCHAR FileName[0];
-} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
-
-
-typedef struct _FILE_RENAME_INFORMATION {
- BOOLEAN Replace;
- HANDLE RootDir;
- ULONG FileNameLength;
- WCHAR FileName[0];
-} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
-
-
-typedef struct _FILE_INTERNAL_INFORMATION {
- LARGE_INTEGER IndexNumber;
-} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
-
-typedef struct _FILE_ACCESS_INFORMATION {
- ACCESS_MASK AccessFlags;
-} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
-
-
-typedef struct _FILE_MODE_INFORMATION {
- ULONG Mode;
-} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
-
-
-typedef struct _FILE_PIPE_INFORMATION {
- ULONG ReadMode;
- ULONG CompletionMode;
-} FILE_PIPE_INFORMATION, *PFILE_PIPE_INFORMATION;
-
-typedef struct _FILE_PIPE_LOCAL_INFORMATION {
- ULONG NamedPipeType;
- ULONG NamedPipeConfiguration;
- ULONG MaximumInstances;
- ULONG CurrentInstances;
- ULONG InboundQuota;
- ULONG ReadDataAvailable;
- ULONG OutboundQuota;
- ULONG WriteQuotaAvailable;
- ULONG NamedPipeState;
- ULONG NamedPipeEnd;
-} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
-
-typedef struct _FILE_PIPE_REMOTE_INFORMATION {
- LARGE_INTEGER CollectDataTime;
- ULONG MaximumCollectionCount;
-} FILE_PIPE_REMOTE_INFORMATION, *PFILE_PIPE_REMOTE_INFORMATION;
-
-typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
- ULONG MaxMessageSize;
- ULONG Unknown; /* ?? */
- ULONG NextSize;
- ULONG MessageCount;
- LARGE_INTEGER Timeout;
-} FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
-
-typedef struct _FILE_MAILSLOT_SET_INFORMATION {
- LARGE_INTEGER Timeout;
-} FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
-
-typedef struct _FILE_COMPRESSION_INFORMATION {
- LARGE_INTEGER CompressedFileSize;
- USHORT CompressionFormat;
- UCHAR CompressionUnitShift;
- UCHAR ChunkShift;
- UCHAR ClusterShift;
- UCHAR Reserved[3];
-} FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
-
-typedef struct _FILE_COMPLETION_INFORMATION { // Information Class 30
- HANDLE IoCompletionHandle;
- PVOID CompletionKey;
-} FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
-
-typedef struct _FILE_ALL_INFORMATION {
- FILE_BASIC_INFORMATION BasicInformation;
- FILE_STANDARD_INFORMATION StandardInformation;
- FILE_INTERNAL_INFORMATION InternalInformation;
- FILE_EA_INFORMATION EaInformation;
- FILE_ACCESS_INFORMATION AccessInformation;
- FILE_POSITION_INFORMATION PositionInformation;
- FILE_MODE_INFORMATION ModeInformation;
- FILE_ALIGNMENT_INFORMATION AlignmentInformation;
- FILE_NAME_INFORMATION NameInformation;
-} FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
-
-
-// file system information structures
-
-typedef struct _FILE_FS_DEVICE_INFORMATION {
- DEVICE_TYPE DeviceType;
- ULONG Characteristics;
-} FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
-
-
-typedef struct _FILE_FS_VOLUME_INFORMATION {
- TIME VolumeCreationTime;
- ULONG VolumeSerialNumber;
- ULONG VolumeLabelLength;
- BOOLEAN SupportsObjects;
- WCHAR VolumeLabel[0];
-} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
-
-typedef struct _FILE_FS_SIZE_INFORMATION {
- LARGE_INTEGER TotalAllocationUnits;
- LARGE_INTEGER AvailableAllocationUnits;
- ULONG SectorsPerAllocationUnit;
- ULONG BytesPerSector;
-} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_ATTRIBUTE_INFORMATION {
- ULONG FileSystemAttributes;
- LONG MaximumComponentNameLength;
- ULONG FileSystemNameLength;
- WCHAR FileSystemName[0];
-} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
-
-/*
- FileSystemAttributes is one of the following values:
-
- FILE_CASE_SENSITIVE_SEARCH 0x00000001
- FILE_CASE_PRESERVED_NAMES 0x00000002
- FILE_UNICODE_ON_DISK 0x00000004
- FILE_PERSISTENT_ACLS 0x00000008
- FILE_FILE_COMPRESSION 0x00000010
- FILE_VOLUME_QUOTAS 0x00000020
- FILE_VOLUME_IS_COMPRESSED 0x00008000
-*/
-typedef struct _FILE_FS_LABEL_INFORMATION {
- ULONG VolumeLabelLength;
- WCHAR VolumeLabel[0];
-} FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
-
-
-typedef struct _FILE_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- WCHAR FileName[0];
-} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
-
-typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- WCHAR FileName[0]; // variable size
-} FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
- FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
-
-
-typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- CHAR ShortNameLength;
- WCHAR ShortName[12]; // 8.3 name
- WCHAR FileName[0];
-} FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
- FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
-
-/*
- NotifyFilter / CompletionFilter:
-
- FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
- FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
- FILE_NOTIFY_CHANGE_NAME 0x00000003
- FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
- FILE_NOTIFY_CHANGE_SIZE 0x00000008
- FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
- FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
- FILE_NOTIFY_CHANGE_CREATION 0x00000040
- FILE_NOTIFY_CHANGE_EA 0x00000080
- FILE_NOTIFY_CHANGE_SECURITY 0x00000100
- FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
- FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
- FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
-*/
-
-typedef struct _FILE_NOTIFY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG Action;
- ULONG NameLength;
- WCHAR Name[1];
-} FILE_NOTIFY_INFORMATION, *PFILE_NOTIFY_INFORMATION;
-
-#define FSCTL_GET_VOLUME_BITMAP 0x9006F
-#define FSCTL_GET_RETRIEVAL_POINTERS 0x90073
-#define FSCTL_MOVE_FILE 0x90074
-
-/* Structure copied from ntifs.h (Must be in sync!) */
-#include <pshpack8.h>
-typedef struct _RETRIEVAL_POINTERS_BUFFER {
- ULONG ExtentCount;
- LARGE_INTEGER StartingVcn;
- struct {
- LARGE_INTEGER NextVcn;
- LARGE_INTEGER Lcn;
- } Extents[1];
-} RETRIEVAL_POINTERS_BUFFER, *PRETRIEVAL_POINTERS_BUFFER;
-#include <poppack.h>
-
-typedef enum _SECTION_INFORMATION_CLASS
-{
- SectionBasicInformation,
- SectionImageInformation,
-} SECTION_INFORMATION_CLASS;
-
-// shutdown action
-
-typedef enum SHUTDOWN_ACTION_TAG {
- ShutdownNoReboot,
- ShutdownReboot,
- ShutdownPowerOff
-} SHUTDOWN_ACTION;
-
-typedef enum _IO_COMPLETION_INFORMATION_CLASS {
- IoCompletionBasicInformation
-} IO_COMPLETION_INFORMATION_CLASS;
-
-typedef struct _IO_COMPLETION_BASIC_INFORMATION {
- LONG Depth;
-} IO_COMPLETION_BASIC_INFORMATION, *PIO_COMPLETION_BASIC_INFORMATION;
-
-#else /* __USE_W32API */
-
-#define DebugDbgLoadSymbols ((DEBUG_CONTROL_CODE)0xffffffff)
-
-#endif /* __USE_W32API */
-
-#ifdef __USE_W32API
-#include <ddk/ntddk.h>
-#endif /* __USE_W32API */
-#ifndef NtCurrentProcess
-#define NtCurrentProcess() ( (HANDLE) 0xFFFFFFFF )
-#endif /* NtCurrentProcess */
-#ifndef NtCurrentThread
-#define NtCurrentThread() ( (HANDLE) 0xFFFFFFFE )
-#endif /* NtCurrentThread */
-
-#ifdef __GNUC__
-#ifdef __NTOSKRNL__
-extern ULONG EXPORTED NtBuildNumber;
-#else
-extern ULONG IMPORTED NtBuildNumber;
-#endif
-#else
-/* Microsoft-style declarations */
-#ifdef __NTOSKRNL__
-extern EXPORTED ULONG NtBuildNumber;
-#else
-extern IMPORTED ULONG NtBuildNumber;
-#endif
-#endif /* __GNUC__ */
-
-typedef struct _SECTION_BASIC_INFORMATION
-{
- PVOID BaseAddress;
- ULONG Attributes;
- LARGE_INTEGER Size;
-} SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
-
-typedef struct _SECTION_IMAGE_INFORMATION
-{
- ULONG EntryPoint;
- ULONG Unknown1;
- ULONG_PTR StackReserve;
- ULONG_PTR StackCommit;
- ULONG Subsystem;
- USHORT MinorSubsystemVersion;
- USHORT MajorSubsystemVersion;
- ULONG Unknown2;
- ULONG Characteristics;
- USHORT ImageNumber;
- BOOLEAN Executable;
- UCHAR Unknown3;
- ULONG Unknown4[3];
-} SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
-
-
-// event access mask
-
-#define EVENT_READ_ACCESS 1
-#define EVENT_WRITE_ACCESS 2
-
-//process query / set information class
-
-#define ProcessBasicInformation 0
-#define ProcessQuotaLimits 1
-#define ProcessIoCounters 2
-#define ProcessVmCounters 3
-#define ProcessTimes 4
-#define ProcessBasePriority 5
-#define ProcessRaisePriority 6
-#define ProcessDebugPort 7
-#define ProcessExceptionPort 8
-#define ProcessAccessToken 9
-#define ProcessLdtInformation 10
-#define ProcessLdtSize 11
-#define ProcessDefaultHardErrorMode 12
-#define ProcessIoPortHandlers 13
-#define ProcessPooledUsageAndLimits 14
-#define ProcessWorkingSetWatch 15
-#define ProcessUserModeIOPL 16
-#define ProcessEnableAlignmentFaultFixup 17
-#define ProcessPriorityClass 18
-#define ProcessWx86Information 19
-#define ProcessHandleCount 20
-#define ProcessAffinityMask 21
-#define ProcessPriorityBoost 22
-#define ProcessDeviceMap 23
-#define ProcessSessionInformation 24
-#define ProcessForegroundInformation 25
-#define ProcessWow64Information 26
-#define ProcessImageFileName 27
-#define ProcessLUIDDeviceMapsEnabled 28
-#define ProcessBreakOnTermination 29
-#define ProcessDebugObjectHandle 30
-#define ProcessDebugFlags 31
-#define ProcessHandleTracing 32
-#define ProcessUnknown33 33
-#define ProcessUnknown34 34
-#define ProcessUnknown35 35
-#define ProcessCookie 36
-#define MaxProcessInfoClass 36
-
-/*
- * thread query / set information class
- */
-#define ThreadBasicInformation 0
-#define ThreadTimes 1
-#define ThreadPriority 2
-#define ThreadBasePriority 3
-#define ThreadAffinityMask 4
-#define ThreadImpersonationToken 5
-#define ThreadDescriptorTableEntry 6
-#define ThreadEnableAlignmentFaultFixup 7
-#define ThreadEventPair 8
-#define ThreadQuerySetWin32StartAddress 9
-#define ThreadZeroTlsCell 10
-#define ThreadPerformanceCount 11
-#define ThreadAmILastThread 12
-#define ThreadIdealProcessor 13
-#define ThreadPriorityBoost 14
-#define ThreadSetTlsArrayAddress 15
-#define ThreadIsIoPending 16
-#define ThreadHideFromDebugger 17
-#define MaxThreadInfoClass 17
-
-
-typedef struct _ATOM_TABLE_INFORMATION
-{
- ULONG NumberOfAtoms;
- RTL_ATOM Atoms[1];
-} ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
-
-
-// mutant information
-
-typedef enum _MUTANT_INFORMATION_CLASS
-{
- MutantBasicInformation = 0
-} MUTANT_INFORMATION_CLASS;
-
-typedef struct _MUTANT_BASIC_INFORMATION
-{
- LONG CurrentCount;
- BOOLEAN OwnedByCaller;
- BOOLEAN AbandonedState;
-} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
-
-
-// SystemTimeOfDayInformation (3)
-typedef
-struct _SYSTEM_TIMEOFDAY_INFORMATION
-{
- LARGE_INTEGER BootTime;
- LARGE_INTEGER CurrentTime;
- LARGE_INTEGER TimeZoneBias;
- ULONG TimeZoneId;
- ULONG Reserved;
-} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
-
-// SystemPathInformation (4)
-// IT DOES NOT WORK
-typedef
-struct _SYSTEM_PATH_INFORMATION
-{
- PVOID Dummy;
-
-} SYSTEM_PATH_INFORMATION, * PSYSTEM_PATH_INFORMATION;
-
-
-// SystemCallCountInformation (6)
-typedef
-struct _SYSTEM_SDT_INFORMATION
-{
- ULONG BufferLength;
- ULONG NumberOfSystemServiceTables;
- ULONG NumberOfServices [1];
- ULONG ServiceCounters [1];
-
-} SYSTEM_SDT_INFORMATION, *PSYSTEM_SDT_INFORMATION;
-
-// SystemDeviceInformation (7)
-typedef
-struct _SYSTEM_DEVICE_INFORMATION
-{
- ULONG NumberOfDisks;
- ULONG NumberOfFloppies;
- ULONG NumberOfCdRoms;
- ULONG NumberOfTapes;
- ULONG NumberOfSerialPorts;
- ULONG NumberOfParallelPorts;
-} SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
-
-// SystemProcessorPerformanceInformation (8)
-// (one per processor in the system)
-typedef
-struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
-{
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER DpcTime;
- LARGE_INTEGER InterruptTime;
- ULONG InterruptCount;
- ULONG Reserved;
-
-} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
-
-// SystemFlagsInformation (9)
-typedef
-struct _SYSTEM_FLAGS_INFORMATION
-{
- ULONG Flags;
-
-} SYSTEM_FLAGS_INFORMATION, * PSYSTEM_FLAGS_INFORMATION;
-
-#define FLG_STOP_ON_EXCEPTION 0x00000001
-#define FLG_SHOW_LDR_SNAPS 0x00000002
-#define FLG_DEBUG_INITIAL_COMMAND 0x00000004
-#define FLG_STOP_ON_HANG_GUI 0x00000008
-#define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
-#define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
-#define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
-#define FLG_HEAP_VALIDATE_ALL 0x00000080
-#define FLG_POOL_ENABLE_TAIL_CHECK 0x00000100
-#define FLG_POOL_ENABLE_FREE_CHECK 0x00000200
-#define FLG_POOL_ENABLE_TAGGING 0x00000400
-#define FLG_HEAP_ENABLE_TAGGING 0x00000800
-#define FLG_USER_STACK_TRACE_DB 0x00001000
-#define FLG_KERNEL_STACK_TRACE_DB 0x00002000
-#define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
-#define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
-#define FLG_IGNORE_DEBUG_PRIV 0x00010000
-#define FLG_ENABLE_CSRDEBUG 0x00020000
-#define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
-#define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
-#define FLG_HEAP_ENABLE_CALL_TRACING 0x00100000
-#define FLG_HEAP_DISABLE_COALESCING 0x00200000
-#define FLG_ENABLE_CLOSE_EXCEPTION 0x00400000
-#define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
-#define FLG_UNKNOWN_01000000 0x01000000
-#define FLG_UNKNOWN_02000000 0x02000000
-#define FLG_UNKNOWN_04000000 0x04000000
-#define FLG_ENABLE_DBGPRINT_BUFFERING 0x08000000
-#define FLG_UNKNOWN_10000000 0x10000000
-#define FLG_UNKNOWN_20000000 0x20000000
-#define FLG_UNKNOWN_40000000 0x40000000
-#define FLG_UNKNOWN_80000000 0x80000000
-
-// SystemCallTimeInformation (10)
-// UNKNOWN
-
-// SystemLocksInformation (12)
-typedef
-struct _SYSTEM_RESOURCE_LOCK_ENTRY
-{
- ULONG ResourceAddress;
- ULONG Always1;
- ULONG Unknown;
- ULONG ActiveCount;
- ULONG ContentionCount;
- ULONG Unused[2];
- ULONG NumberOfSharedWaiters;
- ULONG NumberOfExclusiveWaiters;
-
-} SYSTEM_RESOURCE_LOCK_ENTRY, *PSYSTEM_RESOURCE_LOCK_ENTRY;
-
-typedef
-struct _SYSTEM_RESOURCE_LOCK_INFO
-{
- ULONG Count;
- SYSTEM_RESOURCE_LOCK_ENTRY Lock [1];
-
-} SYSTEM_RESOURCE_LOCK_INFO, *PSYSTEM_RESOURCE_LOCK_INFO;
-
-// SystemInformation13 (13)
-// UNKNOWN
-
-// SystemInformation14 (14)
-// UNKNOWN
-
-// SystemInformation15 (15)
-// UNKNOWN
-
-// SystemInstructionEmulationInfo (19)
-typedef
-struct _SYSTEM_VDM_INFORMATION
-{
- ULONG VdmSegmentNotPresentCount;
- ULONG VdmINSWCount;
- ULONG VdmESPREFIXCount;
- ULONG VdmCSPREFIXCount;
- ULONG VdmSSPREFIXCount;
- ULONG VdmDSPREFIXCount;
- ULONG VdmFSPREFIXCount;
- ULONG VdmGSPREFIXCount;
- ULONG VdmOPER32PREFIXCount;
- ULONG VdmADDR32PREFIXCount;
- ULONG VdmINSBCount;
- ULONG VdmINSWV86Count;
- ULONG VdmOUTSBCount;
- ULONG VdmOUTSWCount;
- ULONG VdmPUSHFCount;
- ULONG VdmPOPFCount;
- ULONG VdmINTNNCount;
- ULONG VdmINTOCount;
- ULONG VdmIRETCount;
- ULONG VdmINBIMMCount;
- ULONG VdmINWIMMCount;
- ULONG VdmOUTBIMMCount;
- ULONG VdmOUTWIMMCount;
- ULONG VdmINBCount;
- ULONG VdmINWCount;
- ULONG VdmOUTBCount;
- ULONG VdmOUTWCount;
- ULONG VdmLOCKPREFIXCount;
- ULONG VdmREPNEPREFIXCount;
- ULONG VdmREPPREFIXCount;
- ULONG VdmHLTCount;
- ULONG VdmCLICount;
- ULONG VdmSTICount;
- ULONG VdmBopCount;
-
-} SYSTEM_VDM_INFORMATION, *PSYSTEM_VDM_INFORMATION;
-
-// SystemInformation20 (20)
-// UNKNOWN
-
-// SystemPoolTagInformation (22)
-// found by Klaus P. Gerlicher
-// (implemented only in checked builds)
-typedef
-struct _POOL_TAG_STATS
-{
- ULONG AllocationCount;
- ULONG FreeCount;
- ULONG SizeBytes;
-
-} POOL_TAG_STATS;
-
-typedef
-struct _SYSTEM_POOL_TAG_ENTRY
-{
- ULONG Tag;
- POOL_TAG_STATS Paged;
- POOL_TAG_STATS NonPaged;
-
-} SYSTEM_POOL_TAG_ENTRY, * PSYSTEM_POOL_TAG_ENTRY;
-
-typedef
-struct _SYSTEM_POOL_TAG_INFO
-{
- ULONG Count;
- SYSTEM_POOL_TAG_ENTRY PoolEntry [1];
-
-} SYSTEM_POOL_TAG_INFO, *PSYSTEM_POOL_TAG_INFO;
-
-// SystemProcessorScheduleInfo (23)
-typedef
-struct _SYSTEM_PROCESSOR_SCHEDULE_INFO
-{
- ULONG nContextSwitches;
- ULONG nDPCQueued;
- ULONG nDPCRate;
- ULONG TimerResolution;
- ULONG nDPCBypasses;
- ULONG nAPCBypasses;
-
-} SYSTEM_PROCESSOR_SCHEDULE_INFO, *PSYSTEM_PROCESSOR_SCHEDULE_INFO;
-
-// SystemInformation25 (25)
-// UNKNOWN
-
-// SystemProcessorFaultCountInfo (33)
-typedef
-struct _SYSTEM_PROCESSOR_FAULT_INFO
-{
- ULONG nAlignmentFixup;
- ULONG nExceptionDispatches;
- ULONG nFloatingEmulation;
- ULONG Unknown;
-
-} SYSTEM_PROCESSOR_FAULT_INFO, *PSYSTEM_PROCESSOR_FAULT_INFO;
-
-// SystemCrashDumpStateInfo (34)
-//
-
-// SystemDebuggerInformation (35)
-typedef
-struct _SYSTEM_DEBUGGER_INFO
-{
- BOOLEAN KdDebuggerEnabled;
- BOOLEAN KdDebuggerPresent;
-
-} SYSTEM_DEBUGGER_INFO, *PSYSTEM_DEBUGGER_INFO;
-
-// SystemInformation36 (36)
-// UNKNOWN
-
-// SystemQuotaInformation (37)
-typedef
-struct _SYSTEM_QUOTA_INFORMATION
-{
- ULONG CmpGlobalQuota;
- ULONG CmpGlobalQuotaUsed;
- ULONG MmSizeofPagedPoolInBytes;
-
-} SYSTEM_QUOTA_INFORMATION, *PSYSTEM_QUOTA_INFORMATION;
-
-// (49)
-// UNKNOWN
-
-// SystemVerifierInformation (51)
-// UNKNOWN
-
-// SystemAddVerifier (52)
-// UNKNOWN
-
-// wait type
-
-#define WaitAll 0
-#define WaitAny 1
-
-// number of wait objects
-
-#define THREAD_WAIT_OBJECTS 3
-//#define MAXIMUM_WAIT_OBJECTS 64
-
-// object type access rights
-
-#define OBJECT_TYPE_CREATE 0x0001
-#define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
-
-// directory access rights
-
-#ifndef __USE_W32API
-#define DIRECTORY_QUERY 0x0001
-#define DIRECTORY_TRAVERSE 0x0002
-#define DIRECTORY_CREATE_OBJECT 0x0004
-#define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
-#endif
-
-#define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
-
-// symbolic link access rights
-
-#define SYMBOLIC_LINK_QUERY 0x0001
-#define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
-
-
-/* object information class */
-
-#ifndef __USE_W32API
-
-typedef enum _OBJECT_INFORMATION_CLASS
-{
- ObjectBasicInformation,
- ObjectNameInformation,
- ObjectTypeInformation,
- ObjectAllTypesInformation,
- ObjectHandleInformation
-} OBJECT_INFORMATION_CLASS;
-
-
-// directory information
-
-typedef struct _OBJECT_DIRECTORY_INFORMATION
-{
- UNICODE_STRING ObjectName;
- UNICODE_STRING ObjectTypeName; // Directory, Device ...
-} OBJECT_DIRECTORY_INFORMATION, *POBJECT_DIRECTORY_INFORMATION;
-
-
-/* system battery state */
-typedef struct _SYSTEM_BATTERY_STATE {
- BOOLEAN AcOnLine;
- BOOLEAN BatteryPresent;
- BOOLEAN Charging;
- BOOLEAN Discharging;
- BOOLEAN Spare1[4];
- ULONG MaxCapacity;
- ULONG RemainingCapacity;
- ULONG Rate;
- ULONG EstimatedTime;
- ULONG DefaultAlert1;
- ULONG DefaultAlert2;
-} SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE;
-
-
-// power information levels
-typedef enum _POWER_INFORMATION_LEVEL {
- SystemPowerPolicyAc,
- SystemPowerPolicyDc,
- VerifySystemPolicyAc,
- VerifySystemPolicyDc,
- SystemPowerCapabilities,
- SystemBatteryState,
- SystemPowerStateHandler,
- ProcessorStateHandler,
- SystemPowerPolicyCurrent,
- AdministratorPowerPolicy,
- SystemReserveHiberFile,
- ProcessorInformation,
- SystemPowerInformationData
-} POWER_INFORMATION_LEVEL;
-
-#endif /* __USE_W32API */
-
-/*
- Action is one of the following values:
-
- FILE_ACTION_ADDED 0x00000001
- FILE_ACTION_REMOVED 0x00000002
- FILE_ACTION_MODIFIED 0x00000003
- FILE_ACTION_RENAMED_OLD_NAME 0x00000004
- FILE_ACTION_RENAMED_NEW_NAME 0x00000005
- FILE_ACTION_ADDED_STREAM 0x00000006
- FILE_ACTION_REMOVED_STREAM 0x00000007
- FILE_ACTION_MODIFIED_STREAM 0x00000008
-
-*/
-
-
-// File System Control commands ( related to defragging )
-
-#define FSCTL_READ_MFT_RECORD 0x90068 // NTFS only
-
-//typedef enum _TIMER_TYPE
-//{
-// NotificationTimer,
-// SynchronizationTimer
-//} TIMER_TYPE;
-
-typedef struct _TIMER_BASIC_INFORMATION
-{
- LARGE_INTEGER TimeRemaining;
- BOOLEAN SignalState;
-} TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
-
-typedef enum _TIMER_INFORMATION_CLASS
-{
- TimerBasicInformation
-} TIMER_INFORMATION_CLASS;
-
-#ifndef __USE_W32API
-
-typedef enum
-{
- UNUSED_MSG_TYPE = 0x0, /* ReactOS */
- LPC_NEW_MESSAGE = 0x0, /* NT */
- LPC_REQUEST = 0x1,
- LPC_REPLY = 0x2,
- LPC_DATAGRAM = 0x3,
- LPC_LOST_REPLY = 0x4,
- LPC_PORT_CLOSED = 0x5,
- LPC_CLIENT_DIED = 0x6,
- LPC_EXCEPTION = 0x7,
- LPC_DEBUG_EVENT = 0x8,
- LPC_ERROR_EVENT = 0x9,
- LPC_CONNECTION_REQUEST = 0xa,
- LPC_CONNECTION_REFUSED = 0xb /* ReactOS only */
-
-} LPC_TYPE, *PLPC_TYPE;
-
-typedef struct _LPC_SECTION_WRITE
-{
- ULONG Length;
- HANDLE SectionHandle;
- ULONG SectionOffset;
- ULONG ViewSize;
- PVOID ViewBase;
- PVOID TargetViewBase;
-} LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
-
-typedef struct _LPC_SECTION_READ
-{
- ULONG Length;
- ULONG ViewSize;
- PVOID ViewBase;
-} LPC_SECTION_READ, *PLPC_SECTION_READ;
-
-typedef struct _LPC_MESSAGE
-{
- USHORT DataSize;
- USHORT MessageSize;
- USHORT MessageType;
- USHORT VirtualRangesOffset;
- CLIENT_ID ClientId;
- ULONG MessageId;
- ULONG SectionSize; /* CallbackID */
-} LPC_MESSAGE, *PLPC_MESSAGE;
-
-#define LPC_MESSAGE_BASE_SIZE sizeof(LPC_MESSAGE)
-
-#define PORT_MESSAGE_TYPE(m) (LPC_TYPE)((m).Header.MessageType)
-
-#endif /* __USE_W32API */
-
-#define PORT_MAX_DATA_LENGTH 0x104
-#define PORT_MAX_MESSAGE_LENGTH 0x148
-
-#define MAX_MESSAGE_DATA (0x130)
-
-#ifdef __USE_W32API
-typedef union _LPC_MAX_MESSAGE
-{
- LPC_MESSAGE Header;
- struct {
- BYTE LpcHeader[LPC_MESSAGE_BASE_SIZE];
- BYTE Data[MAX_MESSAGE_DATA];
- };
-} LPC_MAX_MESSAGE, *PLPC_MAX_MESSAGE;
-#else
-typedef struct _LPC_MAX_MESSAGE
-{
- LPC_MESSAGE Header;
- BYTE Data[MAX_MESSAGE_DATA];
-} LPC_MAX_MESSAGE, *PLPC_MAX_MESSAGE;
-#endif
-
-typedef struct _LPC_PORT_BASIC_INFORMATION
-{
- DWORD Unknown0;
- DWORD Unknown1;
- DWORD Unknown2;
- DWORD Unknown3;
- DWORD Unknown4;
- DWORD Unknown5;
- DWORD Unknown6;
- DWORD Unknown7;
- DWORD Unknown8;
- DWORD Unknown9;
- DWORD Unknown10;
- DWORD Unknown11;
- DWORD Unknown12;
- DWORD Unknown13;
-
-} LPC_PORT_BASIC_INFORMATION, * PLPC_PORT_BASIC_INFORMATION;
-
-
-#if 0
-typedef struct _KINTERRUPT
-{
- ULONG Vector; // Idem
- KAFFINITY ProcessorEnableMask; // not needed
- KSPIN_LOCK SpinLock; // Idem
- PKSPIN_LOCK ActualLock; // Idem
- BOOLEAN Shareable; // ShareVector
- BOOLEAN FloatingSave; // Idem
- CHAR ProcessorNumber; // Number
- PKSERVICE_ROUTINE ServiceRoutine; // Idem
- PVOID ServiceContext; // Idem
- LIST_ENTRY Entry; // InteruptListEntry
- KIRQL Irql; // Irql
- KIRQL SynchLevel; // SynchronizeIrql
- KINTERRUPT_MODE InterruptMode; // Mode
-} KINTERRUPT;
-#endif
-
-typedef struct _KINTERRUPT
-{
- CSHORT Type;
- CSHORT Size;
- LIST_ENTRY InterruptListEntry;
- PKSERVICE_ROUTINE ServiceRoutine;
- PVOID ServiceContext;
- KSPIN_LOCK SpinLock;
- ULONG TickCount;
- PKSPIN_LOCK ActualLock;
- PVOID DispatchAddress;
- ULONG Vector;
- KIRQL Irql;
- KIRQL SynchronizeIrql;
- BOOLEAN FloatingSave;
- BOOLEAN Connected;
- CHAR Number;
- UCHAR ShareVector;
- KINTERRUPT_MODE Mode;
- ULONG ServiceCount;
- ULONG DispatchCount;
- ULONG DispatchCode[106];
-} KINTERRUPT, *PKINTERRUPT;
-
-#ifndef __USE_W32API
-
-typedef struct _KINTERRUPT *PKINTERRUPT;
-
-typedef VOID STDCALL_FUNC
-(*PTIMER_APC_ROUTINE)(
- IN PVOID TimerContext,
- IN ULONG TimerLowValue,
- IN LONG TimerHighValue);
-
-#endif /* __USE_W32API */
-
-typedef enum _IO_COMPLETION_INFORMATION_CLASS
-{
- IoCompletionBasicInformation
-} IO_COMPLETION_INFORMATION_CLASS;
-
-/* BEGIN REACTOS ONLY */
-
-typedef enum _TRAVERSE_METHOD {
- TraverseMethodPreorder,
- TraverseMethodInorder,
- TraverseMethodPostorder
-} TRAVERSE_METHOD;
-
-typedef LONG STDCALL_FUNC
-(*PKEY_COMPARATOR)(IN PVOID Key1,
- IN PVOID Key2);
-
-typedef BOOLEAN STDCALL_FUNC
-(*PTRAVERSE_ROUTINE)(IN PVOID Context,
- IN PVOID Key,
- IN PVOID Value);
-
-struct _BINARY_TREE_NODE;
-
-typedef struct _BINARY_TREE
-{
- struct _BINARY_TREE_NODE * RootNode;
- PKEY_COMPARATOR Compare;
- BOOLEAN UseNonPagedPool;
- union {
- NPAGED_LOOKASIDE_LIST NonPaged;
- PAGED_LOOKASIDE_LIST Paged;
- } List;
- union {
- KSPIN_LOCK NonPaged;
- FAST_MUTEX Paged;
- } Lock;
-} BINARY_TREE, *PBINARY_TREE;
-
-
-struct _SPLAY_TREE_NODE;
-
-typedef struct _SPLAY_TREE
-{
- struct _SPLAY_TREE_NODE * RootNode;
- PKEY_COMPARATOR Compare;
- BOOLEAN Weighted;
- BOOLEAN UseNonPagedPool;
- union {
- NPAGED_LOOKASIDE_LIST NonPaged;
- PAGED_LOOKASIDE_LIST Paged;
- } List;
- union {
- KSPIN_LOCK NonPaged;
- FAST_MUTEX Paged;
- } Lock;
- PVOID Reserved[4];
-} SPLAY_TREE, *PSPLAY_TREE;
-
-
-typedef struct _HASH_TABLE
-{
- // Size of hash table in number of bits
- ULONG HashTableSize;
-
- // Use non-paged pool memory?
- BOOLEAN UseNonPagedPool;
-
- // Lock for this structure
- union {
- KSPIN_LOCK NonPaged;
- FAST_MUTEX Paged;
- } Lock;
-
- // Pointer to array of hash buckets with splay trees
- PSPLAY_TREE HashTrees;
-} HASH_TABLE, *PHASH_TABLE;
-
-
-/* END REACTOS ONLY */
-
-#endif
#ifndef __WIN32K_NTUSER_H
#define __WIN32K_NTUSER_H
-#ifndef _NTNDK_
-#include <ddk/ntapi.h>
-#endif
-
#define WM_SYSTIMER 280
ULONG STDCALL
#include "precomp.h"
#include <math.h>
-#include <ntos/except.h>
int _matherr(struct _exception* e)
\r
#include <ddk/wdmguid.h>\r
#define __GUIDS_ONLY__\r
-#include <ntos/ntpnp.h>\r
+#include <ddk/ntpnp.h>\r
\r
/* EOF */\r
*/
#include <ntoskrnl.h>
-#include <ntos/bootvid.h>
#define NDEBUG
#include <internal/debug.h>
/* INCLUDES ******************************************************************/
#include <ntoskrnl.h>
-#include <ntos/bootvid.h>
#include <ddk/ntbootvid.h>
#define NDEBUG
#include <internal/debug.h>
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#include <ddk/wdmguid.h>
+#include <ddk/ntpnp.h>
#include <ndk/ntndk.h>
#undef IO_TYPE_FILE
#define IO_TYPE_FILE 0x0F5L /* Temp Hack */
-
-/* FIXME: Add to ndk, or at least move somewhere else */
-#include <ntos/ntpnp.h>
-#include <napi/core.h>
/* ReactOS Headers */
#include <reactos/version.h>
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
+#include <ddk/core.h>
#define NDEBUG
#include <internal/debug.h>
#define NTOS_MODE_USER\r
#include <ndk/ntndk.h>\r
#include <ddk/wdmguid.h>\r
+#include <ddk/ntpnp.h>\r
\r
#include <rpc.h>\r
#include <rpcdce.h>\r
-#include <ntos/ntpnp.h>\r
\r
#include "pnp_c.h"\r
\r
#define ENABLE_MOUSE_INPUT 16
#define ENABLE_PROCESSED_OUTPUT 1
#define ENABLE_WRAP_AT_EOL_OUTPUT 2
+#define CONSOLE_INPUT_MODE_VALID (0x0f)
+#define CONSOLE_OUTPUT_MODE_VALID (0x03)
#define KEY_EVENT 1
#define MOUSE_EVENT 2
#define WINDOW_BUFFER_SIZE_EVENT 4
SHORT X;
SHORT Y;
} COORD;
+typedef struct _CONSOLE_SELECTION_INFO {
+ DWORD dwFlags;
+ COORD dwSelectionAnchor;
+ SMALL_RECT srSelection;
+} CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO;
typedef struct _CONSOLE_FONT_INFO {
DWORD nFont;
COORD dwFontSize;