<?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>PC Pro blog &#187; 32-bit</title>
	<atom:link href="http://www.pcpro.co.uk/blogs/tag/32-bit/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pcpro.co.uk/blogs</link>
	<description>Blogging in the real world</description>
	<lastBuildDate>Wed, 08 Feb 2012 16:54:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to make stubborn 32-bit apps work on 64-bit Windows</title>
		<link>http://www.pcpro.co.uk/blogs/2009/08/06/when-32-bit-apps-dont-work-on-64-bit-windows/</link>
		<comments>http://www.pcpro.co.uk/blogs/2009/08/06/when-32-bit-apps-dont-work-on-64-bit-windows/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 13:54:29 +0000</pubDate>
		<dc:creator>Darien Graham-Smith</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Real World Computing]]></category>
		<category><![CDATA[View from the Labs]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[32-bit]]></category>
		<category><![CDATA[64-bit]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.pcpro.co.uk/blogs/?p=6688</guid>
		<description><![CDATA[By now you’ve hopefully seen my feature on 64-bit Windows in the latest issue of PC Pro. And perhaps you derived some comfort from my breezy assurances that &#8220;you don’t need to worry too much about application compatibility. Almost all modern 32-bit software should install and run flawlessly on a 64-bit edition of Windows.&#8221;
Well, of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/08/win7-rc-desk.jpg"><img class="alignright size-thumbnail wp-image-6691" src="http://www.pcpro.co.uk/blogs/wp-content/uploads/2009/08/win7-rc-desk-150x150.jpg" alt="Windows 7 desktop" width="150" height="150" /></a>By now you’ve hopefully seen my feature on 64-bit Windows in the latest issue of <em>PC Pro</em>. And perhaps you derived some comfort from my breezy assurances that &#8220;you don’t need to worry too much about application compatibility. Almost all modern 32-bit software should install and run flawlessly on a 64-bit edition of Windows.&#8221;</p>
<p>Well, of course, whenever you write something like that you’re asking for trouble.<span id="more-6688"></span></p>
<p>Sure enough, just as our September issue was landing on the newsstands, I was discovering that <em>PC Pro</em>’s internal CMS client only worked on – you guessed it – 32-bit Windows. Trying to create a new review from my 64-bit desktop yielded only an obscure error about a missing COM class factory.</p>
<p><strong>Flying the flags</strong></p>
<p>A little digging unearthed the problem. Some naughty developer had written a perfectly valid 32-bit .NET application, but had neglected to flag it as specifically 32-bit code. 64-bit Windows was therefore running it in 64-bit mode, causing errors when the software couldn’t access the 32-bit system resources it expected.</p>
<p>Luckily, this is an easy problem to fix. Microsoft’s <strong><a href="http://msdn.microsoft.com/en-us/library/ms164699.aspx">CorFlags</a></strong> command line tool – part of the .NET Framework – lets you modify the header flags on executable files, including the one that specifies when an application needs to be run in 32-bit mode. Setting this flag for our database application was a simple matter of typing <tt><strong>CorFlags application.exe /32bit+</strong></tt></p>
<p>And <em>voilà </em>– one 32-bit application running perfectly on 64-bit Windows. Worth a try if you ever run into a similar problem.</p>
<p><strong>Which Program Files folder?</strong></p>
<p>While I’m on the subject, here&#8217;s a related problem we ran into back when we started to review PCs running 64-bit Vista. In this case the troublesome software was none other than the <em>PC Pro </em>real-world benchmark suite. Everything appeared to install perfectly, but when we actually launched the tests we received &#8220;resource not found&#8221; errors.</p>
<p>I set about tracing the problem with the help of SysInternals’ indispensible <strong><a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx">Process Monitor</a></strong> utility, and once again, the explanation turned out to be mercifully simple (so simple, in fact, that I felt a bit foolish for not having worked it out myself).</p>
<p>Various files weren’t being found because on 64-bit Windows the “Program Files” folder is reserved for 64-bit applications only. 32-bit programs install into a folder named “Program Files (x86)”. Our test scripts included hard-coded paths that were failing because our 32-bit applications weren&#8217;t in their usual location.</p>
<p>If you come across a problem like this, you can easily fix it by removing explicit references to “C:\Program Files\” and using %ProgramFiles% instead (this clever environment variable should resolve to either “Program Files” or “Program Files (x86)” depending on whether the process calling it is 64-bit or 32-bit). If you can&#8217;t get at the source to change the paths, a quick and dirty workaround is to manually copy your 32-bit files into “Program Files”. Once I&#8217;d done this, our benchmarks ran without a hitch.</p>
<p>So there you have it: 32-bit applications <em>do </em>run on 64-bit Windows&#8230; but sometimes you need to work around a few programmer assumptions to get them going!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pcpro.co.uk/blogs/2009/08/06/when-32-bit-apps-dont-work-on-64-bit-windows/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

