ReactOS  0.4.12-dev-36-g472787f
ntddk_ex.h
Go to the documentation of this file.
1 // 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 
66 NTAPI
68  IN SYSTEM_INFORMATION_CLASS SystemInfoClass,
72 );
73 
74 typedef struct _SYSTEM_MODULE_ENTRY
75 {
86 
88 {
90  SYSTEM_MODULE_ENTRY Module [1];
92 
93 typedef unsigned short WORD;
94 typedef unsigned int BOOL;
95 typedef unsigned long DWORD;
96 typedef unsigned char BYTE;
97 
98 #ifndef __REACTOS__
99 typedef 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 
121 typedef struct _IMAGE_FILE_HEADER {
130 
131 typedef struct _IMAGE_DATA_DIRECTORY {
135 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
136 
137 
138 typedef struct _IMAGE_OPTIONAL_HEADER {
139  //
140  // Standard fields.
141  //
142 
152 
153  //
154  // NT additional fields.
155  //
156 
180 
181 typedef struct _IMAGE_NT_HEADERS {
187 typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS;
188 
189 #define IMAGE_DIRECTORY_ENTRY_EXPORT 0 // Export Directory
190 
191 typedef struct _IMAGE_EXPORT_DIRECTORY {
192  DWORD Characteristics;
193  DWORD TimeDateStamp;
196  DWORD Name;
197  DWORD Base;
198  DWORD NumberOfFunctions;
199  DWORD NumberOfNames;
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__
struct _IMAGE_OPTIONAL_HEADER IMAGE_OPTIONAL_HEADER32
enum _SYSTEM_INFORMATION_CLASS SYSTEM_INFORMATION_CLASS
_SYSTEM_INFORMATION_CLASS
Definition: ntddk_ex.h:10
#define IN
Definition: typedefs.h:38
ULONG MinorVersion
Definition: ros_glue.cpp:5
ULONG MajorVersion
Definition: ros_glue.cpp:4
USHORT ModuleNameOffset
Definition: ntddk_ex.h:83
ULONG ModuleEntryIndex
Definition: ntddk_ex.h:81
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES
Definition: ntddk_ex.h:135
char CHAR
Definition: xmlstorage.h:175
LONG NTSTATUS
Definition: precomp.h:26
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2327
struct _IMAGE_NT_HEADERS IMAGE_NT_HEADERS32
PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS
Definition: ntddk_ex.h:187
WORD MinorOperatingSystemVersion
Definition: ntddk_ex.h:161
IMAGE_NT_HEADERS32 IMAGE_NT_HEADERS
Definition: ntddk_ex.h:186
#define NTSYSAPI
Definition: ntoskrnl.h:14
PVOID ModuleBaseAddress
Definition: ntddk_ex.h:78
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
WORD MajorOperatingSystemVersion
Definition: ntddk_ex.h:160
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
struct _IMAGE_NT_HEADERS * PIMAGE_NT_HEADERS32
long LONG
Definition: pedump.c:60
DWORD SizeOfUninitializedData
Definition: ntddk_ex.h:148
struct NameRec_ * Name
Definition: cdprocs.h:464
NTSYSAPI NTSTATUS NTAPI ZwQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
WORD SizeOfOptionalHeader
Definition: ntddk_ex.h:127
struct _SYSTEM_MODULE_INFORMATION * PSYSTEM_MODULE_INFORMATION
IMAGE_FILE_HEADER FileHeader
Definition: ntddk_ex.h:183
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: ntddk_ex.h:74
DWORD NumberOfSymbols
Definition: ntddk_ex.h:126
struct _SYSTEM_MODULE_ENTRY * PSYSTEM_MODULE_ENTRY
struct _IMAGE_FILE_HEADER * PIMAGE_FILE_HEADER
CHAR ModuleName[256]
Definition: ntddk_ex.h:84
struct _IMAGE_EXPORT_DIRECTORY IMAGE_EXPORT_DIRECTORY
struct _IMAGE_DATA_DIRECTORY IMAGE_DATA_DIRECTORY
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
ULONG Unused
Definition: ntddk_ex.h:76
struct _IMAGE_DATA_DIRECTORY * PIMAGE_DATA_DIRECTORY
ULONG Always0
Definition: ntddk_ex.h:77
OUT PVOID SystemInfoBuffer
Definition: CrossNt.h:78
struct _IMAGE_OPTIONAL_HEADER * PIMAGE_OPTIONAL_HEADER32
ULONG ModuleSize
Definition: ntddk_ex.h:79
struct _IMAGE_DOS_HEADER IMAGE_DOS_HEADER
OUT PVOID IN ULONG SystemInfoBufferSize
Definition: CrossNt.h:78
unsigned char BYTE
Definition: ntddk_ex.h:96
unsigned short USHORT
Definition: pedump.c:61
DWORD PointerToSymbolTable
Definition: ntddk_ex.h:125
_In_ FILTER_INFORMATION_CLASS _In_ ULONG _Out_ PULONG BytesReturned
Definition: fltkernel.h:1716
unsigned int * PULONG
Definition: retypes.h:1
struct _IMAGE_FILE_HEADER IMAGE_FILE_HEADER
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
ULONG Unknown
Definition: ntddk_ex.h:80
struct _SYSTEM_MODULE_ENTRY SYSTEM_MODULE_ENTRY
struct _SYSTEM_MODULE_INFORMATION SYSTEM_MODULE_INFORMATION
USHORT ModuleNameLength
Definition: ntddk_ex.h:82
struct _IMAGE_EXPORT_DIRECTORY * PIMAGE_EXPORT_DIRECTORY
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68