From e482605548b124a7863f6b09395b3a850ae741cc Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 15 Sep 2021 18:55:40 +1000 Subject: [PATCH] sapi: Support create parameter in ISpObjectTokenCategory::SetId. Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Alexandre Julliard --- 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,