Process Hacker
Main Page
Namespaces
Data Structures
Files
File List
Globals
miniinfo.h
Go to the documentation of this file.
1
#ifndef PH_MINIINFO_H
2
#define PH_MINIINFO_H
3
4
#include <
procgrp.h
>
5
6
// begin_phapppub
7
// Section
8
9
typedef
VOID
(NTAPI *
PPH_MINIINFO_SET_SECTION_TEXT
)(
10
_In_
struct
_PH_MINIINFO_SECTION
*Section,
11
_In_opt_
PPH_STRING
Text
12
);
13
14
typedef
struct
_PH_MINIINFO_PARAMETERS
15
{
16
HWND
ContainerWindowHandle
;
17
HWND
MiniInfoWindowHandle
;
18
19
HFONT
Font
;
20
HFONT
MediumFont
;
21
ULONG
FontHeight
;
22
ULONG
FontAverageWidth
;
23
ULONG
MediumFontHeight
;
24
ULONG
MediumFontAverageWidth
;
25
26
PPH_MINIINFO_SET_SECTION_TEXT
SetSectionText
;
27
}
PH_MINIINFO_PARAMETERS
, *
PPH_MINIINFO_PARAMETERS
;
28
29
typedef
enum
_PH_MINIINFO_SECTION_MESSAGE
30
{
31
MiniInfoCreate
,
32
MiniInfoDestroy
,
33
MiniInfoTick
,
34
MiniInfoSectionChanging
,
// PPH_MINIINFO_SECTION Parameter1
35
MiniInfoShowing
,
// BOOLEAN Parameter1 (Showing)
36
MiniInfoCreateDialog
,
// PPH_MINIINFO_CREATE_DIALOG Parameter1
37
MaxMiniInfoMessage
38
}
PH_MINIINFO_SECTION_MESSAGE
;
39
40
typedef
BOOLEAN (NTAPI *
PPH_MINIINFO_SECTION_CALLBACK
)(
41
_In_
struct
_PH_MINIINFO_SECTION
*Section,
42
_In_
PH_MINIINFO_SECTION_MESSAGE
Message,
43
_In_opt_ PVOID Parameter1,
44
_In_opt_ PVOID Parameter2
45
);
46
47
typedef
struct
_PH_MINIINFO_CREATE_DIALOG
48
{
49
BOOLEAN
CustomCreate
;
50
51
// Parameters for default create
52
PVOID
Instance
;
53
PWSTR
Template
;
54
DLGPROC
DialogProc
;
55
PVOID
Parameter
;
56
}
PH_MINIINFO_CREATE_DIALOG
, *
PPH_MINIINFO_CREATE_DIALOG
;
57
58
#define PH_MINIINFO_SECTION_NO_UPPER_MARGINS 0x1
59
// end_phapppub
60
61
// begin_phapppub
62
typedef
struct
_PH_MINIINFO_SECTION
63
{
64
// Public
65
66
// Initialization
67
PH_STRINGREF
Name
;
68
ULONG
Flags
;
69
PPH_MINIINFO_SECTION_CALLBACK
Callback
;
70
PVOID
Context
;
71
PVOID
Reserved1
[3];
72
73
PPH_MINIINFO_PARAMETERS
Parameters
;
74
PVOID
Reserved2
[3];
75
// end_phapppub
76
77
// Private
78
79
struct
80
{
81
ULONG
SpareFlags
: 32;
82
};
83
HWND
DialogHandle
;
84
PPH_STRING
Text
;
85
// begin_phapppub
86
}
PH_MINIINFO_SECTION
, *
PPH_MINIINFO_SECTION
;
87
// end_phapppub
88
89
typedef
enum
_PH_MINIINFO_PIN_TYPE
90
{
91
MiniInfoManualPinType
,
// User pin
92
MiniInfoIconPinType
,
// Notification icon
93
MiniInfoActivePinType
,
// Window is active
94
MiniInfoHoverPinType
,
// Cursor is over mini info window
95
MiniInfoChildControlPinType
,
// Interacting with child control
96
MaxMiniInfoPinType
97
}
PH_MINIINFO_PIN_TYPE
;
98
99
#define PH_MINIINFO_ACTIVATE_WINDOW 0x1
100
#define PH_MINIINFO_LOAD_POSITION 0x2
101
#define PH_MINIINFO_DONT_CHANGE_SECTION_IF_PINNED 0x4
102
103
VOID
PhPinMiniInformation
(
104
_In_
PH_MINIINFO_PIN_TYPE
PinType,
105
_In_
LONG
PinCount,
106
_In_opt_ ULONG PinDelayMs,
107
_In_ ULONG Flags,
108
_In_opt_ PWSTR SectionName,
109
_In_opt_ PPOINT SourcePoint
110
);
111
112
// begin_phapppub
113
// List section
114
115
typedef
enum
_PH_MINIINFO_LIST_SECTION_MESSAGE
116
{
117
MiListSectionCreate
,
118
MiListSectionDestroy
,
119
MiListSectionTick
,
120
MiListSectionShowing
,
// BOOLEAN Parameter1 (Showing)
121
MiListSectionDialogCreated
,
// HWND Parameter1
122
MiListSectionSortProcessList
,
// PPH_MINIINFO_LIST_SECTION_SORT_LIST Parameter1
123
MiListSectionAssignSortData
,
// PPH_MINIINFO_LIST_SECTION_ASSIGN_SORT_DATA Parameter1
124
MiListSectionSortGroupList
,
// PPH_MINIINFO_LIST_SECTION_SORT_LIST Parameter1
125
MiListSectionGetTitleText
,
// PPH_MINIINFO_LIST_SECTION_GET_TITLE_TEXT Parameter1
126
MiListSectionGetUsageText
,
// PPH_MINIINFO_LIST_SECTION_GET_USAGE_TEXT Parameter1
127
MiListSectionInitializeContextMenu
,
// PPH_MINIINFO_LIST_SECTION_MENU_INFORMATION Parameter1
128
MiListSectionHandleContextMenu
,
// PPH_MINIINFO_LIST_SECTION_MENU_INFORMATION Parameter1
129
MaxMiListSectionMessage
130
}
PH_MINIINFO_LIST_SECTION_MESSAGE
;
131
132
typedef
BOOLEAN (NTAPI *
PPH_MINIINFO_LIST_SECTION_CALLBACK
)(
133
_In_
struct
_PH_MINIINFO_LIST_SECTION
*ListSection,
134
_In_
PH_MINIINFO_LIST_SECTION_MESSAGE
Message,
135
_In_opt_ PVOID Parameter1,
136
_In_opt_ PVOID Parameter2
137
);
138
139
// The list section performs the following steps when constructing the list of process groups:
140
// 1. MiListSectionSortProcessList is sent in order to sort the process list.
141
// 2. A small number of process groups is created from the first few processes in the sorted list (typically high
142
// resource consumers).
143
// 3. MiListSectionAssignSortData is sent for each process group so that the user can assign custom sort data to
144
// each process group.
145
// 4. MiListSectionSortGroupList is sent in order to ensure that the process groups are correctly sorted by resource
146
// usage.
147
// The user also has access to the sort data when handling MiListSectionGetTitleText and MiListSectionGetUsageText.
148
149
typedef
struct
_PH_MINIINFO_LIST_SECTION_SORT_DATA
150
{
151
PH_TREENEW_NODE
DoNotModify
;
152
ULONGLONG
UserData
[4];
153
}
PH_MINIINFO_LIST_SECTION_SORT_DATA
, *
PPH_MINIINFO_LIST_SECTION_SORT_DATA
;
154
155
typedef
struct
_PH_MINIINFO_LIST_SECTION_ASSIGN_SORT_DATA
156
{
157
PPH_PROCESS_GROUP
ProcessGroup
;
158
PPH_MINIINFO_LIST_SECTION_SORT_DATA
SortData
;
159
}
PH_MINIINFO_LIST_SECTION_ASSIGN_SORT_DATA
, *
PPH_MINIINFO_LIST_SECTION_ASSIGN_SORT_DATA
;
160
161
typedef
struct
_PH_MINIINFO_LIST_SECTION_SORT_LIST
162
{
163
// MiListSectionSortProcessList: List of PPH_PROCESS_NODE
164
// MiListSectionSortGroupList: List of PPH_MINIINFO_LIST_SECTION_SORT_DATA
165
PPH_LIST
List
;
166
}
PH_MINIINFO_LIST_SECTION_SORT_LIST
, *
PPH_MINIINFO_LIST_SECTION_SORT_LIST
;
167
168
typedef
struct
_PH_MINIINFO_LIST_SECTION_GET_TITLE_TEXT
169
{
170
PPH_PROCESS_GROUP
ProcessGroup
;
171
PPH_MINIINFO_LIST_SECTION_SORT_DATA
SortData
;
172
PPH_STRING
Title
;
// Top line (may already contain a string)
173
PPH_STRING
Subtitle
;
// Bottom line (may already contain a string)
174
COLORREF
TitleColor
;
175
COLORREF
SubtitleColor
;
176
}
PH_MINIINFO_LIST_SECTION_GET_TITLE_TEXT
, *
PPH_MINIINFO_LIST_SECTION_GET_TITLE_TEXT
;
177
178
typedef
struct
_PH_MINIINFO_LIST_SECTION_GET_USAGE_TEXT
179
{
180
PPH_PROCESS_GROUP
ProcessGroup
;
181
PPH_MINIINFO_LIST_SECTION_SORT_DATA
SortData
;
182
PPH_STRING
Line1
;
// Top line
183
PPH_STRING
Line2
;
// Bottom line
184
COLORREF
Line1Color
;
185
COLORREF
Line2Color
;
186
}
PH_MINIINFO_LIST_SECTION_GET_USAGE_TEXT
, *
PPH_MINIINFO_LIST_SECTION_GET_USAGE_TEXT
;
187
188
typedef
struct
_PH_MINIINFO_LIST_SECTION_MENU_INFORMATION
189
{
190
PPH_PROCESS_GROUP
ProcessGroup
;
191
PPH_MINIINFO_LIST_SECTION_SORT_DATA
SortData
;
192
PPH_TREENEW_CONTEXT_MENU
ContextMenu
;
193
struct
_PH_EMENU_ITEM
*
SelectedItem
;
194
}
PH_MINIINFO_LIST_SECTION_MENU_INFORMATION
, *
PPH_MINIINFO_LIST_SECTION_MENU_INFORMATION
;
195
// end_phapppub
196
197
// begin_phapppub
198
typedef
struct
_PH_MINIINFO_LIST_SECTION
199
{
200
// Public
201
202
PPH_MINIINFO_SECTION
Section
;
// State
203
HWND
DialogHandle
;
// State
204
HWND
TreeNewHandle
;
// State
205
PVOID
Context
;
// Initialization
206
PPH_MINIINFO_LIST_SECTION_CALLBACK
Callback
;
// Initialization
207
// end_phapppub
208
209
// Private
210
211
PH_LAYOUT_MANAGER
LayoutManager
;
212
ULONG
RunCount
;
213
LONG
SuspendUpdate
;
214
PPH_LIST
ProcessGroupList
;
215
PPH_LIST
NodeList
;
216
HANDLE
SelectedRepresentativeProcessId
;
217
LARGE_INTEGER
SelectedRepresentativeCreateTime
;
218
// begin_phapppub
219
}
PH_MINIINFO_LIST_SECTION
, *
PPH_MINIINFO_LIST_SECTION
;
220
// end_phapppub
221
222
#endif
ProcessHacker
include
miniinfo.h
Generated by
1.8.2