Wakeup from standby (1 Viewer)

A

Anonymous

Guest
I've found a very simle API to make the system hibernate.
I made a try in VB6 but I guess it will run in .net to.

------- code used on a form in VB ----------
Private Declare Function SetSuspendState Lib "Powrprof" (ByVal Hibernate As Long, ByVal ForceCritical As Long, ByVal DisableWakeEvent As Long) As Long


Private Sub cbSleep_Click()
SetSuspendState 1, 0, 0
End Sub
------------------------------------------

Tonight I will try to setup the environment to build MP to see if any of this hibernate/resume works for real. It might take a while to figure out enough of how MP is constructed but I will give it a try.
 
A

Anonymous

Guest
Hi Forbes and others.

Now I've made the first implementation in MP of this hibernate and resume on timer things.

And YES! it works!

I made the changes for this test in the source of version 0.0.0.10 so it will have to be rewritten in a later version. This is just for testing and I'm sure frodo would do a much better implementation knowing all about the inner secrets of MP.


This is what I've done to the program so far:
- Changed the shutdown action to hibernate instead of shuting down system.

- Added a WaitableTimer, which is set by the OnRecordingChanged() event.

These changes makes it possible to hibernate system by clicking the shutdown button in the MCE home.

Computer then resumes one minute before the recording is due to start.

So, are there anymore people besides forbes and myself that are still interrested in these features?
 

tomtom21000

Retired Team Member
  • Premium Supporter
  • April 22, 2004
    1,226
    120
    Germany
    fred said:
    So, are there anymore people besides forbes and myself that are still interrested in these features?

    Hey fred, this is one of the few core features of a htpc that mp still misses!
    Hope to see it in a release in the near future.

    tomtom21000
     

    FlipGer

    Retired Team Member
  • Premium Supporter
  • April 27, 2004
    2,658
    115
    48
    Leipzig, Germany
    Home Country
    Germany Germany
    Hi,

    jep. I, and many others i think, am also very interested in this feature. :)

    Keep on going. Just tell frodo what you have done. (IRC for example)

    Flip.
     
    A

    Anonymous

    Guest
    OK, there seem to be some interest after all.
    Thanks for the support.

    I will try to get the MP team's attention and se if we could work something out this weekend or in the near future.
     

    MrMario64

    Retired Team Member
  • Premium Supporter
  • April 22, 2004
    822
    1
    50
    Home Country
    Netherlands Netherlands
    you really should write a nice patch and post this on the SF Patch area.

    Good job on this feature!
    thanx
     
    A

    Anonymous

    Guest
    Hi,
    READY FOR TESTING!

    I've now posted a patch for download on SF.
    I must warn you that it's Beta and I wouldn't rely on it yet for recording your favotite show.

    In order to get the shutdown button in the MCE skin to work as hibernate you will have to rebuild the application in VC#.net using supplied source.

    To get the wakeup functionality just copy the two dlls into your MP folder.

    Good luck - and lets hope it will make it into CVS soon.
     

    johnbobjamesson

    Portal Pro
    June 17, 2004
    91
    0
    Crailsheim
    Ok, I just added you to the list of my personal heros. Right after frodo, of course ;-) I scheduled a recording and MP actually went out of S3 Standby. I haven't tried hibernate, yet, but I don't need that too much, anyway. Thank you for making my day!

    J.
     

    Users who are viewing this thread

    Top Bottom