Ability to hook dotnet methods


See this discussion: http://easyhook.codeplex.com/discussions/353827
The ManagedTest example shows how to hook a delegate, not a method itself.
Needs further investigation.
Closed Aug 24, 2015 at 12:57 AM by spazzarama


spazzarama wrote Jul 17, 2012 at 3: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: http://msdn.microsoft.com/en-us/library/ms172237.aspx

spazzarama wrote Jul 17, 2012 at 3:45 AM

Safer option might be something like this: http://msdn.microsoft.com/en-us/magazine/cc188743.aspx

wrote Jul 19, 2012 at 11:02 PM

wrote Feb 22, 2013 at 12:15 AM

wrote Apr 8, 2013 at 10:40 AM

wrote Aug 24, 2015 at 12:57 AM