[PATCH 3/3] sapi: ISpObjectTokenCategory SetId - Support create parameter

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Wed Sep 15 03:55:40 CDT 2021


Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 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




More information about the wine-devel mailing list