This function supercedes SHIdleTimerReset by enabling the application to specify which timer gets reset.
HRESULT WINAPI SHIdleTimerResetEx( DWORD dwFlags );
Indicates which session timer(s) to reset. Can be any combination of the timers as shown in the following table.
Reset device lock session timer.
Reset home session timer (Windows Mobile Standard only).
Reset flush session timer (Windows Mobile Standard only).
Calling SHIdleTimerResetEx(LOCK_SESSION | HOME_SESSION | FLUSH_SESSION) is equivalent to calling SHIdleTimerReset.
SHIdleTimerResetEx can be called by applications to prevent the home screen from coming forward but still allowing device lock to function. In this case the function would be called with HOME_SESSION | FLUSH_SESSION. An example of such an application is a media player application which can call SHIdleTimerResetEx while playing video.
Windows Mobile Professional and Windows Mobile Classic only support LOCK_SESSION and IDLE_SESSION. If IDLE_SESSION is specified, SystemIdleTimerReset will be called which will keep the device from suspending. LOCK_SESSION is the timer that controls when the device will lock. If the device has been user idle for X amount of time the device locks. Calling this function with LOCK_SESSION periodically will prevent the device from auto locking.
HOME_SESSION is the timer that controls when the system will revert to showing the home screen on Windows Mobile Standard. Periodically calling the SHIdleTimerResetEx with HOME_SESSION will prevent the system from automatically switching back to the home screen. FLUSH_SESSION is the timer that controls the periodic flushing of the registry and databases to persistent storage. Note than on power off and suspend these are always flushed. Periodically calling this function with FLUSH_SESSION will prevent the device from performing its periodic flush to persistent storage.