laptop and a wrench

Error

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

Última publicación: August 25, 2014 ArcGIS Engine
Número de ID del error NIM060178
EnviadoAugust 18, 2010
Última modificaciónJune 5, 2024
Relacionado conArcGIS Engine
Versión encontrada10.0 Beta
Lenguaje del programaAll
Sistema operativoWindows OS
Versión de sistema operativo7 64 Bit
Versión corregida10.1
EstadoFixed

Solución alternativa

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();

Pasos para reproducir

ID del error: NIM060178

Software:

  • ArcGIS Engine

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga