[PATCH 2/3] sapi: ISpObjectToken SetId - Support create parameter
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Wed Sep 15 03:55:39 CDT 2021
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/sapi/token.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c
index 04fa3a25d6a..ec1cce5f462 100644
--- a/dlls/sapi/token.c
+++ b/dlls/sapi/token.c
@@ -942,7 +942,10 @@ static HRESULT WINAPI token_SetId( ISpObjectToken *iface,
hr = parse_cat_id( token_id, &root, &subkey );
if (hr != S_OK) return SPERR_NOT_FOUND;
- 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_NOT_FOUND;
This->token_key = key;
--
2.33.0
More information about the wine-devel
mailing list