I do this all day long ;) The docs aren't exactly clear about what profiler events you can use this from. It works fine when called during the JITCompilationStarted event. I used to know all of the boundary cases, but that should probably get you started.
Have fun, -John http://www.iunknown.com -----Original Message----- From: Lukasz Wielek [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 6:36 AM To: [EMAIL PROTECTED] Subject: [DOTNET] Profiler API question Have anyone tried to swap methods during a program execution? I want to swap System.Environment.Exit method (from mscorlib) with my own method, but SetILFunctionBody returns an error. Whats wrong? -- WielO mailto:[EMAIL PROTECTED] ----------------------------------------------------- You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.