Commit 6eab4981 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msdmo: Fix RegOpenKeyExW() failure condition.

Spotted by Mark Harmstone.
parent 5c91d011
......@@ -364,6 +364,7 @@ static HRESULT IEnumDMO_Constructor(
IEnumDMOImpl* lpedmo;
HRESULT hr = S_OK;
UINT size;
LONG ret;
*obj = NULL;
......@@ -406,8 +407,8 @@ static HRESULT IEnumDMO_Constructor(
/* If not filtering by category enum from media objects root */
if (IsEqualGUID(guidCategory, &GUID_NULL))
{
if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0, KEY_READ, &lpedmo->hkey))
hr = E_FAIL;
if ((ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0, KEY_READ, &lpedmo->hkey)))
hr = HRESULT_FROM_WIN32(ret);
}
else
{
......@@ -416,8 +417,8 @@ static HRESULT IEnumDMO_Constructor(
wsprintfW(szKey, szCat3Fmt, szDMORootKey, szDMOCategories,
GUIDToString(szguid, guidCategory));
if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &lpedmo->hkey))
hr = E_FAIL;
if ((ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &lpedmo->hkey)))
hr = HRESULT_FROM_WIN32(ret);
}
lerr:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment