المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : .NET Internals: Rewrite MSIL Code on the Fly with the .NET Framework Profiling API



C++ Programming
03-29-2009, 02:42 AM
In this article, the author shows how to dynamically rewrite Microsoft Intermediate ******** code on the fly using the Profiling API of the CLR. Unlike approaches based on Reflection.Emit, this scheme works with the existing assemblies and doesn't require the creation of proxy or dynamic assemblies. The need for IL code rewriting emerges when you want to make your changes transparent to the client and preserve the identity of classes. This technique can be used for creation of interceptors, pre- and post-processing method calls, and code instrumentation and verification.

Aleksandr Mikunov

<a href="http://msdn.microsoft.com/magazine/21882833-6c9e-47b8-af53-2d9d79d8e594">MSDN Magazine September 2003