-
trapping exit??
i have a console app that when it exits it saves everthing to file, i use atexit() but this does not always work only if the app is terminated by running out of code, it does not work if the user simply closes the command window, is ther some way to do the same as atexit but for it to work when the window is closed??
-
Do you know any win API? It wouldn't be too hard if you could use it.
-
could u give me a little more of a clue please
-
You would need to create ur window through API and when you get the close message in the wndproc, save the info. (that is my idea at least) If you have no clue what I am talking about, ignore this post.
-
i thought just closing the command window is terminating the program abnormally, that should invoke atexit()?