The simple package for hooking processes on Windows. Solution compiles with Visual Studio 2019. It uses external components:
- Add desired hooks to the
hook
project. Seehook/hook.cpp
with example. - Build
hook.dll
fromhook
project. - Build
injector.exe
frominjector
project. - Run
injector.exe
with parameters:
injector <target> <dll>
Where target
is the name or PID of the target process and dll
is the full path to dll with hooks.
5. Have fun :)
You can enable logging in hooks by setting the environment variable LOG_DIR
. if this variable is set, the hook.dll
will write logs to the %LOG_DIR%\<target>.log
file. Refer to hook/hook.cpp
to see an axample.