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 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 lParamparameter for the lMsgmessage.

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 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.

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