forked from winsiderss/systeminformer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheapstruct.h
More file actions
69 lines (55 loc) · 1.44 KB
/
Copy pathheapstruct.h
File metadata and controls
69 lines (55 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef PH_HEAPSTRUCT_H
#define PH_HEAPSTRUCT_H
// Not the actual structure, but has the same size.
typedef struct _HEAP_ENTRY
{
PVOID Data1;
PVOID Data2;
} HEAP_ENTRY, *PHEAP_ENTRY;
#define HEAP_SEGMENT_SIGNATURE 0xffeeffee
// First few fields of HEAP_SEGMENT, VISTA and above
typedef struct _HEAP_SEGMENT
{
HEAP_ENTRY HeapEntry;
ULONG SegmentSignature;
ULONG SegmentFlags;
LIST_ENTRY SegmentListEntry;
struct _HEAP *Heap;
// ...
} HEAP_SEGMENT, *PHEAP_SEGMENT;
// First few fields of HEAP_SEGMENT, WS03 and below
typedef struct _HEAP_SEGMENT_OLD
{
HEAP_ENTRY Entry;
ULONG Signature;
ULONG Flags;
struct _HEAP *Heap;
// ...
} HEAP_SEGMENT_OLD, *PHEAP_SEGMENT_OLD;
// 32-bit versions
typedef struct _HEAP_ENTRY32
{
WOW64_POINTER(PVOID) Data1;
WOW64_POINTER(PVOID) Data2;
} HEAP_ENTRY32, *PHEAP_ENTRY32;
typedef struct _HEAP_SEGMENT32
{
HEAP_ENTRY32 HeapEntry;
ULONG SegmentSignature;
ULONG SegmentFlags;
LIST_ENTRY32 SegmentListEntry;
WOW64_POINTER(struct _HEAP *) Heap;
// ...
} HEAP_SEGMENT32, *PHEAP_SEGMENT32;
typedef struct _HEAP_SEGMENT_OLD32
{
HEAP_ENTRY32 Entry;
ULONG Signature;
ULONG Flags;
WOW64_POINTER(struct _HEAP *) Heap;
// ...
} HEAP_SEGMENT_OLD32, *PHEAP_SEGMENT_OLD32;
#define HEAP_SEGMENT_MAX_SIZE \
(max(sizeof(HEAP_SEGMENT), max(sizeof(HEAP_SEGMENT_OLD), \
max(sizeof(HEAP_SEGMENT32), sizeof(HEAP_SEGMENT_OLD32)))))
#endif