I saw the following article describing how to record the parameters and returned value for a method by Profiling API.However the sample code cannot be downloaded, also it maybe not works for the latest CLR, so May I known if there is any latest sample code for such function can be provided?I means it would should be works for CLR 4.0 or later.
http://blogs.msdn.com/b/jkeljo/archive/2005/08/11/450506.aspx
https://blogs.msdn.microsoft.com/davbr/2006/02/27/bug-inspecting-value-type-returns/