Commit dd083a61 authored by Shaun Ren's avatar Shaun Ren Committed by Alexandre Julliard

sapi: Implement ISpeechVoice::GetTypeInfo.

parent 58087358
......@@ -36,6 +36,7 @@ static REFIID tid_id[] =
{
&IID_ISpeechObjectToken,
&IID_ISpeechObjectTokens,
&IID_ISpeechVoice,
};
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
......
......@@ -57,6 +57,7 @@ enum type_id
{
ISpeechObjectToken_tid,
ISpeechObjectTokens_tid,
ISpeechVoice_tid,
last_tid
};
......
......@@ -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:
......
......@@ -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,
......
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