Skip to content

Commit

Permalink
sapi: Implement ISpeechObjectToken::GetIDsOfNames.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunren authored and julliard committed Feb 13, 2024
1 parent 001d1a4 commit 59a7ee1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
7 changes: 7 additions & 0 deletions dlls/sapi/tests/token.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -671,6 +672,7 @@ static void test_object_token(void)
ISpObjectTokenCategory *cat;
DWORD regid;
IUnknown *obj;
DISPID dispid;
DISPPARAMS params;
VARIANT arg, ret;

Expand Down Expand Up @@ -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( &params, 0, sizeof(params) );
params.cArgs = 1;
params.cNamedArgs = 0;
Expand Down
14 changes: 12 additions & 2 deletions dlls/sapi/token.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 59a7ee1

Please sign in to comment.