laptop and a wrench

Bogue

IMapControl's AddShapeFile C++ method returns 'E_UNEXPECTED' in Engine applications created with VS 2003.

Dernière publication: August 25, 2014 No Product Found
Numéro d’ID de bogue NIM005635
EnvoiDecember 15, 2006
Dernière modificationJune 5, 2024
S’applique àNo Product Found
Version trouvée9.1
Version de correction9.2
StatutFixed

Solution de contournement

add the shapefile by using the AddLayer method, something like: CComPtr<IWorkspaceFactory> pWorkspaceFactory; CComPtr<IWorkspace> pWorkspace; nEC = pWorkspaceFactory.CoCreateInstance(CLSID_ShapefileWorkspaceFactory); nEC = pWorkspaceFactory->OpenFromFile(L"<a href="file:C://Temp//USA" target="_blank">C:\\Temp\\USA</a>", NULL,&pWorkspace); nEC = pWorkspace->QueryInterface(IID_IFeatureWorkspace,(LPVOID*)&piFWS); nEC = piFLayer1.CoCreateInstance(CLSID_FeatureLayer); nEC = piFWS->OpenFeatureClass(L"cities.shp",&piOutputFC); nEC = piFLayer1->putref_FeatureClass(piOutputFC); nEC = piOutputFC->get_AliasName(&cbstrFName); nEC = piFLayer1->put_Name(cbstrFName); nEC = piMapControl->AddLayer(piFLayer1,0);

Étapes pour reproduire

ID de bogue: NIM005635

Logiciel:

  • No Product Found

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