HyperDbg Debugger
Loading...
Searching...
No Matches
Windows.h
Go to the documentation of this file.
1
12#pragma once
13
15// Definitions //
17
31
37
38// Linked lists
39
40FORCEINLINE VOID
42 _Out_ PLIST_ENTRY ListHead)
43{
44 ListHead->Flink = ListHead->Blink = ListHead;
45}
46
47_Check_return_
48FORCEINLINE BOOLEAN
50 _In_ PLIST_ENTRY ListHead)
51{
52 return ListHead->Flink == ListHead;
53}
54
55FORCEINLINE BOOLEAN
57 _In_ PLIST_ENTRY Entry)
58{
59 PLIST_ENTRY Blink;
60 PLIST_ENTRY Flink;
61
62 Flink = Entry->Flink;
63 Blink = Entry->Blink;
64 Blink->Flink = Flink;
65 Flink->Blink = Blink;
66
67 return Flink == Blink;
68}
69
70FORCEINLINE PLIST_ENTRY
72 _Inout_ PLIST_ENTRY ListHead)
73{
74 PLIST_ENTRY Flink;
75 PLIST_ENTRY Entry;
76
77 Entry = ListHead->Flink;
78 Flink = Entry->Flink;
79 ListHead->Flink = Flink;
80 Flink->Blink = ListHead;
81
82 return Entry;
83}
84
85FORCEINLINE PLIST_ENTRY
87 _Inout_ PLIST_ENTRY ListHead)
88{
89 PLIST_ENTRY Blink;
90 PLIST_ENTRY Entry;
91
92 Entry = ListHead->Blink;
93 Blink = Entry->Blink;
94 ListHead->Blink = Blink;
95 Blink->Flink = ListHead;
96
97 return Entry;
98}
99
100FORCEINLINE VOID
102 _Inout_ PLIST_ENTRY ListHead,
103 _Inout_ PLIST_ENTRY Entry)
104{
105 PLIST_ENTRY Blink;
106
107 Blink = ListHead->Blink;
108 Entry->Flink = ListHead;
109 Entry->Blink = Blink;
110 Blink->Flink = Entry;
111 ListHead->Blink = Entry;
112}
113
114FORCEINLINE VOID
116 _Inout_ PLIST_ENTRY ListHead,
117 _Inout_ PLIST_ENTRY Entry)
118{
119 PLIST_ENTRY Flink;
120
121 Flink = ListHead->Flink;
122 Entry->Flink = Flink;
123 Entry->Blink = ListHead;
124 Flink->Blink = Entry;
125 ListHead->Flink = Entry;
126}
127
128FORCEINLINE VOID
130 _Inout_ PLIST_ENTRY ListHead,
131 _Inout_ PLIST_ENTRY ListToAppend)
132{
133 PLIST_ENTRY ListEnd = ListHead->Blink;
134
135 ListHead->Blink->Flink = ListToAppend;
136 ListHead->Blink = ListToAppend->Blink;
137 ListToAppend->Blink->Flink = ListHead;
138 ListToAppend->Blink = ListEnd;
139}
140
141FORCEINLINE PSINGLE_LIST_ENTRY
143 _Inout_ PSINGLE_LIST_ENTRY ListHead)
144{
145 PSINGLE_LIST_ENTRY FirstEntry;
146
147 FirstEntry = ListHead->Next;
148
149 if (FirstEntry)
150 ListHead->Next = FirstEntry->Next;
151
152 return FirstEntry;
153}
154
155FORCEINLINE VOID
157 _Inout_ PSINGLE_LIST_ENTRY ListHead,
158 _Inout_ PSINGLE_LIST_ENTRY Entry)
159{
160 Entry->Next = ListHead->Next;
161 ListHead->Next = Entry;
162}
163
164//
165// MessageId: STATUS_UNSUCCESSFUL
166//
167// MessageText:
168//
169// {Operation Failed}
170// The requested operation was unsuccessful.
171//
172#define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L)
173
175{
176 SystemModuleInformation = 11 // q: RTL_PROCESS_MODULES
177
UCHAR BOOLEAN
Definition BasicTypes.h:39
unsigned char UCHAR
Definition BasicTypes.h:35
unsigned short USHORT
Definition BasicTypes.h:36
#define VOID
Definition BasicTypes.h:33
unsigned long ULONG
Definition BasicTypes.h:37
struct _RTL_PROCESS_MODULES RTL_PROCESS_MODULES
FORCEINLINE VOID PushEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ PSINGLE_LIST_ENTRY Entry)
Definition Windows.h:156
_SYSTEM_INFORMATION_CLASS2
Definition Windows.h:175
@ SystemModuleInformation
Definition Windows.h:176
FORCEINLINE PLIST_ENTRY RemoveHeadList(_Inout_ PLIST_ENTRY ListHead)
Definition Windows.h:71
struct _RTL_PROCESS_MODULES * PRTL_PROCESS_MODULES
struct _RTL_PROCESS_MODULE_INFORMATION RTL_PROCESS_MODULE_INFORMATION
enum _SYSTEM_INFORMATION_CLASS2 SYSTEM_INFORMATION_CLASS2
_Check_return_ FORCEINLINE BOOLEAN IsListEmpty(_In_ PLIST_ENTRY ListHead)
Definition Windows.h:49
FORCEINLINE PSINGLE_LIST_ENTRY PopEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead)
Definition Windows.h:142
FORCEINLINE PLIST_ENTRY RemoveTailList(_Inout_ PLIST_ENTRY ListHead)
Definition Windows.h:86
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition Windows.h:56
FORCEINLINE VOID InitializeListHead(_Out_ PLIST_ENTRY ListHead)
Definition Windows.h:41
FORCEINLINE VOID InsertHeadList(_Inout_ PLIST_ENTRY ListHead, _Inout_ PLIST_ENTRY Entry)
Definition Windows.h:115
struct _RTL_PROCESS_MODULE_INFORMATION * PRTL_PROCESS_MODULE_INFORMATION
FORCEINLINE VOID AppendTailList(_Inout_ PLIST_ENTRY ListHead, _Inout_ PLIST_ENTRY ListToAppend)
Definition Windows.h:129
FORCEINLINE VOID InsertTailList(_Inout_ PLIST_ENTRY ListHead, _Inout_ PLIST_ENTRY Entry)
Definition Windows.h:101
Definition Windows.h:19
ULONG Flags
Definition Windows.h:24
PVOID ImageBase
Definition Windows.h:22
USHORT LoadCount
Definition Windows.h:27
UCHAR FullPathName[256]
Definition Windows.h:29
USHORT InitOrderIndex
Definition Windows.h:26
PVOID MappedBase
Definition Windows.h:21
USHORT OffsetToFileName
Definition Windows.h:28
ULONG ImageSize
Definition Windows.h:23
USHORT LoadOrderIndex
Definition Windows.h:25
PVOID Section
Definition Windows.h:20
Definition Windows.h:33
ULONG NumberOfModules
Definition Windows.h:34
_Field_size_(NumberOfModules) RTL_PROCESS_MODULE_INFORMATION Modules[1]