This project is read-only.
1

Closed

Ability to hook dotnet methods

description

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 1:57 AM by spazzarama

comments

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: http://msdn.microsoft.com/en-us/library/ms172237.aspx

spazzarama wrote Jul 17, 2012 at 4:45 AM

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

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