Partager via


IMediaEventEx::SetNotifyWindow

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method registers a window that will handle messages in response to all events from an object.

Syntax

HRESULT SetNotifyWindow(
  OAHWND hwnd,
  long lMsg,
  long lInstanceData
);

Parameters

  • hwnd
    [in] Handle of window to notify. Pass NULL to stop notification.
  • lMsg
    [in] Window message to be passed as the notification.
  • lInstanceData
    [in] Value (instance data) to be passed as the lParam parameter for the lMsg message.

Return Value

Returns S_OK if successful or E_INVALIDARG if an argument is invalid.

Remarks

This method designates a window as the recipient of messages generated by or sent to the current DirectShow object. You can use this method to monitor the messages from multiple sources in a single window, which lowers processing overhead.

If an event occurs, DirectShow posts the notification message specified in lMsg to the window specified by hwnd. SetNotifyWindow sets the message's lParam parameter to lInstanceData and its wParam parameter to zero.

You can retrieve the event information by calling the GetEvent method when the destination window receives the message.

All event types post the message; when it arrives, any number of events, including zero, might actually be in the queue. If more than one event is in the queue when you call SetNotifyWindow, DirectShow posts only one message. If the application can receive the message after some other action has cleared events from the queue, there might be no events in the queue. For example, the Stop method clears all EC_COMPLETE events from the queue.

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

IMediaEventEx Interface