From e071a70ba870cee586d28beca8f8965f63378eef Mon Sep 17 00:00:00 2001 From: Shaun Ren Date: Thu, 25 May 2023 23:35:28 -0400 Subject: [PATCH] sapi: Implement ISpObjectToken::CreateKey. --- dlls/sapi/tests/token.c | 4 ++++ dlls/sapi/token.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/sapi/tests/token.c b/dlls/sapi/tests/token.c index 3629a86b126..287c74a3e58 100644 --- a/dlls/sapi/tests/token.c +++ b/dlls/sapi/tests/token.c @@ -513,6 +513,10 @@ static void test_object_token(void) hr = ISpObjectToken_SetId( token, NULL, test_token_id, TRUE ); ok( hr == S_OK, "got %08lx\n", hr ); + hr = ISpObjectToken_CreateKey( token, L"Attributes", &sub_key ); + ok( hr == S_OK, "got %08lx\n", hr ); + ISpDataKey_Release( sub_key ); + hr = ISpObjectToken_SetStringValue( token, L"CLSID", TESTCLASS_CLSID ); ok( hr == S_OK, "got %08lx\n", hr ); diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c index 6cc7ccd6d73..dbbc14b6e56 100644 --- a/dlls/sapi/token.c +++ b/dlls/sapi/token.c @@ -1117,8 +1117,11 @@ static HRESULT WINAPI token_OpenKey( ISpObjectToken *iface, static HRESULT WINAPI token_CreateKey( ISpObjectToken *iface, LPCWSTR name, ISpDataKey **sub_key ) { - FIXME( "stub\n" ); - return E_NOTIMPL; + struct object_token *This = impl_from_ISpObjectToken( iface ); + + TRACE( "%p, %s, %p\n", iface, debugstr_w(name), sub_key ); + + return ISpRegDataKey_CreateKey( This->data_key, name, sub_key ); } static HRESULT WINAPI token_DeleteKey( ISpObjectToken *iface, -- 2.11.4.GIT