laptop and a wrench

漏洞

ArcMap dataview does not rendered correctly if it is opened from the ArcObject sample application “DesktopAutomation.”

上次发布: August 19, 2020 ArcGIS for Desktop
漏洞 ID 编号 NIM088363
已提交January 24, 2013
上次修改时间June 5, 2024
适用范围ArcGIS for Desktop
找到的版本10.1
编程语言C#
操作系统Windows OS
操作系统版本7 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.

解决办法

Currently the sample starts the application using the MxDocument class where they can get the application reference from the MxDocument that was just started. The workaround involves starting the process using the standard .NET Process class then utilizes the AppROT AppAdded event handler to obtain the application reference. //import user32.dll to call GetWindowThreadProcessId[System.Runtime.InteropServices.DllImport("user32")]static extern int GetWindowThreadProcessId(IntPtr hWnd, out int processId); private void btnStartApp_Click(object sender, EventArgs e){ m_appROTEvent = new AppROTClass(); m_appROTEvent.AppAdded += new IAppROTEvents_AppAddedEventHandler(m_appROTEvent_AppAdded); m_appROTEvent.AppRemoved += new IAppROTEvents_AppRemovedEventHandler(m_appROTEvent_AppRemoved); System.Diagnostics.Debug.WriteLine("Starting process " + DateTime.Now); Process arcMapProcess = Process.Start(@"<a href="file:C:/Program" target="_blank">C:\Program</a> Files (x86)\ArcGIS\Desktop10.1\bin\ArcMap.exe"); //get the ID of the process that was just started arcMapProcessId = <a href="http://arcMapProcess.Id" target="_blank">arcMapProcess.Id</a>; while (!m_appStarted) Application.DoEvents(); ////Enable/disable controls accordingly txtShapeFilePath.Enabled = true; btnShutdown.Enabled = true; btnDrive.Enabled = ShouldEnableAddLayer; cboApps.Enabled = btnStartApp.Enabled = false;}void m_appROTEvent_AppAdded(AppRef pApp){ //get the ID of the app that was just added GetWindowThreadProcessId((IntPtr)pApp.hWnd, out appAddedProcessId); // compare the IDs to know that you have the correct application instance if (appAddedProcessId == arcMapProcessId) { //Get a reference of the application and make it visible m_application = pApp; m_application.Visible = true; m_appHWnd = m_application.hWnd; System.Diagnostics.Debug.WriteLine("HWND from AppAdded " + m_appHWnd.ToString() + " " + DateTime.Now); m_appStarted = true; }}

重现步骤

漏洞 ID: NIM088363

软件:

  • ArcGIS for Desktop

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项