ref-count problem after showing a .NET form in a MFC app 
Author Message
 ref-count problem after showing a .NET form in a MFC app

Hi all,

I have a good old MFC application that instanciates a .NET form and
brings it up to the screen. After closing this .NET from and quitting
the MFC application the code breaks at the assertion line in
CCmdTarget's deconstructor:

        if (m_xDispatch.m_vtbl != 0)
        ASSERT(m_dwRef <= 1);
#ifdef _AFXDLL
        m_pModuleState = NULL;


Any idea why the reference counter gets not decreased?
I'm working with VS.NET 2003 Final Beta.

Any help would be greatly appreciated.
Thanx in advance.

Mon, 19 Sep 2005 15:29:58 GMT  
 [ 1 post ] 

 Relevant Pages 

1. MFC Bug? Ref counts and GetControlUnknown

2. parenting a Windows (.NET) Form properly in an MFC APP

3. Procedure Reference problem - cannot convert from 'ref System.Windows.Forms.Data

4. Help with Visual Basic ActiveX DLL showing form within Visual C++ ATL app

5. problem porting vc6 mfc app in .net

6. Ref count goes to zero, FinalRelease not called

7. Ref counting an interface property

8. Debugging ref counts

9. Simple Question: Passing Interface Pointers, and Ref counts

10. Ref Count Debugging

11. ref counting clarification..

12. About QueryInterface and ref-count


Powered by phpBB® Forum Software