unknownv2 / CoreHook

A library that simplifies intercepting application function calls using managed code and the .NET Core runtime
MIT License
263 stars 40 forks source link

Test: Fix detour test case address for function. #123

Closed unknownv2 closed 5 years ago

unknownv2 commented 5 years ago

The test case should use the target address which is where the detour is installed instead of the original address, which is where the original function assembly is relocated to. This allows testing recursive calls at the same address inside a hook handler and making sure the detour handler doesn't cause an infinite recursion with the call.