Skip to content

Commit

Permalink
sapi: Implement ISpeechObjectTokens::get_Count.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunren authored and julliard committed Feb 13, 2024
1 parent 59a7ee1 commit 261d7c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions dlls/sapi/tests/token.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ static void test_token_enum(void)
hr = ISpObjectTokenEnumBuilder_AddTokens( token_enum, 3, tokens );
ok( hr == S_OK, "got %08lx\n", hr );

count = 0xdeadbeef;
hr = ISpeechObjectTokens_get_Count( speech_tokens, (LONG *)&count );
ok( hr == S_OK, "got %08lx\n", hr );
ok( count == 3, "got %lu\n", count );

hr = ISpeechObjectTokens_get__NewEnum( speech_tokens, &unk );
ok( hr == S_OK, "got %08lx\n", hr );
hr = IUnknown_QueryInterface( unk, &IID_IEnumVARIANT, (void **)&enumvar );
Expand Down
7 changes: 5 additions & 2 deletions dlls/sapi/token.c
Original file line number Diff line number Diff line change
Expand Up @@ -1313,8 +1313,11 @@ static HRESULT WINAPI speech_tokens_Invoke( ISpeechObjectTokens *iface,
static HRESULT WINAPI speech_tokens_get_Count( ISpeechObjectTokens *iface,
LONG *count )
{
FIXME( "stub\n" );
return E_NOTIMPL;
struct token_enum *This = impl_from_ISpeechObjectTokens( iface );

TRACE( "(%p)->(%p)\n", This, count );

return ISpObjectTokenEnumBuilder_GetCount( &This->ISpObjectTokenEnumBuilder_iface, (ULONG *)count );
}

static HRESULT WINAPI speech_tokens_Item( ISpeechObjectTokens *iface,
Expand Down

0 comments on commit 261d7c3

Please sign in to comment.