Closed 0xThiebaut closed 3 years ago
You will need to inject a DLL into the target process and can then use DetourUpdateThread in that injected DLL.
A few ways you can inject a DLL is by using SetWindowsHookEx, SetWinEventHook, or CreateRemoteThread + LoadLibrary.
I went with CreateRemoteThread
+ LoadLibraryA
. Thanks!
I am looking to hook an existing local process but can't find any clear documentation on how to do so.
I have tried, without success:
CreateToolhelp32Snapshot
to iterate threads followed byOpenThread
to callDetourUpdateThread
.OpenProcess
to callDetourUpdateProcessWithDll
.I checked #76 but feel the suggested approach is for the process itself. Is their any documentation on how Detours can be used for an existing local process?