Signals and Other Interprocess Communication

Windows CE uses event objects to notify a thread when to perform its task or to indicate that a particular event has occurred. For example, a thread that writes to a buffer resets the event object to a signaled state when it has finished writing. By using an event object to notify the thread that its task is finished, the thread can immediately start performing other tasks.

Call the CreateEvent function to create an event object. The PulseEvent function provides a single operation that sets the state of the specified event object to signaled and then resets it to non-signaled after releasing the appropriate number of waiting threads. The SetEvent and ResetEvent functions set the state of the event object to signaled and non-signaled, respectively.

Notifications

Notifications can be used to let users and applications know when an event has occurred. The notification subsystem in Windows CE consists of the following parts:

  • The base notification engine, also called the notify component, which manages all of the notifications that are registered on the system and triggers notifications when an event occurs.
  • The notification UI, which communicates notification events to a user and handles these notifications.

For more information about supporting notifications on your platform, see Implementing the Notification UI and Using the Base Notification Engine. For information about the notification APIs, see Notification Reference.

Data Exchange Messages

The Windows CE kernel provides two data exchange messages especially for interprocess communication. Use the WM_COPYDATA to transfer data from one application to another. The sending application displays a dialog box to the user that requests information about the transfer. The application packages this information into a private data structure, includes a pointer to the private structure in the COPYDATASTRUCT structure, and sends the information to the receiving application's hidden window. The information is then displayed to the user.

The WM_SYSCOPYDATA message is similar to WM_COPYDATA, but is used to transfer data between system components, either in-process or between processes. Handwriting recognition engines and input panels are examples of system components that might use WM_SYSCOPYDATA.

See Also

Migrating from an Open Source Platform to Windows CE | Kernel Synchronization Functions | Memory Mapping a File

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.