-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO.txt
134 lines (118 loc) · 5.9 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[ ] ditch my custom hooks for detours? (why am i reinvent wheel)
https://github.com/Microsoft/Detours
[ ] window tree
[x] windows icon as tree node icon
[ ] search for and filter windows by
[ ] handle
[ ] process name
[ ] window text
[ ] class text
[ ] processes window
[ ] event based update rather than poll
WM_CREATE / WM_DESTROY?
approach a:
use a WH_CBT for HCBT_CREATEWND | HCBT_DESTROYWND?
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms644977(v=vs.85)?redirectedfrom=MSDN
approach b:
SetWinEventHook() EVENT_OBJECT_CREATE 0x8000 | EVENT_OBJECT_DESTROY 0x8001
https://docs.microsoft.com/en-us/windows/win32/winauto/event-constants?redirectedfrom=MSDN
[ ] desktop window -> GetDesktopWindow
what about win10 multidesktop?
[...] tree options
[x] auto refresh
[x] refresh rate
[...] history (red removed, green added)
[ ] tree not updated on remove
[ ] history needs to applied to child nodes when node expanded
[ ] always on top option
[ ] transparency option
[...] properties window
[ ] display size pos, misc, thread process info, window styles
GetWindowLongPtr
https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles
https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles
[ ] allow editing of any property
eg: add or remove window flags
change window position and size
[...] message log
[ ] investigate WH_DEBUG hook:
WH_DEBUG: "called before any other hooktype gets called.
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms644978(v%3Dvs.85)
and look at other hooks (let user choose hook type?)
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms644978(v%3Dvs.85)
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowshookexa
https://docs.microsoft.com/en-us/windows/win32/winmsg/using-hooks#monitoring-system-events
[x] subclass main windproc and forward messages back to observer
[x] display and log messages
[x] send cwpstruct contents
[x] multi pipe client support
[x] fix connection
[x] allow multiple clients
[x] fix build event dll copy
[ ] still doesnt copy in case of dll edit only when build will not rebuild dll and run copy event
[ ] a 32-bit dll must be used for 32-process, and 64 for 64: BadImageFormatException!
"A 32-bit DLL cannot be injected into a 64-bit process, and a 64-bit DLL cannot be injected into a 32-bit process.
If an application requires the use of hooks in other processes, it is required that a 32-bit application
call SetWindowsHookEx to inject a 32-bit DLL into 32-bit processes, and a 64-bit application call SetWindowsHookEx
to inject a 64-bit DLL into 64-bit processes. The 32-bit and 64-bit DLLs must have different names."
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowshookexa#remarks
can we dynamically load matching platform?
//docs.microsoft.com/en-us/windows/desktop/ipc/interprocess-communications
[ ] fix bug where closing window freezes process, some cross thread issues with UI
[x] fix bug when close message window while messages still being recieved = ObjectDisposedException
[ ] add hook argugment for attach internal console
[ ] filter, only show messages x,y,z
[ ] convert message ID to human-readable name, eg:
0x0000 WM_NULL
0x0001 WM_CREATE
0x0002 WM_DESTROY
0x0003 WM_MOVE
0x0200 WM_MOUSEMOVE
https://docs.microsoft.com/en-us/windows/win32/winmsg/about-messages-and-message-queues
https://wiki.winehq.org/List_Of_Windows_Messages
https://www.codeproject.com/Articles/802412/Global-Interceptable-Program-and-System-Hooks-in-N
[ ] read message contents eg:
0x0200 = WM_MOUSEMOVE
x,y cords are in lParam: x-coordinate is in the low-order short of the return value; the y-coordinate is in the high-order short
xPos = GET_X_LPARAM(lParam);
yPos = GET_Y_LPARAM(lParam);
https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousemove
[ ] documentation on hover over message eg:
HWND_TOPMOST [-1] = "Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated."
HWND_TOP [0] = "Places the window at the top of the Z order."
SWP_NOMOVE [0x0002] = "Retains the current position (ignores X and Y parameters)."
[ ] networked? is this feasable, if so, is there a use case?
https://hackinparis.com/data/slides/2017/2017_Cohen_Gil_The_forgotten_interface_Windows_named_pipes.pdf
[ ] pipe enumeration window
https://stackoverflow.com/questions/258701/how-can-i-get-a-list-of-all-open-named-pipes-in-windows
https://docs.microsoft.com/en-us/sysinternals/downloads/pipelist
https://stackoverflow.com/questions/25109491
[ ] handle viewer / list
(what handles do process x have open and to what files)
https://docs.microsoft.com/en-us/sysinternals/downloads/handle
[ ] possible to enumerate hooks?
https://stackoverflow.com/questions/8564987
[ ] move options to properties
[ ] view handles and process/thread ID's as int, hex, both
[ ] hex upper or lower case
[...] virtual desktop render test
[ ] option to show per monitor or full desktop
[ ] multi-monitor handling & physical monitor placement
[ ] window location needs to be mapped to screen, not always re
[ ] color coding for status and flags
eg: if window has flag WS_VISIBLE, make it pink
[ ] transparent filled rect render
[ ] ensure window order rendering respects z-level
[ ] display text
[ ] mouse over/in window event
[ ] send message
[ ] send any message to any window
[ ] highlighting graphics overlay rectangle
[ ] find window based on mouse position 'Find Window'
[ ] log window
[ ] investigate:
[ ] does releasing a hook leave a dll instance loaded in the target?
[ ] set arbitrary window parents, eg embed window into another?
[ ] can we auto detect graphics lib? and hook those too?
https://github.com/alxbrn/universal-graphics-hook
[ ] todo, better name?