<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Captain Codeman&#187; x86</title>
	<atom:link href="http://www.captaincodeman.com/tag/x86/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.captaincodeman.com</link>
	<description>Software Developer</description>
	<lastBuildDate>Fri, 15 Jul 2011 22:50:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Running .NET Apps in 32-bit mode on 64-bit Windows</title>
		<link>http://www.captaincodeman.com/2007/12/17/running-net-apps-in-32-bit-mode-on-64-bit-windows/</link>
		<comments>http://www.captaincodeman.com/2007/12/17/running-net-apps-in-32-bit-mode-on-64-bit-windows/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 00:37:00 +0000</pubDate>
		<dc:creator>Captain Codeman</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[32 bit]]></category>
		<category><![CDATA[64 bit]]></category>
		<category><![CDATA[x64]]></category>
		<category><![CDATA[x86]]></category>

		<guid isPermaLink="false">http://blogs.intesoft.net/post.aspx?id=bc00b190-ee8d-4eb4-8777-61d68c4d24a2</guid>
		<description><![CDATA[The normal behavior for .NET 2.0 applications compiled with the default &#39;Any CPU&#39; platform is to run as 32-bit on x86 (32-bit) Windows and as 64-bit on x64 (64-bit) Windows. Occasionally, some apps won&#39;t run correctly &#8211; I&#39;ve recently run into this with&#160;CCNetConfig (a CruiseControl.NET Configuration tool) and have seen it before with other tools.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>
<span class="postbody">The normal behavior for .NET 2.0 applications compiled with the default &#39;Any CPU&#39; platform is to run as 32-bit on x86 (32-bit) Windows and as 64-bit on x64 (64-bit) Windows.</span>
</p>
<p>
<span class="postbody">Occasionally, some apps won&#39;t run correctly &#8211; I&#39;ve recently run into this with&nbsp;<a href="http://www.codeplex.com/ccnetconfig" target="_blank" title="CruiseControl.NET Configuration">CCNetConfig</a> (a CruiseControl.NET Configuration tool) and have seen it before with other tools. Another obscure scenario where it shows up is if you try to use the JET OleDB driver which will fail in 64-bit mode because there isn&#39;t one! (it has to be 32-bit).</span>
</p>
<p>
<span class="postbody">Rather than have to recompile the app or even worse, run a 32-bit Virtual Machine, there is an easy way to force .NET to run an app in 32-bit mode using the &#39;CorFlags.exe&#39; tool.</span>
</p>
<p>
<span class="postbody">Depending on your system this may be installed in different places. I&#39;ve seen it in different places on XP64 and Vista X64:</span>
</p>
<ul>
<li>
<div>
	<span class="postbody">C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\x64\CorFlags.exe </span>
	</div>
</li>
<li>
<div>
	<span class="postbody">C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\CorFlags.exe </span>
	</div>
</li>
</ul>
<p>
<span class="postbody">Running this from the command line with the path / filename of the app you want to change and the switch /32BIT+ to turn on 32-bit mode, e.g.:</span>
</p>
<pre>
<span class="postbody"><font face="courier new,courier">   CoreFlags.exe TheApp.exe /32BIT+</font></span>
</pre>
<p>
<span class="postbody"></span>
</p>
<p>
<span class="postbody">If that fixes the problem then you know that it <em><strong>is </strong></em>a 64-bit issue. You can re-enable 64-bit operation for the app by turning off the 32-bit switch with the parameter /32BIT-, e.g.:</span>
</p>
<pre>
<span class="postbody"><font face="courier new,courier">   CoreFlags.exe TheApp.exe /32BIT-</font></span>
</pre>
<p>
<span class="postbody"></span>
</p>
<p>
<span class="postbody">Voila &#8230; control over 32-bit and 64-bit execution without doing a recompile! I&#39;m not 100% certain but I think that this switch sets the same flag that the &#39;x86&#39; and &#39;Any CPU&#39; targets set in Visual Studio.</span></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.captaincodeman.com/2007/12/17/running-net-apps-in-32-bit-mode-on-64-bit-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

