This project is read-only.


Ability to hook dotnet methods


See this discussion:
The ManagedTest example shows how to hook a delegate, not a method itself.
Needs further investigation.
Closed Aug 24, 2015 at 1:57 AM by spazzarama


spazzarama wrote Jul 17, 2012 at 4:38 AM

Was able to do it using delegateObj.Method.MethodHandle.GetFunctionPoint() but not safely (yet). Either the native code is not playing nice with the stack (and whatever else is happening in the managed->native->managed transition or perhaps it just isn't possible?

Worth noting that doing this kind of hooking while in the debugger results in a warning stating that something could go seriously wrong:

spazzarama wrote Jul 17, 2012 at 4:45 AM

Safer option might be something like this:

wrote Jul 20, 2012 at 12:02 AM

wrote Feb 22, 2013 at 1:15 AM

wrote Apr 8, 2013 at 11:40 AM

wrote Aug 24, 2015 at 1:57 AM