Microsoft Windows CE 3.0  

Wait Functions

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Windows CE supports single-object and multiple-object wait functions that block or unblock a thread based on the signaled or nonsignaled state of the object. The single object function is WaitForSingleObject. The multiple object functions are WaitForMultipleObjectsand MsgWaitForMultipleObjects.

The WaitForSingleObjectfunction enables a thread wait on a single object. The object can be a synchronization object, such as an event or mutex, or the object can be a handle to a process and thread. Handles are signaled when their processes or threads terminate. Thus, a process can monitor another process or thread and perform some action based on the status of the process or thread.

The WaitForMultipleObjectsand MsgWaitForMultipleObjectsfunctions enable the calling thread to specify an array containing one or more synchronization object handles. These functions return when one of the following events occurs: