NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 48 49 50 51 52 … 93 Next »
Prevent hibernate?

 
  • 0 Vote(s) - 0 Average
Prevent hibernate?
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#1
2006-10-20, 11:30 PM
What's the best way to prevent the PC from going into a standby or hibernate state from within a plugin?

It seems that when somone is using a remote with IR blaster on their PC with my SuDoku plugin, the PC will still go to sleep even if they're actively using the remote to move around the grid.

Is there a way of triggering a 'keep alive' kind of event each time a user presses a button on the remote or each time Render() is called?

Cheers,
Brian
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#2
2006-10-21, 05:16 AM
I'm no expert, but I think you need to monitor for the WM_POWERBROADCAST message, and respond to it with a BROADCAST_POWER_DENY.

This sample might get you started:

http://www.thescripts.com/forum/thread270488.html

Do some searches on WM_POWERBROADCAST and BROADCAST_POWER_DENY, and it should get you going in the right direction.
hoefkko
Offline

Junior Member

Posts: 10
Threads: 2
Joined: Sep 2006
#3
2006-10-21, 02:55 PM
Take a look at
http://msdn.microsoft.com/library/defaul...nstate.asp

This API will lett the system know your app needs the disk and screen and will prevent hybernating (beacause there is no user activity).

This will not prevent the computer of going to hybernate because the user presses the power button or forces hybernating from the windows menu.
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#4
2006-10-26, 11:23 AM
In my Slimm GB-PVR tray utility, I found that nothing seems able to reliably stop a system standby or hibernate. By the time the POWER message is received and the DENY message is transmitted, the machine is already too far along to be stopped. It does successfully trap restart, log off and shut down requests and will not allow these to be successful while a recording is in progress or you are watching live TV.

If you do manage to successfully block standby and hibernate, I would be interested to know how you did it.
[SIZE="1"]Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
See my blog for releases, HD wallpapers, movie, game and anime reviews and more.[/SIZE]
hoefkko
Offline

Junior Member

Posts: 10
Threads: 2
Joined: Sep 2006
#5
2006-10-26, 09:11 PM
Attached a sample project in VB.NET (.NET 1.1)

Starting the program prevents standby/hybernate (triggered from power management). while it is running
When you close the program, the system will go to standby (after the time elapsed defined in power management)

Please let me know if this works.
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#6
2006-10-26, 09:18 PM
hoefkko Wrote:Attached a sample project in VB.NET (.NET 1.1)

Starting the program prevents standby/hybernate (triggered from power management). while it is running
When you close the program, the system will go to standby (after the time elapsed defined in power management)

Cool, that's a different tactic to the one I used. I receive Windows power status broadcast messages and respond with a deny message (that was the example on MSDN) and it only partially works and is unelegate. This looks interesting, thanks.
[SIZE="1"]Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
See my blog for releases, HD wallpapers, movie, game and anime reviews and more.[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  How to prevent default screen background? cncb 28 8,305 2012-05-16, 08:28 PM
Last Post: ACTCMS
  Standby/hibernate mvallevand 7 2,709 2010-05-03, 12:33 PM
Last Post: pBS

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode