Process Hacker
hexeditp.h
Go to the documentation of this file.
1 #ifndef _PH_HEXEDITP_H
2 #define _PH_HEXEDITP_H
3 
4 typedef struct _PHP_HEXEDIT_CONTEXT
5 {
6  PUCHAR Data;
8  BOOLEAN UserBuffer;
9  LONG TopIndex; // index of first visible byte on screen
10 
15 
18  BOOLEAN ShowAddress;
19  BOOLEAN ShowAscii;
20  BOOLEAN ShowHex;
21  BOOLEAN AddressIsWide;
23 
24  BOOLEAN NoAddressChange;
25  BOOLEAN HalfPage;
26 
27  HFONT Font;
30  PWCHAR CharBuffer;
32  BOOLEAN Update;
33 
37 
38  BOOLEAN HasCapture;
39  POINT EditPosition;
41 
42 #define IS_PRINTABLE(Byte) ((ULONG)((Byte) - ' ') <= (ULONG)('~' - ' '))
43 
44 #define TO_HEX(Buffer, Byte) \
45 { \
46  *(Buffer)++ = PhIntegerToChar[(Byte) >> 4]; \
47  *(Buffer)++ = PhIntegerToChar[(Byte) & 0xf]; \
48 }
49 
50 #define REDRAW_WINDOW(hwnd) \
51  RedrawWindow((hwnd), NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE)
52 
54  _Out_ PPHP_HEXEDIT_CONTEXT *Context
55  );
56 
58  _In_ _Post_invalid_ PPHP_HEXEDIT_CONTEXT Context
59  );
60 
61 LRESULT CALLBACK PhpHexEditWndProc(
62  _In_ HWND hwnd,
63  _In_ UINT uMsg,
64  _In_ WPARAM wParam,
65  _In_ LPARAM lParam
66  );
67 
69  _In_ HWND hwnd,
70  _In_ PPHP_HEXEDIT_CONTEXT Context,
71  _In_opt_ HDC hdc
72  );
73 
75  _In_ HWND hwnd,
76  _In_ PPHP_HEXEDIT_CONTEXT Context,
77  _In_ PAINTSTRUCT *PaintStruct,
78  _In_ HDC hdc
79  );
80 
82  _In_ HWND hwnd,
83  _In_ PPHP_HEXEDIT_CONTEXT Context
84  );
85 
86 FORCEINLINE BOOLEAN PhpHexEditHasSelected(
87  _In_ PPHP_HEXEDIT_CONTEXT Context
88  )
89 {
90  return Context->SelStart != -1;
91 }
92 
94  _In_ HWND hwnd,
95  _In_ PPHP_HEXEDIT_CONTEXT Context
96  );
97 
99  _In_ HWND hwnd,
100  _In_ PPHP_HEXEDIT_CONTEXT Context
101  );
102 
104  _In_ HWND hwnd,
105  _In_ PPHP_HEXEDIT_CONTEXT Context,
106  _In_ LONG Position
107  );
108 
110  _In_ HWND hwnd,
111  _In_ PPHP_HEXEDIT_CONTEXT Context,
112  _In_ LONG X,
113  _In_ LONG Y,
114  _Out_ POINT *Point
115  );
116 
118  _In_ HWND hwnd,
119  _In_ PPHP_HEXEDIT_CONTEXT Context,
120  _In_ LONG X,
121  _In_ LONG Y
122  );
123 
125  _In_ HWND hwnd,
126  _In_ PPHP_HEXEDIT_CONTEXT Context,
127  _In_ LONG S,
128  _In_ LONG E
129  );
130 
132  _In_ HWND hwnd,
133  _In_ PPHP_HEXEDIT_CONTEXT Context,
134  _In_ LONG Position
135  );
136 
138  _In_ HWND hwnd,
139  _In_ PPHP_HEXEDIT_CONTEXT Context
140  );
141 
143  _In_ HWND hwnd,
144  _In_ PPHP_HEXEDIT_CONTEXT Context
145  );
146 
148  _In_ HWND hwnd,
149  _In_ PPHP_HEXEDIT_CONTEXT Context
150  );
151 
153  _In_ HWND hwnd,
154  _In_ PPHP_HEXEDIT_CONTEXT Context
155  );
156 
158  _In_ HWND hwnd,
159  _In_ PPHP_HEXEDIT_CONTEXT Context
160  );
161 
163  _In_ HWND hwnd,
164  _In_ PPHP_HEXEDIT_CONTEXT Context
165  );
166 
168  _In_ HWND hwnd,
169  _In_ PPHP_HEXEDIT_CONTEXT Context
170  );
171 
173  _In_ HWND hwnd,
174  _In_ PPHP_HEXEDIT_CONTEXT Context,
175  _In_ LONG S,
176  _In_ LONG E
177  );
178 
180  _In_ HWND hwnd,
181  _In_ PPHP_HEXEDIT_CONTEXT Context,
182  _In_ LONG S,
183  _In_ LONG L
184  );
185 
187  _In_ HWND hwnd,
188  _In_ PPHP_HEXEDIT_CONTEXT Context,
189  _In_ PUCHAR Data,
190  _In_ ULONG Length
191  );
192 
194  _In_ HWND hwnd,
195  _In_ PPHP_HEXEDIT_CONTEXT Context,
196  _In_ PUCHAR Data,
197  _In_ ULONG Length
198  );
199 
200 #endif