Article View: borland.public.cppbuilder.nativeapi
Article #12864Re: preventing standby
From: PaoloItaly
Date: Mon, 17 Nov 2003 12:28
Date: Mon, 17 Nov 2003 12:28
21 lines
1626 bytes
1626 bytes
in the class definition
EXECUTION_STATE oldState;
in the form constructor
oldState = ::SetThreadExecutionState(ES_SYSTEM_REQUIRED |
ES_DISPLAY_REQUIR
ED |
ES_CONTINUOUS);
and finally in the form destructor
if (oldState)
::SetThreadExecutionState(oldState | ES_CONTINUOUS);
"PaoloItaly" <paolo@sirius-es.it> ha scritto nel messaggio
news:3fb88e1e$1@newsgroups.borland.com...
> On a win2000 i intercept the WM_POWERBROADCAST message and i return
> PBT_APMQUERYSUSPENDFAILED, but after 2 consecutively time that i receive
> the WM_POWERBROADCAST message, my PC go in standby.
> There is a way to avoid this ?
>
> Thanks
>
>
Technical Details
Message-ID:
<3fb8beff@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fb88e1e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,7a4add9c9d3ac02c X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-17 04:39:22 PST From: "PaoloItaly" <paolo@sirius-es.it> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fb88e1e$1@newsgroups.borland.com> Subject: Re: preventing standby Date: Mon, 17 Nov 2003 13:28:13 +0100 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 NNTP-Posting-Host: 81.112.124.34 Message-ID: <3fb8beff@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069072127 81.112.124.34 (17 Nov 2003 04:28:47 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail