By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,009 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Exit handler?

P: n/a
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!
Mar 16 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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/
Mar 16 '06 #2

P: n/a
Just what the doctor ordered. Thanks!

"Jochen Kalmbach [MVP]" <no********************@holzma.de> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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/

Mar 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.