33#include "wincodecsdk.h"
38DEFINE_GUID(IID_MdbrUnknown, 0x00240e6f,0x3f23,0x4432,0xb0,0xcc,0x48,0xd5,0xbb,0xff,0x6c,0x36);
40#define expect_blob(propvar, data, length) do { \
41 ok((propvar).vt == VT_BLOB, "unexpected vt: %i\n", (propvar).vt); \
42 if ((propvar).vt == VT_BLOB) { \
43 ok(U(propvar).blob.cbSize == (length), "expected size %u, got %u\n", (ULONG)(length), U(propvar).blob.cbSize); \
44 if (U(propvar).blob.cbSize == (length)) { \
45 ok(!memcmp(U(propvar).blob.pBlobData, (data), (length)), "unexpected data\n"); \
56#define IFD_UNDEFINED 7
59#define IFD_SRATIONAL 10
102 { 0xf001,
IFD_BYTE, 1, 0x11223344 },
103 { 0xf002,
IFD_BYTE, 4, 0x11223344 },
116 { 0xf00f,
IFD_ASCII, 4,
'a' |
'b' << 8 |
'c' << 16 |
'd' << 24 },
118 { 0xf011,
IFD_UNDEFINED, 4,
'a' |
'b' << 8 |
'c' << 16 |
'd' << 24 },
119 { 0xf012,
IFD_BYTE, 0, 0x11223344 },
121 { 0xf014,
IFD_LONG, 0, 0x11223344 },
127 1234567890.0987654321,
128 { 0x1a2b3c4d, 0x5a6b7c8d },
130 { 0x0101, 0x0202, 0x0303, 0x0404 },
131 { 0x11223344, 0x55667788 },
133 { { 0x01020304, 0x05060708 }, { 0x10203040, 0x50607080 }, { 0x11223344, 0x55667788 } },
142 'w',
'i',
'n',
'e',
't',
'e',
's',
't',0,
157 0,0,122,38, 0,0,128,132,
158 0,0,250,0, 0,0,128,232,
159 0,0,117,48, 0,0,234,96,
160 0,0,58,152, 0,0,23,112,
1650x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
1660x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53,
1670xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,
1680x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd5,
1690x06,0x03,0x0f,0x07,0x2d,0x12,0x10,0xf0,0xfd,0x00,0x00,0x00,0x0c,0x49,0x44,0x41,
1700x54,0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59,
1710xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
1760x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff,
1770xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44,
183'G',
'I',
'F',
'8',
'9',
'a',0x01,0x00,0x01,0x00,0xA1,0x00,0x00,
1840x6F,0x6F,0x6F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
1860x21,0xFF,0x0B,
'A',
'N',
'I',
'M',
'E',
'X',
'T',
'S',
'1',
'.',
'0',
1870x03,0x01,0x05,0x00,0x00,
1880x21,0xFE,0x0C,
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
'!',0x00,
1890x21,0x01,0x0D,
'a',
'n',
'i',
'm',
'a',
't',
'i',
'o',
'n',
'.',
'g',
'i',
'f',0x00,
1900x21,0xF9,0x04,0x00,0x0A,0x00,0xFF,0x00,0x2C,
1910x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x81,
1920xDE,0xDE,0xDE,0x00,0x00,0x00,
1930x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x4C,0x01,0x00,
1940x21,0xFE,0x08,
'i',
'm',
'a',
'g',
'e',
' ',
'#',
'1',0x00,
1950x21,0x01,0x0C,
'p',
'l',
'a',
'i',
'n',
't',
'e',
'x',
't',
' ',
'#',
'1',0x00,
1960x21,0xF9,0x04,0x01,0x0A,0x00,0x01,0x00,0x2C,
1970x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x81,
1980x4D,0x4D,0x4D,0x00,0x00,0x00,
1990x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x44,0x01,0x00,
2000x21,0xFE,0x08,
'i',
'm',
'a',
'g',
'e',
' ',
'#',
'2',0x00,
2010x21,0x01,0x0C,
'p',
'l',
'a',
'i',
'n',
't',
'e',
'x',
't',
' ',
'#',
'2',0x00,0x3B
212 ok(hdata != 0,
"GlobalAlloc failed\n");
213 if (!hdata)
return NULL;
220 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal failed, hr=%x\n",
hr);
237 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void**)&persist);
238 ok(
hr ==
S_OK,
"QueryInterface failed, hr=%x\n",
hr);
242 hr = IWICPersistStream_LoadEx(persist,
stream,
NULL, persist_options);
245 IWICPersistStream_Release(persist);
250 ok(
hr ==
S_OK,
"IStream_Seek error %#x\n",
hr);
253 "current stream pos is at %x/%x, data size %x\n", cur_pos.
u.LowPart, cur_pos.
u.HighPart, data_size);
265 ULONG items_returned;
268 &IID_IWICMetadataReader, (
void**)&
reader);
269 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%x\n",
hr);
274 hr = IWICMetadataReader_GetEnumerator(
reader, &enumerator);
275 ok(
hr ==
S_OK,
"GetEnumerator failed, hr=%x\n",
hr);
280 PropVariantInit(&
id);
281 PropVariantInit(&
value);
283 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
285 ok(items_returned == 1,
"unexpected item count %i\n", items_returned);
287 if (
hr ==
S_OK && items_returned == 1)
298 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
300 ok(items_returned == 0,
"unexpected item count %i\n", items_returned);
302 IWICEnumMetadataItem_Release(enumerator);
305 hr = IWICMetadataReader_QueryInterface(
reader, &IID_IWICMetadataBlockReader, (
void**)&blockreader);
309 IWICMetadataBlockReader_Release(blockreader);
311 IWICMetadataReader_Release(
reader);
324 PropVariantInit(&
id);
325 PropVariantInit(&
value);
328 &IID_IWICMetadataReader, (
void**)&
reader);
329 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%x\n",
hr);
336 ok(
hr ==
S_OK,
"GetCount failed, hr=%x\n",
hr);
342 ok(
hr ==
S_OK,
"GetCount failed, hr=%x\n",
hr);
348 hr = IWICMetadataReader_GetEnumerator(
reader, &enumerator);
349 ok(
hr ==
S_OK,
"GetEnumerator failed, hr=%x\n",
hr);
353 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
355 ok(items_returned == 1,
"unexpected item count %i\n", items_returned);
357 if (
hr ==
S_OK && items_returned == 1)
361 ok(!
strcmp(
U(
id).pszVal,
"winetest"),
"unexpected id: %s\n",
U(
id).pszVal);
370 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
372 ok(items_returned == 0,
"unexpected item count %i\n", items_returned);
374 IWICEnumMetadataItem_Release(enumerator);
378 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%x\n",
hr);
381 hr = IWICMetadataReader_GetMetadataFormat(
reader,
NULL);
386 strcpy(
U(
id).pszVal,
"winetest");
389 ok(
hr ==
S_OK,
"GetValue failed, hr=%x\n",
hr);
395 ok(
hr ==
S_OK,
"GetValue failed, hr=%x\n",
hr);
408 ok(
hr ==
S_OK,
"GetValueByIndex failed, hr=%x\n",
hr);
411 ok(
hr ==
S_OK,
"GetValueByIndex failed, hr=%x\n",
hr);
415 ok(
hr ==
S_OK,
"GetValueByIndex failed, hr=%x\n",
hr);
417 ok(!
strcmp(
U(
id).pszVal,
"winetest"),
"unexpected id: %s\n",
U(
id).pszVal);
421 ok(
hr ==
S_OK,
"GetValueByIndex failed, hr=%x\n",
hr);
429 IWICMetadataReader_Release(
reader);
439 static const WCHAR ImageGamma[] = {
'I',
'm',
'a',
'g',
'e',
'G',
'a',
'm',
'm',
'a',0};
442 PropVariantInit(&
id);
443 PropVariantInit(&
value);
446 &IID_IWICMetadataReader, (
void**)&
reader);
453 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%x\n",
hr);
457 ok(
hr ==
S_OK,
"GetCount failed, hr=%x\n",
hr);
461 ok(
hr ==
S_OK,
"GetValue failed, hr=%x\n",
hr);
471 ok(
U(
value).ulVal == 33333,
"unexpected value: %u\n",
U(
value).ulVal);
474 IWICMetadataReader_Release(
reader);
485 static const WCHAR expected_names[8][12] = {
486 {
'W',
'h',
'i',
't',
'e',
'P',
'o',
'i',
'n',
't',
'X',0},
487 {
'W',
'h',
'i',
't',
'e',
'P',
'o',
'i',
'n',
't',
'Y',0},
490 {
'G',
'r',
'e',
'e',
'n',
'X',0},
491 {
'G',
'r',
'e',
'e',
'n',
'Y',0},
492 {
'B',
'l',
'u',
'e',
'X',0},
493 {
'B',
'l',
'u',
'e',
'Y',0},
495 static const ULONG expected_vals[8] = {
496 31270,32900, 64000,33000, 30000,60000, 15000,6000
500 PropVariantInit(&
id);
501 PropVariantInit(&
value);
504 &IID_IWICMetadataReader, (
void**)&
reader);
511 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%x\n",
hr);
515 ok(
hr ==
S_OK,
"GetCount failed, hr=%x\n",
hr);
521 ok(
hr ==
S_OK,
"GetValue failed, hr=%x\n",
hr);
531 ok(
U(
value).ulVal == expected_vals[
i],
"got %u, expected %u\n",
U(
value).ulVal, expected_vals[
i]);
535 IWICMetadataReader_Release(
reader);
540 return (
s >> 8) | (
s << 8);
557 char *data_start =
data;
563 for (
i = 0;
i < number_of_entries;
i++)
573 if (
entry->count > 4)
579 if (
entry->count > 2)
602 if (
entry->count > 1)
618 for (
j = 0;
j <
entry->count * 2;
j++)
642 data +=
sizeof(*entry);
665 hr = IWICMetadataReader_GetEnumerator(
reader, &enumerator);
666 ok(
hr ==
S_OK,
"GetEnumerator error %#x\n",
hr);
669 PropVariantInit(&
id);
670 PropVariantInit(&
value);
674 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
676 ok(items_returned == 1,
"unexpected item count %u\n", items_returned);
681 ok(
U(
id).uiVal == td[
i].
id,
"%u: expected id %#x, got %#x\n",
i, td[
i].
id,
U(
id).uiVal);
695 for (
j = 0;
j <
U(
value).caub.cElems;
j++)
701 for (
j = 0;
j <
U(
value).caui.cElems;
j++)
708 for (
j = 0;
j <
U(
value).caul.cElems;
j++)
715 for (
j = 0;
j <
U(
value).cauh.cElems;
j++)
720 for (
j = 0;
j <
U(
value).calpstr.cElems;
j++)
735 "%u: expected %s, got %s\n",
i, td[
i].
string,
U(
value).pszVal);
743 ok(
U(
value).uhVal.QuadPart == td[
i].
value[0],
"%u: expected value %#x/%#x got %#x/%#x\n",
751 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
753 ok(items_returned == 0,
"unexpected item count %u\n", items_returned);
755 IWICEnumMetadataItem_Release(enumerator);
762 {
VT_UI2, 0xfe, 0, { 1 } },
763 {
VT_UI4, 0x100, 0, { 222 } },
764 {
VT_UI4, 0x101, 0, { 333 } },
765 {
VT_UI2, 0x102, 0, { 24 } },
766 {
VT_UI4, 0x103, 0, { 32773 } },
768 {
VT_UI1, 0xf001, 0, { 0x44 } },
770 {
VT_I1, 0xf003, 0, { 0x44 } },
771 {
VT_I2, 0xf004, 0, { 0x3344 } },
773 {
VT_I4, 0xf006, 0, { 0x11223344 } },
774 {
VT_R4, 0xf007, 0, { 0x11223344 } },
775 {
VT_R8, 0xf008, 0, { ((
LONGLONG)0x41d26580 << 32) | 0xb486522c } },
776 {
VT_I8, 0xf009, 0, { ((
LONGLONG)0x5a6b7c8d << 32) | 0x1a2b3c4d } },
777 {
VT_UI1|
VT_VECTOR, 0xf00a, 13, {
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
'!',0 } },
778 {
VT_I2|
VT_VECTOR, 0xf00b, 4, { 0x0101, 0x0202, 0x0303, 0x0404 } },
781 {
VT_LPSTR, 0xf00e, 12, { 0 },
"Hello World!" },
782 {
VT_LPSTR, 0xf00f, 4, { 0 },
"abcd" },
783 {
VT_BLOB, 0xf010, 13, { 0 },
"Hello World!" },
784 {
VT_BLOB, 0xf011, 4, { 0 },
"abcd" },
785 {
VT_UI1, 0xf012, 0, { 0x44 } },
786 {
VT_UI2, 0xf013, 0, { 0x3344 } },
787 {
VT_UI4, 0xf014, 0, { 0x11223344 } },
788 {
VT_R4, 0xf015, 0, { 0x11223344 } },
790 { ((
LONGLONG)0x05060708 << 32) | 0x01020304,
791 ((
LONGLONG)0x50607080 << 32) | 0x10203040,
792 ((
LONGLONG)0x55667788 << 32) | 0x11223344 } },
800 char *IFD_data_swapped;
801#ifdef WORDS_BIGENDIAN
808 &IID_IWICMetadataReader, (
void**)&
reader);
809 ok(
hr ==
S_OK,
"CoCreateInstance error %#x\n",
hr);
843 ok(
hr ==
S_OK,
"GetMetadataFormat error %#x\n",
hr);
846 hr = IWICMetadataReader_GetMetadataFormat(
reader,
NULL);
850 ok(
hr ==
S_OK,
"GetValueByIndex error %#x\n",
hr);
853 PropVariantInit(&
id);
854 PropVariantInit(&
value);
857 ok(
hr ==
S_OK,
"GetValueByIndex error %#x\n",
hr);
860 ok(
hr ==
S_OK,
"GetValueByIndex error %#x\n",
hr);
864 ok(
hr ==
S_OK,
"GetValueByIndex error %#x\n",
hr);
868 ok(
hr ==
S_OK,
"GetValueByIndex error %#x\n",
hr);
870 ok(
U(
id).uiVal == 0xfe,
"unexpected id: %#x\n",
U(
id).uiVal);
874 ok(
hr ==
S_OK,
"GetValueByIndex error %#x\n",
hr);
883 PropVariantInit(&
id);
884 PropVariantInit(&
value);
902 U(
id).uiVal = 0xf00e;
921 hr = IWICMetadataReader_QueryInterface(
reader, &IID_IWICMetadataBlockReader, (
void**)&blockreader);
925 IWICMetadataBlockReader_Release(blockreader);
927 IWICMetadataReader_Release(
reader);
938 &IID_IWICMetadataReader, (
void**)&
reader);
949 hr = IWICMetadataReader_QueryInterface(
reader, &IID_IWICMetadataBlockReader, (
void**)&blockreader);
953 IWICMetadataBlockReader_Release(blockreader);
955 IWICMetadataReader_Release(
reader);
968 &IID_IWICComponentFactory, (
void**)&
factory);
969 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%x\n",
hr);
973 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
978 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
983 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
988 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
991 ok(
hr ==
S_OK,
"CreateMetadataReaderFromContainer failed, hr=%x\n",
hr);
996 ok(
hr ==
S_OK,
"GetCount failed, hr=%x\n",
hr);
1000 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%x\n",
hr);
1003 IWICMetadataReader_Release(
reader);
1006 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
1009 ok(
hr ==
S_OK,
"CreateMetadataReaderFromContainer failed, hr=%x\n",
hr);
1014 ok(
hr ==
S_OK,
"GetCount failed, hr=%x\n",
hr);
1018 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%x\n",
hr);
1021 IWICMetadataReader_Release(
reader);
1026 IWICComponentFactory_Release(
factory);
1033 {
VT_UI2, 0, 0, { 2005 },
NULL, {
'Y',
'e',
'a',
'r',0 } },
1034 {
VT_UI1, 0, 0, { 6 },
NULL, {
'M',
'o',
'n',
't',
'h',0 } },
1035 {
VT_UI1, 0, 0, { 3 },
NULL, {
'D',
'a',
'y',0 } },
1036 {
VT_UI1, 0, 0, { 15 },
NULL, {
'H',
'o',
'u',
'r',0 } },
1037 {
VT_UI1, 0, 0, { 7 },
NULL, {
'M',
'i',
'n',
'u',
't',
'e',0 } },
1038 {
VT_UI1, 0, 0, { 45 },
NULL, {
'S',
'e',
'c',
'o',
'n',
'd',0 } }
1047 GUID containerformat;
1052 &IID_IWICBitmapDecoder, (
void**)&decoder);
1053 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%x\n",
hr);
1060 ok(
hr ==
S_OK,
"Initialize failed, hr=%x\n",
hr);
1062 hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICMetadataBlockReader, (
void**)&blockreader);
1065 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
1066 ok(
hr ==
S_OK,
"GetFrame failed, hr=%x\n",
hr);
1068 hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void**)&blockreader);
1069 ok(
hr ==
S_OK,
"QueryInterface failed, hr=%x\n",
hr);
1073 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader,
NULL);
1076 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &containerformat);
1077 ok(
hr ==
S_OK,
"GetContainerFormat failed, hr=%x\n",
hr);
1078 ok(
IsEqualGUID(&containerformat, &GUID_ContainerFormatPng),
"unexpected container format\n");
1080 hr = IWICMetadataBlockReader_GetCount(blockreader,
NULL);
1083 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
1084 ok(
hr ==
S_OK,
"GetCount failed, hr=%x\n",
hr);
1090 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0,
NULL);
1094 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
1095 ok(
hr ==
S_OK,
"GetReaderByIndex failed, hr=%x\n",
hr);
1099 hr = IWICMetadataReader_GetMetadataFormat(
reader, &containerformat);
1100 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1103 "unexpected container format\n");
1111 IWICMetadataReader_Release(
reader);
1114 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
1118 &IID_IWICComponentFactory, (
void**)&
factory);
1119 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%x\n",
hr);
1121 hr = IWICComponentFactory_CreateQueryReaderFromBlockReader(
factory,
NULL, &queryreader);
1122 ok(
hr ==
E_INVALIDARG,
"CreateQueryReaderFromBlockReader should have failed: %08x\n",
hr);
1124 hr = IWICComponentFactory_CreateQueryReaderFromBlockReader(
factory, blockreader,
NULL);
1125 ok(
hr ==
E_INVALIDARG,
"CreateQueryReaderFromBlockReader should have failed: %08x\n",
hr);
1127 hr = IWICComponentFactory_CreateQueryReaderFromBlockReader(
factory, blockreader, &queryreader);
1128 ok(
hr ==
S_OK,
"CreateQueryReaderFromBlockReader failed: %08x\n",
hr);
1130 IWICMetadataQueryReader_Release(queryreader);
1132 IWICComponentFactory_Release(
factory);
1134 IWICMetadataBlockReader_Release(blockreader);
1137 hr = IWICBitmapFrameDecode_GetMetadataQueryReader(frame, &queryreader);
1138 ok(
hr ==
S_OK,
"GetMetadataQueryReader failed: %08x\n",
hr);
1142 IWICMetadataQueryReader_Release(queryreader);
1145 IWICBitmapFrameDecode_Release(frame);
1147 IWICBitmapDecoder_Release(decoder);
1154 static const struct test_data gif_LSD[9] =
1156 {
VT_UI1|
VT_VECTOR, 0, 6, {
'G',
'I',
'F',
'8',
'7',
'a'},
NULL, {
'S',
'i',
'g',
'n',
'a',
't',
'u',
'r',
'e',0 } },
1157 {
VT_UI2, 0, 0, { 1 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1158 {
VT_UI2, 0, 0, { 1 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1159 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'G',
'l',
'o',
'b',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'F',
'l',
'a',
'g',0 } },
1160 {
VT_UI1, 0, 0, { 0 },
NULL, {
'C',
'o',
'l',
'o',
'r',
'R',
'e',
's',
'o',
'l',
'u',
't',
'i',
'o',
'n',0 } },
1161 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1162 {
VT_UI1, 0, 0, { 0 },
NULL, {
'G',
'l',
'o',
'b',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'S',
'i',
'z',
'e',0 } },
1163 {
VT_UI1, 0, 0, { 0 },
NULL, {
'B',
'a',
'c',
'k',
'g',
'r',
'o',
'u',
'n',
'd',
'C',
'o',
'l',
'o',
'r',
'I',
'n',
'd',
'e',
'x',0 } },
1164 {
VT_UI1, 0, 0, { 0 },
NULL, {
'P',
'i',
'x',
'e',
'l',
'A',
's',
'p',
'e',
'c',
't',
'R',
'a',
't',
'i',
'o',0 } }
1166 static const struct test_data gif_IMD[8] =
1168 {
VT_UI2, 0, 0, { 0 },
NULL, {
'L',
'e',
'f',
't',0 } },
1169 {
VT_UI2, 0, 0, { 0 },
NULL, {
'T',
'o',
'p',0 } },
1170 {
VT_UI2, 0, 0, { 1 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1171 {
VT_UI2, 0, 0, { 1 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1172 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'L',
'o',
'c',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'F',
'l',
'a',
'g',0 } },
1173 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'I',
'n',
't',
'e',
'r',
'l',
'a',
'c',
'e',
'F',
'l',
'a',
'g',0 } },
1174 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1175 {
VT_UI1, 0, 0, { 0 },
NULL, {
'L',
'o',
'c',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'S',
'i',
'z',
'e',0 } }
1177 static const struct test_data animated_gif_LSD[9] =
1179 {
VT_UI1|
VT_VECTOR, 0, 6, {
'G',
'I',
'F',
'8',
'9',
'a'},
NULL, {
'S',
'i',
'g',
'n',
'a',
't',
'u',
'r',
'e',0 } },
1180 {
VT_UI2, 0, 0, { 1 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1181 {
VT_UI2, 0, 0, { 1 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1182 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'G',
'l',
'o',
'b',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'F',
'l',
'a',
'g',0 } },
1183 {
VT_UI1, 0, 0, { 2 },
NULL, {
'C',
'o',
'l',
'o',
'r',
'R',
'e',
's',
'o',
'l',
'u',
't',
'i',
'o',
'n',0 } },
1184 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1185 {
VT_UI1, 0, 0, { 1 },
NULL, {
'G',
'l',
'o',
'b',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'S',
'i',
'z',
'e',0 } },
1186 {
VT_UI1, 0, 0, { 0 },
NULL, {
'B',
'a',
'c',
'k',
'g',
'r',
'o',
'u',
'n',
'd',
'C',
'o',
'l',
'o',
'r',
'I',
'n',
'd',
'e',
'x',0 } },
1187 {
VT_UI1, 0, 0, { 0 },
NULL, {
'P',
'i',
'x',
'e',
'l',
'A',
's',
'p',
'e',
'c',
't',
'R',
'a',
't',
'i',
'o',0 } }
1189 static const struct test_data animated_gif_IMD[8] =
1191 {
VT_UI2, 0, 0, { 0 },
NULL, {
'L',
'e',
'f',
't',0 } },
1192 {
VT_UI2, 0, 0, { 0 },
NULL, {
'T',
'o',
'p',0 } },
1193 {
VT_UI2, 0, 0, { 1 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1194 {
VT_UI2, 0, 0, { 1 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1195 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'L',
'o',
'c',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'F',
'l',
'a',
'g',0 } },
1196 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'I',
'n',
't',
'e',
'r',
'l',
'a',
'c',
'e',
'F',
'l',
'a',
'g',0 } },
1197 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1198 {
VT_UI1, 0, 0, { 1 },
NULL, {
'L',
'o',
'c',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'S',
'i',
'z',
'e',0 } }
1200 static const struct test_data animated_gif_GCE[5] =
1202 {
VT_UI1, 0, 0, { 0 },
NULL, {
'D',
'i',
's',
'p',
'o',
's',
'a',
'l',0 } },
1203 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'U',
's',
'e',
'r',
'I',
'n',
'p',
'u',
't',
'F',
'l',
'a',
'g',0 } },
1204 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'T',
'r',
'a',
'n',
's',
'p',
'a',
'r',
'e',
'n',
'c',
'y',
'F',
'l',
'a',
'g',0 } },
1205 {
VT_UI2, 0, 0, { 10 },
NULL, {
'D',
'e',
'l',
'a',
'y',0 } },
1206 {
VT_UI1, 0, 0, { 1 },
NULL, {
'T',
'r',
'a',
'n',
's',
'p',
'a',
'r',
'e',
'n',
't',
'C',
'o',
'l',
'o',
'r',
'I',
'n',
'd',
'e',
'x',0 } }
1208 static const struct test_data animated_gif_APE[2] =
1210 {
VT_UI1|
VT_VECTOR, 0, 11, {
'A',
'N',
'I',
'M',
'E',
'X',
'T',
'S',
'1',
'.',
'0' },
NULL, {
'A',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',0 } },
1211 {
VT_UI1|
VT_VECTOR, 0, 4, { 0x03,0x01,0x05,0x00 },
NULL, {
'D',
'a',
't',
'a',0 } }
1213 static const struct test_data animated_gif_comment_1[1] =
1215 {
VT_LPSTR, 0, 12, { 0 },
"Hello World!", {
'T',
'e',
'x',
't',
'E',
'n',
't',
'r',
'y',0 } }
1217 static const struct test_data animated_gif_comment_2[1] =
1219 {
VT_LPSTR, 0, 8, { 0 },
"image #1", {
'T',
'e',
'x',
't',
'E',
'n',
't',
'r',
'y',0 } }
1221 static const struct test_data animated_gif_plain_1[1] =
1223 {
VT_BLOB, 0, 17, { 0 },
"\x21\x01\x0d\x61nimation.gif" }
1225 static const struct test_data animated_gif_plain_2[1] =
1227 {
VT_BLOB, 0, 16, { 0 },
"\x21\x01\x0cplaintext #1" }
1243 &IID_IWICBitmapDecoder, (
void **)&decoder);
1244 ok(
hr ==
S_OK,
"CoCreateInstance error %#x\n",
hr);
1246 ok(
hr ==
S_OK,
"Initialize error %#x\n",
hr);
1251 hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICMetadataBlockReader, (
void **)&blockreader);
1256 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &
format);
1257 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
1261 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
1265 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
1266 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1271 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1281 IWICMetadataReader_Release(
reader);
1284 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
1287 IWICMetadataBlockReader_Release(blockreader);
1291 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
1294 hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void **)&blockreader);
1299 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader,
NULL);
1302 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &
format);
1303 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
1307 hr = IWICMetadataBlockReader_GetCount(blockreader,
NULL);
1310 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
1314 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
1315 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1320 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1330 IWICMetadataReader_Release(
reader);
1333 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
1336 IWICMetadataBlockReader_Release(blockreader);
1339 IWICBitmapFrameDecode_Release(frame);
1340 IWICBitmapDecoder_Release(decoder);
1346 &IID_IWICBitmapDecoder, (
void **)&decoder);
1347 ok(
hr ==
S_OK,
"CoCreateInstance error %#x\n",
hr);
1349 ok(
hr ==
S_OK,
"Initialize error %#x\n",
hr);
1354 hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICMetadataBlockReader, (
void **)&blockreader);
1359 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &
format);
1360 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
1364 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
1368 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
1369 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1374 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1384 IWICMetadataReader_Release(
reader);
1387 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
1388 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1393 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1403 IWICMetadataReader_Release(
reader);
1406 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 2, &
reader);
1407 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1412 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1422 IWICMetadataReader_Release(
reader);
1425 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 3, &
reader);
1426 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1431 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1441 IWICMetadataReader_Release(
reader);
1444 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 4, &
reader);
1447 IWICMetadataBlockReader_Release(blockreader);
1451 hr = IWICBitmapDecoder_GetFrame(decoder, 1, &frame);
1454 hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void **)&blockreader);
1459 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader,
NULL);
1462 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &
format);
1463 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
1467 hr = IWICMetadataBlockReader_GetCount(blockreader,
NULL);
1470 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
1474 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
1475 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1480 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1490 IWICMetadataReader_Release(
reader);
1493 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
1494 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1499 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1510 IWICMetadataReader_Release(
reader);
1513 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 2, &
reader);
1514 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1519 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1529 IWICMetadataReader_Release(
reader);
1532 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 3, &
reader);
1533 ok(
hr ==
S_OK,
"GetReaderByIndex error %#x\n",
hr);
1538 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#x\n",
hr);
1548 IWICMetadataReader_Release(
reader);
1551 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 4, &
reader);
1554 IWICMetadataBlockReader_Release(blockreader);
1557 hr = IWICBitmapDecoder_GetMetadataQueryReader(decoder, &queryreader);
1559 "GetMetadataQueryReader error %#x\n",
hr);
1593 hr = IWICMetadataQueryReader_GetContainerFormat(queryreader, &
format);
1594 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
1600 hr = IWICMetadataQueryReader_GetLocation(queryreader, 256,
name, &
len);
1601 ok(
hr ==
S_OK,
"GetLocation error %#x\n",
hr);
1602 ok(
len == 2,
"expected 2, got %u\n",
len);
1613 hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW,
NULL);
1614 ok(
hr == decoder_data[
i].
hr,
"GetMetadataByName(%s) returned %#x, expected %#x\n",
wine_dbgstr_w(queryW),
hr, decoder_data[
i].
hr);
1616 PropVariantInit(&
value);
1617 hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW, &
value);
1618 ok(
hr == decoder_data[
i].
hr,
"GetMetadataByName(%s) returned %#x, expected %#x\n",
wine_dbgstr_w(queryW),
hr, decoder_data[
i].
hr);
1619 ok(
value.vt == decoder_data[
i].vt,
"expected %#x, got %#x\n", decoder_data[
i].vt,
value.vt);
1622 hr = IUnknown_QueryInterface(
value.punkVal, &IID_IWICMetadataQueryReader, (
void **)&meta_reader);
1623 ok(
hr ==
S_OK,
"QueryInterface error %#x\n",
hr);
1627 hr = IWICMetadataQueryReader_GetLocation(meta_reader, 256,
name, &
len);
1628 ok(
hr ==
S_OK,
"GetLocation error %#x\n",
hr);
1641 hr = IWICMetadataQueryReader_GetMetadataByName(meta_reader, queryW +
len - 1, &
value);
1642 ok(
hr == decoder_data[
j].
hr,
"GetMetadataByName(%s) returned %#x, expected %#x\n",
wine_dbgstr_w(queryW +
len - 1),
hr, decoder_data[
j].
hr);
1643 ok(
value.vt == decoder_data[
j].vt,
"expected %#x, got %#x\n", decoder_data[
j].vt,
value.vt);
1647 IWICMetadataQueryReader_Release(meta_reader);
1653 IWICMetadataQueryReader_Release(queryreader);
1656 hr = IWICBitmapFrameDecode_GetMetadataQueryReader(frame, &queryreader);
1658 "GetMetadataQueryReader error %#x\n",
hr);
1671 {
"/[0]grctlext/{str=delay}",
S_OK,
VT_UI2 },
1673 {
"/[0]grctlext/{wstr=delay}",
S_OK,
VT_UI2 },
1675 {
"/imgdesc/{STR=interlaceFLAG}",
S_OK,
VT_BOOL },
1676 {
"/imgdesc/{WSTR=interlaceFLAG}",
S_OK,
VT_BOOL },
1688 static const WCHAR guidW[] = {
'/',
'{',
'g',
'u',
'i',
'd',
'=',
'\\',0};
1689 static const WCHAR imgdescW[] = {
'i',
'm',
'g',
'd',
'e',
's',
'c',0};
1690 static const WCHAR ImgDescW[] = {
'I',
'm',
'g',
'D',
'e',
's',
'c',0};
1696 hr = IWICMetadataQueryReader_GetContainerFormat(queryreader, &
format);
1697 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
1703 hr = IWICMetadataQueryReader_GetLocation(queryreader, 256,
name, &
len);
1704 ok(
hr ==
S_OK,
"GetLocation error %#x\n",
hr);
1705 ok(
len == 2,
"expected 2, got %u\n",
len);
1713 PropVariantInit(&
value);
1714 hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW, &
value);
1715 ok(
hr == frame_data[
i].
hr,
"GetMetadataByName(%s) returned %#x, expected %#x\n",
wine_dbgstr_w(queryW),
hr, frame_data[
i].
hr);
1716 ok(
value.vt == frame_data[
i].vt,
"expected %#x, got %#x\n", frame_data[
i].vt,
value.vt);
1719 hr = IUnknown_QueryInterface(
value.punkVal, &IID_IWICMetadataQueryReader, (
void **)&meta_reader);
1720 ok(
hr ==
S_OK,
"QueryInterface error %#x\n",
hr);
1724 hr = IWICMetadataQueryReader_GetLocation(meta_reader, 256,
name, &
len);
1725 ok(
hr ==
S_OK,
"GetLocation error %#x\n",
hr);
1729 IWICMetadataQueryReader_Release(meta_reader);
1738 ok(
hr ==
S_OK,
"WICMapGuidToShortName error %#x\n",
hr);
1743 ok(
hr ==
S_OK,
"WICMapGuidToShortName error %#x\n",
hr);
1748 ok(
hr ==
S_OK,
"WICMapGuidToShortName error %#x\n",
hr);
1753 memcpy(queryW, guidW,
sizeof(guidW) - 2);
1756 PropVariantInit(&
value);
1757 hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW, &
value);
1762 IWICMetadataQueryReader_Release(queryreader);
1765 IWICBitmapFrameDecode_Release(frame);
1766 IWICBitmapDecoder_Release(decoder);
1771 static const WCHAR LSD_name[] = {
'L',
'o',
'g',
'i',
'c',
'a',
'l',
' ',
'S',
'c',
'r',
'e',
'e',
'n',
' ',
'D',
'e',
's',
'c',
'r',
'i',
'p',
't',
'o',
'r',
' ',
'R',
'e',
'a',
'd',
'e',
'r',0};
1772 static const char LSD_data[] =
"hello world!\x1\x2\x3\x4\xab\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf";
1775 {
VT_UI1|
VT_VECTOR, 0, 6, {
'w',
'o',
'r',
'l',
'd',
'!'},
NULL, {
'S',
'i',
'g',
'n',
'a',
't',
'u',
'r',
'e',0 } },
1776 {
VT_UI2, 0, 0, { 0x201 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1777 {
VT_UI2, 0, 0, { 0x403 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1778 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'G',
'l',
'o',
'b',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'F',
'l',
'a',
'g',0 } },
1779 {
VT_UI1, 0, 0, { 2 },
NULL, {
'C',
'o',
'l',
'o',
'r',
'R',
'e',
's',
'o',
'l',
'u',
't',
'i',
'o',
'n',0 } },
1780 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1781 {
VT_UI1, 0, 0, { 3 },
NULL, {
'G',
'l',
'o',
'b',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'S',
'i',
'z',
'e',0 } },
1782 {
VT_UI1, 0, 0, { 6 },
NULL, {
'B',
'a',
'c',
'k',
'g',
'r',
'o',
'u',
'n',
'd',
'C',
'o',
'l',
'o',
'r',
'I',
'n',
'd',
'e',
'x',0 } },
1783 {
VT_UI1, 0, 0, { 7 },
NULL, {
'P',
'i',
'x',
'e',
'l',
'A',
's',
'p',
'e',
'c',
't',
'R',
'a',
't',
'i',
'o',0 } }
1797 &IID_IWICMetadataReader, (
void **)&
reader);
1799 "CoCreateInstance error %#x\n",
hr);
1807 ok(
hr ==
S_OK,
"IStream_Seek error %#x\n",
hr);
1809 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
1810 ok(
hr ==
S_OK,
"QueryInterface error %#x\n",
hr);
1812 hr = IWICPersistStream_Load(persist,
stream);
1815 IWICPersistStream_Release(persist);
1827 ok(
hr ==
S_OK,
"GetMetadataFormat error %#x\n",
hr);
1830 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
1831 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#x\n",
hr);
1833 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
id);
1838 ok(
hr ==
S_OK,
"GetFriendlyName error %#x\n",
hr);
1841 IWICMetadataHandlerInfo_Release(
info);
1842 IWICMetadataReader_Release(
reader);
1850 static const WCHAR IMD_name[] = {
'I',
'm',
'a',
'g',
'e',
' ',
'D',
'e',
's',
'c',
'r',
'i',
'p',
't',
'o',
'r',
' ',
'R',
'e',
'a',
'd',
'e',
'r',0};
1851 static const char IMD_data[] =
"hello world!\x1\x2\x3\x4\x5\x6\x7\x8\xed\xa\xb\xc\xd\xe\xf";
1854 {
VT_UI2, 0, 0, { 0x201 },
NULL, {
'L',
'e',
'f',
't',0 } },
1855 {
VT_UI2, 0, 0, { 0x403 },
NULL, {
'T',
'o',
'p',0 } },
1856 {
VT_UI2, 0, 0, { 0x605 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1857 {
VT_UI2, 0, 0, { 0x807 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1858 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'L',
'o',
'c',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'F',
'l',
'a',
'g',0 } },
1859 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'I',
'n',
't',
'e',
'r',
'l',
'a',
'c',
'e',
'F',
'l',
'a',
'g',0 } },
1860 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1861 {
VT_UI1, 0, 0, { 5 },
NULL, {
'L',
'o',
'c',
'a',
'l',
'C',
'o',
'l',
'o',
'r',
'T',
'a',
'b',
'l',
'e',
'S',
'i',
'z',
'e',0 } }
1875 &IID_IWICMetadataReader, (
void **)&
reader);
1877 "CoCreateInstance error %#x\n",
hr);
1885 ok(
hr ==
S_OK,
"IStream_Seek error %#x\n",
hr);
1887 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
1888 ok(
hr ==
S_OK,
"QueryInterface error %#x\n",
hr);
1890 hr = IWICPersistStream_Load(persist,
stream);
1893 IWICPersistStream_Release(persist);
1905 ok(
hr ==
S_OK,
"GetMetadataFormat error %#x\n",
hr);
1908 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
1909 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#x\n",
hr);
1911 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
id);
1916 ok(
hr ==
S_OK,
"GetFriendlyName error %#x\n",
hr);
1919 IWICMetadataHandlerInfo_Release(
info);
1920 IWICMetadataReader_Release(
reader);
1928 static const WCHAR GCE_name[] = {
'G',
'r',
'a',
'p',
'h',
'i',
'c',
' ',
'C',
'o',
'n',
't',
'r',
'o',
'l',
' ',
'E',
'x',
't',
'e',
'n',
's',
'i',
'o',
'n',
' ',
'R',
'e',
'a',
'd',
'e',
'r',0};
1929 static const char GCE_data[] =
"hello world!\xa\x2\x3\x4\x5\x6\x7\x8\xed\xa\xb\xc\xd\xe\xf";
1932 {
VT_UI1, 0, 0, { 2 },
NULL, {
'D',
'i',
's',
'p',
'o',
's',
'a',
'l',0 } },
1933 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'U',
's',
'e',
'r',
'I',
'n',
'p',
'u',
't',
'F',
'l',
'a',
'g',0 } },
1934 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'T',
'r',
'a',
'n',
's',
'p',
'a',
'r',
'e',
'n',
'c',
'y',
'F',
'l',
'a',
'g',0 } },
1935 {
VT_UI2, 0, 0, { 0x302 },
NULL, {
'D',
'e',
'l',
'a',
'y',0 } },
1936 {
VT_UI1, 0, 0, { 4 },
NULL, {
'T',
'r',
'a',
'n',
's',
'p',
'a',
'r',
'e',
'n',
't',
'C',
'o',
'l',
'o',
'r',
'I',
'n',
'd',
'e',
'x',0 } }
1950 &IID_IWICMetadataReader, (
void **)&
reader);
1952 "CoCreateInstance error %#x\n",
hr);
1960 ok(
hr ==
S_OK,
"IStream_Seek error %#x\n",
hr);
1962 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
1963 ok(
hr ==
S_OK,
"QueryInterface error %#x\n",
hr);
1965 hr = IWICPersistStream_Load(persist,
stream);
1968 IWICPersistStream_Release(persist);
1980 ok(
hr ==
S_OK,
"GetMetadataFormat error %#x\n",
hr);
1983 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
1984 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#x\n",
hr);
1986 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
id);
1991 ok(
hr ==
S_OK,
"GetFriendlyName error %#x\n",
hr);
1994 IWICMetadataHandlerInfo_Release(
info);
1995 IWICMetadataReader_Release(
reader);
2003 static const WCHAR APE_name[] = {
'A',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',
' ',
'E',
'x',
't',
'e',
'n',
's',
'i',
'o',
'n',
' ',
'R',
'e',
'a',
'd',
'e',
'r',0};
2004 static const char APE_data[] = { 0x21,0xff,0x0b,
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
2007 4,0x44,0x55,0x66,0x77,
2011 {
VT_UI1|
VT_VECTOR, 0, 11, {
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd' },
NULL, {
'A',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',0 } },
2012 {
VT_UI1|
VT_VECTOR, 0, 10, { 1,0x11,2,0x22,0x33,4,0x44,0x55,0x66,0x77 },
NULL, {
'D',
'a',
't',
'a',0 } }
2014 WCHAR dataW[] = {
'd',
'a',
't',
'a',0 };
2027 &IID_IWICMetadataReader, (
void **)&
reader);
2029 "CoCreateInstance error %#x\n",
hr);
2035 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
2036 ok(
hr ==
S_OK,
"QueryInterface error %#x\n",
hr);
2038 hr = IWICPersistStream_Load(persist,
stream);
2041 IWICPersistStream_Release(persist);
2053 ok(
hr ==
S_OK,
"GetMetadataFormat error %#x\n",
hr);
2056 PropVariantInit(&
value);
2058 U(
id).pwszVal = dataW;
2064 for (
i = 0;
i <
U(
value).caub.cElems;
i++)
2068 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
2069 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#x\n",
hr);
2071 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
clsid);
2076 ok(
hr ==
S_OK,
"GetFriendlyName error %#x\n",
hr);
2079 IWICMetadataHandlerInfo_Release(
info);
2080 IWICMetadataReader_Release(
reader);
2088 static const WCHAR GIF_comment_name[] = {
'C',
'o',
'm',
'm',
'e',
'n',
't',
' ',
'E',
'x',
't',
'e',
'n',
's',
'i',
'o',
'n',
' ',
'R',
'e',
'a',
'd',
'e',
'r',0};
2089 static const char GIF_comment_data[] = { 0x21,0xfe,
2090 5,
'H',
'e',
'l',
'l',
'o',
2092 6,
'W',
'o',
'r',
'l',
'd',
'!',
2096 {
VT_LPSTR, 0, 12, { 0 },
"Hello World!", {
'T',
'e',
'x',
't',
'E',
'n',
't',
'r',
'y',0 } }
2098 WCHAR text_entryW[] = {
'T',
'E',
'X',
'T',
'E',
'N',
'T',
'R',
'Y',0 };
2111 &IID_IWICMetadataReader, (
void **)&
reader);
2113 "CoCreateInstance error %#x\n",
hr);
2119 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
2120 ok(
hr ==
S_OK,
"QueryInterface error %#x\n",
hr);
2122 hr = IWICPersistStream_Load(persist,
stream);
2125 IWICPersistStream_Release(persist);
2137 ok(
hr ==
S_OK,
"GetMetadataFormat error %#x\n",
hr);
2140 PropVariantInit(&
value);
2142 U(
id).pwszVal = text_entryW;
2150 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
2151 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#x\n",
hr);
2153 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
clsid);
2158 ok(
hr ==
S_OK,
"GetFriendlyName error %#x\n",
hr);
2161 IWICMetadataHandlerInfo_Release(
info);
2162 IWICMetadataReader_Release(
reader);
2170 static const WCHAR unkW[] = {
'u',
'n',
'k',0 };
2171 static const WCHAR unknownW[] = {
'u',
'n',
'k',
'n',
'o',
'w',
'n',0 };
2211 ok(
len == 0xdeadbeef,
"got %u\n",
len);
2218 ok(
len == 0xdeadbeef,
"got %u\n",
len);
2227 static const WCHAR unkW[] = {
'u',
'n',
'k',0 };
2228 static const WCHAR xmpW[] = {
'x',
'm',
'p',0 };
2229 static const WCHAR XmPW[] = {
'X',
'm',
'P',0 };
2230 static const WCHAR unknownW[] = {
'u',
'n',
'k',
'n',
'o',
'w',
'n',0 };
2262 &GUID_ContainerFormatBmp,
2263 &GUID_ContainerFormatPng,
2264 &GUID_ContainerFormatIco,
2265 &GUID_ContainerFormatJpeg,
2266 &GUID_ContainerFormatTiff,
2267 &GUID_ContainerFormatGif,
2268 &GUID_ContainerFormatWmp,
2269 &GUID_MetadataFormatUnknown,
2270 &GUID_MetadataFormatIfd,
2271 &GUID_MetadataFormatSubIfd,
2272 &GUID_MetadataFormatExif,
2273 &GUID_MetadataFormatGps,
2274 &GUID_MetadataFormatInterop,
2275 &GUID_MetadataFormatApp0,
2276 &GUID_MetadataFormatApp1,
2277 &GUID_MetadataFormatApp13,
2278 &GUID_MetadataFormatIPTC,
2279 &GUID_MetadataFormatIRB,
2280 &GUID_MetadataFormat8BIMIPTC,
2281 &GUID_MetadataFormat8BIMResolutionInfo,
2282 &GUID_MetadataFormat8BIMIPTCDigest,
2283 &GUID_MetadataFormatXMP,
2284 &GUID_MetadataFormatThumbnail,
2285 &GUID_MetadataFormatChunktEXt,
2286 &GUID_MetadataFormatXMPStruct,
2287 &GUID_MetadataFormatXMPBag,
2288 &GUID_MetadataFormatXMPSeq,
2289 &GUID_MetadataFormatXMPAlt,
2290 &GUID_MetadataFormatLSD,
2291 &GUID_MetadataFormatIMD,
2292 &GUID_MetadataFormatGCE,
2293 &GUID_MetadataFormatAPE,
2294 &GUID_MetadataFormatJpegChrominance,
2295 &GUID_MetadataFormatJpegLuminance,
2296 &GUID_MetadataFormatJpegComment,
2297 &GUID_MetadataFormatGifComment,
2298 &GUID_MetadataFormatChunkgAMA,
2299 &GUID_MetadataFormatChunkbKGD,
2300 &GUID_MetadataFormatChunkiTXt,
2301 &GUID_MetadataFormatChunkcHRM,
2302 &GUID_MetadataFormatChunkhIST,
2303 &GUID_MetadataFormatChunkiCCP,
2304 &GUID_MetadataFormatChunksRGB,
2305 &GUID_MetadataFormatChunktIME
2308static 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 };
2309static 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 };
2310static WCHAR xmp_scheme[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
'x',
'a',
'p',
'/',
'1',
'.',
'0',
'/',0 };
2311static 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 };
2312static 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 };
2313static 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 };
2314static 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 };
2315static 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 };
2316static WCHAR pdf_scheme[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
'p',
'd',
'f',
'/',
'1',
'.',
'3',
'/',0 };
2317static 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 };
2318static WCHAR tiff_scheme[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
't',
'i',
'f',
'f',
'/',
'1',
'.',
'0',
'/',0 };
2319static WCHAR exif_scheme[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
'e',
'x',
'i',
'f',
'/',
'1',
'.',
'0',
'/',0 };
2320static 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 };
2321static 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 };
2322static 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 };
2323static 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 };
2324static 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 };
2325static 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 };
2326static 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 };
2327static 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 };
2328static 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 };
2329static 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 };
2330static 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 };
2331static 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 };
2332static 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 };
2333static 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 };
2367 static const WCHAR xmW[] = {
'x',
'm',0 };
2368 static const WCHAR xmpW[] = {
'x',
'm',
'p',0 };
2369 static WCHAR schemaW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
'x',
'a',
'p',
'/',
'1',
'.',
'0',
'/',0 };
2370 static WCHAR SCHEMAW[] = {
'H',
'T',
'T',
'P',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
'x',
'a',
'p',
'/',
'1',
'.',
'0',
'/',0 };
2403 ok(
len == 0xdeadbeef,
"got %u\n",
len);
2415 ok(
len == 0xdeadbeef,
"got %u\n",
len);
2421 ok(
len == 0xdeadbeef,
"got %u\n",
len);
2431 win_skip(
"Modern schemas are not supported\n");
2443 ok(
hr ==
S_OK,
"%u: %u: format %s does not support schema %s\n",
2521 ok(0,
"not implemented\n");
2538 ok(0,
"not implemented\n");
2544 static char buf[16][256];
2559 if (!
var)
return "(null)";
2589 if (value1)
return value1 < 0 ? -1 : 1;
2628 ok(0,
"unsupported schema vt %u\n",
schema->vt);
2666 if (
IsEqualGUID(
U(*id).puuid, &GUID_MetadataFormatXMP) ||
2691 ok(0,
"not implemented\n");
2713 IsEqualIID(iid, &IID_IWICMetadataBlockReader))
2768 if (index < current_metadata->
count)
2781 ok(0,
"not implemented\n");
2798static const char xmp[] =
"http://ns.adobe.com/xap/1.0/";
2799static const char dc[] =
"http://purl.org/dc/elements/1.1/";
2800static const char tiff[] =
"http://ns.adobe.com/tiff/1.0/";
2810 {
"xmp",
"Rating", 4, 5, 6 },
2811 {
NULL,
"Rating", 7, 8, 9 }
2825 {
xmp,
"Rating", 4, 5, 6 },
2828 {
NULL,
"RATING", 13, 14, 15 },
2829 {
NULL,
"R}ATING", 16, 17, 18 },
2830 {
NULL,
"xmp", 19, 20, 21 }
2835 { &GUID_MetadataFormatIfd, 1,
item1 }
2840 { &GUID_MetadataFormatXMP, 1,
item1 },
2841 { &GUID_MetadataFormatIfd, 3,
item2 }
2846 { &GUID_MetadataFormatXMP, 1,
item1 },
2847 { &GUID_MetadataFormatIfd, 3,
item2 },
2848 { &GUID_MetadataFormatXMP, 4,
item3 },
2849 { &GUID_MetadataFormatXMP, 7,
item4 },
2850 { &GUID_MetadataFormatIfd, 7,
item4 }
2855 &GUID_ContainerFormatGif,
2861 &GUID_ContainerFormatTiff,
2867 &GUID_ContainerFormatPng,
2873 static const char q1[] =
"/ifd/{uchar=1}";
2874 static const char q2[] =
"/ifd/xmp:{long=4}";
2875 static const char q3[] =
"/ifd/{str=xmp}:{uint=4}";
2876 static const char q4[] =
"/xmp/{char=7}";
2877 static const char q5[] =
"/[1]xmp/{short=7}";
2878 static const char q6[] =
"/[1]ifd/{str=dc}:{uint=7}";
2879 static const char q7[] =
"/[1]ifd/{str=http://purl.org/dc/elements/1.1/}:{longlong=7}";
2880 static const char q8[] =
"/[1]ifd/{str=http://ns.adobe.com/tiff/1.0/}:{int=10}";
2881 static const char q9[] =
"/[2]xmp/xmp:{ulong=4}";
2882 static const char q10[] =
"/[2]xmp/{str=xmp}:{ulong=4}";
2883 static const char q11[] =
"/xmp";
2884 static const char q12[] =
"/ifd/xmp";
2885 static const char q13[] =
"/ifd/xmp/tiff";
2886 static const char q14[] =
"/[0]ifd/[0]xmp/[0]tiff";
2887 static const char q15[] =
"/[*]xmp";
2889 static const char q20[] =
"/ifd/\\Rating";
2890 static const char q21[] =
"/[0]ifd/Rating";
2891 static const char q22[] =
"/[2]xmp/xmp:{str=Rating}";
2892 static const char q23[] =
"/[2]xmp/xmp:Rating";
2894 static const char q24[] =
"/[1]ifd/{str=http://ns.adobe.com/xap/1.0/}:Rating";
2895 static const char q25[] =
"/[1]ifd/{str=http://ns.adobe.com/xap/1.0/}:{str=Rating}";
2896 static const char q26[] =
"/[1]ifd/{wstr=\\RATING}";
2897 static const char q27[] =
"/[1]ifd/{str=R\\ATING}";
2898 static const char q28[] =
"/[1]ifd/{str=R\\}ATING}";
2900 static const char q40[] =
"[0]/ifd/Rating";
2901 static const char q41[] =
"/[+1]ifd/Rating";
2902 static const char q42[] =
"/[-1]ifd/Rating";
2903 static const char q43[] =
"/ifd/{\\str=Rating}";
2904 static const char q44[] =
"/ifd/{badtype=0}";
2905 static const char q45[] =
"/ifd/{uint=0x1234}";
2906 static const char q46[] =
"/ifd/[0]Rating";
2907 static const char q47[] =
"/ifd/[*]Rating";
2915 const char *str_value;
2963 &IID_IWICComponentFactory, (
void **)&
factory);
2964 ok(
hr ==
S_OK,
"CoCreateInstance error %#x\n",
hr);
2967 ok(
hr ==
S_OK,
"CreateQueryReaderFromBlockReader error %#x\n",
hr);
2973 hr = IWICMetadataQueryReader_GetContainerFormat(
reader, &
format);
2974 ok(
hr ==
S_OK,
"%u: GetContainerFormat error %#x\n",
i,
hr);
2979 PropVariantInit(&
value);
2980 hr = IWICMetadataQueryReader_GetMetadataByName(
reader, queryW, &
value);
2994 hr = IUnknown_QueryInterface(
value.punkVal, &IID_IWICMetadataQueryReader, (
void **)&new_reader);
2995 ok(
hr ==
S_OK,
"QueryInterface error %#x\n",
hr);
2999 hr = IWICMetadataQueryReader_GetLocation(new_reader, 256,
location, &
len);
3000 ok(
hr ==
S_OK,
"GetLocation error %#x\n",
hr);
3004 hr = IWICMetadataQueryReader_GetLocation(new_reader, 256,
location,
NULL);
3009 hr = IWICMetadataQueryReader_GetLocation(new_reader, 3,
location, &
len);
3011 ok(
len == 0xdeadbeef,
"got %u\n",
len);
3016 hr = IWICMetadataQueryReader_GetLocation(new_reader, 0,
location, &
len);
3018 ok(
len == 0xdeadbeef,
"got %u\n",
len);
3022 hr = IWICMetadataQueryReader_GetLocation(new_reader, 0,
NULL, &
len);
3023 ok(
hr ==
S_OK,
"GetLocation error %#x\n",
hr);
3027 hr = IWICMetadataQueryReader_GetLocation(new_reader, 3,
NULL, &
len);
3028 ok(
hr ==
S_OK,
"GetLocation error %#x\n",
hr);
3031 hr = IWICMetadataQueryReader_GetLocation(new_reader, 0,
NULL,
NULL);
3034 IWICMetadataQueryReader_Release(new_reader);
3051 IWICMetadataQueryReader_Release(
reader);
3052 IWICComponentFactory_Release(
factory);
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define ERROR_INSUFFICIENT_BUFFER
static const WCHAR rootW[]
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
UINT(* handler)(MSIPACKAGE *)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
HRESULT WINAPI PropVariantToInt64(REFPROPVARIANT propvarIn, LONGLONG *ret)
static LPSTR get_temp_buffer(void)
static const WCHAR unknownW[]
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLenum GLuint GLenum GLsizei const GLchar * buf
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
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 GLint GLint j
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
#define todo_wine_if(is_todo)
@ COINIT_APARTMENTTHREADED
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
struct _ULARGE_INTEGER::@4135 u
struct IFD_rational srational_val
struct IFD_entry entry[40]
struct IFD_rational rational[3]
const WCHAR id_string[32]
#define FIELD_OFFSET(t, f)
@ WICDecodeMetadataCacheOnLoad
@ WICPersistOptionBigEndian
@ WICPersistOptionDefault
@ WICPersistOptionLittleEndian
#define REGDB_E_CLASSNOTREG
#define WINCODEC_ERR_WRONGSTATE
#define WINCODEC_ERR_UNSUPPORTEDOPERATION
#define WINCODEC_ERR_INVALIDQUERYCHARACTER
#define WINCODEC_ERR_PROPERTYNOTSUPPORTED
#define HRESULT_FROM_WIN32(x)
#define WINCODEC_ERR_VALUEOUTOFRANGE
#define DISP_E_TYPEMISMATCH
#define WINCODEC_ERR_INSUFFICIENTBUFFER
#define WINCODEC_ERR_REQUESTONLYVALIDATMETADATAROOT
#define WINCODEC_ERR_PROPERTYNOTFOUND