Share via


IMediaEvent::GetEvent

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method retrieves the next notification event.

Syntax

HRESULT GetEvent(
  long* lEventCode,
  long* lParam1,
  long* lParam2,
  long msTimeout
);

Parameters

  • lEventCode
    [out] Next event notification.
  • lParam1
    [out] First parameter of the event.
  • lParam2
    [out] Second parameter of the event.
  • msTimeout
    [in] Time, in milliseconds, to wait before assuming that there are no events.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. If the time-out is zero and no event is waiting, or if the time-out elapses before an event appears, this method returns E_ABORT.

Remarks

The application can pass a time-out value of INFINITE to indicate that the method should block until there is an event; however, applications should avoid using INFINITE. Threads cannot process any messages while waiting in GetEvent. If you call GetEvent from the thread that processes Windows messages, specify only small wait times on the call in order to remain responsive to user input. This is most important when streaming data from a source such as the Internet, because state transitions can take significantly more time to complete.

After calling GetEvent, applications should always call FreeEventParams to release any resource associated with the event.

For a list of notification codes and event parameter values, see Event Notification Codes.

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

Reference

IMediaEvent Interface