views:

71

answers:

1

Is it possible to manipulate the bytecode of a (signed) .NET program at runtime? E.g. by forcing the JIT to re-evalutate the IL?

+2  A: 

Yes, it's possible with the .net CLR profiling APIs. But it's not an easy task. For instance, you can have a look at this article:

Jb Evain
So there are no libraries (which you know of) that can help me get there quicker?
Benson
Not if you want to interact with the JIT. You can use managed AOP libraries that will either create proxies, or weave IL code before the assembly is loaded. But if you want to interact with the JIT, the profiling API is the only way.
Jb Evain