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>
This commit is contained in:
Alistair Leslie-Hughes 2021-09-15 18:55:39 +10:00 committed by Alexandre Julliard
parent d2ff007ae0
commit 5d11517f6d

View file

@ -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;