locked
VB6 Active X DLL called within VB.NET Stability Analysis Question RRS feed

  • Question

  • Summary

    Request help debugging and ensuring that the following is stable; - VB6 Active X DLL called within VB.NET Version 2 Windows Forms application. For example finding the source of an exception error.

     

    Detail

    The main issue potentially outstanding is a programmatically customised VB6 TreeView Active X control. This control worked straight away called within a test VB.NET project using interoperability. However when I tried to use the same TreeView Active X control within a number of forms within the main application  I got the following exception error; -

     

    “An unhandled exception of type ‘System.AccessViolationException’ occurred in AxInterop.TreeView.dll’

     

    Additional Information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.”

     

    I thought an idea to try and identify any area of instability would be to step from the  Debugger in VB.NET (Main Application) into the VB6 Debugger (Active X) to analyse more closely any potential area of instability. I followed the instructions to achieve this on page 182

    of ; -http://msdn.microsoft.com/vbrun/staythepath/additionalresources/upgradingvb6/chapter9.pdf

     

    1. Run Visual Basic 6 and load the application you want to debug

    2. From the Project menu, choose Project Properties.

    3. Click the Compile tab and select Create Symbolic Debug Info.

    4. For best results, select No Optimization.

    5. Click the Component tab.

    6. Change the Version Compatibility setting from Project Compatibility to Binary Compatibility

     

    Step 6 generates the following error; - “Unable to set the version compatible component: “.

     

    Any ideas how I can fix this error?

    Thursday, September 28, 2006 2:54 PM