Skip to content

Commit 59a7ee1

Browse files
shaunrenjulliard
authored andcommitted
sapi: Implement ISpeechObjectToken::GetIDsOfNames.
1 parent 001d1a4 commit 59a7ee1

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

dlls/sapi/tests/token.c

+7
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ static IClassFactory test_class_cf = { &ClassFactoryVtbl };
660660
static void test_object_token(void)
661661
{
662662
static const WCHAR test_token_id[] = L"HKEY_LOCAL_MACHINE\\Software\\Winetest\\sapi\\TestToken";
663+
static const WCHAR *get_description = L"GetDescription";
663664

664665
ISpObjectToken *token;
665666
IDispatch *disp;
@@ -671,6 +672,7 @@ static void test_object_token(void)
671672
ISpObjectTokenCategory *cat;
672673
DWORD regid;
673674
IUnknown *obj;
675+
DISPID dispid;
674676
DISPPARAMS params;
675677
VARIANT arg, ret;
676678

@@ -919,6 +921,11 @@ static void test_object_token(void)
919921
ok( tempB && !wcscmp( tempB, L"TestToken" ), "got %s\n", wine_dbgstr_w( tempB ) );
920922
SysFreeString( tempB );
921923

924+
dispid = 0xdeadbeef;
925+
hr = ISpeechObjectToken_GetIDsOfNames( speech_token, &IID_NULL, (WCHAR **)&get_description, 1, 0x409, &dispid );
926+
ok( hr == S_OK, "got %08lx\n", hr );
927+
ok( dispid == DISPID_SOTGetDescription, "got %08lx\n", dispid );
928+
922929
memset( &params, 0, sizeof(params) );
923930
params.cArgs = 1;
924931
params.cNamedArgs = 0;

dlls/sapi/token.c

+12-2
Original file line numberDiff line numberDiff line change
@@ -1787,8 +1787,18 @@ static HRESULT WINAPI speech_token_GetIDsOfNames( ISpeechObjectToken *iface,
17871787
LCID lcid,
17881788
DISPID *dispids )
17891789
{
1790-
FIXME( "stub\n" );
1791-
return E_NOTIMPL;
1790+
ITypeInfo *ti;
1791+
HRESULT hr;
1792+
1793+
TRACE( "(%p)->(%s %p %u %#lx %p)\n",
1794+
iface, debugstr_guid( iid ), names, count, lcid, dispids );
1795+
1796+
if (FAILED(hr = get_typeinfo( ISpeechObjectToken_tid, &ti )))
1797+
return hr;
1798+
hr = ITypeInfo_GetIDsOfNames( ti, names, count, dispids );
1799+
ITypeInfo_Release( ti );
1800+
1801+
return hr;
17921802
}
17931803

17941804
static HRESULT WINAPI speech_token_Invoke( ISpeechObjectToken *iface,

0 commit comments

Comments
 (0)