On Thu, Sep 6, 2018 at 5:08 PM, Huw Davies huw@codeweavers.com wrote:
Well something like:
HKEY roots[] = {HKCU, HKLM}; int i;
for (i = 0; i < ARRAY_SIZE(roots); i++) { if (RegOpenKeyEx(roots[i], key, ..., &hkey) == ERROR_SUCCESS) { ret = query_value(hkey, value); RegCloseKey(hkey); if (ret == ERROR_SUCCESS) { This->quick_complete = data; break; } } }
where query_value does the appropriate calls to RegQueryValueEx().
Huw.
Thanks, I completely misunderstood it before, I thought you wanted just a dummy loop for the break (like a localized goto). Now it is more reasonable indeed :-)