cl991036
管理员
管理员
  • 注册日期2003-07-25
  • 发帖数5917
  • QQ14265545
  • 铜币29669枚
  • 威望217点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • GIS帝国铁杆
阅读:1784回复:0

ArcEngine9.3 没有原生支持64位,而是以32位兼容方式运行

楼主#
更多 发布于:2010-03-09 08:56
VS2008在64位Windows平台上编译ArcEngine导致HRESULT:0x80040154
(REGDB_E_CLASSNOTREG)错误的解决办法。<br><br>VS2008 在64位的系统(XP/Vista/Win7均是)中编译ArcEngine(9.3SP1)并运行时提示:</p>
<p>没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))</p>
<p>原因:ArcEngine9.3没有原生支持64位,而是以32位兼容方式运行</p>
<p>解决办法:在项目属性里设置“生成”=>“目标平台”为x86而不是默认的ANY CPU.</p>
<p>ESRI官方也是这么解决的:</p>
<p><a href="http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow;d=33000" target="_blank" >http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow;d=33000</a></p>
<p>Bug:  Error: Class not registered(Exception from HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG) </p>
<table border="0">

<tr>
<th valign="top">Article ID:</th>
<td valign="top">33000</td></tr>
<tr>
<th valign="top">Bug Id:</th>
<td valign="top">NIM007516</td></tr>
<tr>
<th valign="top">Software:</th>
<td valign="top"> <strong>ArcGIS Engine Runtime</strong> 9.2, 9.3</td></tr>
<tr>
<th valign="top">Platforms:</th>
<td valign="top"> <strong>Windows</strong> 2000, XP</td></tr></table>

<h4>Description</h4>
<div>Running an application from Visual Studio 2005 on 64-bit computers,
 displays the following error message: <br><br>"Error : Class not
registered(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)"</div>
<h4>Cause</h4>
<div>When running a Visual Studio application, the default Common
Language Runtime (CLR) platform in the Visual Studio is set to Any CPU.
This default must be changed on 64-bit computers to compile the
assemblies with the 32-bit, x86 compatible CLR.</div>
<h4>Workaround</h4>
<div>Change the default Platform Target CPU to allow applications to run
 on 64-bit machines:<br><br>
<ol><li>Right-click on the solution in the Visual Studio Solution
Explorer and open the Properties window.</li><li>Click the compile tab:
Visual Basic, or the build tab: Visual C#.</li><li>For Visual Basic,
click the Advanced tab.</li><li>Select x86 as the Target CPU (Visual
Basic) or Platform Target (Visual C#).</li><li>Rebuild the solution. </li></ol></div>
<p><em><br></em></p><br>
喜欢0 评分0
没钱又丑,农村户口。头可断,发型一定不能乱。 邮箱:gisempire@qq.com
游客

返回顶部