Module: wine Branch: master Commit: 5d11517f6d6bd1d2fd864ce3eb821602162c70d8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=5d11517f6d6bd1d2fd864ce3e...
Author: Alistair Leslie-Hughes leslie_alistair@hotmail.com Date: Wed Sep 15 18:55:39 2021 +1000
sapi: Support create parameter in ISpObjectToken::SetId.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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;