<?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>Geospecialling &#187; x64</title>
	<atom:link href="http://www.geospecialling.com/index.php/tag/x64/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geospecialling.com</link>
	<description>Being a (G)IS Developer...</description>
	<lastBuildDate>Thu, 26 Jan 2012 04:11:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Debugging COM DLL files in AutoCAD x64 and Visual Studio</title>
		<link>http://www.geospecialling.com/index.php/2011/03/debugging-com-dll-files-in-autocad-x64-and-visual-studio/</link>
		<comments>http://www.geospecialling.com/index.php/2011/03/debugging-com-dll-files-in-autocad-x64-and-visual-studio/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 18:19:46 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visual Lisp]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/03/debugging-com-dll-files-in-autocad-x64-and-visual-studio/</guid>
		<description><![CDATA[While attempting to work out some x64 specific kinks in some of the DraftLogic COM code that is being migrated to .NET I hit a pretty annoying wall.&#160; Well, it was actually a series of small walls (probably around knee high)&#160; that kept tripping me… In this post, I’m working on a problem that is [...]]]></description>
			<content:encoded><![CDATA[<p>While attempting to work out some x64 specific kinks in some of the <a title="DraftLogic" href="http://www.draftlogic.com" rel="tag" target="_blank">DraftLogic</a> COM code that is being migrated to .NET I hit a pretty annoying wall.&#160; Well, it was actually a series of small walls (probably around knee high)&#160; that kept tripping me…</p>
<p>In this post, I’m working on a problem that is pertaining to a 64 bit version of AutoCAD loading a COM enabled .NET assembly – however this information should apply to any x64 executable calling any x64 COM assembly.&#160;&#160; Replace AutoCAD with &lt;YourApp.exe&gt; and you should be good to go =)</p>
<p>The first thing I did was to ensure each of the projects had been set to build for&#160; “ANY CPU”.&#160;&#160; This got the ball of fun rolling.&#160;&#160; We have a VLX which instantiates the COM class using vlax-get-or-create-object.&#160; When called this would constantly return nil.&#160;&#160; Of course this all works just peachy when running an x86 build of AutoCAD.&#160;&#160; At this point my breakpoints would appear in Visual Studio as disabled and would happily inform me that “The breakpoint will not currently be hit”. </p>
<p>This usually results when the incorrect DLL is being loaded, or when the PDB file is missing.&#160;&#160; Once Visual Studio is running in debug mode you can bring up the Modules window from the Debug/Windows/Modules menu.&#160; This should show you all the assemblies involved in the current session as well a bunch of other information including their paths.&#160; The assembly in question was not listed here – so at this point I’m assuming that Windows cannot find the dll.</p>
<h2>Junk in the Registry</h2>
<p>I am now thinking that I have orphaned and duplicated types and CLSIDs in the registry, likely pointing to other builds of the dlls.&#160;&#160; If the GUIDs for the classes or types changed you end up with a lot of junk in the registry.&#160;&#160; I don’t trust those registry “cleaner” apps and in the interest of keeping my OS working – I chose to manually search out and nuke all the registry references manually.&#160; This can be done by searching both for your assembly’s type name, and COM exposed class names in regedit.&#160; A lot of this was done in the HKEY_CLASSES_ROOT root.&#160; After all of that the problem still exists..</p>
<h2>Wow6432Node Registry Keys</h2>
<p>Registry keys were a two part problem. After dealing with the junk in the registry, I found I also had to deal with the x86 <a title="x86 registry redirection" href="http://msdn.microsoft.com/en-us/library/aa384232(v=vs.85).aspx" rel="tag" target="_blank">registry redirection</a>.&#160;&#160; DraftLogic has been until this point limited to x86 architecture as a result of&#160; the VB6 code not being x64 friendly.&#160;&#160; As a result of this, all of the needed keys had been placed in the WOW6432Node of the appropriate software registry sections.&#160;&#160; This was the easiest wall to find and hop over.&#160; Unfortunately, this also didn’t solve the problem.</p>
<h2>Improperly Registered Assemblies-thanks for nothingVisual Studio</h2>
<p>So the next and fortunately final problem turns out that Visual Studio 2005/2008 (unsure about 2010) <a title="KB956933 COM assemblies in x64" href="http://support.microsoft.com/kb/956933" rel="tag" target="_blank">does not properly register assemblies.</a>&#160; Turns out the last piece of the solution is pretty simple – couple changes to the project.&#160; What’s happening is that Visual Studio is running the x86 build of regasm.exe to register the assemblies on run, probably because Visual Studio is an x86 app itself.&#160; This results in all kinds of x64 hating… To solve this we have to change two things in the COM enabled projects. </p>
<p>First though, I created a new build configuration called x64 so these changes would not affect in my ANY CPU configuration – which will be used to build my shipping assemblies.&#160; It is also important to note that this problem is MOSTLY only a problem when running code from the IDE.&#160; Assemblies installed and registered using an installer should not have this problem if the installer takes into consideration the “bitness” of AutoCAD (or any application calling your COM enabled dll).&#160; ie.&#160; Installshield asks the user on install what “bitness” of AutoCAD they are using, and the assemblies are registered as needed.&#160; It may also be possible to register an assembly using both the 32 and 64 bit versions of regasm – but I have not tried this.</p>
<p>So with the new x64 configuration created I edited the properties of each COM enabled project&#160; I unchecked “Register for COM interop” and added a post-build event command line of:</p>
<p>%Windir%\Microsoft.NET\Framework64\v2.0.50727\regasm $(TargetPath) /register /codebase /tlb</p>
<p>This would ensure that my COM enabled assemblies were properly registered for use by 64 bit&#160; applications.</p>
<p>After all that, my breakpoints were finally hit, and I could actually start working out the x64 specific bugs. Too bad we couldn’t have moved this to ObjectARX.NET instead – then this would have been a non-issue =)&#160; In retrospect, each of these problems were a contributing factor and each needed to be resolved.&#160; </p>
<p>Hopefully if you are facing a similar issue this post helps you get over at least a couple of the walls!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5798ded2-acee-42cc-a8d5-8b32f9864e3b" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Visual+Lisp" rel="tag">Visual Lisp</a>,<a href="http://technorati.com/tags/AutoCAD" rel="tag">AutoCAD</a>,<a href="http://technorati.com/tags/COM" rel="tag">COM</a>,<a href="http://technorati.com/tags/x64" rel="tag">x64</a>,<a href="http://technorati.com/tags/Visual+Studio" rel="tag">Visual Studio</a>,<a href="http://technorati.com/tags/COM%2b" rel="tag">COM+</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/03/debugging-com-dll-files-in-autocad-x64-and-visual-studio/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing AutoCAD Map 3D 2011 x86 on Vista x64</title>
		<link>http://www.geospecialling.com/index.php/2011/01/installing-autocad-map-3d-2011-x86-on-vista-x64/</link>
		<comments>http://www.geospecialling.com/index.php/2011/01/installing-autocad-map-3d-2011-x86-on-vista-x64/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 05:02:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[AutoCAD]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2011/01/installing-autocad-map-3d-2011-x86-on-vista-x64/</guid>
		<description><![CDATA[Long ago I gave up trying to get both the 64 and 32 bit Oracle clients working on Vista x64.&#160; I have for now adopted the approach that if it talks to Oracle – it needs to be 32 bit.&#160; Even my development projects are set to x86 only to ensure only the 32 bit [...]]]></description>
			<content:encoded><![CDATA[<p>Long ago I gave up trying to get both the <a title="Oracle x86 x64 hell" href="http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/" rel="tag" target="_blank">64 and 32 bit Oracle clients working on Vista x64</a>.&#160; I have for now adopted the approach that if it talks to Oracle – it needs to be 32 bit.&#160; Even my development projects are set to x86 only to ensure only the 32 bit Oracle client is loaded on my development machine.&#160; </p>
<p>I needed to install <a title="AutoCAD Map 3D 2011" href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBYQFjAA&amp;url=http%3A%2F%2Fusa.autodesk.com%2Fadsk%2Fservlet%2Fpc%2Findex%3Fid%3D13818317%26siteID%3D123112&amp;rct=j&amp;q=autocad%20map%202011&amp;ei=DDJHTYufDMzegQfLrJTNAQ&amp;usg=AFQjCNGL_t2Qy5bPlwRpNPkSKmQ7-NgFwA&amp;cad=rja" rel="tag" target="_blank">AutoCAD Map 3D 2011</a>&#160; to debug some <a title="ObjectARX" href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBsQFjAA&amp;url=http%3A%2F%2Fusa.autodesk.com%2Fadsk%2Fservlet%2Findex%3Fid%3D773204%26siteID%3D123112&amp;rct=j&amp;q=objectARX&amp;ei=5TFHTdCIHcXOgAep_NzIAQ&amp;usg=AFQjCNGH82-jEJQxFtDrtrkZvck4kPXd8g&amp;cad=rja" rel="tag" target="_blank">ObjectARX</a> code I’ve been working on so I downloaded the 32 bit installer and fired it up only to be informed that my platform was unsupported and I would need to install the 64 bit version.&#160; grrrr.</p>
<p>Google had very little to say on the topic.&#160; More junk about hacking MSI files with Orca.&#160; I took a look at setup.ini and there were far too many references to x64 – I don’t have time for this…Finally I came across the <a title="Longbow Software Converter" href="http://www.longbowsoftware.com/" rel="tag" target="_blank">Longbow Software Converter</a>.&#160; The product claims to modify your setups to allow the 32 bit installers to work on x64 operating systems, 40$.&#160; I couldn’t find any reviews or testimonials so I figured I’d give it a shot…</p>
<p>So here is your first testimonial Longbow Software =)</p>
<p>This actually worked great.&#160; Bought the convert, installed it to a virtual machine.&#160;&#160; The interface is dead simple – paste or browse to the location of the AutoCAD installation files and press Convert.&#160; Keep in mind if you’re running from a DVD you’ll need to copy the contents of the DVD to your PC or a network share so the files can be edited.&#160; I pointed the converter to an install on a network share.&#160; It chugged away for about a minute (keeping in mind this was on an underpowered VM).&#160; Within a matter of minutes I had AutoCAD Map 3D 2011 installing on my Vista x64 box with no problems.&#160; Ran AutoCAD and it seems to fire up no problem.&#160; </p>
<p>Bear in mind – for AutoCAD to work with anything Oracle – you need to have the 32 bit Oracle client running on your machine.</p>
<p>40$ well spent IMO.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2011/01/installing-autocad-map-3d-2011-x86-on-vista-x64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally an Oracle x64 client that works on Vista &#8211; AKA Getting Map 2010 x64 running with Oracle&#8230;</title>
		<link>http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/</link>
		<comments>http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/#comments</comments>
		<pubDate>Fri, 22 May 2009 22:01:39 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/</guid>
		<description><![CDATA[As my legion of dedicated readers know, I’m an 64 Bit zealot.&#160; I would love to see a Windows task manager free of *32.&#160; It keeps me up at night…well not really but, whatever. =) Autodesk recently released AutoCAD Map 2010 – the first native x64 release.&#160; How could I resist installing that?&#160; I had [...]]]></description>
			<content:encoded><![CDATA[<p>As my legion of dedicated readers know, I’m an 64 Bit zealot.&#160; I would love to see a Windows task manager free of *32.&#160; It keeps me up at night…well not really but, whatever. =) Autodesk recently released <a title="AutoCAD Map 2010" href="http://usa.autodesk.com/adsk/servlet/index?id=3081357&amp;siteID=123112" target="_blank" rel="tag">AutoCAD Map 2010</a> – the first native x64 release.&#160; How could I resist installing that?&#160; I had this funny feeling I would regret this decision.&#160; Somehow, somewhere I just knew I would end up in <a title="Vista Oracle Driver Hell" href="http://www.webrade.com/blogs/darrin/2008/10/23/OracleClientODACOnVistaX64MostlyWorkingFinally.aspx" target="_blank" rel="tag">Vista Oracle Driver Hell</a> once again.&#160; So I installed Map 2010, started it up and tried to connect to my Oracle server.&#160; You guessed it.&#160; Connection Failed.</p>
<p>The problem is this.&#160;&#160; x64 Applications cannot use the x86 driver.&#160; In my previous attempts to get basic Oracle/ODP connectivity on my x64 Vista machine I ended up running the 11g x86 Oracle client.&#160; Today I was back to the Oracle download site – and lookie lookie.&#160; They’ve released an <a title="Oracle x64 Vista/Windows 2008 Client" href="http://www.oracle.com/technology/software/products/database/oracle11g/111070_win64_2008soft.html" target="_blank" rel="tag">Oracle Server 2008 x64 client</a>!&#160; 2008 is basically Vista so, maybe, just maybe – I thought Oracle will give us some x64 love.&#160; Here are some steps that will help you get running:</p>
<p>First thing is first.&#160; Backup your TNSnames.ora.&#160; Its found in the network\admin folder.&#160; </p>
<p>Next I un-installed the x86 11.1.0.6 client.&#160;&#160; Delete the leftovers with windows explorer.</p>
<p>Next download both the 11.1.0.7 client for both x86 and x64 (yes, we need to run with both…)</p>
<p>First I installed the x64 client.&#160; I like to do full runtime installations.&#160; </p>
<p>Next, I copy my backed up tnsnames.ora into the network\admin folder.</p>
<p>Now fire up Map 2010 x64 – connect to Oracle server – Success!&#160; Happy Happy Days.&#160; Unfortunately, fire up <a title="Toad for Oracle" href="http://www.quest.com/toad-for-oracle/" target="_blank" rel="tag">Toad for Oracle</a> (which is still 32 bit) and it fails with an error of “Cannot find OCI.DLL”.&#160; Doh.</p>
<p>So, I go ahead and install the Oracle 11.1.0.7&#160; x86 client.&#160; I install it to the client_2 folder.&#160; Then copy my tnsnames backup into the network\admin folder in the client_2 folder.&#160; Restart Toad, and success! </p>
<p>Now I want to check one last thing.&#160; Last time I was dealing with this fun issue – I had to set my development projects to only run in x86 mode.&#160; So, I fire up my <a title="FullCircle - Excel to Database / Database to Excel" href="http://www.landoris.com/Solutions/FullCircle/" target="_blank" rel="tag">FullCircle</a> development project and try it out.&#160; Running IIS in x86 mode works.&#160;&#160; Running IIS in x64 mode failed..</p>
<p>The &#8216;MSDAORA&#8217; provider is not registered on the local machine</p>
<p>It seems the Microsoft MSDAORA provider doesn’t exist in x64 – so change your connection to use the Oracle OraOLEDB.Oracle instead and x64 projects run no problem.&#160; It would be perfect to one day get one install that does both x86 and x64 – but for now, I’m content with this setup.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:11f220e3-6c4c-4deb-b192-94e77f7b166c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Oracle" rel="tag">Oracle</a>,<a href="http://technorati.com/tags/Vista" rel="tag">Vista</a>,<a href="http://technorati.com/tags/x64" rel="tag">x64</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/05/finally-an-oracle-x64-client-that-works-on-vista-aka-getting-map-2010-x64-running-with-oracle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ODAC/ODP.NET on Vista x64</title>
		<link>http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/</link>
		<comments>http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 13:11:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ODP.NET]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/</guid>
		<description><![CDATA[Since moving to Vista x64 I&#8217;ve had a heck of a time with Oracle clients.&#160; The one thing I could not get working until tonight was ODP with Visual Studio / .NET.&#160; Finally I found a solution. First, download and install Oracle 11g ODAC and Oracle Developer Tools for Visual Studio. (Link requires registration)&#160;&#160; This [...]]]></description>
			<content:encoded><![CDATA[<p>Since moving to Vista x64 I&#8217;ve had a heck of a time with Oracle clients.&#160; The one thing I could not get working until tonight was ODP with Visual Studio / .NET.&#160; Finally I found a solution. </p>
<p>First, download and install <a title="Oracle ODAC 11g" href="http://www.oracle.com/technology/software/tech/dotnet/utilsoft.html" target="_blank" rel="tag">Oracle 11g ODAC and Oracle Developer Tools for Visual Studio</a>. (Link requires registration)&#160;&#160; This should get the 32bit stuff installed.&#160;&#160; I&#8217;m still using an Oracle 10g R2 server.&#160; You will likely need to grab a copy of the TNSnames.ora for your existing client folder and place it in the appropriate tree of the 11g product home.</p>
<p>This however is not enough to get .NET working with ODP.&#160; Go to the folder where you extracted the zip.&#160; We need to find the Oracle.DataAccess.dll.&#160; This can be found in the file named filegroup4.jar, in the stage\components\oracle.ntoledb.odp_net_2.&#160; Winrar will open .jar files if needed.&#160; Extract the Oracle.DataAscess.dll file.</p>
<p>For now, I&#8217;ve put a copy of this file in my projects lib folder.&#160; I then added a reference directly to this file from all projects that need ODP access.&#160; </p>
<p>Keep in mind &#8211; before you ship you may want to remove this reference and ensure that the .DLL file doesn&#8217;t get included in your build.&#160; This should get your Vista x64 box developing with ODP.</p>
<p>To Oracle &#8211; come on guys.&#160; Give us some Vista x64 love!</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:123a6d8a-f567-47ae-a3ec-b8a415d2eaf3" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/.NET" rel="tag">.NET</a>,<a href="http://technorati.com/tags/ODP.NET" rel="tag">ODP.NET</a>,<a href="http://technorati.com/tags/Oracle" rel="tag">Oracle</a>,<a href="http://technorati.com/tags/Vista" rel="tag">Vista</a>,<a href="http://technorati.com/tags/X64" rel="tag">X64</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2008/07/odacodp-net-on-vista-x64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

