I need information to create a program that shutdowns the computer to one certain hour. I know how to shutdown the computer but how the hell I make the routine that continuously verifies the hour of the system? Excuse my poor english X). Any help will be apreciatted
Posted on 2001-04-04 20:18:00 by unknow
You can use SetTimer to get a message sent to your window whenever the ammount of time you put in has been reached. The message will be sent until you call KillTimer. Although this doesn't allow you to put in an hour, what you could do is either calculate how many millesecondes there are till that hour and then set a timer. Or you could make a timer for a certain length such as one minute, where each time you could check the hour until you get the correct hour.
Posted on 2001-04-04 21:08:00 by Soul~Drudge
I Think it would be easier to just check the clock time store the start time and keep checking for an hour or what have you, you can even set it for a year for now or further. just by reading the system clock time ans storing it and add the amount of time you want to check for when that time is reached you can do what ever.... To do this you would use GetSystemTime,addr LPSYSTEMTIME Maybe I helped or maybe I just did not understand you. if so sorry..... This message was edited by Zcoder, on 4/5/2001 7:42:27 PM
Posted on 2001-04-05 19:38:00 by Zcoder