Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 what's 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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...