Exit handler?

  • Thread starter Thread starter Bob Altman
  • Start date Start date
B

Bob Altman

Hi all,

I have a VS 2003 unmanaged C++ DLL library application. One of my routines
needs to do some cleanup when the calling application exits for any reason.
What are my options for creating some sort of "application termination
handler" that gets control when the application exits? (In particular, I
need to perform the cleanup if the calling app terminates abnormally.) TIA!
 
Hi Bob!
I have a VS 2003 unmanaged C++ DLL library application. One of my routines
needs to do some cleanup when the calling application exits for any reason.
What are my options for creating some sort of "application termination
handler" that gets control when the application exits?

See: _onexit
http://msdn2.microsoft.com/en-us/library/zk17ww08.aspx
(In particular, I
need to perform the cleanup if the calling app terminates abnormally.) TIA!

AFAIK, you have no chance to survive a "TerminateProcess"...

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 

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

Back
Top