I believe Windows sends a message:
CTRL_SHUTDOWN_EVENT or CTRL_LOGOFF_EVENT
to each console application when it shuts down. You could write a little app. that sits and waits for this message then writes something to a log file. I bet somebody has already done this. Why not try one of the C/C++ or VB forums?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.