Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

ISpNotifyTranslator::InitWindowMessage

ISpNotifyTranslator::InitWindowMessage sets up the instance to send window messages to a specified window.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT InitWindowMessage(</strong> <strong>HWND</strong> <em>hWnd</em>, <strong>UINT</strong> <em>Msg</em>, <strong>WPARAM</strong> <em>wParam</em>, <strong>LPARAM</strong> <em>lParam</em> <strong>);</strong> </pre>

Parameters

  • hWnd
    [in] Handle to the window whose message handler function will receive Speech Platform notifications.
  • Msg
    [in] Message number which will be passed into the message handler function of the window hWnd.
  • wParam
    [in] wParam that will be passed into the message handler function of the window hWnd.
  • lParam
    [in] lParam that will be passed into the message handler function of the window hWnd

Return Values

Value Description
S_OK Function completed successfully.
SPERR_ALREADY_INITIALIZED SpTranslator object already initialized.
E_INVALIDARG hWnd is invalid or bad.
FAILED(hr) Appropriate error message.