sapi: Implement ISpeechVoice::GetIDsOfNames.

This commit is contained in:
Shaun Ren 2024-02-16 20:04:41 -05:00 committed by Alexandre Julliard
parent dd083a6195
commit 9d044669f3
2 changed files with 17 additions and 3 deletions

View file

@ -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_text[] = L"Hello! This is a test sentence.";
static const WCHAR *get_voices = L"GetVoices";
ISpVoice *voice;
IUnknown *dummy;
@ -438,6 +439,7 @@ static void test_spvoice(void)
UINT info_count;
ITypeInfo *typeinfo;
TYPEATTR *typeattr;
DISPID dispid;
HRESULT hr;
if (waveOutGetNumDevs() == 0) {
@ -732,6 +734,11 @@ static void test_spvoice(void)
ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr);
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);
done:

View file

@ -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,
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,