IMediaEventEx::SetNotifyWindow (Compact 2013)
3/26/2014
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
Header |
dshow.h |
Library |
Strmiids.lib |