Process Hacker
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 
10  _In_ struct _PH_MINIINFO_SECTION *Section,
11  _In_opt_ PPH_STRING Text
12  );
13 
15 {
18 
19  HFONT Font;
20  HFONT MediumFont;
21  ULONG FontHeight;
25 
28 
30 {
34  MiniInfoSectionChanging, // PPH_MINIINFO_SECTION Parameter1
35  MiniInfoShowing, // BOOLEAN Parameter1 (Showing)
36  MiniInfoCreateDialog, // PPH_MINIINFO_CREATE_DIALOG Parameter1
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 
48 {
49  BOOLEAN CustomCreate;
50 
51  // Parameters for default create
52  PVOID Instance;
53  PWSTR Template;
54  DLGPROC DialogProc;
55  PVOID Parameter;
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
68  ULONG Flags;
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  };
85 // begin_phapppub
87 // end_phapppub
88 
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
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 
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 
116 {
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
131 
132 typedef BOOLEAN (NTAPI *PPH_MINIINFO_LIST_SECTION_CALLBACK)(
133  _In_ struct _PH_MINIINFO_LIST_SECTION *ListSection,
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 
150 {
152  ULONGLONG UserData[4];
154 
156 {
158  PPH_MINIINFO_LIST_SECTION_SORT_DATA SortData;
160 
162 {
163  // MiListSectionSortProcessList: List of PPH_PROCESS_NODE
164  // MiListSectionSortGroupList: List of PPH_MINIINFO_LIST_SECTION_SORT_DATA
167 
169 {
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;
177 
179 {
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;
187 
189 {
191  PPH_MINIINFO_LIST_SECTION_SORT_DATA SortData;
195 // end_phapppub
196 
197 // begin_phapppub
199 {
200  // Public
201 
202  PPH_MINIINFO_SECTION Section; // State
203  HWND DialogHandle; // State
204  HWND TreeNewHandle; // State
205  PVOID Context; // Initialization
207 // end_phapppub
208 
209  // Private
210 
212  ULONG RunCount;
218 // begin_phapppub
220 // end_phapppub
221 
222 #endif