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/
 
Back
Top