This function starts running an application when a specified event occurs.
BOOL CeRunAppAtEvent( TCHAR *pwszAppName, LONG lWhichEvent );
[in] Pointer to a null-terminated string that specifies the name of the application to be started.
[in] Event at which the application is to be started. It is one of the following values:
Value Description NOTIFICATION_EVENT_DEVICE_CHANGE When a PC Card device is changed. NOTIFICATION_EVENT_NONE No events — remove all event registrations for this application. NOTIFICATION_EVENT_RESTORE_END When a full device data restore completes. NOTIFICATION_EVENT_RS232_DETECTED When an RS232 connection is made. NOTIFICATION_EVENT_SYNC_END When data synchronization finishes. NOTIFICATION_EVENT_TIME_CHANGE When the system time is changed. NOTIFICATION_EVENT_TZ_CHANGE When the time zone is changed. NOTIFICATION_EVENT_WAKEUP When the device wakes up.
TRUE indicates success. FALSE indicates failure.
The application is started with a system-defined command line. If there was already an instance of the application running, the new instance must send a private message to the existing instance and then shut down. The command line, which corresponds to the registered event, can be one of the following string constants.
The string values in this table are processed as command line commands. In some cases, the part of the command line that follows the string is treated as a parameter.
Use the CeRunAppAtEvent function sparingly, because automatically starting an application can confuse the user and cause low-memory conditions on a machine with restricted memory. Ideally, the application should be small and non-intrusive.
The following constants are defined in the header file, but they are not supported:
|Runs on||Versions||Defined in||Include||Link to|
|Windows CE OS||1.01 and later||Notify.h||Notify.lib|
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.