sapi: Support create parameter in ISpObjectTokenCategory::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:40 +10:00 committed by Alexandre Julliard
parent 5d11517f6d
commit e482605548
1 changed files with 4 additions and 3 deletions

View File

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