Share via


IMediaEvent::GetEventHandle (Windows Embedded CE 6.0)

1/6/2010

This method retrieves a handle to a manual-reset event that will be signaled as long as there are event notifications to deliver.

Syntax

HRESULT GetEventHandle(
  OAEVENT* hEvent
);

Parameters

  • hEvent
    [out] Handle for the event.

Return Value

Returns an HRESULT value.

Remarks

You can monitor events (including the retrieved event) and messages on a single thread; to do this, declare a HANDLE variable, cast it to an OAEVENT pointer, then pass it to GetEventHandle. You must cast the pointer to an OAEVENT pointer because HANDLE is not a valid OLE Automation type. The following code fragment demonstrates how to cast and use the HANDLE.

HANDLE hEvent;
GetEventHandle( (OAEVENT*) &hEvent );

You can pass the retrieved event handle to the Win32 WaitForMultipleObjects or MsgWaitForMultipleObjects functions to wait for event notifications at the same time as other messages and events on a single thread. The implementation of GetEvent sets and resets the handle within the application, so applications should not reset the handle themselves.

Requirements

Windows Embedded CE Windows CE 2.12 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

See Also

Reference

IMediaEvent Interface