4 ms·
IIRC you can just use WM_SETTEXT message instead. Don't know about FPS, probably in between of the two methods you used.
by anonymfus 6y ago
IIRC you can just use WM_SETTEXT message instead. Don't know about FPS, probably in between of the two methods you used.
- mywittyname 6y agoI'm not sure this would work. The "game" is running in a different process than notepad and WM_SETTEXT accepts a memory pointer as input. This pointer would be meaningless because it's coming from a different process.
- netmare 6y agoWindows does automatic parameter marshaling for system messages (0 to WM_USER-1), which WM_SETTEXT is a part of. Since the meaning of the parameters is well-established, the system can allocate memory in the target process and replace the pointers with meaningful values for the target wndproc.
- unnouinceput 6y agoYou can also allocate memory on the hooked process, Notepad in this case, and modify that one then use WM_SETTEXT. I thought about that when I saw his "wait to fill Notepad with WM_CHAR" which took like 10 seconds? Anyway WM_SETTEXT would be faster then 30 FPS he achieved with accessing Notepad's buffer memory since he's doing a lot of extra-work there to achieve the final result.