AE开发时遇到的一些问题

问题:

在进行AE开发时:
检索 COM 类工厂中 CLSID 为 {D9B4FA40-D6D9-11D1-AA81-00C04FA33A15} 的组件失败,原因是出现以下错误: 80040111 ClassFactory 无法供应请求的类 (异常来自 HRESULT:0x80040111 (CLASS_E_CLASSNOTAVAILABLE))。

解决:

在执行创建语句前,增加一行代码:ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server);   问题解决了。

原因:

使用AE的某些COM组件,需要声明绑定产品许可。


问题:

The Product License has not been initialized

报错原因:未初始化许可证

解决方法:

AE10.1以前版本

             IAoInitialize m_AoInitialize = new AoInitialize();
              m_AoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo);

                 将上面两句代码放到下面的代码之上

AE10的与AE10.1以后版本的对应关系

esriLicenseProductCodeArcInfo ==》esriLicenseProductCodeAdvanced

esriLicenseProductCodeArcEditor==》esriLicenseProductCodeStandard

esriLicenseProductCodeArcView ==》esriLicenseProductCodeBasic





猜你喜欢

转载自blog.csdn.net/baidu_23263735/article/details/78471702