Esme Povirk (@madewokherd) commented about dlls/windowscodecs/metadataquery.c:
- if (SUCCEEDED(hr))
hr = IWICMetadataReader_GetMetadataFormat(reader, guid);
- if (reader)
IWICMetadataReader_Release(reader);
- if (SUCCEEDED(hr))
- {
for (i = 0; i < enumerator->guids.count; ++i)
{
if (IsEqualGUID(&enumerator->guids.entries[i].guid, guid))
{
*index = ++enumerator->guids.entries[i].index;
return S_OK;
}
For this to make sense, I think you must be using the `index` field to mean "number of instances of this guid minus one", in which case the name `index` is confusing.