According to Microsoft document:
(
http://msdn.microsoft.com/library/d.../html/ppc_programming_pocket_pc_2002_lfyy.asp)
===========================================
You can override the automatic suspend that occurs when no user input has
occurred for a period of time. To prevent automatic power down, call the
Windows CE SystemParametersInfo function for each of the three time-out
values, SPI_GETBATTERYIDLETIMEOUT, SPI_GETEXTERNALIDLETIMEOUT, and
SPI_GETWAKEUPIDLETIMEOUT, as shown in the following code. Your application
must call the SystemIdleTimerReset function more frequently than any of the
nonzero time-out values.
DWORD batIdle, acIdle, wakeUpIdle, shortestIdle;
TCHAR szOutput[200];
// Get the values.
SystemParametersInfo(SPI_GETBATTERYIDLETIMEOUT,0,&batIdle,0);
SystemParametersInfo(SPI_GETEXTERNALIDLETIMEOUT,0,&acIdle,0);
SystemParametersInfo(SPI_GETWAKEUPIDLETIMEOUT,0,&wakeUpIdle,0);
// Determine which is the lowest nonzero value.
shortestIdle=batIdle;
shortestIdle=((acIdle>0)&&(acIdle<shortestIdle)) ? acIdle :
(((wakeUpIdle>0)&&(wakeUpIdle<shortestIdle)) ? wakeUpIdle : shortestIdle);
if (shortestIdle==0)
// If all values are zero, the device can never time out.
wsprintf(szOutput,_T("Battery Idle Timeout: %d\nAC Power Idle Timeout:
%d\nWakeup Idle Timeout: %d\nThe device will not time out."),batIdle, acIdle,
wakeUpIdle);
else
{
// Otherwise, you need to reset the idle timer more
// frequently than the lowest time-out value.
wsprintf(szOutput,_T("Battery Idle Timeout: %d\nAC Power
Idle Timeout: %d\nWakeup Idle Timeout: %d\nYou need to
call SystemIdleTimerReset at least every %d
sec"),batIdle, acIdle, wakeUpIdle, shortestIdle-1);
}
MessageBox(hWnd,szOutput,_T("Results"),MB_OK);
===========================================
I try to following the instruction in the document on a HHP Dolphin 9500,
seems like it does not work. Though batIdle, acIdle, wakeUpIdle are all 0,
device suspend anyway.