laptop and a wrench

Bogue

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

Dernière publication: August 25, 2014 ArcGIS Engine
Numéro d’ID de bogue NIM060178
EnvoiAugust 18, 2010
Dernière modificationJune 5, 2024
S’applique àArcGIS Engine
Version trouvée10.0 Beta
Langue du programmeAll
Système d’exploitationWindows OS
Version du système d’exploitation7 64 Bit
Version de correction10.1
StatutFixed

Solution de contournement

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

Étapes pour reproduire

ID de bogue: NIM060178

Logiciel:

  • ArcGIS Engine

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement