From: Alistair Leslie-Hughes Subject: [PATCH 3/3] sapi: ISpObjectTokenCategory SetId - Support create parameter Message-Id: Date: Wed, 15 Sep 2021 18:55:40 +1000 In-Reply-To: <20210915085540.612257-1-leslie_alistair@hotmail.com> References: <20210915085540.612257-1-leslie_alistair@hotmail.com> Signed-off-by: Alistair Leslie-Hughes --- dlls/sapi/token.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c index ec1cce5f462..ba91a425e9e 100644 --- a/dlls/sapi/token.c +++ b/dlls/sapi/token.c @@ -416,9 +416,10 @@ static HRESULT WINAPI token_category_SetId( ISpObjectTokenCategory *iface, hr = parse_cat_id( id, &root, &subkey ); if (hr != S_OK) return SPERR_INVALID_REGISTRY_KEY; - if (create) FIXME( "Ignoring create\n" ); - - res = RegOpenKeyExW( root, subkey, 0, KEY_ALL_ACCESS, &key ); + if (create) + res = RegCreateKeyExW( root, subkey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); + else + res = RegOpenKeyExW( root, subkey, 0, KEY_ALL_ACCESS, &key ); if (res) return SPERR_INVALID_REGISTRY_KEY; hr = CoCreateInstance( &CLSID_SpDataKey, NULL, CLSCTX_ALL, -- 2.33.0