[PATCH 3/4] mfplat: Implement MFTEnum.

Nikolay Sivov bunglehead at gmail.com
Fri Apr 28 00:46:34 CDT 2017


On 28.04.2017 7:28, Alistair Leslie-Hughes wrote:
> +    for (i = 0; i < size / sizeof(GUID); i += 2)
> +    {
> +        if (!memcmp(&guids[i], &type->guidMajorType, sizeof(GUID)) &&
> +            !memcmp(&guids[i+1], &type->guidSubtype, sizeof(GUID)))
> +        {
> +            ret = TRUE;
> +            break;
> +        }
> +    }

IsEqualGUID could be used instead.

> +HRESULT WINAPI MFTEnum(GUID category, UINT32 flags, MFT_REGISTER_TYPE_INFO *input_type,
> +                       MFT_REGISTER_TYPE_INFO *output_type, IMFAttributes *attributes,
> +                       CLSID **pclsids, UINT32 *pcount)

I think it's better to print a fixme for non-zero flags and attributes,
and use TRACE otherwise.

> +    if (RegOpenKeyW(HKEY_LOCAL_MACHINE, categories_keyW, &hcategory))
> +        return E_FAIL;
> +
> +    GUIDToString(buffer, &category);
> +
> +    ret = RegOpenKeyW(hcategory, buffer, &hlist);
> +    RegCloseKey(hcategory);
> +    if (ret) return E_FAIL;

This probably could be replaced with a single RegOpenKeyW().

> +        PVOID tmp;

Why void*?



More information about the wine-devel mailing list