HI all,
I have a very simple c# app with just one form (normal form) that loads a manually converted VB6 ocx with
Assembly ctlAssembly = Assembly.LoadFrom("AxControl.dll");
ctlType = ctlAssembly.GetTypes()[0];
tmpCtrl = Activator.CreateInstance(ctlType) as Control;
this.Controls.Add (tmpCtrl);
This ocx works fine in the VB app. However, it just crash the C# app each time I close down the C# app with this Application Error:
"The instruction at "....." referenced memory at "....". The memory could not be "read". Click on OK to terminate the program".
I checked the that ocx was killed property (like it runs the UserControl_Terminate method). I got no clue on whats happening. It works for my other VB controls.
What else should I check? What does the "memory could not be "read" message means?
Thanks alot,
Winnie
I have a very simple c# app with just one form (normal form) that loads a manually converted VB6 ocx with
Assembly ctlAssembly = Assembly.LoadFrom("AxControl.dll");
ctlType = ctlAssembly.GetTypes()[0];
tmpCtrl = Activator.CreateInstance(ctlType) as Control;
this.Controls.Add (tmpCtrl);
This ocx works fine in the VB app. However, it just crash the C# app each time I close down the C# app with this Application Error:
"The instruction at "....." referenced memory at "....". The memory could not be "read". Click on OK to terminate the program".
I checked the that ocx was killed property (like it runs the UserControl_Terminate method). I got no clue on whats happening. It works for my other VB controls.
What else should I check? What does the "memory could not be "read" message means?
Thanks alot,
Winnie