ExitInstance never called: how to debug application exit?

C

Chris

Hi

We're porting an MFC application from VS 5.0 to VS 7.0 (using pure C++
only).
There is a problem when the application exits:
...
'ratv_client.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
The thread 'Win32 Thread' (0xd4c) has exited with code 3 (0x3).
Detected memory leaks!
...

There are memory leaks because ExitInstance of our application
(derived from CWinApp) is never called! We're trying to understand
why... In order to do this, we want to debug the part where the
application exits.
We've put breakpoints on the return of AfxWinMain, in AfxWinTerm, on
"return ExitInstance()" of thrdcore.cpp, even on "exit(mainret)" of
crtexe.c, but none of those breakpoints are reached.
The 'Win32 Thread' (whatever that is) seems to suddently stop before
anything we can reach.

So how can we trace what happens when we quit the application?

Any help appreciated, thanks in advance!
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top