This is new. I run the MFC wizard with all the defaults, set all the
right switches to get it to compile with managed extensions, did a
#using on System.Windows.Forms.dll, #undef'd MessageBox and run the
following line of code in OnAppAbout:

System::Windows::Forms::MessageBox::Show(S"Ain't .NET cool?");

When I build the debug build, run the app, show the message box in a
debug build and close the app, I get the following assertion:

File: cmdtarg.cpp
Line: 48

While is the following code:

CCmdTarget::~CCmdTarget()
{
#ifndef _AFX_NO_OLE_SUPPORT
        if (m_xDispatch.m_vtbl != 0)
                ((COleDispatchImpl*)&m_xDispatch)->Disconnect();
        ASSERT(m_dwRef <= 1); // <-- cmdtarg.cpp(48)
#endif
#ifdef _AFXDLL
        m_pModuleState = NULL;
#endif
}

This isn't the much heralding IJW that I've come to know and love.
Anyone have a clue?

Chris Sells
http://www.sellsbrothers.com/

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to