<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to tell if a function is managed code?</title><link>http://blogs.msdn.com/b/jmstall/archive/2007/10/12/how-to-tell-if-a-function-is-managed-code.aspx</link><description>This is a moot point for pure C# apps, but what if you're writing in MC++ (or some other 'mixed' language) and you want to know if a function is getting compiled as managed or native code? You can try and inspect the source and infer from the language</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How to tell if a function is managed code?</title><link>http://blogs.msdn.com/b/jmstall/archive/2007/10/12/how-to-tell-if-a-function-is-managed-code.aspx#5421848</link><pubDate>Fri, 12 Oct 2007 15:44:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5421848</guid><dc:creator>Russell Osterlund</dc:creator><description>&lt;p&gt;Alternatively, if you know that the code has not been ngen'd, you can examine the virtual address of the first instruction. &amp;nbsp;In your first sample, the address will not be located in any loaded module, but in memory that has been allocated by the JIT compiler (presumably this is why VS shows a zero offset since the address could possibly change with a later re-JIT). &amp;nbsp;In the latter sample, the virtual address will be found inside the module's range probably in the .text section. &amp;nbsp;If the code has been ngen'd, you might then be able to fall back on the heuristics you give.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5421848" width="1" height="1"&gt;</description></item></channel></rss>