Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "SystemIdleTimerReset" in [All]

aygshell

.
Summary
.

You can call both SystemIdleTimerReset and SHIdleTimerReset to cover a wider range of devices(?)

coredll

.

static extern void SystemIdleTimerReset();

.

Declare Sub SystemTimerReset Lib "coredll.dll" Alias "SystemIdleTimerReset" ()

.

To keep a device awake indefinitely, you can use SystemParametersInfo() (also in CoreDll) to query the three idle timeouts SPI_GETBATTERYIDLETIMEOUT, SPI_GETEXTERNALIDLETIMEOUT, and SPI_GETWAKEUPIDLETIMEOUT. Ignoring any values that are zero, use the minimum of these three values as your N, set a recurring timer to fire more often than every N seconds, and call SystemIdleTimerReset() every time it fires. When you're done with your critical operation, kill the timer, and the device will be able to sleep again. I tried this from C# and each idle-timeout value was 0, so I just called SystemIdleTimerReset() every 30 seconds during the critical operation.

.

    public static extern void SystemIdleTimerReset();

.

            SystemIdleTimerReset();

.
Documentation
[SystemIdleTimerReset] on MSDN

 
Access PInvoke.net directly from VS: