Article View: borland.public.cppbuilder.nativeapi
Article #3600Re: SetSystemPowerState issues
From: Bob Gonder
Date: Fri, 19 May 2006 18:39
Date: Fri, 19 May 2006 18:39
25 lines
2214 bytes
2214 bytes
Mike Collins wrote: >All options seem to work except the hibernate / stand-by. The only way i >could find to implement either of these was with SetSystemPowerState(). > >What I need to know is, is there any way to detect or determine if the >system can or can't be placed in either of theses modes? I think you want to look at GetPwrCapabilities() http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/getpwrcapabilities.asp I should think that HiberFilePresent would indicate if hibernation is available. Don't know what the various SystemS1 sleep states are. >My second question, (in following with this) is, does my application (or any >other running on the system) need to perform any specialist operations >before the system is suspended. For example, we have a hardware polling >thread - does this need to be specifically suspended by our application or >does the OS take care of these aspects? Well, that depends on if your hardware/polling can withstand a long interruption. If your application or the hardware crashes with sleep or hibernate, then, yes, they should check for those system messages and take care of themselves. If they don't care about the missed polls, then nothing is needed. The app will just go to sleep.
Technical Details
Message-ID:
<hi3s625hiq004edghi6b2c57otqvstpehp@4ax.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<446de84c@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a40f30873ebce91c X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: SetSystemPowerState issues Date: Fri, 19 May 2006 11:39:49 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <hi3s625hiq004edghi6b2c57otqvstpehp@4ax.com> References: <446de84c@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 71.0.33.27 X-Trace: newsgroups.borland.com 1148063985 71.0.33.27 (19 May 2006 11:39:45 -0700) Lines: 29 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail