make a program respond to system shutdown/reboot
Posted on 2004-08-31
i have an application that needs to do some housekeeping when the system shuts down. i've done this before on Borland c++ builder and in delphi but i'm rather confused as to where to add the message capture and handler on a normal C program (to be compiled with either mingw (gcc) or visual studio)
any ideas how can i capture the windows shutdown, pause it for a bit, do the housekeeping and then continue withg the shutdown?
thanks, i really appreciate any help