Hi there.
I am currently researching how to write .NET code that can be injected into another .NET process and override function return values. The idea is that my code would alter the return values of a method call, like this:
Public Function DoSomething() As String
Return "Value"
End Function
My code would intercept calls to DoSomething() and return my own custom string, rather then "Value".
I'm guessing that I would need to look o using the .NET Profiling API to do this type of thing. Does anyone have experience of using the Profiling API, and if so, do you think that this code injection is possible?
I don't intend to use this for anything malicious, I'm just interested in trying something very low-level in .NET to see if it can be done.
Cheers. Jas.