From: Shaun Ren sren@codeweavers.com
--- dlls/sapi/tests/token.c | 7 +++++++ dlls/sapi/token.c | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/dlls/sapi/tests/token.c b/dlls/sapi/tests/token.c index ec8a101fea4..6265cde2bc3 100644 --- a/dlls/sapi/tests/token.c +++ b/dlls/sapi/tests/token.c @@ -660,6 +660,7 @@ static IClassFactory test_class_cf = { &ClassFactoryVtbl }; static void test_object_token(void) { static const WCHAR test_token_id[] = L"HKEY_LOCAL_MACHINE\Software\Winetest\sapi\TestToken"; + static const WCHAR *get_description = L"GetDescription";
ISpObjectToken *token; IDispatch *disp; @@ -671,6 +672,7 @@ static void test_object_token(void) ISpObjectTokenCategory *cat; DWORD regid; IUnknown *obj; + DISPID dispid; DISPPARAMS params; VARIANT arg, ret;
@@ -919,6 +921,11 @@ static void test_object_token(void) ok( tempB && !wcscmp( tempB, L"TestToken" ), "got %s\n", wine_dbgstr_w( tempB ) ); SysFreeString( tempB );
+ dispid = 0xdeadbeef; + hr = ISpeechObjectToken_GetIDsOfNames( speech_token, &IID_NULL, (WCHAR **)&get_description, 1, 0x409, &dispid ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( dispid == DISPID_SOTGetDescription, "got %08lx\n", dispid ); + memset( ¶ms, 0, sizeof(params) ); params.cArgs = 1; params.cNamedArgs = 0; diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c index c8cb806bbae..888da86d7a4 100644 --- a/dlls/sapi/token.c +++ b/dlls/sapi/token.c @@ -1787,8 +1787,18 @@ static HRESULT WINAPI speech_token_GetIDsOfNames( ISpeechObjectToken *iface, LCID lcid, DISPID *dispids ) { - FIXME( "stub\n" ); - return E_NOTIMPL; + ITypeInfo *ti; + HRESULT hr; + + TRACE( "(%p)->(%s %p %u %#lx %p)\n", + iface, debugstr_guid( iid ), names, count, lcid, dispids ); + + if (FAILED(hr = get_typeinfo( ISpeechObjectToken_tid, &ti ))) + return hr; + hr = ITypeInfo_GetIDsOfNames( ti, names, count, dispids ); + ITypeInfo_Release( ti ); + + return hr; }
static HRESULT WINAPI speech_token_Invoke( ISpeechObjectToken *iface,