ISpNotifySource::SetNotifySink sets up the instance to make free-threaded notification calls through ISpNotifySink::Notify.
HRESULT SetNotifySink(
ISpNotifySink *pNotifySink
);
| Value | Description |
|---|---|
| S_OK | Function completed successfully. |
| E_INVALIDARG | Interface pointer is invalid. |
| FAILED (hr) | Appropriate error message. |
If pNotifySink is NULL, any notification mechanism currently associated with this notify source is removed.
Because free-threaded notifications can occur on any thread, at any point during execution, they are extremely prone to deadlocks and re-entrance problems. See the documentation for ISpNotifySink for more details. Most applications will find one of the other notification mechanisms much easier to use.