CeEventHasOccurred
This function is used by operating system (OS) components and by device drivers to send a notification that one of the supported events on the system has occurred.
This function is only available to platform and driver developers.
BOOL CeEventHasOccurred (
LONG lWhichEvent,
TCHAR* pwszEndOfCommandLine
);
Parameters
- lWhichEvent
[in] Identifies the event that just occurred. It must be one of the events supported by CeRunAppAtEvent. - pwszEndOfCommandLine
[in] Pointer to a string that contains a message associated with the event that just occurred. This string is appended to the command line that launches the application associated with the event.
Remarks
Calls to CeEventHasOccurred notify the OS that the event identified by the lWhichEvent parameter has just occurred. If an application has previously been associated with that event through a call to CeRunAppAtEvent, then it is launched with the command-line parameters supplied by CeRunAppAtEvent and pwszEndOfCommandLine. For example, an application named Program.exe could be associated with COM port detection using the following code:
CeRunAppEvent("Program.exe", NOTIFICATION_EVENT_RS232_DETECTED);
Then, the serial driver could signal a newly detected COM port with the following code:
CeEventHasOccurred (NOTIFICATION_EVENT_RS232_DETECTED, L"A new COM
port has been detected!");
When the event is triggered, the application would be launched as though you entered the following command on the command line:
program.exe AppRunAtRs232Detect A new COM port has been detected!
In this example, CeRunnAppAtEvent automatically adds the string AppRunAtRs232Detect
to the command line.
To add your own notification event to your system, you must modify CeNotifyPublic_FilterEvent to recognize your event. Next, call CeEventHasOccurred from your software component or device driver, as appropriate.
The delay for blocking the CeEventHasOccured function while the OS initializes can be set with the ShortApiTimeout registry value. For more information, see User Interface Registry Settings.
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Notify.h.
Link Library: Coredll.lib.
See Also
Notification Functions | CeRunAppAtEvent | User Interface Registry Settings
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.