Article View: borland.public.cppbuilder.nativeapi
Article #1321Re: Can't get the computer to programmatically wake from standby.... (original question in language cpp)
From: << Wiljo >>
Date: Mon, 17 Sep 2007 11:52
Date: Mon, 17 Sep 2007 11:52
44 lines
3412 bytes
3412 bytes
Remy Lebeau (TeamB) schreef: > "Wiljo" <nospam@nospam.com> wrote in message > news:46ec1d00@newsgroups.borland.com... > >> That is what waitable timers are all about. > > That is not what waitable timers are all about. The feature you are trying > to use is just a small piece of what they are primarily meant for - an event > object that can be waited on via the various Msg/WaitFor...() functions, > that is automatically signalled at a specific time by the OS instead of the > application. Waking up the machine from Standby is a secondary effect. The > wakeup feature is barely mentioned in the several pages of documentation > Microsoft has on what waitable timers are and how to use them. > Sorry I wrote that waitable timers are all about waking up one's computer. It clearly does a lot more, and waking up is just a side effect. Is there maybe another procedure to wake up the computer at a cerain time? I don't want to set up a wait procedure that uses a WaitForSingleObject or something, because it is more difficult to change the wakeup time later. There should be a simpler way of setting up a timer, that wakes the computer, if it went to sleep, at a certain time. >> It just doesn't work in my case. > > I tested the exact code you provided earlier, and it works as-is for me on > my XP laptop without any problem. When entering Standby mode, the display > and all of the lights turn off. Exactly 1 minute later, all of the lights > turn back on (but not the display, as per MSDN's documentation) and the > program's UI has been updated with the correct timestamp. So I'm guessing > that the problem is with your machine/OS, not your code. > I am glad to read that my piece of code does work on your machine, but I am not sure if this problem is machine/OS related. I have another commercial PVR running, that does wake my computer at the correct time to record a show. That program "ShowShifter" is not stable enough for my liking, and the filename convention is not ideal. So now I am using ATV2000 and writing my own scheduler. This scheduler is already working fine with ATV2000, but does not yet take care of sleeping and waking up. And I would like to do that as well. Leaving my computer on the whole day is not very environmently friendly. > > Gambit > > Wiljo.
Technical Details
Message-ID:
<46ee6a93$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46eaf724$1@newsgroups.borland.com> <46eb0592$1@newsgroups.borland.com> <46ec1d00@newsgroups.borland.com> <46eca7c2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,dbb9f35f467d4b41 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 17 Sep 2007 13:52:52 +0200 From: "<< Wiljo >>" <wherever@theuniverse.com> User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Can't get the computer to programmatically wake from standby.... (original question in language cpp) References: <46eaf724$1@newsgroups.borland.com> <46eb0592$1@newsgroups.borland.com> <46ec1d00@newsgroups.borland.com> <46eca7c2@newsgroups.borland.com> In-Reply-To: <46eca7c2@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 81.207.96.249 Message-ID: <46ee6a93$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1190029971 81.207.96.249 (17 Sep 2007 04:52:51 -0700) Lines: 44 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail