Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Microsoft Speech Platform
ISpNotifySource::SetNotifySink
ISpNotifySource::SetNotifySink sets up the instance to make free-threaded notification calls through ISpNotifySink::Notify.
<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT SetNotifySink(</strong> <strong><a runat="server" href="jj127654(v=msdn.10).md">ISpNotifySink</a></strong> <em>*pNotifySink</em> <strong>);</strong> </pre>
Parameters
- pNotifySink
[in] Pointer to the notification interface. If pNotifySink is NULL, any current notification mechanism (notify sink, window message, callback, or Win32 event) is removed.
Return Values
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_INVALIDARG | Interface pointer is invalid. |
FAILED (hr) | Appropriate error message. |
Remarks
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.