1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

sapi: Implement ISpeechVoice::GetTypeInfo.

This commit is contained in:
Shaun Ren 2024-02-16 19:52:33 -05:00 committed by Alexandre Julliard
parent 58087358d1
commit dd083a6195
4 changed files with 19 additions and 4 deletions

View file

@ -36,6 +36,7 @@ static REFIID tid_id[] =
{
&IID_ISpeechObjectToken,
&IID_ISpeechObjectTokens,
&IID_ISpeechVoice,
};
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)

View file

@ -57,6 +57,7 @@ enum type_id
{
ISpeechObjectToken_tid,
ISpeechObjectTokens_tid,
ISpeechVoice_tid,
last_tid
};

View file

@ -436,6 +436,8 @@ static void test_spvoice(void)
LONG count;
BSTR req = NULL, opt = NULL;
UINT info_count;
ITypeInfo *typeinfo;
TYPEATTR *typeattr;
HRESULT hr;
if (waveOutGetNumDevs() == 0) {
@ -719,6 +721,17 @@ static void test_spvoice(void)
ok(hr == S_OK, "got %#lx.\n", hr);
ok(info_count == 1, "got %u.\n", info_count);
typeinfo = NULL;
typeattr = NULL;
hr = ISpeechVoice_GetTypeInfo(speech_voice, 0, 0, &typeinfo);
ok(hr == S_OK, "got %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr);
ok(hr == S_OK, "got %#lx.\n", hr);
ok(typeattr->typekind == TKIND_DISPATCH, "got %u.\n", typeattr->typekind);
ok(IsEqualGUID(&typeattr->guid, &IID_ISpeechVoice), "got %s.\n", wine_dbgstr_guid(&typeattr->guid));
ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr);
ITypeInfo_Release(typeinfo);
ISpeechVoice_Release(speech_voice);
done:

View file

@ -186,12 +186,12 @@ static HRESULT WINAPI speech_voice_GetTypeInfoCount(ISpeechVoice *iface, UINT *c
return S_OK;
}
static HRESULT WINAPI speech_voice_GetTypeInfo(ISpeechVoice *iface, UINT info, LCID lcid,
static HRESULT WINAPI speech_voice_GetTypeInfo(ISpeechVoice *iface, UINT index, LCID lcid,
ITypeInfo **type_info)
{
FIXME("(%p, %u, %lu, %p): stub.\n", iface, info, lcid, type_info);
return E_NOTIMPL;
TRACE("(%p, %u, %#lx, %p).\n", iface, index, lcid, type_info);
if (index != 0) return DISP_E_BADINDEX;
return get_typeinfo(ISpeechVoice_tid, type_info);
}
static HRESULT WINAPI speech_voice_GetIDsOfNames(ISpeechVoice *iface, REFIID riid, LPOLESTR *names,