🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1322

Re: Can't get the computer to programmatically wake from standby.... (original question in language cpp)

#1322
From: Remy Lebeau (TeamB)
Date: Mon, 17 Sep 2007 17:32
30 lines
2310 bytes
"<< Wiljo >>" <wherever@theuniverse.com> wrote in message
news:46ee6a93$1@newsgroups.borland.com...

> Is there maybe another procedure to wake up the computer at a
> cerain time?

Not that I know of.

> 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.

Not really.  You can create a separate event for that using CreatEvent(),
then you use WaitForMultipleObjects() instead of WaitForSingleObject().
That way, when you want to change a timer that is already in progress,
signal the event so the waiting stops immediately.  The code can then test
which object was signalled.  If the event was siangled then cancel and reset
the timer as needed.

> 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.

All I know is that the code you have shown works fine in a simple test app.
If it is not related to the machine/OS, then there is probably something
else in your program is that effecting power states.  Maybe you are not
responding to a power notification correctly or something, I don't know.


Gambit
Technical Details
Message-ID: <46eeba54$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46eaf724$1@newsgroups.borland.com> <46eb0592$1@newsgroups.borland.com> <46ec1d00@newsgroups.borland.com> <46eca7c2@newsgroups.borland.com> <46ee6a93$1@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
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <46eaf724$1@newsgroups.borland.com> <46eb0592$1@newsgroups.borland.com> <46ec1d00@newsgroups.borland.com> <46eca7c2@newsgroups.borland.com> <46ee6a93$1@newsgroups.borland.com>
Subject: Re: Can't get the computer to programmatically wake from standby.... (original question in language cpp)
Date: Mon, 17 Sep 2007 10:32:12 -0700
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.29.61
Message-ID: <46eeba54$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1190050388 75.83.29.61 (17 Sep 2007 10:33:08 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail