Module: wine Branch: master Commit: 261d7c3de4af85f7b2269f5b0e2809f11a102894 URL: https://gitlab.winehq.org/wine/wine/-/commit/261d7c3de4af85f7b2269f5b0e2809f...
Author: Shaun Ren sren@codeweavers.com Date: Tue Feb 6 16:37:07 2024 -0500
sapi: Implement ISpeechObjectTokens::get_Count.
---
dlls/sapi/tests/token.c | 5 +++++ dlls/sapi/token.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/sapi/tests/token.c b/dlls/sapi/tests/token.c index 6265cde2bc3..a68a0b7cd46 100644 --- a/dlls/sapi/tests/token.c +++ b/dlls/sapi/tests/token.c @@ -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 ); diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c index 888da86d7a4..2cfc34304c9 100644 --- a/dlls/sapi/token.c +++ b/dlls/sapi/token.c @@ -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,