home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
PowerScheduler plugin 0.1 (wakeup/hibernate)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="gabbe" data-source="post: 4631" data-attributes="member: 10337"><p>Hello fred, nice work. </p><p>Are You using this coding <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/system_wake_up_events.asp" target="_blank">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/system_wake_up_events.asp</a> ??</p><p></p><p>Here is a click from the MS site:</p><p></p><p>When the system wakes automatically because of an event (other than power switch or user activity), the system automatically sets its idle timer to at least 1 minute. This timer allows applications to call the SetThreadExecutionState function to indicate that they are busy. This enables the system to shut down without affecting the user. The following criteria determine whether a system shutdown is needed:</p><p></p><p></p><p>If the system wakes automatically, it shuts down as soon as the last job is completed, as indicated by the process calling SetThreadExecutionState. </p><p>If the system wakes automatically, but the user provides new input while the event is handled, the system does not shut down when the last job finishes. </p><p>If the system is on and the user is active, the system does not enter the sleeping state. </p><p>If the system is on, no applications are busy, and the user is inactive for a long time, the system enters the sleeping state when the timer expires. </p><p></p><p>SetThreadExecutionState</p><p></p><p>The SetThreadExecutionState function enables applications to inform the system that it is in use, thereby preventing the system from entering the sleeping power state or turning off the display while the application is running.</p><p></p><p></p><p>EXECUTION_STATE SetThreadExecutionState(</p><p> EXECUTION_STATE esFlags</p><p>);</p><p></p><p>Parameters</p><p>esFlags </p><p>[in] Thread's execution requirements. This parameter can be one or more of the following values. Flag Meaning </p><p>ES_CONTINUOUS</p><p>0x80000000 Informs the system that the state being set should remain in effect until the next call that uses ES_CONTINUOUS and one of the other state flags is cleared. </p><p>ES_DISPLAY_REQUIRED</p><p>0x00000002 Forces the display to be on by resetting the display idle timer. </p><p>ES_SYSTEM_REQUIRED</p><p>0x00000001 Forces the system to be in the working state by resetting the system idle timer. </p><p></p><p>END clip:</p><p>So it should only to be to call SetThreadExecutionState once directly after wake up and once when its ready. If no user inputs from wake up it should go to sleep again....</p><p>So You shouldn't need any own timer...</p><p>regards /gabbe[/url]</p></blockquote><p></p>
[QUOTE="gabbe, post: 4631, member: 10337"] Hello fred, nice work. Are You using this coding [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/system_wake_up_events.asp[/url] ?? Here is a click from the MS site: When the system wakes automatically because of an event (other than power switch or user activity), the system automatically sets its idle timer to at least 1 minute. This timer allows applications to call the SetThreadExecutionState function to indicate that they are busy. This enables the system to shut down without affecting the user. The following criteria determine whether a system shutdown is needed: If the system wakes automatically, it shuts down as soon as the last job is completed, as indicated by the process calling SetThreadExecutionState. If the system wakes automatically, but the user provides new input while the event is handled, the system does not shut down when the last job finishes. If the system is on and the user is active, the system does not enter the sleeping state. If the system is on, no applications are busy, and the user is inactive for a long time, the system enters the sleeping state when the timer expires. SetThreadExecutionState The SetThreadExecutionState function enables applications to inform the system that it is in use, thereby preventing the system from entering the sleeping power state or turning off the display while the application is running. EXECUTION_STATE SetThreadExecutionState( EXECUTION_STATE esFlags ); Parameters esFlags [in] Thread's execution requirements. This parameter can be one or more of the following values. Flag Meaning ES_CONTINUOUS 0x80000000 Informs the system that the state being set should remain in effect until the next call that uses ES_CONTINUOUS and one of the other state flags is cleared. ES_DISPLAY_REQUIRED 0x00000002 Forces the display to be on by resetting the display idle timer. ES_SYSTEM_REQUIRED 0x00000001 Forces the system to be in the working state by resetting the system idle timer. END clip: So it should only to be to call SetThreadExecutionState once directly after wake up and once when its ready. If no user inputs from wake up it should go to sleep again.... So You shouldn't need any own timer... regards /gabbe[/url] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
PowerScheduler plugin 0.1 (wakeup/hibernate)
Contact us
RSS
Top
Bottom