[PATCH 5/9] sapi: Implement SpObjectTokenEnum::GetCount().

Huw Davies huw at codeweavers.com
Thu Sep 28 02:40:50 CDT 2017


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/sapi/token.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c
index 8ad13a8..27d3abe 100644
--- a/dlls/sapi/token.c
+++ b/dlls/sapi/token.c
@@ -234,6 +234,7 @@ struct token_enum
 
     BOOL init;
     WCHAR *req, *opt;
+    ULONG count;
 };
 
 struct token_enum *impl_from_ISpObjectTokenEnumBuilder( ISpObjectTokenEnumBuilder *iface )
@@ -326,8 +327,14 @@ static HRESULT WINAPI token_enum_Item( ISpObjectTokenEnumBuilder *iface,
 static HRESULT WINAPI token_enum_GetCount( ISpObjectTokenEnumBuilder *iface,
                                            ULONG *count )
 {
-    FIXME( "stub\n" );
-    return E_NOTIMPL;
+    struct token_enum *This = impl_from_ISpObjectTokenEnumBuilder( iface );
+
+    TRACE( "(%p)->(%p)\n", This, count );
+
+    if (!This->init) return SPERR_UNINITIALIZED;
+
+    *count = This->count;
+    return S_OK;
 }
 
 static HRESULT WINAPI token_enum_SetAttribs( ISpObjectTokenEnumBuilder *iface,
@@ -417,6 +424,7 @@ HRESULT token_enum_create( IUnknown *outer, REFIID iid, void **obj )
     This->req = NULL;
     This->opt = NULL;
     This->init = FALSE;
+    This->count = 0;
 
     hr = ISpObjectTokenEnumBuilder_QueryInterface( &This->ISpObjectTokenEnumBuilder_iface, iid, obj );
 
-- 
2.7.4




More information about the wine-patches mailing list