ReactOS  0.4.14-dev-98-gb0d4763
metadataquery.c
Go to the documentation of this file.
1 /*
2  * Copyright 2016 Andrew Eikum for CodeWeavers
3  * Copyright 2017 Dmitry Timoshkov
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18  */
19 
20 #include "config.h"
21 
22 #include <stdarg.h>
23 
24 #define COBJMACROS
25 #define NONAMELESSUNION
26 
27 #include "windef.h"
28 #include "winbase.h"
29 #include "objbase.h"
30 #include "propvarutil.h"
31 
32 #include "wincodecs_private.h"
33 
34 #include "wine/debug.h"
35 
37 
38 static const WCHAR *map_shortname_to_schema(const GUID *format, const WCHAR *name);
39 
40 typedef struct {
45 } QueryReader;
46 
48 {
49  return CONTAINING_RECORD(iface, QueryReader, IWICMetadataQueryReader_iface);
50 }
51 
53  void **ppvObject)
54 {
56 
57  TRACE("(%p,%s,%p)\n", This, debugstr_guid(riid), ppvObject);
58 
59  if (IsEqualGUID(riid, &IID_IUnknown) ||
60  IsEqualGUID(riid, &IID_IWICMetadataQueryReader))
61  *ppvObject = &This->IWICMetadataQueryReader_iface;
62  else
63  *ppvObject = NULL;
64 
65  if (*ppvObject)
66  {
67  IUnknown_AddRef((IUnknown*)*ppvObject);
68  return S_OK;
69  }
70 
71  return E_NOINTERFACE;
72 }
73 
75 {
78  TRACE("(%p) refcount=%u\n", This, ref);
79  return ref;
80 }
81 
83 {
86  TRACE("(%p) refcount=%u\n", This, ref);
87  if (!ref)
88  {
89  IWICMetadataBlockReader_Release(This->block);
90  HeapFree(GetProcessHeap(), 0, This->root);
92  }
93  return ref;
94 }
95 
97 {
99 
100  TRACE("(%p,%p)\n", This, format);
101 
102  return IWICMetadataBlockReader_GetContainerFormat(This->block, format);
103 }
104 
106 {
107  static const WCHAR rootW[] = { '/',0 };
109  const WCHAR *root;
110  UINT actual_len;
111 
112  TRACE("(%p,%u,%p,%p)\n", This, len, location, ret_len);
113 
114  if (!ret_len) return E_INVALIDARG;
115 
116  root = This->root ? This->root : rootW;
117  actual_len = lstrlenW(root) + 1;
118 
119  if (location)
120  {
121  if (len < actual_len)
123 
124  memcpy(location, root, actual_len * sizeof(WCHAR));
125  }
126 
127  *ret_len = actual_len;
128 
129  return S_OK;
130 }
131 
132 struct string_t
133 {
134  const WCHAR *str;
135  int len;
136 };
137 
138 static const struct
139 {
140  int len;
141  WCHAR str[10];
143 } str2vt[] =
144 {
145  { 4, {'c','h','a','r'}, VT_I1 },
146  { 5, {'u','c','h','a','r'}, VT_UI1 },
147  { 5, {'s','h','o','r','t'}, VT_I2 },
148  { 6, {'u','s','h','o','r','t'}, VT_UI2 },
149  { 4, {'l','o','n','g'}, VT_I4 },
150  { 5, {'u','l','o','n','g'}, VT_UI4 },
151  { 3, {'i','n','t'}, VT_I4 },
152  { 4, {'u','i','n','t'}, VT_UI4 },
153  { 8, {'l','o','n','g','l','o','n','g'}, VT_I8 },
154  { 9, {'u','l','o','n','g','l','o','n','g'}, VT_UI8 },
155  { 5, {'f','l','o','a','t'}, VT_R4 },
156  { 6, {'d','o','u','b','l','e'}, VT_R8 },
157  { 3, {'s','t','r'}, VT_LPSTR },
158  { 4, {'w','s','t','r'}, VT_LPWSTR },
159  { 4, {'g','u','i','d'}, VT_CLSID },
160  { 4, {'b','o','o','l'}, VT_BOOL }
161 };
162 
163 static VARTYPE map_type(struct string_t *str)
164 {
165  UINT i;
166 
167  for (i = 0; i < ARRAY_SIZE(str2vt); i++)
168  {
169  if (str2vt[i].len == str->len)
170  {
172  str->str, str->len, str2vt[i].str, str2vt[i].len) == CSTR_EQUAL)
173  return str2vt[i].vt;
174  }
175  }
176 
177  WARN("type %s is not recognized\n", wine_dbgstr_wn(str->str, str->len));
178 
179  return VT_ILLEGAL;
180 }
181 
182 static HRESULT get_token(struct string_t *elem, PROPVARIANT *id, PROPVARIANT *schema, int *idx)
183 {
184  const WCHAR *start, *end, *p;
185  WCHAR *bstr;
186  struct string_t next_elem;
187  HRESULT hr;
188 
189  TRACE("%s, len %d\n", wine_dbgstr_wn(elem->str, elem->len), elem->len);
190 
191  PropVariantInit(id);
192  PropVariantInit(schema);
193 
194  if (!elem->len) return S_OK;
195 
196  start = elem->str;
197 
198  if (*start == '[')
199  {
200  WCHAR *idx_end;
201 
202  if (start[1] < '0' || start[1] > '9') return DISP_E_TYPEMISMATCH;
203 
204  *idx = strtolW(start + 1, &idx_end, 10);
205  if (idx_end > elem->str + elem->len) return WINCODEC_ERR_INVALIDQUERYREQUEST;
206  if (*idx_end != ']') return WINCODEC_ERR_INVALIDQUERYREQUEST;
207  if (*idx < 0) return WINCODEC_ERR_INVALIDQUERYREQUEST;
208  end = idx_end + 1;
209 
210  next_elem.str = end;
211  next_elem.len = elem->len - (end - start);
212  hr = get_token(&next_elem, id, schema, idx);
213  if (hr != S_OK)
214  {
215  TRACE("get_token error %#x\n", hr);
216  return hr;
217  }
218  elem->len = (end - start) + next_elem.len;
219 
220  TRACE("indexed %s [%d]\n", wine_dbgstr_wn(elem->str, elem->len), *idx);
221  return S_OK;
222  }
223  else if (*start == '{')
224  {
225  VARTYPE vt;
226  PROPVARIANT next_token;
227 
228  end = memchrW(start + 1, '=', elem->len - 1);
230  if (end > elem->str + elem->len) return WINCODEC_ERR_INVALIDQUERYREQUEST;
231 
232  next_elem.str = start + 1;
233  next_elem.len = end - start - 1;
234  vt = map_type(&next_elem);
235  TRACE("type %s => %d\n", wine_dbgstr_wn(next_elem.str, next_elem.len), vt);
236  if (vt == VT_ILLEGAL) return WINCODEC_ERR_WRONGSTATE;
237 
238  next_token.vt = VT_BSTR;
239  next_token.u.bstrVal = SysAllocStringLen(NULL, elem->len - (end - start) + 1);
240  if (!next_token.u.bstrVal) return E_OUTOFMEMORY;
241 
242  bstr = next_token.u.bstrVal;
243 
244  end++;
245  p = end;
246  while (*end && *end != '}' && end - start < elem->len)
247  {
248  if (*end == '\\') end++;
249  *bstr++ = *end++;
250  }
251  if (*end != '}')
252  {
255  }
256  *bstr = 0;
257  TRACE("schema/id %s\n", wine_dbgstr_w(next_token.u.bstrVal));
258 
259  if (vt == VT_CLSID)
260  {
261  id->vt = VT_CLSID;
262  id->u.puuid = CoTaskMemAlloc(sizeof(GUID));
263  if (!id->u.puuid)
264  {
266  return E_OUTOFMEMORY;
267  }
268 
269  hr = UuidFromStringW(next_token.u.bstrVal, id->u.puuid);
270  }
271  else
274  if (hr != S_OK)
275  {
276  PropVariantClear(id);
278  return hr;
279  }
280 
281  end++;
282  if (*end == ':')
283  {
284  PROPVARIANT next_id, next_schema;
285  int next_idx = 0;
286 
287  next_elem.str = end + 1;
288  next_elem.len = elem->len - (end - start + 1);
289  hr = get_token(&next_elem, &next_id, &next_schema, &next_idx);
290  if (hr != S_OK)
291  {
292  TRACE("get_token error %#x\n", hr);
293  return hr;
294  }
295  elem->len = (end - start + 1) + next_elem.len;
296 
297  TRACE("id %s [%d]\n", wine_dbgstr_wn(elem->str, elem->len), *idx);
298 
299  if (next_schema.vt != VT_EMPTY)
300  {
302  PropVariantClear(&next_schema);
304  }
305 
306  *schema = *id;
307  *id = next_id;
308 
309  return S_OK;
310  }
311 
312  elem->len = end - start;
313  return S_OK;
314  }
315 
316  end = memchrW(start, '/', elem->len);
317  if (!end) end = start + elem->len;
318 
319  p = memchrW(start, ':', end - start);
320  if (p)
321  {
322  next_elem.str = p + 1;
323  next_elem.len = end - p - 1;
324 
325  elem->len = p - start;
326  }
327  else
328  elem->len = end - start;
329 
330  id->vt = VT_BSTR;
331  id->u.bstrVal = SysAllocStringLen(NULL, elem->len + 1);
332  if (!id->u.bstrVal) return E_OUTOFMEMORY;
333 
334  bstr = id->u.bstrVal;
335  p = elem->str;
336  while (p - elem->str < elem->len)
337  {
338  if (*p == '\\') p++;
339  *bstr++ = *p++;
340  }
341  *bstr = 0;
342  TRACE("%s [%d]\n", wine_dbgstr_variant((VARIANT *)id), *idx);
343 
344  if (*p == ':')
345  {
346  PROPVARIANT next_id, next_schema;
347  int next_idx = 0;
348 
349  hr = get_token(&next_elem, &next_id, &next_schema, &next_idx);
350  if (hr != S_OK)
351  {
352  TRACE("get_token error %#x\n", hr);
353  PropVariantClear(id);
355  return hr;
356  }
357  elem->len += next_elem.len + 1;
358 
359  TRACE("id %s [%d]\n", wine_dbgstr_wn(elem->str, elem->len), *idx);
360 
361  if (next_schema.vt != VT_EMPTY)
362  {
364  PropVariantClear(&next_schema);
365  PropVariantClear(id);
368  }
369 
370  *schema = *id;
371  *id = next_id;
372  }
373 
374  return S_OK;
375 }
376 
379 {
380  HRESULT hr;
381  GUID format;
382  IWICMetadataReader *new_reader;
383  UINT count, i, matched_index;
384 
385  *reader = NULL;
386 
387  hr = IWICMetadataBlockReader_GetCount(block_reader, &count);
388  if (hr != S_OK) return hr;
389 
390  matched_index = 0;
391 
392  for (i = 0; i < count; i++)
393  {
394  hr = IWICMetadataBlockReader_GetReaderByIndex(block_reader, i, &new_reader);
395  if (hr != S_OK) return hr;
396 
397  hr = IWICMetadataReader_GetMetadataFormat(new_reader, &format);
398  if (hr == S_OK)
399  {
400  if (IsEqualGUID(&format, guid))
401  {
402  if (matched_index == index)
403  {
404  *reader = new_reader;
405  return S_OK;
406  }
407 
408  matched_index++;
409  }
410  }
411 
412  IWICMetadataReader_Release(new_reader);
413  if (hr != S_OK) return hr;
414  }
415 
417 }
418 
420  GUID *guid, IWICMetadataReader **new_reader)
421 {
422  HRESULT hr;
423  PROPVARIANT schema, id, value;
424 
425  *new_reader = NULL;
426 
427  PropVariantInit(&schema);
428  PropVariantInit(&id);
429  PropVariantInit(&value);
430 
431  if (index)
432  {
433  schema.vt = VT_UI2;
434  schema.u.uiVal = index;
435  }
436 
437  id.vt = VT_CLSID;
438  id.u.puuid = guid;
439  hr = IWICMetadataReader_GetValue(reader, &schema, &id, &value);
440  if (hr != S_OK) return hr;
441 
442  if (value.vt == VT_UNKNOWN)
443  hr = IUnknown_QueryInterface(value.u.punkVal, &IID_IWICMetadataReader, (void **)new_reader);
444  else
446 
448  return hr;
449 }
450 
452 {
454  struct string_t elem;
455  WCHAR *full_query;
456  const WCHAR *p;
457  int index, len;
458  PROPVARIANT tk_id, tk_schema, new_value;
459  GUID guid;
461  HRESULT hr = S_OK;
462 
463  TRACE("(%p,%s,%p)\n", This, wine_dbgstr_w(query), value);
464 
465  len = lstrlenW(query) + 1;
466  if (This->root) len += lstrlenW(This->root);
467  full_query = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
468  full_query[0] = 0;
469  if (This->root)
470  lstrcpyW(full_query, This->root);
471  lstrcatW(full_query, query);
472 
473  PropVariantInit(&tk_id);
474  PropVariantInit(&tk_schema);
475  PropVariantInit(&new_value);
476 
477  reader = NULL;
478  p = full_query;
479 
480  while (*p)
481  {
482  if (*p != '/')
483  {
484  WARN("query should start with '/'\n");
486  break;
487  }
488 
489  p++;
490 
491  index = 0;
492  elem.str = p;
493  elem.len = lstrlenW(p);
494  hr = get_token(&elem, &tk_id, &tk_schema, &index);
495  if (hr != S_OK)
496  {
497  WARN("get_token error %#x\n", hr);
498  break;
499  }
500  TRACE("parsed %d characters: %s, index %d\n", elem.len, wine_dbgstr_wn(elem.str, elem.len), index);
501  TRACE("id %s, schema %s\n", wine_dbgstr_variant((VARIANT *)&tk_id), wine_dbgstr_variant((VARIANT *)&tk_schema));
502 
503  if (!elem.len) break;
504 
505  if (tk_id.vt == VT_CLSID || (tk_id.vt == VT_BSTR && WICMapShortNameToGuid(tk_id.u.bstrVal, &guid) == S_OK))
506  {
507  WCHAR *root;
508 
509  if (tk_schema.vt != VT_EMPTY)
510  {
511  FIXME("unsupported schema vt %u\n", tk_schema.vt);
512  PropVariantClear(&tk_schema);
513  }
514 
515  if (tk_id.vt == VT_CLSID) guid = *tk_id.u.puuid;
516 
517  if (reader)
518  {
519  IWICMetadataReader *new_reader;
520 
521  hr = get_next_reader(reader, index, &guid, &new_reader);
522  IWICMetadataReader_Release(reader);
523  reader = new_reader;
524  }
525  else
527 
528  if (hr != S_OK) break;
529 
530  root = SysAllocStringLen(NULL, elem.str + elem.len - full_query + 2);
531  if (!root)
532  {
533  hr = E_OUTOFMEMORY;
534  break;
535  }
536  lstrcpynW(root, full_query, p - full_query + elem.len + 1);
537 
538  PropVariantClear(&new_value);
539  new_value.vt = VT_UNKNOWN;
540  hr = MetadataQueryReader_CreateInstance(This->block, root, (IWICMetadataQueryReader **)&new_value.u.punkVal);
542  if (hr != S_OK) break;
543  }
544  else
545  {
546  PROPVARIANT schema, id;
547 
548  if (!reader)
549  {
551  break;
552  }
553 
554  if (tk_schema.vt == VT_BSTR)
555  {
556  hr = IWICMetadataReader_GetMetadataFormat(reader, &guid);
557  if (hr != S_OK) break;
558 
559  schema.vt = VT_LPWSTR;
560  schema.u.pwszVal = (LPWSTR)map_shortname_to_schema(&guid, tk_schema.u.bstrVal);
561  if (!schema.u.pwszVal)
562  schema.u.pwszVal = tk_schema.u.bstrVal;
563  }
564  else
565  schema = tk_schema;
566 
567  if (tk_id.vt == VT_BSTR)
568  {
569  id.vt = VT_LPWSTR;
570  id.u.pwszVal = tk_id.u.bstrVal;
571  }
572  else
573  id = tk_id;
574 
575  PropVariantClear(&new_value);
576  hr = IWICMetadataReader_GetValue(reader, &schema, &id, &new_value);
577  if (hr != S_OK) break;
578  }
579 
580  p += elem.len;
581 
582  PropVariantClear(&tk_id);
583  PropVariantClear(&tk_schema);
584  }
585 
586  if (reader)
587  IWICMetadataReader_Release(reader);
588 
589  PropVariantClear(&tk_id);
590  PropVariantClear(&tk_schema);
591 
592  if (hr == S_OK && value)
593  *value = new_value;
594  else
595  PropVariantClear(&new_value);
596 
597  HeapFree(GetProcessHeap(), 0, full_query);
598 
599  return hr;
600 }
601 
603  IEnumString **ppIEnumString)
604 {
606  FIXME("(%p,%p)\n", This, ppIEnumString);
607  return E_NOTIMPL;
608 }
609 
610 static IWICMetadataQueryReaderVtbl mqr_vtbl = {
612  mqr_AddRef,
613  mqr_Release,
618 };
619 
621 {
622  QueryReader *obj;
623 
625  if (!obj)
626  return E_OUTOFMEMORY;
627 
628  obj->IWICMetadataQueryReader_iface.lpVtbl = &mqr_vtbl;
629  obj->ref = 1;
630 
631  IWICMetadataBlockReader_AddRef(mbr);
632  obj->block = mbr;
633 
634  obj->root = root ? heap_strdupW(root) : NULL;
635 
636  *out = &obj->IWICMetadataQueryReader_iface;
637 
638  return S_OK;
639 }
640 
641 static const WCHAR bmpW[] = { 'b','m','p',0 };
642 static const WCHAR pngW[] = { 'p','n','g',0 };
643 static const WCHAR icoW[] = { 'i','c','o',0 };
644 static const WCHAR jpgW[] = { 'j','p','g',0 };
645 static const WCHAR tiffW[] = { 't','i','f','f',0 };
646 static const WCHAR gifW[] = { 'g','i','f',0 };
647 static const WCHAR wmphotoW[] = { 'w','m','p','h','o','t','o',0 };
648 static const WCHAR unknownW[] = { 'u','n','k','n','o','w','n',0 };
649 static const WCHAR ifdW[] = { 'i','f','d',0 };
650 static const WCHAR subW[] = { 's','u','b',0 };
651 static const WCHAR exifW[] = { 'e','x','i','f',0 };
652 static const WCHAR gpsW[] = { 'g','p','s',0 };
653 static const WCHAR interopW[] = { 'i','n','t','e','r','o','p',0 };
654 static const WCHAR app0W[] = { 'a','p','p','0',0 };
655 static const WCHAR app1W[] = { 'a','p','p','1',0 };
656 static const WCHAR app13W[] = { 'a','p','p','1','3',0 };
657 static const WCHAR iptcW[] = { 'i','p','t','c',0 };
658 static const WCHAR irbW[] = { 'i','r','b',0 };
659 static const WCHAR _8bimiptcW[] = { '8','b','i','m','i','p','t','c',0 };
660 static const WCHAR _8bimResInfoW[] = { '8','b','i','m','R','e','s','I','n','f','o',0 };
661 static const WCHAR _8bimiptcdigestW[] = { '8','b','i','m','i','p','t','c','d','i','g','e','s','t',0 };
662 static const WCHAR xmpW[] = { 'x','m','p',0 };
663 static const WCHAR thumbW[] = { 't','h','u','m','b',0 };
664 static const WCHAR tEXtW[] = { 't','E','X','t',0 };
665 static const WCHAR xmpstructW[] = { 'x','m','p','s','t','r','u','c','t',0 };
666 static const WCHAR xmpbagW[] = { 'x','m','p','b','a','g',0 };
667 static const WCHAR xmpseqW[] = { 'x','m','p','s','e','q',0 };
668 static const WCHAR xmpaltW[] = { 'x','m','p','a','l','t',0 };
669 static const WCHAR logscrdescW[] = { 'l','o','g','s','c','r','d','e','s','c',0 };
670 static const WCHAR imgdescW[] = { 'i','m','g','d','e','s','c',0 };
671 static const WCHAR grctlextW[] = { 'g','r','c','t','l','e','x','t',0 };
672 static const WCHAR appextW[] = { 'a','p','p','e','x','t',0 };
673 static const WCHAR chrominanceW[] = { 'c','h','r','o','m','i','n','a','n','c','e',0 };
674 static const WCHAR luminanceW[] = { 'l','u','m','i','n','a','n','c','e',0 };
675 static const WCHAR comW[] = { 'c','o','m',0 };
676 static const WCHAR commentextW[] = { 'c','o','m','m','e','n','t','e','x','t',0 };
677 static const WCHAR gAMAW[] = { 'g','A','M','A',0 };
678 static const WCHAR bKGDW[] = { 'b','K','G','D',0 };
679 static const WCHAR iTXtW[] = { 'i','T','X','t',0 };
680 static const WCHAR cHRMW[] = { 'c','H','R','M',0 };
681 static const WCHAR hISTW[] = { 'h','I','S','T',0 };
682 static const WCHAR iCCPW[] = { 'i','C','C','P',0 };
683 static const WCHAR sRGBW[] = { 's','R','G','B',0 };
684 static const WCHAR tIMEW[] = { 't','I','M','E',0 };
685 
686 static const struct
687 {
688  const GUID *guid;
689  const WCHAR *name;
690 } guid2name[] =
691 {
692  { &GUID_ContainerFormatBmp, bmpW },
693  { &GUID_ContainerFormatPng, pngW },
694  { &GUID_ContainerFormatIco, icoW },
695  { &GUID_ContainerFormatJpeg, jpgW },
696  { &GUID_ContainerFormatTiff, tiffW },
697  { &GUID_ContainerFormatGif, gifW },
698  { &GUID_ContainerFormatWmp, wmphotoW },
699  { &GUID_MetadataFormatUnknown, unknownW },
700  { &GUID_MetadataFormatIfd, ifdW },
701  { &GUID_MetadataFormatSubIfd, subW },
702  { &GUID_MetadataFormatExif, exifW },
703  { &GUID_MetadataFormatGps, gpsW },
704  { &GUID_MetadataFormatInterop, interopW },
705  { &GUID_MetadataFormatApp0, app0W },
706  { &GUID_MetadataFormatApp1, app1W },
707  { &GUID_MetadataFormatApp13, app13W },
708  { &GUID_MetadataFormatIPTC, iptcW },
709  { &GUID_MetadataFormatIRB, irbW },
710  { &GUID_MetadataFormat8BIMIPTC, _8bimiptcW },
711  { &GUID_MetadataFormat8BIMResolutionInfo, _8bimResInfoW },
712  { &GUID_MetadataFormat8BIMIPTCDigest, _8bimiptcdigestW },
713  { &GUID_MetadataFormatXMP, xmpW },
714  { &GUID_MetadataFormatThumbnail, thumbW },
715  { &GUID_MetadataFormatChunktEXt, tEXtW },
716  { &GUID_MetadataFormatXMPStruct, xmpstructW },
717  { &GUID_MetadataFormatXMPBag, xmpbagW },
718  { &GUID_MetadataFormatXMPSeq, xmpseqW },
719  { &GUID_MetadataFormatXMPAlt, xmpaltW },
720  { &GUID_MetadataFormatLSD, logscrdescW },
721  { &GUID_MetadataFormatIMD, imgdescW },
722  { &GUID_MetadataFormatGCE, grctlextW },
723  { &GUID_MetadataFormatAPE, appextW },
724  { &GUID_MetadataFormatJpegChrominance, chrominanceW },
725  { &GUID_MetadataFormatJpegLuminance, luminanceW },
726  { &GUID_MetadataFormatJpegComment, comW },
727  { &GUID_MetadataFormatGifComment, commentextW },
728  { &GUID_MetadataFormatChunkgAMA, gAMAW },
729  { &GUID_MetadataFormatChunkbKGD, bKGDW },
730  { &GUID_MetadataFormatChunkiTXt, iTXtW },
731  { &GUID_MetadataFormatChunkcHRM, cHRMW },
732  { &GUID_MetadataFormatChunkhIST, hISTW },
733  { &GUID_MetadataFormatChunkiCCP, iCCPW },
734  { &GUID_MetadataFormatChunksRGB, sRGBW },
735  { &GUID_MetadataFormatChunktIME, tIMEW }
736 };
737 
739 {
740  UINT i;
741 
742  TRACE("%s,%u,%p,%p\n", wine_dbgstr_guid(guid), len, name, ret_len);
743 
744  if (!guid) return E_INVALIDARG;
745 
746  for (i = 0; i < ARRAY_SIZE(guid2name); i++)
747  {
749  {
750  if (name)
751  {
752  if (!len) return E_INVALIDARG;
753 
754  len = min(len - 1, lstrlenW(guid2name[i].name));
755  memcpy(name, guid2name[i].name, len * sizeof(WCHAR));
756  name[len] = 0;
757 
758  if (len < lstrlenW(guid2name[i].name))
760  }
761  if (ret_len) *ret_len = lstrlenW(guid2name[i].name) + 1;
762  return S_OK;
763  }
764  }
765 
767 }
768 
770 {
771  UINT i;
772 
773  TRACE("%s,%p\n", debugstr_w(name), guid);
774 
775  if (!name || !guid) return E_INVALIDARG;
776 
777  for (i = 0; i < ARRAY_SIZE(guid2name); i++)
778  {
779  if (!lstrcmpiW(name, guid2name[i].name))
780  {
781  *guid = *guid2name[i].guid;
782  return S_OK;
783  }
784  }
785 
787 }
788 
789 static const WCHAR rdf[] = { 'r','d','f',0 };
790 static const WCHAR rdf_scheme[] = { 'h','t','t','p',':','/','/','w','w','w','.','w','3','.','o','r','g','/','1','9','9','9','/','0','2','/','2','2','-','r','d','f','-','s','y','n','t','a','x','-','n','s','#',0 };
791 static const WCHAR dc[] = { 'd','c',0 };
792 static const WCHAR dc_scheme[] = { 'h','t','t','p',':','/','/','p','u','r','l','.','o','r','g','/','d','c','/','e','l','e','m','e','n','t','s','/','1','.','1','/',0 };
793 static const WCHAR xmp[] = { 'x','m','p',0 };
794 static const WCHAR xmp_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/',0 };
795 static const WCHAR xmpidq[] = { 'x','m','p','i','d','q',0 };
796 static const WCHAR xmpidq_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','m','p','/','I','d','e','n','t','i','f','i','e','r','/','q','u','a','l','/','1','.','0','/',0 };
797 static const WCHAR xmpRights[] = { 'x','m','p','R','i','g','h','t','s',0 };
798 static const WCHAR xmpRights_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','r','i','g','h','t','s','/',0 };
799 static const WCHAR xmpMM[] = { 'x','m','p','M','M',0 };
800 static const WCHAR xmpMM_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','m','m','/',0 };
801 static const WCHAR xmpBJ[] = { 'x','m','p','B','J',0 };
802 static const WCHAR xmpBJ_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','b','j','/',0 };
803 static const WCHAR xmpTPg[] = { 'x','m','p','T','P','g',0 };
804 static const WCHAR xmpTPg_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','t','/','p','g','/',0 };
805 static const WCHAR pdf[] = { 'p','d','f',0 };
806 static const WCHAR pdf_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','p','d','f','/','1','.','3','/',0 };
807 static const WCHAR photoshop[] = { 'p','h','o','t','o','s','h','o','p',0 };
808 static const WCHAR photoshop_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','p','h','o','t','o','s','h','o','p','/','1','.','0','/',0 };
809 static const WCHAR tiff[] = { 't','i','f','f',0 };
810 static const WCHAR tiff_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','t','i','f','f','/','1','.','0','/',0 };
811 static const WCHAR exif[] = { 'e','x','i','f',0 };
812 static const WCHAR exif_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','e','x','i','f','/','1','.','0','/',0 };
813 static const WCHAR stDim[] = { 's','t','D','i','m',0 };
814 static const WCHAR stDim_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','s','T','y','p','e','/','D','i','m','e','n','s','i','o','n','s','#',0 };
815 static const WCHAR xapGImg[] = { 'x','a','p','G','I','m','g',0 };
816 static const WCHAR xapGImg_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','g','/','i','m','g','/',0 };
817 static const WCHAR stEvt[] = { 's','t','E','v','t',0 };
818 static const WCHAR stEvt_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','s','T','y','p','e','/','R','e','s','o','u','r','c','e','E','v','e','n','t','#',0 };
819 static const WCHAR stRef[] = { 's','t','R','e','f',0 };
820 static const WCHAR stRef_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','s','T','y','p','e','/','R','e','s','o','u','r','c','e','R','e','f','#',0 };
821 static const WCHAR stVer[] = { 's','t','V','e','r',0 };
822 static const WCHAR stVer_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','s','T','y','p','e','/','V','e','r','s','i','o','n','#',0 };
823 static const WCHAR stJob[] = { 's','t','J','o','b',0 };
824 static const WCHAR stJob_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','a','p','/','1','.','0','/','s','T','y','p','e','/','J','o','b','#',0 };
825 static const WCHAR aux[] = { 'a','u','x',0 };
826 static const WCHAR aux_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','e','x','i','f','/','1','.','0','/','a','u','x','/',0 };
827 static const WCHAR crs[] = { 'c','r','s',0 };
828 static const WCHAR crs_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','c','a','m','e','r','a','-','r','a','w','-','s','e','t','t','i','n','g','s','/','1','.','0','/',0 };
829 static const WCHAR xmpDM[] = { 'x','m','p','D','M',0 };
830 static const WCHAR xmpDM_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','a','d','o','b','e','.','c','o','m','/','x','m','p','/','1','.','0','/','D','y','n','a','m','i','c','M','e','d','i','a','/',0 };
831 static const WCHAR Iptc4xmpCore[] = { 'I','p','t','c','4','x','m','p','C','o','r','e',0 };
832 static const WCHAR Iptc4xmpCore_scheme[] = { 'h','t','t','p',':','/','/','i','p','t','c','.','o','r','g','/','s','t','d','/','I','p','t','c','4','x','m','p','C','o','r','e','/','1','.','0','/','x','m','l','n','s','/',0 };
833 static const WCHAR MicrosoftPhoto[] = { 'M','i','c','r','o','s','o','f','t','P','h','o','t','o',0 };
834 static const WCHAR MicrosoftPhoto_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','p','h','o','t','o','/','1','.','0','/',0 };
835 static const WCHAR MP[] = { 'M','P',0 };
836 static const WCHAR MP_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','p','h','o','t','o','/','1','.','2','/',0 };
837 static const WCHAR MPRI[] = { 'M','P','R','I',0 };
838 static const WCHAR MPRI_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','p','h','o','t','o','/','1','.','2','/','t','/','R','e','g','i','o','n','I','n','f','o','#',0 };
839 static const WCHAR MPReg[] = { 'M','P','R','e','g',0 };
840 static const WCHAR MPReg_scheme[] = { 'h','t','t','p',':','/','/','n','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','p','h','o','t','o','/','1','.','2','/','t','/','R','e','g','i','o','n','#',0 };
841 
842 static const struct
843 {
844  const WCHAR *name;
845  const WCHAR *schema;
846 } name2schema[] =
847 {
848  { rdf, rdf_scheme },
849  { dc, dc_scheme },
850  { xmp, xmp_scheme },
851  { xmpidq, xmpidq_scheme },
853  { xmpMM, xmpMM_scheme },
854  { xmpBJ, xmpBJ_scheme },
855  { xmpTPg, xmpTPg_scheme },
856  { pdf, pdf_scheme },
858  { tiff, tiff_scheme },
859  { exif, exif_scheme },
860  { stDim, stDim_scheme },
861  { xapGImg, xapGImg_scheme },
862  { stEvt, stEvt_scheme },
863  { stRef, stRef_scheme },
864  { stVer, stVer_scheme },
865  { stJob, stJob_scheme },
866  { aux, aux_scheme },
867  { crs, crs_scheme },
868  { xmpDM, xmpDM_scheme },
871  { MP, MP_scheme },
872  { MPRI, MPRI_scheme },
873  { MPReg, MPReg_scheme }
874 };
875 
876 static const WCHAR *map_shortname_to_schema(const GUID *format, const WCHAR *name)
877 {
878  UINT i;
879 
880  /* It appears that the only metadata formats
881  * that support schemas are xmp and xmpstruct.
882  */
883  if (!IsEqualGUID(format, &GUID_MetadataFormatXMP) &&
884  !IsEqualGUID(format, &GUID_MetadataFormatXMPStruct))
885  return NULL;
886 
887  for (i = 0; i < ARRAY_SIZE(name2schema); i++)
888  {
889  if (!lstrcmpW(name2schema[i].name, name))
890  return name2schema[i].schema;
891  }
892 
893  return NULL;
894 }
895 
897 {
898  UINT i;
899 
900  TRACE("%s,%s,%u,%p,%p\n", wine_dbgstr_guid(format), debugstr_w(schema), len, name, ret_len);
901 
902  if (!format || !schema || !ret_len)
903  return E_INVALIDARG;
904 
905  /* It appears that the only metadata formats
906  * that support schemas are xmp and xmpstruct.
907  */
908  if (!IsEqualGUID(format, &GUID_MetadataFormatXMP) &&
909  !IsEqualGUID(format, &GUID_MetadataFormatXMPStruct))
911 
912  for (i = 0; i < ARRAY_SIZE(name2schema); i++)
913  {
915  {
916  if (name)
917  {
918  if (!len) return E_INVALIDARG;
919 
920  len = min(len - 1, lstrlenW(name2schema[i].name));
921  memcpy(name, name2schema[i].name, len * sizeof(WCHAR));
922  name[len] = 0;
923 
924  if (len < lstrlenW(name2schema[i].name))
926  }
927 
928  if (ret_len) *ret_len = lstrlenW(name2schema[i].name) + 1;
929  return S_OK;
930  }
931  }
932 
934 }
static const WCHAR imgdescW[]
static const WCHAR chrominanceW[]
static const WCHAR wmphotoW[]
const uint16_t * PCWSTR
Definition: typedefs.h:55
static const WCHAR interopW[]
#define REFIID
Definition: guiddef.h:118
#define E_NOINTERFACE
Definition: winerror.h:2364
Definition: compat.h:1939
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
const WCHAR * name
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs)
static const WCHAR MicrosoftPhoto_scheme[]
Definition: compat.h:1955
HRESULT hr
Definition: shlfolder.c:183
static HRESULT get_next_reader(IWICMetadataReader *reader, UINT index, GUID *guid, IWICMetadataReader **new_reader)
Definition: scsiwmi.h:51
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
static const WCHAR xmpMM[]
Definition: compat.h:1951
static const WCHAR photoshop_scheme[]
static const WCHAR xmpDM[]
static const WCHAR tiff_scheme[]
static const WCHAR xapGImg_scheme[]
REFIID riid
Definition: precomp.h:44
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: ole2.c:2952
static HRESULT find_reader_from_block(IWICMetadataBlockReader *block_reader, UINT index, GUID *guid, IWICMetadataReader **reader)
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
static const WCHAR MPRI_scheme[]
static const WCHAR rootW[]
Definition: chain.c:69
HRESULT WINAPI WICMapSchemaToName(REFGUID format, LPWSTR schema, UINT len, WCHAR *name, UINT *ret_len)
static const WCHAR unknownW[]
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
GLuint GLuint GLsizei count
Definition: gl.h:1545
struct _root root
#define WARN(fmt,...)
Definition: debug.h:111
#define strtolW(s, e, b)
Definition: unicode.h:33
static const WCHAR exif[]
static const WCHAR luminanceW[]
static const WCHAR bmpW[]
static const WCHAR crs_scheme[]
static const WCHAR stVer[]
static const WCHAR stJob_scheme[]
const char * wine_dbgstr_guid(const GUID *guid)
static const WCHAR stDim_scheme[]
int next_token(char **, FILE *)
HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc, PROPVAR_CHANGE_FLAGS flags, VARTYPE vt)
Definition: propvar.c:361
GLuint GLuint end
Definition: gl.h:1545
#define NORM_IGNORECASE
Definition: winnls.h:173
static const WCHAR xmpBJ[]
WCHAR str[10]
static const WCHAR MP_scheme[]
static HRESULT WINAPI mqr_QueryInterface(IWICMetadataQueryReader *iface, REFIID riid, void **ppvObject)
Definition: metadataquery.c:52
#define lstrlenW
Definition: compat.h:407
Definition: send.c:47
static LONG next_id
Definition: changenotify.c:91
static const WCHAR _8bimiptcdigestW[]
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
static const WCHAR app1W[]
Definition: tiffiop.h:102
static const WCHAR xmpstructW[]
#define lstrcpynW
Definition: compat.h:397
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
static const WCHAR tEXtW[]
static const WCHAR Iptc4xmpCore[]
static const WCHAR pngW[]
static const WCHAR xmpbagW[]
static const WCHAR MicrosoftPhoto[]
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const GUID * guid
static const WCHAR gpsW[]
static const WCHAR xmpTPg_scheme[]
static const WCHAR commentextW[]
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
RPC_STATUS WINAPI UuidFromStringW(RPC_WSTR s, UUID *uuid)
Definition: rpcrt4_main.c:615
static const WCHAR photoshop[]
long LONG
Definition: pedump.c:60
static const WCHAR * map_shortname_to_schema(const GUID *format, const WCHAR *name)
static const WCHAR bKGDW[]
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
static const struct @567 str2vt[]
static HRESULT WINAPI mqr_GetContainerFormat(IWICMetadataQueryReader *iface, GUID *format)
Definition: metadataquery.c:96
static const WCHAR rdf[]
#define debugstr_w
Definition: kernel32.h:32
static size_t elem
Definition: string.c:68
GLenum GLint ref
Definition: glext.h:6028
static const WCHAR pdf_scheme[]
#define FIXME(fmt,...)
Definition: debug.h:110
static const WCHAR appextW[]
unsigned int idx
Definition: utils.c:41
static const WCHAR exifW[]
WCHAR * root
Definition: metadataquery.c:44
#define E_INVALIDARG
Definition: ddrawi.h:101
static const WCHAR logscrdescW[]
static HRESULT WINAPI mqr_GetMetadataByName(IWICMetadataQueryReader *iface, LPCWSTR query, PROPVARIANT *value)
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR sRGBW[]
static const WCHAR tiff[]
static ULONG WINAPI mqr_Release(IWICMetadataQueryReader *iface)
Definition: metadataquery.c:82
static const WCHAR xmp_scheme[]
static const WCHAR iTXtW[]
GLuint index
Definition: glext.h:6031
#define WINCODEC_ERR_UNEXPECTEDMETADATATYPE
Definition: winerror.h:3308
#define debugstr_guid
Definition: kernel32.h:35
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
static const WCHAR exif_scheme[]
static const WCHAR xmpidq[]
static const WCHAR icoW[]
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
Definition: lang.c:2275
static const WCHAR subW[]
#define WINCODEC_ERR_INVALIDQUERYREQUEST
Definition: winerror.h:3307
#define DISP_E_TYPEMISMATCH
Definition: winerror.h:2514
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR app13W[]
static QueryReader * impl_from_IWICMetadataQueryReader(IWICMetadataQueryReader *iface)
Definition: metadataquery.c:47
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const WCHAR MPReg[]
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR jpgW[]
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
static const WCHAR rdf_scheme[]
static const WCHAR tIMEW[]
static const WCHAR gAMAW[]
#define WINAPI
Definition: msvc.h:8
static const WCHAR crs[]
#define LOCALE_SYSTEM_DEFAULT
static ULONG WINAPI mqr_AddRef(IWICMetadataQueryReader *iface)
Definition: metadataquery.c:74
static FILE * out
Definition: regtests2xml.c:44
static const WCHAR xmpseqW[]
static const WCHAR tiffW[]
static VARTYPE map_type(struct string_t *str)
static JOBOBJECTINFOCLASS LPVOID DWORD LPDWORD ret_len
Definition: process.c:79
static const WCHAR _8bimResInfoW[]
static const WCHAR ifdW[]
static const WCHAR thumbW[]
static const WCHAR app0W[]
static const WCHAR xmpMM_scheme[]
static const WCHAR Iptc4xmpCore_scheme[]
static const WCHAR xmpRights_scheme[]
Definition: compat.h:1940
#define index(s, c)
Definition: various.h:29
static const WCHAR xmpidq_scheme[]
#define InterlockedDecrement
Definition: armddk.h:52
static const WCHAR cHRMW[]
static const WCHAR grctlextW[]
int len
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
#define CSTR_EQUAL
Definition: winnls.h:453
REFIID LPVOID * ppvObject
Definition: precomp.h:44
const char * wine_dbgstr_wn(const WCHAR *str, int n)
Definition: compat.c:342
static const WCHAR xmpDM_scheme[]
static const WCHAR xmpaltW[]
static const WCHAR MPRI[]
GLsizei const GLfloat * value
Definition: glext.h:6069
static IWICMetadataQueryReaderVtbl mqr_vtbl
static const WCHAR xmpTPg[]
static const WCHAR comW[]
#define WINCODEC_ERR_WRONGSTATE
Definition: winerror.h:3273
#define S_OK
Definition: intsafe.h:59
#define InterlockedIncrement
Definition: armddk.h:53
#define lstrcpyW
Definition: compat.h:406
static const WCHAR stEvt[]
static HRESULT get_token(struct string_t *elem, PROPVARIANT *id, PROPVARIANT *schema, int *idx)
static const WCHAR stRef[]
static HRESULT WINAPI mqr_GetEnumerator(IWICMetadataQueryReader *iface, IEnumString **ppIEnumString)
IWICMetadataQueryReader IWICMetadataQueryReader_iface
Definition: metadataquery.c:41
GLuint start
Definition: gl.h:1545
#define ARRAY_SIZE(a)
Definition: main.h:24
static const WCHAR xmpBJ_scheme[]
const WCHAR * str
static const WCHAR xmpRights[]
#define E_NOTIMPL
Definition: ddrawi.h:99
unsigned short VARTYPE
Definition: compat.h:1895
static const WCHAR xmpW[]
HRESULT WINAPI WICMapGuidToShortName(REFGUID guid, UINT len, WCHAR *name, UINT *ret_len)
#define min(a, b)
Definition: monoChain.cc:55
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
const WCHAR * schema
static const WCHAR stEvt_scheme[]
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
Definition: reader.h:83
VARTYPE vt
Definition: compat.h:2022
static const WCHAR pdf[]
Definition: name.c:36
static const WCHAR aux[]
HRESULT WINAPI WICMapShortNameToGuid(PCWSTR name, GUID *guid)
static const WCHAR MPReg_scheme[]
static const WCHAR stVer_scheme[]
static const WCHAR irbW[]
unsigned int ULONG
Definition: retypes.h:1
GLenum GLuint id
Definition: glext.h:5579
static const struct @568 guid2name[]
IWICMetadataBlockReader * block
Definition: metadataquery.c:43
static const struct @569 name2schema[]
static const WCHAR iptcW[]
static const WCHAR dc_scheme[]
static const WCHAR dc[]
static const WCHAR aux_scheme[]
static const WCHAR xmp[]
#define WINCODEC_ERR_PROPERTYNOTSUPPORTED
Definition: winerror.h:3280
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define WINCODEC_ERR_PROPERTYNOTFOUND
Definition: winerror.h:3279
static HRESULT WINAPI mqr_GetLocation(IWICMetadataQueryReader *iface, UINT len, WCHAR *location, UINT *ret_len)
#define WINCODEC_ERR_INSUFFICIENTBUFFER
Definition: winerror.h:3303
GLfloat GLfloat p
Definition: glext.h:8902
BSTR bstrVal
Definition: compat.h:2040
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static const WCHAR gifW[]
WINE_UNICODE_INLINE WCHAR * memchrW(const WCHAR *ptr, WCHAR ch, size_t n)
Definition: unicode.h:295
static const WCHAR hISTW[]
HRESULT MetadataQueryReader_CreateInstance(IWICMetadataBlockReader *mbr, const WCHAR *root, IWICMetadataQueryReader **out)
static const WCHAR MP[]
VARTYPE vt
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
union value::@481 u
#define HeapFree(x, y, z)
Definition: compat.h:394
static const WCHAR iCCPW[]
Definition: compat.h:1941
Definition: compat.h:1938
static const WCHAR xapGImg[]
static const WCHAR stDim[]
static const WCHAR stRef_scheme[]
static const WCHAR _8bimiptcW[]
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
static const WCHAR stJob[]