Commit 9d044669 authored by Shaun Ren's avatar Shaun Ren Committed by Alexandre Julliard

sapi: Implement ISpeechVoice::GetIDsOfNames.

parent dd083a61
...@@ -418,6 +418,7 @@ static void test_spvoice(void) ...@@ -418,6 +418,7 @@ static void test_spvoice(void)
{ {
static const WCHAR test_token_id[] = L"HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Speech\\Voices\\Tokens\\WinetestVoice"; static const WCHAR test_token_id[] = L"HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Speech\\Voices\\Tokens\\WinetestVoice";
static const WCHAR test_text[] = L"Hello! This is a test sentence."; static const WCHAR test_text[] = L"Hello! This is a test sentence.";
static const WCHAR *get_voices = L"GetVoices";
ISpVoice *voice; ISpVoice *voice;
IUnknown *dummy; IUnknown *dummy;
...@@ -438,6 +439,7 @@ static void test_spvoice(void) ...@@ -438,6 +439,7 @@ static void test_spvoice(void)
UINT info_count; UINT info_count;
ITypeInfo *typeinfo; ITypeInfo *typeinfo;
TYPEATTR *typeattr; TYPEATTR *typeattr;
DISPID dispid;
HRESULT hr; HRESULT hr;
if (waveOutGetNumDevs() == 0) { if (waveOutGetNumDevs() == 0) {
...@@ -732,6 +734,11 @@ static void test_spvoice(void) ...@@ -732,6 +734,11 @@ static void test_spvoice(void)
ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr);
ITypeInfo_Release(typeinfo); ITypeInfo_Release(typeinfo);
dispid = 0xdeadbeef;
hr = ISpeechVoice_GetIDsOfNames(speech_voice, &IID_NULL, (WCHAR **)&get_voices, 1, 0x409, &dispid);
ok(hr == S_OK, "got %#lx.\n", hr);
ok(dispid == DISPID_SVGetVoices, "got %#lx.\n", dispid);
ISpeechVoice_Release(speech_voice); ISpeechVoice_Release(speech_voice);
done: done:
......
...@@ -195,11 +195,18 @@ static HRESULT WINAPI speech_voice_GetTypeInfo(ISpeechVoice *iface, UINT index, ...@@ -195,11 +195,18 @@ static HRESULT WINAPI speech_voice_GetTypeInfo(ISpeechVoice *iface, UINT index,
} }
static HRESULT WINAPI speech_voice_GetIDsOfNames(ISpeechVoice *iface, REFIID riid, LPOLESTR *names, static HRESULT WINAPI speech_voice_GetIDsOfNames(ISpeechVoice *iface, REFIID riid, LPOLESTR *names,
UINT count, LCID lcid, DISPID *dispid) UINT count, LCID lcid, DISPID *dispids)
{ {
FIXME("(%p, %s, %p, %u, %lu, %p): stub.\n", iface, debugstr_guid(riid), names, count, lcid, dispid); ITypeInfo *typeinfo;
HRESULT hr;
return E_NOTIMPL; TRACE("(%p, %s, %p, %u, %#lx, %p).\n", iface, debugstr_guid(riid), names, count, lcid, dispids);
if (FAILED(hr = get_typeinfo(ISpeechVoice_tid, &typeinfo)))
return hr;
hr = ITypeInfo_GetIDsOfNames(typeinfo, names, count, dispids);
ITypeInfo_Release(typeinfo);
return hr;
} }
static HRESULT WINAPI speech_voice_Invoke(ISpeechVoice *iface, DISPID dispid, REFIID riid, LCID lcid, static HRESULT WINAPI speech_voice_Invoke(ISpeechVoice *iface, DISPID dispid, REFIID riid, LCID lcid,
......
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