Looking for a way for a service to prevent a windows box from sleeping.
Is the SetThreadExecutionState api call the only way via .NET (C# or F#)?
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Looking for a way for a service to prevent a windows box from sleeping.
Is the SetThreadExecutionState api call the only way via .NET (C# or F#)?
A cursory search of the Internet shows that SetThreadExecutionState is the officially-mandated way to prevent the screensaver from appearing or the system from entering sleep, standby, or hibernate. The function works by resetting the system's idle timer.
It's one of those cases where the name of the function does not reflect its actual utility.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.