<?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>Host the CLR and Generate IL to call a MessageBox</title><link>http://blogs.msdn.com/calvin_hsia/archive/2006/08/07/691467.aspx</link><description>Here’s some C++ code to host the CLR. It’s an alternative to using COM Interop (s ee A Visual Basic COM object is simple to create, call and debug from Excel ), or using a User Control (see Create a .Net UserControl that calls a web service that acts</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Interesting Finds: August 7, 2006</title><link>http://blogs.msdn.com/calvin_hsia/archive/2006/08/07/691467.aspx#691699</link><pubDate>Tue, 08 Aug 2006 05:23:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:691699</guid><dc:creator>Jason Haley</dc:creator><description /></item><item><title>Rob Herbst   ::  Host the CLR in C++</title><link>http://blogs.msdn.com/calvin_hsia/archive/2006/08/07/691467.aspx#691757</link><pubDate>Tue, 08 Aug 2006 06:21:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:691757</guid><dc:creator>Rob Herbst   ::  Host the CLR in C++</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://www.robherbst.com/blog/2006/08/07/host-the-clr-in-c/"&gt;http://www.robherbst.com/blog/2006/08/07/host-the-clr-in-c/&lt;/a&gt;</description></item><item><title>re: Host the CLR and Generate IL to call a MessageBox</title><link>http://blogs.msdn.com/calvin_hsia/archive/2006/08/07/691467.aspx#692200</link><pubDate>Tue, 08 Aug 2006 18:05:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:692200</guid><dc:creator>Jochen Kirstätter</dc:creator><description>Hi Calvin,&lt;br&gt;&lt;br&gt;nice shot. I experimented some stuff writing a host for CLR inside of Visual FoxPro. I created an FLL to ease usage in VFP. On of my next steps is to create an object reference (added to _VFP or _Screen) in order to execute .NET assemblies in VFP. Second, I'm stuck with configuring my own ApplicationDomain for VFP to separate memory stuff from the default app domain.&lt;br&gt;&lt;br&gt;Maybe this could be an idea to extend Sedna... ;-)&lt;br&gt;&lt;br&gt;Anyway, here's the C++ code I use inside my FLL to create the CLR host:&lt;br&gt;&lt;br&gt;HRESULT hr = CorBindToRuntimeEx(&lt;br&gt;	NULL,&lt;br&gt;	NULL,&lt;br&gt;	0,&lt;br&gt;	CLSID_CLRRuntimeHost,&lt;br&gt;	IID_ICLRRuntimeHost,&lt;br&gt;	(PVOID*)&amp;amp;pRuntimeHost);&lt;br&gt;&lt;br&gt;This way, always the latest, installed version of .NET Framework is returned. Would be nice to share some thoughts about writing an CLR Host for VFP.&lt;br&gt;&lt;br&gt;Kind regards, Jochen &amp;quot;JoKi&amp;quot; Kirst&amp;#228;tter</description></item><item><title>re: Host the CLR and Generate IL to call a MessageBox</title><link>http://blogs.msdn.com/calvin_hsia/archive/2006/08/07/691467.aspx#692955</link><pubDate>Wed, 09 Aug 2006 08:36:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:692955</guid><dc:creator>rstrahl</dc:creator><description>So how would this be more benficial than say doing COM interop into the CLR which automatically creates a default AppDomain?&lt;br&gt;&lt;br&gt;I can see this being useful for pure C++ code, but I'm not sure I see the immediate benefit for doing this higher up the stack for say FoxPro or VB 6 since you still need to pass data across somehow. I don't think that there's a big performance gain either when you compare COM interop vs. directly calling into the CLR.&lt;br&gt;&lt;br&gt;Can you give a use case when this would be useful? &lt;br&gt;&lt;br&gt;I'm just thinking out loud here. A while back I built an Add-in interface into Help Builder for example, that allows Add-in creation in .NET even though the application is a FoxPro application. It uses COM interop and that works just fine. i just don't see the benefit of a 'pure' .NET hosting situation unless you need to have a primary gateway (ie. IIS, IE etc.).&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Host the CLR and Generate IL to call a MessageBox</title><link>http://blogs.msdn.com/calvin_hsia/archive/2006/08/07/691467.aspx#1322994</link><pubDate>Tue, 19 Dec 2006 08:50:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1322994</guid><dc:creator>rsl</dc:creator><description>&lt;p&gt;Hi Calvin,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Thanks for the information. I've tried doing the same way to use my managed c++ code in unmanaged c++ . But the API ExecuteInDefaultAppDomain(..) fails. May I know why is it so?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;RSL&lt;/p&gt;
</description></item><item><title>Good site</title><link>http://blogs.msdn.com/calvin_hsia/archive/2006/08/07/691467.aspx#9043516</link><pubDate>Wed, 05 Nov 2008 08:49:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9043516</guid><dc:creator>Olgunka-ev</dc:creator><description>&lt;p&gt;&amp;lt;a href= &lt;a rel="nofollow" target="_new" href="http://index1.ystins.com"&gt;http://index1.ystins.com&lt;/a&gt; &amp;gt;laguardia rising stars 2006&amp;lt;/a&amp;gt; &amp;lt;a href= &lt;a rel="nofollow" target="_new" href="http://index2.ystins.com"&gt;http://index2.ystins.com&lt;/a&gt; &amp;gt;northumberland county va&amp;lt;/a&amp;gt; &amp;lt;a href= &lt;a rel="nofollow" target="_new" href="http://index3.ystins.com"&gt;http://index3.ystins.com&lt;/a&gt; &amp;gt;holy ghost prep bensalem craft&amp;lt;/a&amp;gt; &amp;lt;a href= &lt;a rel="nofollow" target="_new" href="http://index4.ystins.com"&gt;http://index4.ystins.com&lt;/a&gt; &amp;gt;miles away from the ordinary&amp;lt;/a&amp;gt; &amp;lt;a href= &lt;a rel="nofollow" target="_new" href="http://index5.ystins.com"&gt;http://index5.ystins.com&lt;/a&gt; &amp;gt;star trader software&amp;lt;/a&amp;gt; &lt;/p&gt;
</description></item></channel></rss>