ReactOS 0.4.16-dev-91-g764881a
ntddk_ex.h
Go to the documentation of this file.
1
2// Copyright (C) Alexander Telyatnikov, Ivan Keliukh, Yegor Anchishkin, SKIF Software, 1999-2013. Kiev, Ukraine
3// All rights reserved
4// This file was released under the GPLv2 on June 2015.
6
7#ifndef __NTDDK_EX__H__
8#define __NTDDK_EX__H__
9
53#if !defined PO_CB_SYSTEM_POWER_POLICY
55#else
56 _SystemPowerInformation,
57#endif
62
63
68 IN SYSTEM_INFORMATION_CLASS SystemInfoClass,
72);
73
75{
86
88{
92
93typedef unsigned short WORD;
94typedef unsigned int BOOL;
95typedef unsigned long DWORD;
96typedef unsigned char BYTE;
97
98#ifndef __REACTOS__
99typedef struct _IMAGE_DOS_HEADER { // DOS .EXE header
100 WORD e_magic; // Magic number
101 WORD e_cblp; // Bytes on last page of file
102 WORD e_cp; // Pages in file
103 WORD e_crlc; // Relocations
104 WORD e_cparhdr; // Size of header in paragraphs
105 WORD e_minalloc; // Minimum extra paragraphs needed
106 WORD e_maxalloc; // Maximum extra paragraphs needed
107 WORD e_ss; // Initial (relative) SS value
108 WORD e_sp; // Initial SP value
109 WORD e_csum; // Checksum
110 WORD e_ip; // Initial IP value
111 WORD e_cs; // Initial (relative) CS value
112 WORD e_lfarlc; // File address of relocation table
113 WORD e_ovno; // Overlay number
114 WORD e_res[4]; // Reserved words
115 WORD e_oemid; // OEM identifier (for e_oeminfo)
116 WORD e_oeminfo; // OEM information; e_oemid specific
117 WORD e_res2[10]; // Reserved words
118 LONG e_lfanew; // File address of new exe header
120
121typedef struct _IMAGE_FILE_HEADER {
130
131typedef struct _IMAGE_DATA_DIRECTORY {
135#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
136
137
139 //
140 // Standard fields.
141 //
142
152
153 //
154 // NT additional fields.
155 //
156
180
181typedef struct _IMAGE_NT_HEADERS {
188
189#define IMAGE_DIRECTORY_ENTRY_EXPORT 0 // Export Directory
190
191typedef struct _IMAGE_EXPORT_DIRECTORY {
196 DWORD Name;
197 DWORD Base;
200 DWORD AddressOfFunctions; // RVA from base of image
201 DWORD AddressOfNames; // RVA from base of image
202 DWORD AddressOfNameOrdinals; // RVA from base of image
204#endif
205
206#define IOCTL_DISK_GET_PARTITION_INFO_EX CTL_CODE(IOCTL_DISK_BASE, 0x0012, METHOD_BUFFERED, FILE_ANY_ACCESS)
207#define IOCTL_DISK_GET_DRIVE_LAYOUT_EX CTL_CODE(IOCTL_DISK_BASE, 0x0014, METHOD_BUFFERED, FILE_ANY_ACCESS)
208#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX CTL_CODE(IOCTL_DISK_BASE, 0x0028, METHOD_BUFFERED, FILE_ANY_ACCESS)
209
210#define IOCTL_STORAGE_LOAD_MEDIA2 CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_ANY_ACCESS)
211#define IOCTL_STORAGE_GET_MEDIA_TYPES_EX CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
212#define IOCTL_STORAGE_CHECK_VERIFY2 CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_ANY_ACCESS)
213
214#endif //__NTDDK_EX__H__
LONG NTSTATUS
Definition: precomp.h:26
#define NTSYSAPI
Definition: ntoskrnl.h:12
struct _SYSTEM_MODULE_ENTRY * PSYSTEM_MODULE_ENTRY
struct _SYSTEM_MODULE_INFORMATION * PSYSTEM_MODULE_INFORMATION
IMAGE_NT_HEADERS32 IMAGE_NT_HEADERS
Definition: ntddk_ex.h:186
struct _IMAGE_NT_HEADERS * PIMAGE_NT_HEADERS32
unsigned int BOOL
Definition: ntddk_ex.h:94
struct _IMAGE_DATA_DIRECTORY IMAGE_DATA_DIRECTORY
unsigned char BYTE
Definition: ntddk_ex.h:96
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _IMAGE_FILE_HEADER IMAGE_FILE_HEADER
struct _SYSTEM_MODULE_ENTRY SYSTEM_MODULE_ENTRY
struct _IMAGE_OPTIONAL_HEADER * PIMAGE_OPTIONAL_HEADER32
PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS
Definition: ntddk_ex.h:187
NTSYSAPI NTSTATUS NTAPI ZwQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
struct _IMAGE_EXPORT_DIRECTORY * PIMAGE_EXPORT_DIRECTORY
struct _IMAGE_DOS_HEADER IMAGE_DOS_HEADER
struct _SYSTEM_MODULE_INFORMATION SYSTEM_MODULE_INFORMATION
struct _IMAGE_OPTIONAL_HEADER IMAGE_OPTIONAL_HEADER32
struct _IMAGE_DATA_DIRECTORY * PIMAGE_DATA_DIRECTORY
struct _IMAGE_EXPORT_DIRECTORY IMAGE_EXPORT_DIRECTORY
_SYSTEM_INFORMATION_CLASS
Definition: ntddk_ex.h:10
@ SystemCurrentTimeZoneInformation
Definition: ntddk_ex.h:59
@ SystemKernelDebuggerInformation
Definition: ntddk_ex.h:46
@ SystemTimeOfDayInformation
Definition: ntddk_ex.h:14
@ SystemProcessorInformation
Definition: ntddk_ex.h:12
@ SystemModuleInformation
Definition: ntddk_ex.h:22
@ SystemExceptionInformation
Definition: ntddk_ex.h:44
@ SystemBasicInformation
Definition: ntddk_ex.h:11
@ SystemDpcBehaviorInformation
Definition: ntddk_ex.h:35
@ SystemPathInformation
Definition: ntddk_ex.h:15
@ SystemVdmInstemulInformation
Definition: ntddk_ex.h:30
@ SystemPowerInformation
Definition: ntddk_ex.h:54
@ SystemLookasideInformation
Definition: ntddk_ex.h:60
@ SystemRegistryQuotaInformation
Definition: ntddk_ex.h:48
@ SystemExtendServiceTableInformation
Definition: ntddk_ex.h:49
@ SystemNonPagedPoolInformation
Definition: ntddk_ex.h:26
@ SystemCrashDumpInformation
Definition: ntddk_ex.h:43
@ SystemInterruptInformation
Definition: ntddk_ex.h:34
@ SystemNextEventIdInformation
Definition: ntddk_ex.h:41
@ SystemUnloadGdiDriverInformation
Definition: ntddk_ex.h:38
@ SystemFileCacheInformation
Definition: ntddk_ex.h:32
@ SystemLocksInformation
Definition: ntddk_ex.h:23
@ SystemHandleInformation
Definition: ntddk_ex.h:27
@ SystemProcessInformation
Definition: ntddk_ex.h:16
@ SystemVdmBopInformation
Definition: ntddk_ex.h:31
@ SystemEventIdsInformation
Definition: ntddk_ex.h:42
@ SystemCallTimeInformation
Definition: ntddk_ex.h:21
@ SystemContextSwitchInformation
Definition: ntddk_ex.h:47
@ SystemTimeAdjustmentInformation
Definition: ntddk_ex.h:39
@ SystemFullMemoryInformation
Definition: ntddk_ex.h:36
@ SystemPrioritySeperation
Definition: ntddk_ex.h:50
@ SystemPageFileInformation
Definition: ntddk_ex.h:29
@ SystemPerformanceInformation
Definition: ntddk_ex.h:13
@ SystemStackTraceInformation
Definition: ntddk_ex.h:24
@ SystemPlugPlayBusInformation
Definition: ntddk_ex.h:51
@ SystemObjectInformation
Definition: ntddk_ex.h:28
@ SystemFlagsInformation
Definition: ntddk_ex.h:20
@ SystemLoadGdiDriverInformation
Definition: ntddk_ex.h:37
@ SystemDeviceInformation
Definition: ntddk_ex.h:18
@ SystemSummaryMemoryInformation
Definition: ntddk_ex.h:40
@ SystemPagedPoolInformation
Definition: ntddk_ex.h:25
@ SystemCrashDumpStateInformation
Definition: ntddk_ex.h:45
@ SystemProcessorPerformanceInformation
Definition: ntddk_ex.h:19
@ SystemCallCountInformation
Definition: ntddk_ex.h:17
@ SystemPoolTagInformation
Definition: ntddk_ex.h:33
@ SystemDockInformation
Definition: ntddk_ex.h:52
@ SystemProcessorSpeedInformation
Definition: ntddk_ex.h:58
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
enum _SYSTEM_INFORMATION_CLASS SYSTEM_INFORMATION_CLASS
struct _IMAGE_NT_HEADERS IMAGE_NT_HEADERS32
struct _IMAGE_FILE_HEADER * PIMAGE_FILE_HEADER
unsigned short WORD
Definition: ntddk_ex.h:93
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES
Definition: ntimage.h:280
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
OUT PVOID IN ULONG SystemInfoBufferSize
Definition: CrossNt.h:79
OUT PVOID SystemInfoBuffer
Definition: CrossNt.h:78
WORD e_res2[10]
Definition: ntddk_ex.h:117
DWORD AddressOfNameOrdinals
Definition: compat.h:167
DWORD NumberOfSymbols
Definition: ntddk_ex.h:126
DWORD PointerToSymbolTable
Definition: ntddk_ex.h:125
WORD SizeOfOptionalHeader
Definition: ntddk_ex.h:127
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
IMAGE_FILE_HEADER FileHeader
Definition: ntddk_ex.h:183
WORD MinorOperatingSystemVersion
Definition: ntddk_ex.h:161
WORD MajorOperatingSystemVersion
Definition: ntddk_ex.h:160
DWORD SizeOfUninitializedData
Definition: ntddk_ex.h:148
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]
Definition: ntddk_ex.h:178
Definition: ntddk_ex.h:75
ULONG Always0
Definition: ntddk_ex.h:77
USHORT ModuleNameOffset
Definition: ntddk_ex.h:83
ULONG Unknown
Definition: ntddk_ex.h:80
ULONG ModuleSize
Definition: ntddk_ex.h:79
CHAR ModuleName[256]
Definition: ntddk_ex.h:84
PVOID ModuleBaseAddress
Definition: ntddk_ex.h:78
USHORT ModuleNameLength
Definition: ntddk_ex.h:82
ULONG ModuleEntryIndex
Definition: ntddk_ex.h:81
ULONG Unused
Definition: ntddk_ex.h:76
SYSTEM_MODULE_ENTRY Module[1]
Definition: ntddk_ex.h:90
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
Definition: wdfiotarget.h:1052
char CHAR
Definition: xmlstorage.h:175
unsigned char BYTE
Definition: xxhash.c:193