Hi, I'm trying to make a program to run in the background on my computer that times how long the computer has been running for. I can set it as a scheduled task to run on startup, but I don't know if its possible to detect when windows is shutting down so that it can save the result to a file or something. I've tried doing some research, but all i can find is stuff about WM_QueryEndSession, but not anything relevant to C programming.
Can anyone help?