Process Hacker
notifico.h
Go to the documentation of this file.
1 #ifndef PH_NOTIFICO_H
2 #define PH_NOTIFICO_H
3 
4 #define PH_ICON_MINIMUM 0x1
5 #define PH_ICON_CPU_HISTORY 0x1
6 #define PH_ICON_IO_HISTORY 0x2
7 #define PH_ICON_COMMIT_HISTORY 0x4
8 #define PH_ICON_PHYSICAL_HISTORY 0x8
9 #define PH_ICON_CPU_USAGE 0x10
10 #define PH_ICON_DEFAULT_MAXIMUM 0x20
11 #define PH_ICON_DEFAULT_ALL 0x1f
12 
13 #define PH_ICON_LIMIT 0x80000000
14 #define PH_ICON_ALL 0xffffffff
15 
16 // begin_phapppub
18  _In_ struct _PH_NF_ICON *Icon
19  );
20 
21 typedef VOID (NTAPI *PPH_NF_BEGIN_BITMAP)(
22  _Out_ PULONG Width,
23  _Out_ PULONG Height,
24  _Out_ HBITMAP *Bitmap,
25  _Out_opt_ PVOID *Bits,
26  _Out_ HDC *Hdc,
27  _Out_ HBITMAP *OldBitmap
28  );
29 
30 typedef struct _PH_NF_POINTERS
31 {
35 
36 #define PH_NF_UPDATE_IS_BITMAP 0x1
37 #define PH_NF_UPDATE_DESTROY_RESOURCE 0x2
38 
40  _In_ struct _PH_NF_ICON *Icon,
41  _Out_ PVOID *NewIconOrBitmap,
42  _Out_ PULONG Flags,
43  _Out_ PPH_STRING *NewText,
44  _In_opt_ PVOID Context
45  );
46 
47 typedef BOOLEAN (NTAPI *PPH_NF_ICON_MESSAGE_CALLBACK)(
48  _In_ struct _PH_NF_ICON *Icon,
49  _In_ ULONG_PTR WParam,
50  _In_ ULONG_PTR LParam,
51  _In_opt_ PVOID Context
52  );
53 
54 // Special messages
55 // The message type is stored in LOWORD(LParam), and the message data is in WParam.
56 
57 #define PH_NF_MSG_SHOWMINIINFOSECTION (WM_APP + 1)
58 
60 {
61  PWSTR SectionName; // NULL to leave unchanged
63 
64 // Structures and internal functions
65 
66 #define PH_NF_ICON_UNAVAILABLE 0x1
67 #define PH_NF_ICON_SHOW_MINIINFO 0x2
68 // end_phapppub
69 
70 // begin_phapppub
71 typedef struct _PH_NF_ICON
72 {
73  // Public
74 
75  struct _PH_PLUGIN *Plugin;
76  ULONG SubId;
77  PVOID Context;
78  PPH_NF_POINTERS Pointers;
79 // end_phapppub
80 
81  // Private
82 
83  PWSTR Text;
84  ULONG Flags;
85  ULONG IconId;
88 // begin_phapppub
90 // end_phapppub
91 
93  VOID
94  );
95 
97  VOID
98  );
99 
101  VOID
102  );
103 
105  VOID
106  );
107 
109  _In_ ULONG_PTR WParam,
110  _In_ ULONG_PTR LParam
111  );
112 
114  VOID
115  );
116 
117 ULONG PhNfTestIconMask(
118  _In_ ULONG Id
119  );
120 
122  _In_ ULONG Id,
123  _In_ BOOLEAN Visible
124  );
125 
126 BOOLEAN PhNfShowBalloonTip(
127  _In_opt_ ULONG Id,
128  _In_ PWSTR Title,
129  _In_ PWSTR Text,
130  _In_ ULONG Timeout,
131  _In_ ULONG Flags
132  );
133 
134 HICON PhNfBitmapToIcon(
135  _In_ HBITMAP Bitmap
136  );
137 
138 PPH_NF_ICON PhNfRegisterIcon(
139  _In_ struct _PH_PLUGIN *Plugin,
140  _In_ ULONG SubId,
141  _In_opt_ PVOID Context,
142  _In_ PWSTR Text,
143  _In_ ULONG Flags,
144  _In_opt_ PPH_NF_ICON_UPDATE_CALLBACK UpdateCallback,
145  _In_opt_ PPH_NF_ICON_MESSAGE_CALLBACK MessageCallback
146  );
147 
148 PPH_NF_ICON PhNfGetIconById(
149  _In_ ULONG Id
150  );
151 
152 PPH_NF_ICON PhNfFindIcon(
153  _In_ PPH_STRINGREF PluginName,
154  _In_ ULONG SubId
155  );
156 
158  _In_ BOOLEAN Pinned
159  );
160 
161 // begin_phapppub
162 // Public registration data
163 
165 {
169 // end_phapppub
170 
171 #endif