Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem using CLR in MFC ActiveX controls

Problem using CLR in MFC ActiveX controls

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++debugginghelpdotnet
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    astibich2
    wrote on last edited by
    #1

    I recently discovered MFC support for winforms, and have been using it to host .Net Controls in my MFC activeX controls. This all worked beautifully, until recently when we started getting an assertion from msilexit.cpp during shutdown of the hosting application. The assertion is due to a user breakpoint, which originates from the __clrcall _exit_callback function. extern "C" void __clrcall _exit_callback(void) { ... if ( *__onexitend != NULL ) (**__onexitend)(); ... } Here are the facts that I have been able to collect. 1. There are no exceptions generated after you dismiss the assertion. 2. The application seems to have no problems in release. 3. There seems to be a correlation between the assertion and the number of "clr enabled" activeX libraries that have been loaded into memory. The magic number seems to be three. If you only load two "clr enabled" activeX's during the application lifetime, no assertion. My output window, when the assertion occurs, looks like this: 'VRExplorer.exe': Unloaded 'F:\VirtualRack\Trunk\Source\BuiltComponents\Debug\VRSystem\VRGUIControls.ocx' 'VRExplorer.exe': Unloaded 'F:\VirtualRack\Trunk\Source\BuiltComponents\Debug\VRSystem\VRGUIPanelWatch.ocx' 'VRExplorer.exe': Unloaded 'F:\VirtualRack\Trunk\Source\BuiltComponents\Debug\VRSystem\VRServiceLoggerPanel.ocx' 'VRExplorer.exe': Unloaded 'F:\VirtualRack\Trunk\Source\BuiltComponents\Debug\VRSystem\VRBitmaps.ocx' The thread 0x11d4 has exited with code 0 (0x0). The thread 0x16ec has exited with code 0 (0x0). The thread 0x230 has exited with code 0 (0x0). The thread 0x11bc has exited with code 0 (0x0). VRExplorer.exe has triggered a breakpoint Thanks for your help, Aaron

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups