64-bit Windows and ArcGIS
Page 1 of 1
64-bit Windows and ArcGIS
So we predominantly use C# for development at TC Technology for many reasons which I will leave for a different post. During 64-bit testing though we found that it can be interesting when dealing with:
* 64-bit Windows
* ArcGIS 9.2
* .NET 2.0
at the same time. When trying to initialize AO using the following code
IAoInitialize init = new AoInitializeClass();
it fails with an error like this:
System.Runtime.InteropServices.COMException
Retrieving the COM class factory for component with CLSID {2237A429-E4AC-40D6-96A5-5B6CCF40D56B} failed due to the following error: 80040154.
We did some digging and, thankfully, someone has already figured it out. It turns out that if you build any .NET code with the ‘Any CPU’ option which is the default then ArcObjects based applications fail. This makes sense as the c++ dlls that are built for AO are 32-bit so the application/assemblies that are consuming them also need to be 32-bit.
Fixing the problem is pretty easy (although if you have a bunch of assemblies like we do tedious!).
First thing to do is select ‘Configuration Manager’ from the Solution Platforms drop down (the one with ‘Any CPU right now’):
It actually brings up the same configuration window as the Debug/Release configuration!
From the ‘Active solution platforms’ drop-down select ‘New’:
image
and from the resultant ‘New Solution Platform’ select x86. This is create a new configuration for x86 only. This way when it is run on a 64-bit environment the OS will know that it should be run as a 32-bit application.
* 64-bit Windows
* ArcGIS 9.2
* .NET 2.0
at the same time. When trying to initialize AO using the following code
IAoInitialize init = new AoInitializeClass();
it fails with an error like this:
System.Runtime.InteropServices.COMException
Retrieving the COM class factory for component with CLSID {2237A429-E4AC-40D6-96A5-5B6CCF40D56B} failed due to the following error: 80040154.
We did some digging and, thankfully, someone has already figured it out. It turns out that if you build any .NET code with the ‘Any CPU’ option which is the default then ArcObjects based applications fail. This makes sense as the c++ dlls that are built for AO are 32-bit so the application/assemblies that are consuming them also need to be 32-bit.
Fixing the problem is pretty easy (although if you have a bunch of assemblies like we do tedious!).
First thing to do is select ‘Configuration Manager’ from the Solution Platforms drop down (the one with ‘Any CPU right now’):
It actually brings up the same configuration window as the Debug/Release configuration!
From the ‘Active solution platforms’ drop-down select ‘New’:
image
and from the resultant ‘New Solution Platform’ select x86. This is create a new configuration for x86 only. This way when it is run on a 64-bit environment the OS will know that it should be run as a 32-bit application.
prabhat- GIS Geek
- Posts : 19
Join date : 2008-03-15
Age : 41
Location : Kanpur India
Similar topics
» Looking for maps to include in your ArcGIS apps? Try ArcGIS Online
» GISTT Demo in Arcgis
» ArcGIS 9.3: ESRI Resource Centers
» ArcGIS Desktop 9.3: New KML Export Support
» ESRI ArcGIS Explorer OpenGL
» GISTT Demo in Arcgis
» ArcGIS 9.3: ESRI Resource Centers
» ArcGIS Desktop 9.3: New KML Export Support
» ESRI ArcGIS Explorer OpenGL
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Thu Jul 28, 2011 11:51 pm by Ronney
» Chicago Festival of maps continues
Sat Dec 26, 2009 9:53 am by victoria justice
» Province of BC unlocks digital data and strikes a deal with Google
Sat Dec 26, 2009 9:47 am by victoria justice
» share GPS tracks via Google Earth
Sat Dec 26, 2009 9:45 am by victoria justice
» GIS for Web Developers: Adding ‘Where’ to Your Web Applications
Sat Mar 14, 2009 1:34 am by prabhakar
» How to Design a GIS Project
Thu Dec 25, 2008 4:37 am by sean flynn
» ArcGIS Desktop 9.3: New KML Export Support
Thu Dec 25, 2008 4:34 am by sean flynn
» ArcGIS 9.3: ESRI Resource Centers
Thu Dec 25, 2008 4:25 am by sean flynn
» Help for interview..urgent
Wed Aug 27, 2008 3:28 am by ironore