laptop and a wrench

漏洞

The error, "Error HRESULT E_FAIL has been returned from a call to a COM component" displays with IEnumStyleGalleryItem.Next method.

上次发布: August 25, 2014 ArcGIS Engine
漏洞 ID 编号 NIM060178
已提交August 18, 2010
上次修改时间June 5, 2024
适用范围ArcGIS Engine
找到的版本10.0 Beta
编程语言All
操作系统Windows OS
操作系统版本7 64 Bit
修正版本10.1
状态Fixed

解决办法

The sample executes successfully after adding the statement 'gallery.Clear();' is added. IStyleGallery gallery = new ServerStyleGalleryClass(); gallery.Clear(); IStyleGalleryStorage galleryStorage = (IStyleGalleryStorage)gallery; galleryStorage.AddFile("ESRI.ServerStyle"); IEnumStyleGalleryItem styleGalleryItems = gallery.get_Items("Color Ramps", "", "Default Ramps"); styleGalleryItems.Reset(); IStyleGalleryItem galleryItem = styleGalleryItems.Next(); while (galleryItem != null) { if (galleryItem.Category == "Default Ramps") { } galleryItem = styleGalleryItems.Next(); }or another workaround option:Replace: IStyleGallery gallery = new ServerStyleGalleryClass();With IStyleGallery gallery = new ESRI.ArcGIS.Framework.StyleGalleryClass();

重现步骤

漏洞 ID: NIM060178

软件:

  • ArcGIS Engine

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项