Microsoft Windows CE 3.0  

IMediaEventEx::SetNotifyWindow

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.

Registers a window that will handle messages in response to all events from an object.

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

Parameters

hwnd
[in] Handle of window to notify. Pass NULL to stop notification.
lMsg
[in] The window message to be passed as the notification.
lInstanceData
[in] Value (instance data) to be passed as the lParamparameter for the lMsgmessage.

Return Values

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 lMsgto the window specified by hwnd. SetNotifyWindowsets the message's lParamparameter to lInstanceDataand its wParamparameter to zero.

You can retrieve the event information by calling the GetEventmethod 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 Stopmethod clears all EC_COMPLETEevents from the queue.