Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Shopmotion


Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
free forum
 
November 2018
MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
2627282930  

Calendar Calendar


64-bit Windows and ArcGIS

Go down

64-bit Windows and ArcGIS

Post  prabhat on Sat Mar 15, 2008 3:51 am

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.
avatar
prabhat
GIS Geek

Posts : 19
Join date : 2008-03-15
Age : 35
Location : Kanpur India

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum