Commit 0ff960b7 authored by Bernhard Kölbl's avatar Bernhard Kölbl Committed by Alexandre Julliard

windows.media.speech: Implement ISpeechRecognizer2_get_ContinuousRecognitionSession.

parent a03a4ee6
......@@ -443,8 +443,10 @@ DEFINE_IINSPECTABLE(recognizer2, ISpeechRecognizer2, struct recognizer, ISpeechR
static HRESULT WINAPI recognizer2_get_ContinuousRecognitionSession( ISpeechRecognizer2 *iface,
ISpeechContinuousRecognitionSession **session )
{
FIXME("iface %p, session %p stub!\n", iface, session);
return E_NOTIMPL;
struct recognizer *impl = impl_from_ISpeechRecognizer2(iface);
TRACE("iface %p, session %p.\n", iface, session);
ISpeechContinuousRecognitionSession_QueryInterface(impl->session, &IID_ISpeechContinuousRecognitionSession, (void **)session);
return S_OK;
}
static HRESULT WINAPI recognizer2_get_State( ISpeechRecognizer2 *iface, SpeechRecognizerState *state )
......
......@@ -569,6 +569,7 @@ static void test_VoiceInformation(void)
static void test_SpeechRecognizer(void)
{
static const WCHAR *speech_recognition_name = L"Windows.Media.SpeechRecognition.SpeechRecognizer";
ISpeechContinuousRecognitionSession *session = NULL;
ISpeechRecognizerFactory *sr_factory = NULL;
ISpeechRecognizerStatics *sr_statics = NULL;
ISpeechRecognizerStatics2 *sr_statics2 = NULL;
......@@ -648,6 +649,14 @@ static void test_SpeechRecognizer(void)
hr = IInspectable_QueryInterface(inspectable, &IID_ISpeechRecognizer2, (void **)&recognizer2);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ISpeechRecognizer2_get_ContinuousRecognitionSession(recognizer2, &session);
ok(hr == S_OK, "ISpeechRecognizer2_get_ContinuousRecognitionSession failed, hr %#lx.\n", hr);
check_refcount(session, 2);
check_refcount(inspectable, 3);
ref = ISpeechContinuousRecognitionSession_Release(session);
ok(ref == 1, "Got unexpected ref %lu.\n", ref);
hr = IInspectable_QueryInterface(inspectable, &IID_IClosable, (void **)&closable);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment