Partager via


CAMMsgEvent::WaitMsg

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Enables sent messages to be processed while waiting for an event to be signaled or for the indicated time-out to occur.

Syntax

BOOL WaitMsg(
  DWORD dwTimeOut
);

Parameters

  • dwTimeOut
    Optional time-out value, represented in milliseconds. The default is INFINITE.

Return Value

Returns TRUE if the event is signaled, or FALSE if the time-out occurred.

Remarks

Call CAMMsgEvent::WaitMsg rather than CAMEvent::Wait if you want to block on a time-out or a signaled event and continue to process sent messages.

If you do not process messages and another thread sends you a message, deadlock could occur.

For example, if you create a thread using the Win32 CreateThread function and block until the thread can initialize, deadlock occurs if the thread sends a message to your window using the Win32 SendMessage function. This is because SendMessage does not return until the message is processed.

CAMMsgEvent::WaitMsg allows SendMessage to return to the caller by using a Win32 PeekMessage loop to do message processing.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment, Version 2.12 requires DXPAK 1.0 or later