I have a project where I use the MFC support for interop: <afxwinforms.h>,
CWinFormsControl<Ctrl> etc. This works fine exept for some problems when the
application closes down. Now and then I get an ASSERT in wincore.cpp l .2870
(WalkPreTranslateTree). Further I can see in the output window that the
native code unloads before the Managed code. Normally this is the other way
round as the EXE is a native C++ program, while the GUI is made up of
contained .NET controls.
Order of output in the debug window:
The program '[3328] Test.exe: Native' has exited with code 0 (0x0).
The program '[3328] Test.exe: Managed' has exited with code 0 (0x0).
Why do I still get messages to the WalkPreTranslateTree function after the
corresponding window is destroyed. And why does the managed code unload after
the native? And could these issues be related?
Any ideas? All help appreciated.