seawaterblue

why my C# DLL is error?

Discussion created by seawaterblue on Dec 14, 2012
i use the ARCGIS DESKTOP9.3   C#  sample at "ArcGIS\DeveloperKit\SamplesNET\Desktop\CommandInheritingBaseCommand\CSharp\CommandInheritingBaseCommand",I register the  result ZoomToLayer.dll to arcmap and it works,but when i exit the arcmap.exe then error appear as follows
[ATTACH=CONFIG]19936[/ATTACH]

and the hint is


�??�?��?�?��?�?�(JIT)�?�?�??不�?�此对话�?�??详�?信息�?
请�?见此�?息�??�?尾�??

************** �?常�??�?� **************
System.AccessViolationException: 尝�?读�?�??�??�?��?保�?��??�??�?�??�?�??常�??示�?��?�??�?已�?坏�??
   �?� System.Windows.Forms.UnsafeNativeMethods.IOleInPlaceObject.GetWindow(IntPtr& hwnd)
   �?� System.Windows.Forms.AxHost.WndProc(Message& m)
   �?� System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   �?� System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   �?� System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** 已�?�载�??�?序�?? **************
mscorlib
    �?序�??�??�?�: 2.0.0.0
    Win32 �??�?�: 2.0.50727.3053 (netfxsp.050727-3000)
    �?��?�代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ContentsView
    �?序�??�??�?�: 1.0.4727.37063
    Win32 �??�?�: 1.0.4727.37063
    �?��?�代码: file:///C:/ContentsView.DLL
----------------------------------------
ESRI.ArcGIS.ArcMapUI
    �?序�??�??�?�: 9.3.0.1770
    Win32 �??�?�: 9.3.0.1770
    �?��?�代码: file:///C:/WINDOWS/assembly/GAC_MSIL/ESRI.ArcGIS.ArcMapUI/9.3.0.1770__8fc3cc631e44ad86/ESRI.ArcGIS.ArcMapUI.dll
----------------------------------------
System.Windows.Forms
    �?序�??�??�?�: 2.0.0.0
    Win32 �??�?�: 2.0.50727.3053 (netfxsp.050727-3000)
    �?��?�代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    �?序�??�??�?�: 2.0.0.0
    Win32 �??�?�: 2.0.50727.3053 (netfxsp.050727-3000)
    �?��?�代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    �?序�??�??�?�: 2.0.0.0
    Win32 �??�?�: 2.0.50727.3053 (netfxsp.050727-3000)
    �?��?�代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
ESRI.ArcGIS.AxControls
    �?序�??�??�?�: 9.3.0.1770
    Win32 �??�?�: 9.3.0.1770
    �?��?�代码: file:///C:/WINDOWS/assembly/GAC_MSIL/ESRI.ArcGIS.AxControls/9.3.0.1770__8fc3cc631e44ad86/ESRI.ArcGIS.AxControls.dll
----------------------------------------
ESRI.ArcGIS.Controls
    �?序�??�??�?�: 9.3.0.1770
    Win32 �??�?�: 9.3.0.1770
    �?��?�代码: file:///C:/WINDOWS/assembly/GAC_MSIL/ESRI.ArcGIS.Controls/9.3.0.1770__8fc3cc631e44ad86/ESRI.ArcGIS.Controls.dll
----------------------------------------
Accessibility
    �?序�??�??�?�: 2.0.0.0
    Win32 �??�?�: 2.0.50727.3053 (netfxsp.050727-3000)
    �?��?�代码: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Windows.Forms.resources
    �?序�??�??�?�: 2.0.0.0
    Win32 �??�?�: 2.0.50727.3053 (netfxsp.050727-3000)
    �?��?�代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
    �?序�??�??�?�: 2.0.0.0
    Win32 �??�?�: 2.0.50727.3053 (netfxsp.050727-3000)
    �?��?�代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------

************** JIT �?�? **************
要启�?��?�?�(JIT)�?�?�?
该�?�?��?序�??计�?�?��?? .config �??件(machine.config)�?? system.windows.forms �??中�?须设置
jitDebugging �?��??
�?�?�?�?��?序�?��?�?须启�?�
�?�?�??

�?�?:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

启�?� JIT �?�?�?�?任�?�?��?�?�?�??�?常
�?��?被�?�?��?��?�此计�?�?��?注�??�?? JIT �?�?�?��?
�??不�?��?�此对话�?�?�?�??

Attachments

Outcomes