Process Hacker
wndexp.h
Go to the documentation of this file.
1 #ifndef WNDEXP_H
2 #define WNDEXP_H
3 
4 #include <phdk.h>
5 #include "wndtree.h"
6 
7 extern BOOLEAN IsHookClient;
9 
10 #define PLUGIN_NAME L"ProcessHacker.WindowExplorer"
11 #define SETTING_NAME_SHOW_DESKTOP_WINDOWS (PLUGIN_NAME L".ShowDesktopWindows")
12 #define SETTING_NAME_WINDOW_TREE_LIST_COLUMNS (PLUGIN_NAME L".WindowTreeListColumns")
13 #define SETTING_NAME_WINDOWS_WINDOW_POSITION (PLUGIN_NAME L".WindowsWindowPosition")
14 #define SETTING_NAME_WINDOWS_WINDOW_SIZE (PLUGIN_NAME L".WindowsWindowSize")
15 
16 // hook
17 
18 #define WE_SERVER_MESSAGE_NAME L"WE_ServerMessage"
19 #define WE_SERVER_SHARED_SECTION_NAME L"\\BaseNamedObjects\\WeSharedSection"
20 #define WE_SERVER_SHARED_SECTION_LOCK_NAME L"\\BaseNamedObjects\\WeSharedSectionLock"
21 #define WE_SERVER_SHARED_SECTION_EVENT_NAME L"\\BaseNamedObjects\\WeSharedSectionEvent"
22 #define WE_CLIENT_MESSAGE_TIMEOUT 2000
23 
24 typedef struct _WE_HOOK_SHARED_DATA
25 {
26  ULONG MessageId;
27 
28  struct
29  {
30  ULONG_PTR WndProc;
31  ULONG_PTR DlgProc;
32  WNDCLASSEX ClassInfo;
33  } c;
35 
37  VOID
38  );
39 
41  VOID
42  );
43 
44 BOOLEAN WeIsServerActive(
45  VOID
46  );
47 
49  _Out_ PWE_HOOK_SHARED_DATA *Data
50  );
51 
53  VOID
54  );
55 
56 BOOLEAN WeSendServerRequest(
57  _In_ HWND hWnd
58  );
59 
61  VOID
62  );
63 
65  VOID
66  );
67 
68 // wnddlg
69 
71 {
77 
78 typedef struct _WE_WINDOW_SELECTOR
79 {
81  union
82  {
83  struct
84  {
85  HANDLE ProcessId;
86  } Process;
87  struct
88  {
89  HANDLE ThreadId;
90  } Thread;
91  struct
92  {
94  } Desktop;
95  };
97 
99  _In_ HWND ParentWindowHandle,
100  _In_ PWE_WINDOW_SELECTOR Selector
101  );
102 
103 #define WM_WE_PLUSMINUS (WM_APP + 1)
104 
105 // wndprp
106 
108  _In_ HWND ParentWindowHandle,
109  _In_ HWND WindowHandle
110  );
111 
112 // utils
113 
114 #define WE_PhMainWndHandle (*(HWND *)WeGetProcedureAddress("PhMainWndHandle"))
115 #define WE_WindowsVersion (*(ULONG *)WeGetProcedureAddress("WindowsVersion"))
116 
118  _In_ PSTR Name
119  );
120 
122  _In_ PWSTR OriginalName,
123  _Inout_updates_(256) PWCHAR Buffer,
124  _Out_ PUNICODE_STRING ObjectName
125  );
126 
128  _In_ HWND hWnd
129  );
130 
131 #endif