laptop and a wrench

漏洞

The IFeatureSelection.SelectFeatures Method throws (RPC_E_SERVERFAULT ) exceptions when called with a query filter on an ArcMap dataset from an external Windows Forms application

上次发布: December 22, 2016 ArcObjects SDK
漏洞 ID 编号 BUG-000096943
已提交June 7, 2016
上次修改时间June 5, 2024
适用范围ArcObjects SDK
找到的版本10.4
操作系统Windows OS
操作系统版本7.0 64 Bit
状态Will Not Be Addressed

附加信息

We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.

解决办法

Use the IObjectFactory ArcObjects to get around the problem:C# Code:[STAThread()] static void Main(string[] args) { //ESRI License Initializer generated code. m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeBasic, esriLicenseProductCode.esriLicenseProductCodeStandard, esriLicenseProductCode.esriLicenseProductCodeAdvanced }, new esriLicenseExtensionCode[] { }); //ESRI License Initializer generated code. IAppROT pROT = new AppROT(); int itmCnt = 0; IApplication pAPP = null; while (itmCnt < pROT.Count) { pAPP = pROT.Item[itmCnt]; if (<a href="http://pAPP.Name" target="_blank">pAPP.Name</a> == "ArcMap") break; itmCnt++; } IMxDocument pMX = pAPP.Document as IMxDocument; IFeatureLayer pFL = pMX.FocusMap.Layer[0] as IFeatureLayer; IFeatureSelection pFSel = pFL as IFeatureSelection; ///TestConsole application space IQueryFilter pQF = new QueryFilter(); /// appRot application space IObjectFactory objectFactory = (IObjectFactory)pAPP; IPersist persist = (IPersist)pQF; System.Guid typeClassID; persist.GetClassID(out typeClassID); pQF = (IQueryFilter)objectFactory.Create(typeClassID.ToString("B")); pQF.WhereClause = "1=1"; IFeatureClass FC = pFL.FeatureClass; IFeatureCursor pFeatCursor = FC.Search(pQF, false); //pFSel.SelectionSet.Select(pQF, esriSelectionType.esriSelectionTypeHybrid, esriSelectionOption.esriSelectionOptionNormal, ((IDataset)pFL.FeatureClass).Workspace); pFSel.SelectFeatures(pQF, esriSelectionResultEnum.esriSelectionResultNew, true); //Do not make any call to ArcObjects after ShutDownApplication() }

重现步骤

漏洞 ID: BUG-000096943

软件:

  • ArcObjects SDK

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项