SleepEx - Windows API Reference

SleepEx

Description:

Causes the system to enter a low-power state. This function is similar to the `Sleep()` function, but it allows the system to enter a low-power state instead of simply pausing execution. It is often used in conjunction with the `WakeLock` class to prevent the system from resuming when the device is idle.

Prototype:

<HINSTANCE> SleepEx(DWORD dwMilliseconds);

Parameters:

Return Value:

Returns TRUE if the function succeeds, or FALSE if a problem occurs.

Example:

<BOOL> result = SleepEx(1000); // Sleep for 1 second>

Related APIs: