2008-03-06 12:27:39 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2008 Francois Gouget for CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NTDDK_
|
|
|
|
#define _NTDDK_
|
|
|
|
|
|
|
|
/* Note: We will probably have to duplicate everything ultimately :-( */
|
|
|
|
#include <ddk/wdm.h>
|
|
|
|
|
|
|
|
#include <excpt.h>
|
|
|
|
/* FIXME: #include <ntdef.h> */
|
|
|
|
#include <ntstatus.h>
|
|
|
|
/* FIXME: #include <bugcodes.h> */
|
|
|
|
/* FIXME: #include <ntiologc.h> */
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2008-09-07 23:01:55 +00:00
|
|
|
typedef struct _CONFIGURATION_INFORMATION
|
|
|
|
{
|
|
|
|
ULONG DiskCount;
|
|
|
|
ULONG FloppyCount;
|
|
|
|
ULONG CdRomCount;
|
|
|
|
ULONG TapeCount;
|
|
|
|
ULONG ScsiPortCount;
|
|
|
|
ULONG SerialCount;
|
|
|
|
ULONG ParallelCount;
|
|
|
|
BOOLEAN AtDiskPrimaryAddressClaimed;
|
|
|
|
BOOLEAN AtDiskSecondaryAddressClaimed;
|
|
|
|
ULONG Version;
|
|
|
|
ULONG MediumChangerCount;
|
|
|
|
} CONFIGURATION_INFORMATION, *PCONFIGURATION_INFORMATION;
|
|
|
|
|
2009-08-14 11:31:57 +00:00
|
|
|
typedef enum _CONFIGURATION_TYPE
|
|
|
|
{
|
|
|
|
ArcSystem = 0,
|
|
|
|
CentralProcessor,
|
|
|
|
FloatingPointProcessor,
|
|
|
|
PrimaryIcache,
|
|
|
|
PrimaryDcache,
|
|
|
|
SecondaryIcache,
|
|
|
|
SecondaryDcache,
|
|
|
|
SecondaryCache,
|
|
|
|
EisaAdapter,
|
|
|
|
TcAdapter,
|
|
|
|
ScsiAdapter,
|
|
|
|
DtiAdapter,
|
|
|
|
MultiFunctionAdapter,
|
|
|
|
DiskController,
|
|
|
|
TapeController,
|
|
|
|
CdromController,
|
|
|
|
WormController,
|
|
|
|
SerialController,
|
|
|
|
NetworkController,
|
|
|
|
DisplayController,
|
|
|
|
ParallelController,
|
|
|
|
PointerController,
|
|
|
|
KeyboardController,
|
|
|
|
AudioController,
|
|
|
|
OtherController,
|
|
|
|
DiskPeripheral,
|
|
|
|
FloppyDiskPeripheral,
|
|
|
|
TapePeripheral,
|
|
|
|
ModemPeripheral,
|
|
|
|
MonitorPeripheral,
|
|
|
|
PrinterPeripheral,
|
|
|
|
PointerPeripheral,
|
|
|
|
KeyboardPeripheral,
|
|
|
|
TerminalPeripheral,
|
|
|
|
OtherPeripheral,
|
|
|
|
LinePeripheral,
|
|
|
|
NetworkPeripheral,
|
|
|
|
SystemMemory,
|
|
|
|
DockingInformation,
|
|
|
|
RealModeIrqRoutingTable,
|
|
|
|
RealModePCIEnumeration,
|
2019-08-27 01:33:54 +00:00
|
|
|
MaximumType
|
2009-08-14 11:31:57 +00:00
|
|
|
} CONFIGURATION_TYPE, *PCONFIGURATION_TYPE;
|
|
|
|
|
2020-05-29 07:53:09 +00:00
|
|
|
#define IMAGE_ADDRESSING_MODE_32BIT 3
|
|
|
|
|
2011-03-19 09:26:58 +00:00
|
|
|
typedef struct _IMAGE_INFO
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
ULONG Properties;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
ULONG ImageAddressingMode : 8;
|
|
|
|
ULONG SystemModeImage : 1;
|
|
|
|
ULONG ImageMappedToAllPids : 1;
|
|
|
|
ULONG ExtendedInfoPresent : 1;
|
2020-05-29 07:53:09 +00:00
|
|
|
ULONG MachineTypeMismatch : 1;
|
|
|
|
ULONG ImageSignatureLevel : 4;
|
|
|
|
ULONG ImageSignatureType : 3;
|
|
|
|
ULONG ImagePartialMap : 1;
|
|
|
|
ULONG Reserved : 12;
|
2015-02-28 16:30:51 +00:00
|
|
|
} DUMMYSTRUCTNAME;
|
|
|
|
} DUMMYUNIONNAME;
|
2011-03-19 09:26:58 +00:00
|
|
|
PVOID ImageBase;
|
|
|
|
ULONG ImageSelector;
|
|
|
|
SIZE_T ImageSize;
|
|
|
|
ULONG ImageSectionNumber;
|
|
|
|
} IMAGE_INFO, *PIMAGE_INFO;
|
|
|
|
|
2014-11-03 19:08:24 +00:00
|
|
|
typedef enum _IO_NOTIFICATION_EVENT_CATEGORY
|
|
|
|
{
|
|
|
|
EventCategoryReserved,
|
|
|
|
EventCategoryHardwareProfileChange,
|
|
|
|
EventCategoryDeviceInterfaceChange,
|
|
|
|
EventCategoryTargetDeviceChange
|
|
|
|
} IO_NOTIFICATION_EVENT_CATEGORY;
|
|
|
|
|
2012-12-04 09:40:16 +00:00
|
|
|
typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION
|
|
|
|
{
|
|
|
|
LARGE_INTEGER ValidDataLength;
|
|
|
|
} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
|
|
|
|
|
2020-06-22 07:16:06 +00:00
|
|
|
typedef enum _RTL_GENERIC_COMPARE_RESULTS
|
|
|
|
{
|
|
|
|
GenericLessThan,
|
|
|
|
GenericGreaterThan,
|
|
|
|
GenericEqual
|
|
|
|
} RTL_GENERIC_COMPARE_RESULTS;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
struct _RTL_GENERIC_TABLE;
|
|
|
|
|
|
|
|
typedef RTL_GENERIC_COMPARE_RESULTS (WINAPI *PRTL_GENERIC_COMPARE_ROUTINE)(struct _RTL_GENERIC_TABLE *, void *, void *);
|
2023-08-11 23:56:52 +00:00
|
|
|
typedef void * (__WINE_ALLOC_SIZE(2) WINAPI *PRTL_GENERIC_ALLOCATE_ROUTINE)(struct _RTL_GENERIC_TABLE *, LONG);
|
2020-06-22 07:16:06 +00:00
|
|
|
typedef void (WINAPI *PRTL_GENERIC_FREE_ROUTINE)(struct _RTL_GENERIC_TABLE *Table, void *);
|
|
|
|
|
|
|
|
typedef struct _RTL_GENERIC_TABLE
|
|
|
|
{
|
|
|
|
PRTL_SPLAY_LINKS TableRoot;
|
|
|
|
LIST_ENTRY InsertOrderList;
|
|
|
|
LIST_ENTRY *OrderedPointer;
|
|
|
|
ULONG WhichOrderedElement;
|
|
|
|
ULONG NumberGenericTableElements;
|
|
|
|
PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine;
|
|
|
|
PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine;
|
|
|
|
PRTL_GENERIC_FREE_ROUTINE FreeRoutine;
|
|
|
|
void *TableContext;
|
|
|
|
} RTL_GENERIC_TABLE;
|
|
|
|
typedef RTL_GENERIC_TABLE *PRTL_GENERIC_TABLE;
|
|
|
|
|
2015-11-19 01:10:36 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
struct _RTL_AVL_TABLE;
|
|
|
|
|
|
|
|
typedef RTL_GENERIC_COMPARE_RESULTS (WINAPI *PRTL_AVL_COMPARE_ROUTINE)(struct _RTL_AVL_TABLE *, void *, void *);
|
|
|
|
|
2023-08-11 23:56:52 +00:00
|
|
|
typedef void * (__WINE_ALLOC_SIZE(2) WINAPI *PRTL_AVL_ALLOCATE_ROUTINE)(struct _RTL_AVL_TABLE *, LONG);
|
2015-11-19 01:10:36 +00:00
|
|
|
|
|
|
|
typedef void (WINAPI *PRTL_AVL_FREE_ROUTINE )(struct _RTL_AVL_TABLE *, void *buffer);
|
|
|
|
|
|
|
|
typedef struct _RTL_AVL_TABLE {
|
|
|
|
RTL_BALANCED_LINKS BalancedRoot;
|
|
|
|
void *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;
|
|
|
|
void *TableContext;
|
|
|
|
} RTL_AVL_TABLE, *PRTL_AVL_TABLE;
|
|
|
|
|
2018-03-01 22:02:38 +00:00
|
|
|
typedef struct _PS_CREATE_NOTIFY_INFO {
|
|
|
|
SIZE_T Size;
|
|
|
|
union {
|
|
|
|
ULONG Flags;
|
|
|
|
struct {
|
|
|
|
ULONG FileOpenNameAvailable :1;
|
|
|
|
ULONG IsSubsystemProcess :1;
|
|
|
|
ULONG Reserved :30;
|
|
|
|
} DUMMYSTRUCTNAME;
|
|
|
|
} DUMMYUNIONNAME;
|
|
|
|
HANDLE ParentProcessId;
|
|
|
|
CLIENT_ID CreatingThreadId;
|
|
|
|
struct _FILE_OBJECT *FileObject;
|
|
|
|
PCUNICODE_STRING ImageFileName;
|
|
|
|
PCUNICODE_STRING CommandLine;
|
|
|
|
NTSTATUS CreationStatus;
|
|
|
|
} PS_CREATE_NOTIFY_INFO, *PPS_CREATE_NOTIFY_INFO;
|
|
|
|
|
2019-05-16 17:50:33 +00:00
|
|
|
typedef void (WINAPI *PCREATE_PROCESS_NOTIFY_ROUTINE)(HANDLE,HANDLE,BOOLEAN);
|
|
|
|
typedef void (WINAPI *PCREATE_PROCESS_NOTIFY_ROUTINE_EX)(PEPROCESS,HANDLE,PS_CREATE_NOTIFY_INFO*);
|
|
|
|
typedef void (WINAPI *PCREATE_THREAD_NOTIFY_ROUTINE)(HANDLE,HANDLE,BOOLEAN);
|
2014-11-03 19:08:24 +00:00
|
|
|
typedef VOID (WINAPI *PDRIVER_NOTIFICATION_CALLBACK_ROUTINE)(PVOID,PVOID);
|
2008-08-28 22:31:58 +00:00
|
|
|
typedef VOID (WINAPI *PDRIVER_REINITIALIZE)(PDRIVER_OBJECT,PVOID,ULONG);
|
2011-03-19 09:26:58 +00:00
|
|
|
typedef VOID (WINAPI *PLOAD_IMAGE_NOTIFY_ROUTINE)(PUNICODE_STRING,HANDLE,PIMAGE_INFO);
|
2009-08-14 11:31:57 +00:00
|
|
|
typedef NTSTATUS (WINAPI *PIO_QUERY_DEVICE_ROUTINE)(PVOID,PUNICODE_STRING,INTERFACE_TYPE,ULONG,
|
|
|
|
PKEY_VALUE_FULL_INFORMATION*,CONFIGURATION_TYPE,ULONG,PKEY_VALUE_FULL_INFORMATION*);
|
2019-02-01 15:28:16 +00:00
|
|
|
typedef void (NTAPI EXPAND_STACK_CALLOUT)(void*);
|
|
|
|
typedef EXPAND_STACK_CALLOUT *PEXPAND_STACK_CALLOUT;
|
2019-03-24 02:52:55 +00:00
|
|
|
|
|
|
|
#ifndef UUID_DEFINED
|
|
|
|
#define UUID_DEFINED
|
2019-02-27 03:08:42 +00:00
|
|
|
typedef GUID UUID;
|
2019-03-24 02:52:55 +00:00
|
|
|
#endif
|
2008-08-28 22:31:58 +00:00
|
|
|
|
2019-02-27 03:08:42 +00:00
|
|
|
NTSTATUS WINAPI ExUuidCreate(UUID*);
|
2009-08-14 11:31:57 +00:00
|
|
|
NTSTATUS WINAPI IoQueryDeviceDescription(PINTERFACE_TYPE,PULONG,PCONFIGURATION_TYPE,PULONG,
|
|
|
|
PCONFIGURATION_TYPE,PULONG,PIO_QUERY_DEVICE_ROUTINE,PVOID);
|
2019-08-22 04:16:52 +00:00
|
|
|
void WINAPI IoRegisterBootDriverReinitialization(DRIVER_OBJECT*,PDRIVER_REINITIALIZE,void*);
|
2008-08-28 22:31:58 +00:00
|
|
|
void WINAPI IoRegisterDriverReinitialization(PDRIVER_OBJECT,PDRIVER_REINITIALIZE,PVOID);
|
2008-08-28 22:36:35 +00:00
|
|
|
NTSTATUS WINAPI IoRegisterShutdownNotification(PDEVICE_OBJECT);
|
2019-05-30 11:11:42 +00:00
|
|
|
BOOLEAN WINAPI KeAreApcsDisabled(void);
|
2019-06-25 13:36:15 +00:00
|
|
|
void WINAPI DECLSPEC_NORETURN KeBugCheck(ULONG);
|
2019-02-01 15:28:16 +00:00
|
|
|
NTSTATUS WINAPI KeExpandKernelStackAndCallout(PEXPAND_STACK_CALLOUT,void*,SIZE_T);
|
2018-11-06 12:10:17 +00:00
|
|
|
void WINAPI KeSetTargetProcessorDpc(PRKDPC,CCHAR);
|
2018-08-31 01:09:31 +00:00
|
|
|
BOOLEAN WINAPI MmIsAddressValid(void *);
|
2019-04-29 14:01:34 +00:00
|
|
|
HANDLE WINAPI PsGetProcessId(PEPROCESS);
|
2020-05-31 15:26:20 +00:00
|
|
|
void * WINAPI PsGetProcessSectionBaseAddress(PEPROCESS);
|
2019-04-29 14:01:45 +00:00
|
|
|
HANDLE WINAPI PsGetThreadId(PETHREAD);
|
2019-05-21 10:11:44 +00:00
|
|
|
HANDLE WINAPI PsGetThreadProcessId(PETHREAD);
|
2020-05-29 07:53:10 +00:00
|
|
|
NTSTATUS WINAPI PsRemoveLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE);
|
2019-05-16 17:50:33 +00:00
|
|
|
NTSTATUS WINAPI PsSetCreateProcessNotifyRoutine(PCREATE_PROCESS_NOTIFY_ROUTINE,BOOLEAN);
|
|
|
|
NTSTATUS WINAPI PsSetCreateProcessNotifyRoutineEx(PCREATE_PROCESS_NOTIFY_ROUTINE_EX,BOOLEAN);
|
|
|
|
NTSTATUS WINAPI PsSetCreateThreadNotifyRoutine(PCREATE_THREAD_NOTIFY_ROUTINE);
|
2011-03-19 09:26:58 +00:00
|
|
|
NTSTATUS WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE);
|
2023-07-01 14:36:22 +00:00
|
|
|
NTSTATUS WINAPI PsSetLoadImageNotifyRoutineEx(PLOAD_IMAGE_NOTIFY_ROUTINE,ULONG_PTR);
|
2023-09-26 16:25:33 +00:00
|
|
|
LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
|
|
|
|
void WINAPI RtlCopyString(STRING*,const STRING*);
|
|
|
|
BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
|
2021-12-01 03:15:57 +00:00
|
|
|
void * WINAPI RtlGetElementGenericTable(PRTL_GENERIC_TABLE,ULONG);
|
2021-12-01 03:15:55 +00:00
|
|
|
void WINAPI RtlInitializeGenericTable(PRTL_GENERIC_TABLE,PRTL_GENERIC_COMPARE_ROUTINE,PRTL_GENERIC_ALLOCATE_ROUTINE,PRTL_GENERIC_FREE_ROUTINE,void *);
|
2015-11-19 01:10:36 +00:00
|
|
|
void WINAPI RtlInitializeGenericTableAvl(PRTL_AVL_TABLE,PRTL_AVL_COMPARE_ROUTINE,PRTL_AVL_ALLOCATE_ROUTINE, PRTL_AVL_FREE_ROUTINE,void *);
|
|
|
|
void WINAPI RtlInsertElementGenericTableAvl(PRTL_AVL_TABLE,void *,ULONG,BOOL*);
|
2021-12-01 03:15:58 +00:00
|
|
|
void * WINAPI RtlLookupElementGenericTable(PRTL_GENERIC_TABLE,void *);
|
2023-09-26 16:25:33 +00:00
|
|
|
void WINAPI RtlMapGenericMask(ACCESS_MASK*,const GENERIC_MAPPING*);
|
2021-12-01 03:15:56 +00:00
|
|
|
ULONG WINAPI RtlNumberGenericTableElements(PRTL_GENERIC_TABLE);
|
2023-09-26 16:25:33 +00:00
|
|
|
BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
|
|
|
|
NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
|
|
|
|
char WINAPI RtlUpperChar(char);
|
|
|
|
void WINAPI RtlUpperString(STRING*,const STRING*);
|
|
|
|
|
|
|
|
#ifndef _WIN64
|
|
|
|
ULONGLONG WINAPI RtlLargeIntegerDivide(ULONGLONG,ULONGLONG,ULONGLONG*);
|
|
|
|
#endif
|
2008-08-28 22:31:58 +00:00
|
|
|
|
2008-03-06 12:27:39 +00:00
|
|
|
#endif
|