shell32: Avoid closing the caller's key.

Signed-off-by: Theodore Dubois <tblodt@icloud.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Theodore Dubois 2016-06-05 09:35:39 -07:00 committed by Alexandre Julliard
parent 2a7c4ea875
commit 7c915af47e
1 changed files with 3 additions and 1 deletions

View File

@ -259,7 +259,9 @@ static HRESULT WINAPI IQueryAssociations_fnInit(
}
else if (hkeyProgid != NULL)
{
This->hkeySource = This->hkeyProgID = hkeyProgid;
/* reopen the key so we don't end up closing a key owned by the caller */
RegOpenKeyExW(hkeyProgid, NULL, 0, KEY_READ, &This->hkeyProgID);
This->hkeySource = This->hkeyProgID;
return S_OK;
}
else