The Windows CE operating system uses application notifications to communicate with applications without requiring user intervention. Application notifications are generated when a system event or a timer event occurs. An application does not need to be running when the notification occurs.
The system sends a system-event notification when a specified system event occurs. Examples of system events are the completion of data synchronization and the establishment of a network connection. Whenever the specified event occurs, the system starts the application with a command-line parameter.
You register an application for system-event notification by calling the CeRunAppAtEvent function. For a complete list of events and command line parameters, see CeRunAppAtEvent. Once you have registered a notification for a system event, the notification occurs each time the event occurs. You can delete the registration of an application for all system events by calling CeRunAppAtEvent and specifying NULL as the second parameter.
The system sends a timer-event notification at a specified date and time. You register for a timer-event notification using the CeRunAppAtTime function. Timer-event notifications are useful when the user notification method does not provide the user with necessary information to handle an event. In a timer event notification, the system issues the notification at the specified time and the application displays the notification information.
Note Use CeRunAppAtEvent and CeRunAppAtTime sparingly. Automatically starting an application can confuse the user and cause low-memory conditions on a device with restricted memory. Ideally, the application that starts automatically should be small and non-intrusive.
You must register a separate notification for each instance of a recurring timer event. Typically, an application sets all of the instances for a specified period of time upon startup. To handle cases where the specified time period elapses without the user running the application, register the CeRunAppAtTime function to run the application for each desired time during the next time period.