Windows CE–based Device Notification

In addition to supporting notification for the desktop computer–based application, Windows CE supports Notification API, which allows applications on the mobile device to receive connection notification.

The CeRunAppAtEvent function provides Windows CE–based applications with the ability to be notified when a connection or other event occurs. When a specified event occurs, applications registered by CeRunAppAtEvent are launched. For example, events include when a device is connected to a desktop computer, when an operating system is restored from a backup, or when the system time is changed.

The function is prototyped as:

BOOL CeRunAppAtEvent (TCHAR *pwszAppName, LONG lWhichEvent);

The name of the application to be launched when the event occurs is indicated by the first parameter. The second parameter is a set of bit flags that indicate which events you want to track.