IMediaEvent::GetEventHandle

Windows CE .NET

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

HRESULT GetEventHandle(
  OAEVENT* hEvent
);

Parameters

hEvent
[out] Handle for the event.

Return Values

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

DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.

See Also

IMediaEvent Interface


Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.

Show: