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.
A version of this page is also available for
4/8/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 HRESULTvalue.

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.

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

You can pass the retrieved event handle to the Win32 WaitForMultipleObjectsor MsgWaitForMultipleObjectsfunctions to wait for event notifications at the same time as other messages and events on a single thread. The implementation of GetEventsets 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
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

See Also