none
ExecutionEngineException when try to add a control from interop assembly to WinForm RRS feed

  • Question

  • Hi Guys,

    I have recently converted a .NET 1.1 project to .NET 2.0. There is a control in a interop assembly which is used in code, when I try to add the control to the Form by calling Me. Controls.Add I get a ExecutionEngineException with the following call stack:

      mscorlib.dll!System.Runtime.InteropServices.Marshal.PtrToStructure(System.IntPtr ptr, System.Type structureType) + 0x5d bytes 
      System.Windows.Forms.dll!System.Windows.Forms.MenuItem.GetMenuItemFromItemData(System.IntPtr itemData = 2000774112) + 0x68 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.Control.WmMeasureItem(ref System.Windows.Forms.Message m = {msg=0x2c (WM_MEASUREITEM) hwnd=0xa0a44 wparam=0x0 lparam=0x12c30c result=0x0}) + 0x81 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m = {msg=0x2c (WM_MEASUREITEM) hwnd=0xa0a44 wparam=0x0 lparam=0x12c30c result=0x0}) + 0x448 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc(ref System.Windows.Forms.Message m = {msg=0x2c (WM_MEASUREITEM) hwnd=0xa0a44 wparam=0x0 lparam=0x12c30c result=0x0}) + 0x73 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m = {msg=0x2c (WM_MEASUREITEM) hwnd=0xa0a44 wparam=0x0 lparam=0x12c30c result=0x0}) + 0x21 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m = {msg=0x2c (WM_MEASUREITEM) hwnd=0xa0a44 wparam=0x0 lparam=0x12c30c result=0x0}) + 0xd2 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd = 657988, int msg = 44, System.IntPtr wparam = 0, System.IntPtr lparam = 1229580) + 0x96 bytes 
      [Native to Managed Transition] 
      [Managed to Native Transition] 
      System.Windows.Forms.dll!System.Windows.Forms.AxHost.DoVerb(int verb = -5) + 0x10e bytes 
      System.Windows.Forms.dll!System.Windows.Forms.AxHost.InPlaceActivate() + 0x36 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.AxHost.TransitionUpTo(int state = 4) + 0x16d bytes 
      System.Windows.Forms.dll!System.Windows.Forms.AxHost.CreateHandle() + 0xa1 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.Control.CreateControl(bool fIgnoreVisible = true) + 0xc0 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.Control.CreateControl(bool fIgnoreVisible = true) + 0x188 bytes 
      System.Windows.Forms.dll!System.Windows.Forms.AxHost.EndInit() + 0x3f bytes 
      myDLL.dll!Casus.frmMain.InitializeComponent() Line 1254 + 0x1c bytes Basic

    Any help, suggestions or idea's are appriciated.

    Orhan
    Monday, May 25, 2009 9:02 AM

Answers