Applications generally do not run while an H/PC is in the suspend state. However, several functions can alter the time at which an H/PC suspends itself. The following table shows functions that you can use to reset activity times or to set timers and events that can switch an H/PC from the suspend state to the on state.
Function |
Description |
CeRunAppAtTime | Sets a timer or runs an application at a specified time. |
WaitCommEvent | Waits for a communications event to occur. Serial, Infrared Data Association (IrDA), or PC Card storage devices can return EV_POWER when the device resumes operation. |
If an application uses the Sleep function, it does not increment the elapsed time counter while the H/PC is in suspend state. It starts counting again when the H/PC resumes operation. The internal clock is not affected when the H/PC suspends operation. Though an application is not notified when a device enters the suspend state, the operating system does notify a device driver by calling a power-handler function. A device driver might use this notification to suspend operation of the device it controls, which may cause a device not to be available immediately after the device switches to the on state. For example, when a file stored on a PC Card storage device is open and the user tries to save the file before the PC Card is turned on, the system returns an error message.