Error loading shapefile in Arcobject c# : Exception from HRESULT: 0x80040228

0

I want to read a shapefile by Arcobject and C#. I used the ArcGIS Snippet and write follow code:

ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);
IWorkspaceFactory wsf = new ShapefileWorkspaceFactory();
IWorkspace ws = wsf.OpenFromFile(@"E:\Data\shap file iran\IRN_adm\", 0);
IFeatureWorkspace fws = ws as IFeatureWorkspace;
IFeatureClass fc = fws.OpenFeatureClass("Province.shp");

but in line 3 returned error:

Exception from HRESULT: 0x80040228

Whats the matter?

c#
shapefile
arcobjects
asked on Stack Overflow Oct 15, 2015 by Mahdi Ahmadi • edited Oct 15, 2015 by Soner Gönül

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0