在Arcobject c#中加载shapefile时出错:来自HRESULT的异常:0x80040228

时间:2015-10-15 06:28:24

标签: c# shapefile arcobjects

我想通过Arcobject和C#读取shapefile。我使用了ArcGIS Snippet并编写了以下代码:

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

但在第3行返回错误:

  

HRESULT的异常:0x80040228

是什么事?

0 个答案:

没有答案