locked
Problem of the VB6 User Control Containing both VB6 User Controls and VB .NET User Controls RRS feed

  • General discussion

  • I have a project requiring:

     

    1) Frist put a VB6 user control (ControlVB6-1) and a VB .NET user control (ControlVBNET-1) in a new VB6 user control (ControlVB6-2). 

    2) Then put this new VB6 user control (ControlVB6-2) on a VB6 form of a new EXE application.

     

    Next I ran the application from IDE. The program seems working fine until it is being closed. The error message popped up as below:


    ControlVB6-1

    Run-time error: '-2147418105 (80010007)':

     

    Automation Error

    The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.


     

    Then when you close the IDE, there appear some other random crash error messages, such as:


    vb6.exe - Application Error

    The instruction at "0x22e2c4b" referenced memory at "0x00000022". The memory could not be "written". Click on OK to terminate the program.


     

    However if I put the VB6 user control (ControlVB6-1) and VB .NET user control (ControlVBNET-1) directly on the VB6 form of the new EXE application, there seem no error messages popping up when closing the program and IDE.

     

    Would you please help me figure out what the problem is? Thanks!

     

    Iris

    Tuesday, July 10, 2007 4:34 PM

All replies

  • Are you using the InteropForms toolkit to build your .net usercontrol btw?  It's not clear from the above post.

     

    If you aren't then, you might try using this toolkit instead.

     

    If you are, however, we don't support hosting .net user controls in a vb6 user control since (from my testing anyway), you cannot even get the controls to be hosted in the VB6 usercontrol designer due to a winforms bug (that will be fixed in an upcoming SP to the .net runtime).   I'm surprised you are even getting that far as to be able to run the program.

     

    However, if you are (and you are using the toolkit), try compiling your app to an .exe and running the .exe directly.   Does that crash on exit?

     

    Toddap_MS

    Tuesday, July 17, 2007 4:36 PM
    Moderator