You are reading help file online using chmlib.com
|
ISpNotifySource::SetNotifyCallbackFunction sets up this instance to send notifications using a standard C-style callback function.
HRESULT SetNotifyCallbackFunction(
SPNOTIFYCALLBACK *pfnCallback,
WPARAM wParam,
LPARAM lParam
);
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_INVALIDARG | Callback function is invalid. |
FAILED (hr) | Appropriate error message. |
It is the responsibility of the client code to control the lifetime of a notification. To remove an installed notify callback, call ISpEventSource::SetNotifySink (NULL). The final release of an object that supports ISpEventSource will automatically remove an installed notify callback.
The SAPI implementation uses a hidden window to call back the client on the same thread that was used to initialize the event source. Notification callbacks are the result of processing a window message. When this notification mechanism is used:
The SPNOTIFYCALLBACK function is declared as follows:
typedef void __stdcall SPNOTIFYCALLBACK(WPARAM wParam, LPARAM lParam);
You are reading help file online using chmlib.com
|