Share via


IAsyncReader2::GetEventHandle (Compact 2013)

3/26/2014

This method returns a handle to the event that is signaled when new media samples are available.

Syntax

HRESULT GetEventHandle(
  OAEVENT* pHandle
);

Parameters

  • pHandle
    [out] Event handle.

Return Value

Returns the HRESULT values shown in the following table.

Value

Description

E_FAIL

E_INVALIDARG

The event handle was not returned.

S_OK

The event handle was returned.

Remarks

This event is a manual reset event. Do not call CloseHandle() on this event.

To monitor events, you declare a handle variable, cast it to an OAEVENT pointer, and then pass it to this method, as shown in the following code example.

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

You can pass the returned event handle to the WaitForMultipleObjects function to wait for event notifications. Do not reset the handle in your application because the filter graph sets and resets events.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IAsyncReader2 Interface