[PATCH 0/1] MR10657: cfgmgr32: Fix querying unnamed properties.
From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/cfgmgr32/cfgmgr32.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/cfgmgr32/cfgmgr32.c b/dlls/cfgmgr32/cfgmgr32.c index 280f10dd4db..18a5d94de17 100644 --- a/dlls/cfgmgr32/cfgmgr32.c +++ b/dlls/cfgmgr32/cfgmgr32.c @@ -160,10 +160,14 @@ static LSTATUS query_property( HKEY root, const WCHAR *prefix, DEVPROPTYPE type, WCHAR path[MAX_PATH]; ULONG reg_type; LSTATUS err; + HKEY hkey; - err = RegQueryValueExW( root, propkey_string( &prop->key, prefix, path, ARRAY_SIZE(path) ), - NULL, ®_type, prop->buffer, prop->size ); - if (type == DEVPROP_TYPE_EMPTY) type = reg_type & 0xffff; + if (!(err = open_key( root, propkey_string( &prop->key, prefix, path, ARRAY_SIZE(path) ), KEY_QUERY_VALUE, TRUE, &hkey ))) + { + err = RegQueryValueExW( hkey, NULL, NULL, ®_type, prop->buffer, prop->size ); + if (type == DEVPROP_TYPE_EMPTY) type = reg_type & 0xffff; + RegCloseKey( hkey ); + } if (!err && !prop->buffer) err = ERROR_MORE_DATA; if ((!err || err == ERROR_MORE_DATA) && prop->type) *prop->type = type; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10657
participants (2)
-
Rémi Bernon -
Rémi Bernon (@rbernon)