[PATCH v3 01/17] shell32/autocomplete: Revamp pwzsRegKeyPath handling so it can deal with arbitrary sizes and make it more robust

Gabriel Ivăncescu gabrielopcode at gmail.com
Thu Sep 6 09:19:05 CDT 2018


On Thu, Sep 6, 2018 at 5:08 PM, Huw Davies <huw at 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 :-)



More information about the wine-devel mailing list