33#include "wincodecsdk.h"
38DEFINE_GUID(IID_MdbrUnknown, 0x00240e6f,0x3f23,0x4432,0xb0,0xcc,0x48,0xd5,0xbb,0xff,0x6c,0x36);
40#define expect_ref(obj,ref) expect_ref_((IUnknown *)obj, ref, __LINE__)
45 refcount = IUnknown_Release(
obj);
46 ok_(__FILE__,
line)(refcount ==
ref,
"Expected refcount %ld, got %ld.\n",
ref, refcount);
49#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
58 hr = IUnknown_QueryInterface(iface, iid, (
void **)&unk);
59 ok_(__FILE__,
line)(
hr == expected_hr,
"Got hr %#lx, expected %#lx.\n",
hr, expected_hr);
61 IUnknown_Release(unk);
64#define check_persist_options(a, b) check_persist_options_(__LINE__, a, b)
72 if (
SUCCEEDED(IUnknown_QueryInterface(iface, &IID_IWICStreamProvider, (
void **)&stream_provider)))
74 hr = IWICStreamProvider_GetPersistOptions(stream_provider, &
options);
78 IWICStreamProvider_Release(stream_provider);
81 ok_(__FILE__,
line)(0,
"IWICStreamProvider is not supported.\n");
90 if (
SUCCEEDED(IUnknown_QueryInterface(iface, &IID_IWICStreamProvider, (
void **)&stream_provider)))
92 hr = IWICStreamProvider_GetStream(stream_provider,
stream);
93 IWICStreamProvider_Release(stream_provider);
99#define compare_blob(a,b,c) compare_blob_(__LINE__,a,b,c)
102 ok_(__FILE__,
line)(propvar->vt ==
VT_BLOB,
"Unexpected vt: %i\n", propvar->vt);
105 ok_(__FILE__,
line)(propvar->blob.cbSize ==
length,
"Expected size %lu, got %lu.\n",
length, propvar->blob.cbSize);
106 if (propvar->blob.cbSize ==
length)
166 { 0xf001,
IFD_BYTE, 1, 0x11223344 },
167 { 0xf002,
IFD_BYTE, 4, 0x11223344 },
180 { 0xf00f,
IFD_ASCII, 4,
'a' |
'b' << 8 |
'c' << 16 |
'd' << 24 },
182 { 0xf011,
IFD_UNDEFINED, 4,
'a' |
'b' << 8 |
'c' << 16 |
'd' << 24 },
183 { 0xf012,
IFD_BYTE, 0, 0x11223344 },
185 { 0xf014,
IFD_LONG, 0, 0x11223344 },
191 1234567890.0987654321,
192 { 0x1a2b3c4d, 0x5a6b7c8d },
194 { 0x0101, 0x0202, 0x0303, 0x0404 },
195 { 0x11223344, 0x55667788 },
197 { { 0x01020304, 0x05060708 }, { 0x10203040, 0x50607080 }, { 0x11223344, 0x55667788 } },
206 'w',
'i',
'n',
'e',
't',
'e',
's',
't',0,
221 0,0,122,38, 0,0,128,132,
222 0,0,250,0, 0,0,128,232,
223 0,0,117,48, 0,0,234,96,
224 0,0,58,152, 0,0,23,112,
233 0,9, 0,10, 0,11, 0,12,
234 0,13, 0,14, 0,15, 0,16,
235 0,17, 0,18, 0,19, 0,20,
2480x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
2490x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53,
2500xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,
2510x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd5,
2520x06,0x03,0x0f,0x07,0x2d,0x12,0x10,0xf0,0xfd,0x00,0x00,0x00,0x0c,0x49,0x44,0x41,
2530x54,0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59,
2540xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
2590x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff,
2600xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44,
266'G',
'I',
'F',
'8',
'9',
'a',0x01,0x00,0x01,0x00,0xA1,0x00,0x00,
2670x6F,0x6F,0x6F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
2690x21,0xFF,0x0B,
'A',
'N',
'I',
'M',
'E',
'X',
'T',
'S',
'1',
'.',
'0',
2700x03,0x01,0x05,0x00,0x00,
2710x21,0xFE,0x0C,
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
'!',0x00,
2720x21,0x01,0x0D,
'a',
'n',
'i',
'm',
'a',
't',
'i',
'o',
'n',
'.',
'g',
'i',
'f',0x00,
2730x21,0xF9,0x04,0x00,0x0A,0x00,0xFF,0x00,0x2C,
2740x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x81,
2750xDE,0xDE,0xDE,0x00,0x00,0x00,
2760x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x4C,0x01,0x00,
2770x21,0xF9,0x04,0x01,0x0A,0x00,0x01,0x00,
2780x21,0xFE,0x08,
'i',
'm',
'a',
'g',
'e',
' ',
'#',
'1',0x00,
2790x21,0x01,0x0C,
'p',
'l',
'a',
'i',
'n',
't',
'e',
'x',
't',
' ',
'#',
'1',0x00,
2800x2C,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x81,
2810x4D,0x4D,0x4D,0x00,0x00,0x00,
2820x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x44,0x01,0x00,
2830x21,0xFE,0x08,
'i',
'm',
'a',
'g',
'e',
' ',
'#',
'2',0x00,
2840x21,0x01,0x0C,
'p',
'l',
'a',
'i',
'n',
't',
'e',
'x',
't',
' ',
'#',
'2',0x00,0x3B
291 return IUnknown_Release(
unknown);
302 ok(hdata != 0,
"GlobalAlloc failed\n");
303 if (!hdata)
return NULL;
310 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal failed, hr=%lx\n",
hr);
331 hr = IUnknown_QueryInterface(iface, &IID_IWICPersistStream, (
void **)&persist);
332 ok(
hr ==
S_OK,
"QueryInterface failed, hr=%lx\n",
hr);
334 hr = IWICPersistStream_LoadEx(persist,
NULL,
NULL, 0);
337 hr = IUnknown_QueryInterface(iface, &IID_IWICStreamProvider, (
void **)&stream_provider);
341 hr = IWICStreamProvider_GetPreferredVendorGUID(stream_provider, &
guid);
347 hr = IWICStreamProvider_GetPreferredVendorGUID(stream_provider,
NULL);
351 hr = IWICStreamProvider_GetPersistOptions(stream_provider,
NULL);
356 hr = IWICStreamProvider_GetPersistOptions(stream_provider, &
flags);
362 stream2 = (
void *)0xdeadbeef;
363 hr = IWICStreamProvider_GetStream(stream_provider, &stream2);
366 ok(stream2 == (
void *)0xdeadbeef,
"Unexpected stream pointer.\n");
368 hr = IWICPersistStream_LoadEx(persist,
stream,
NULL, persist_options);
372 hr = IWICStreamProvider_GetPreferredVendorGUID(stream_provider, &
guid);
378 flags = ~persist_options;
379 hr = IWICStreamProvider_GetPersistOptions(stream_provider, &
flags);
383 ok(
flags == persist_options,
"Unexpected options %#lx.\n",
flags);
387 stream2 = (
void *)0xdeadbeef;
388 hr = IWICStreamProvider_GetStream(stream_provider, &stream2);
391 ok(stream2 == (
void *)0xdeadbeef,
"Unexpected stream pointer.\n");
396 hr = IWICStreamProvider_GetStream(stream_provider, &stream2);
400 ok(stream2 ==
stream,
"Unexpected stream pointer.\n");
402 IStream_Release(stream2);
405 IWICStreamProvider_Release(stream_provider);
406 IWICPersistStream_Release(persist);
410 ok(
hr ==
S_OK,
"IStream_Seek error %#lx\n",
hr);
413 "current stream pos is at %lx/%lx, data size %x\n", cur_pos.
u.LowPart, cur_pos.
u.HighPart, data_size);
437 hr = IWICMetadataReader_GetEnumerator(
reader, &enumerator);
438 ok(
hr ==
S_OK,
"GetEnumerator error %#lx\n",
hr);
441 PropVariantInit(&
id);
442 PropVariantInit(&
value);
448 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
450 ok(items_returned == 1,
"unexpected item count %lu\n", items_returned);
455 ok(
id.uiVal == td[
i].
id,
"Expected id %#lx, got %#x\n", td[
i].
id,
id.uiVal);
469 for (
j = 0;
j <
value.caub.cElems;
j++)
475 for (
j = 0;
j <
value.caui.cElems;
j++)
482 for (
j = 0;
j <
value.caul.cElems;
j++)
489 for (
j = 0;
j <
value.cauh.cElems;
j++)
490 ok(td[
i].
value[
j] ==
value.cauh.pElems[
j].QuadPart,
"Expected value[%ld] %I64x, got %08lx/%08lx\n",
j, td[
i].
value[
j],
value.cauh.pElems[
j].u.LowPart,
value.cauh.pElems[
j].u.HighPart);
494 for (
j = 0;
j <
value.calpstr.cElems;
j++)
517 ok(
value.uhVal.QuadPart == td[
i].
value[0],
"Eexpected value %#I64x got %#lx/%#lx\n",
527 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
529 ok(items_returned == 0,
"unexpected item count %lu\n", items_returned);
531 IWICEnumMetadataItem_Release(enumerator);
534#define test_reader_container_format(a, b) _test_reader_container_format(a, b, __LINE__)
543 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
550 for (
unsigned i = 0;
i <
count; ++
i)
562 for (
unsigned i = 0;
i <
count; ++
i)
566 IWICMetadataHandlerInfo_Release(
info);
578 ULONG items_returned;
582 &IID_IWICMetadataReader, (
void**)&
reader);
583 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%lx\n",
hr);
595 hr = IWICMetadataReader_GetEnumerator(
reader, &enumerator);
596 ok(
hr ==
S_OK,
"GetEnumerator failed, hr=%lx\n",
hr);
601 PropVariantInit(&
id);
602 PropVariantInit(&
value);
604 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
606 ok(items_returned == 1,
"unexpected item count %li\n", items_returned);
608 if (
hr ==
S_OK && items_returned == 1)
619 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
621 ok(items_returned == 0,
"unexpected item count %li\n", items_returned);
623 hr = IWICEnumMetadataItem_Reset(enumerator);
638 IWICEnumMetadataItem_Release(enumerator);
641 hr = IWICMetadataReader_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
646 hr = IWICPersistStream_LoadEx(persist,
NULL,
NULL, 0);
652 IWICPersistStream_Release(persist);
654 IWICMetadataReader_Release(
reader);
657 &IID_IWICMetadataWriter, (
void **)&writer);
672 IWICMetadataWriter_Release(writer);
683 ULONG items_returned;
688 PropVariantInit(&
id);
689 PropVariantInit(&
value);
692 &IID_IWICMetadataReader, (
void**)&
reader);
693 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%lx\n",
hr);
706 ok(
hr ==
S_OK,
"GetCount failed, hr=%lx\n",
hr);
711 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
715 IWICMetadataHandlerInfo_Release(
info);
718 ok(
hr ==
S_OK,
"GetCount failed, hr=%lx\n",
hr);
724 hr = IWICMetadataReader_GetEnumerator(
reader, &enumerator);
725 ok(
hr ==
S_OK,
"GetEnumerator failed, hr=%lx\n",
hr);
729 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
731 ok(items_returned == 1,
"unexpected item count %li\n", items_returned);
733 if (
hr ==
S_OK && items_returned == 1)
737 ok(!
strcmp(
id.pszVal,
"winetest"),
"unexpected id: %s\n",
id.pszVal);
746 hr = IWICEnumMetadataItem_Next(enumerator, 1, &
schema, &
id, &
value, &items_returned);
748 ok(items_returned == 0,
"unexpected item count %li\n", items_returned);
750 IWICEnumMetadataItem_Release(enumerator);
754 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%lx\n",
hr);
757 hr = IWICMetadataReader_GetMetadataFormat(
reader,
NULL);
762 strcpy(
id.pszVal,
"winetest");
765 ok(
hr ==
S_OK,
"GetValue failed, hr=%lx\n",
hr);
771 ok(
hr ==
S_OK,
"GetValue failed, hr=%lx\n",
hr);
776 strcpy(
id.pszVal,
"test");
784 ok(
hr ==
S_OK,
"GetValueByIndex failed, hr=%lx\n",
hr);
787 ok(
hr ==
S_OK,
"GetValueByIndex failed, hr=%lx\n",
hr);
791 ok(
hr ==
S_OK,
"GetValueByIndex failed, hr=%lx\n",
hr);
793 ok(!
strcmp(
id.pszVal,
"winetest"),
"unexpected id: %s\n",
id.pszVal);
797 ok(
hr ==
S_OK,
"GetValueByIndex failed, hr=%lx\n",
hr);
805 IWICMetadataReader_Release(
reader);
808 &IID_IWICMetadataWriter, (
void **)&writer);
823 IWICMetadataWriter_Release(writer);
837 PropVariantInit(&
id);
838 PropVariantInit(&
value);
841 &IID_IWICMetadataReader, (
void**)&
reader);
853 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
857 IWICMetadataHandlerInfo_Release(
info);
860 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%lx\n",
hr);
864 ok(
hr ==
S_OK,
"GetCount failed, hr=%lx\n",
hr);
868 ok(
hr ==
S_OK,
"GetValue failed, hr=%lx\n",
hr);
878 ok(
value.ulVal == 33333,
"unexpected value: %lu\n",
value.ulVal);
881 IWICMetadataReader_Release(
reader);
884 &IID_IWICMetadataWriter, (
void **)&writer);
899 IWICMetadataWriter_Release(writer);
911 static const WCHAR *expected_names[8] =
922 static const ULONG expected_vals[8] = {
923 31270,32900, 64000,33000, 30000,60000, 15000,6000
927 PropVariantInit(&
id);
928 PropVariantInit(&
value);
931 &IID_IWICMetadataReader, (
void**)&
reader);
944 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%lx\n",
hr);
948 ok(
hr ==
S_OK,
"GetCount failed, hr=%lx\n",
hr);
954 ok(
hr ==
S_OK,
"GetValue failed, hr=%lx\n",
hr);
964 ok(
value.ulVal == expected_vals[
i],
"got %lu, expected %lu\n",
value.ulVal, expected_vals[
i]);
968 IWICMetadataReader_Release(
reader);
971 &IID_IWICMetadataWriter, (
void **)&writer);
986 IWICMetadataWriter_Release(writer);
999 PropVariantInit(&
id);
1000 PropVariantInit(&
value);
1003 &IID_IWICMetadataReader, (
void**)&
reader);
1016 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%lx\n",
hr);
1020 ok(
hr ==
S_OK,
"GetCount failed, hr=%lx\n",
hr);
1024 ok(
hr ==
S_OK,
"GetValue failed, hr=%lx\n",
hr);
1034 ok(20 ==
value.caui.cElems,
"expected cElems %d, got %ld\n", 20,
value.caub.cElems);
1035 for (
i = 0;
i <
value.caui.cElems;
i++)
1036 ok(
i+1 ==
value.caui.pElems[
i],
"%u: expected value %u, got %u\n",
i,
i+1,
value.caui.pElems[
i]);
1039 IWICMetadataReader_Release(
reader);
1042 &IID_IWICMetadataWriter, (
void **)&writer);
1057 IWICMetadataWriter_Release(writer);
1078 &IID_IWICMetadataReader, (
void**)&
reader);
1091 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%lx\n",
hr);
1095 ok(
hr ==
S_OK,
"GetCount failed, hr=%lx\n",
hr);
1100 IWICMetadataReader_Release(
reader);
1103 &IID_IWICMetadataWriter, (
void **)&writer);
1118 IWICMetadataWriter_Release(writer);
1123 return (
s >> 8) | (
s << 8);
1140 char *data_start =
data;
1146 for (
i = 0;
i < number_of_entries;
i++)
1150 switch (
entry->type)
1156 if (
entry->count > 4)
1162 if (
entry->count > 2)
1185 if (
entry->count > 1)
1201 for (
j = 0;
j <
entry->count * 2;
j++)
1225 data +=
sizeof(*entry);
1233 {
VT_UI2, 0xfe, 0, { 1 } },
1234 {
VT_UI4, 0x100, 0, { 222 } },
1235 {
VT_UI4, 0x101, 0, { 333 } },
1236 {
VT_UI2, 0x102, 0, { 24 } },
1237 {
VT_UI4, 0x103, 0, { 32773 } },
1239 {
VT_UI1, 0xf001, 0, { 0x44 } },
1241 {
VT_I1, 0xf003, 0, { 0x44 } },
1242 {
VT_I2, 0xf004, 0, { 0x3344 } },
1244 {
VT_I4, 0xf006, 0, { 0x11223344 } },
1245 {
VT_R4, 0xf007, 0, { 0x11223344 } },
1246 {
VT_R8, 0xf008, 0, { ((
LONGLONG)0x41d26580 << 32) | 0xb486522c } },
1247 {
VT_I8, 0xf009, 0, { ((
LONGLONG)0x5a6b7c8d << 32) | 0x1a2b3c4d } },
1248 {
VT_UI1|
VT_VECTOR, 0xf00a, 13, {
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
'!',0 } },
1249 {
VT_I2|
VT_VECTOR, 0xf00b, 4, { 0x0101, 0x0202, 0x0303, 0x0404 } },
1252 {
VT_LPSTR, 0xf00e, 12, { 0 },
"Hello World!" },
1253 {
VT_LPSTR, 0xf00f, 4, { 0 },
"abcd" },
1254 {
VT_BLOB, 0xf010, 13, { 0 },
"Hello World!" },
1255 {
VT_BLOB, 0xf011, 4, { 0 },
"abcd" },
1256 {
VT_UI1, 0xf012, 0, { 0x44 } },
1257 {
VT_UI2, 0xf013, 0, { 0x3344 } },
1258 {
VT_UI4, 0xf014, 0, { 0x11223344 } },
1259 {
VT_R4, 0xf015, 0, { 0x11223344 } },
1261 { ((
LONGLONG)0x05060708 << 32) | 0x01020304,
1262 ((
LONGLONG)0x50607080 << 32) | 0x10203040,
1263 ((
LONGLONG)0x55667788 << 32) | 0x11223344 } },
1266 char *IFD_data_swapped;
1296 ok(
hr ==
S_OK,
"GetValueByIndex error %#lx\n",
hr);
1298 PropVariantInit(&
schema);
1299 PropVariantInit(&
id);
1300 PropVariantInit(&
value);
1303 ok(
hr ==
S_OK,
"GetValueByIndex error %#lx\n",
hr);
1306 ok(
hr ==
S_OK,
"GetValueByIndex error %#lx\n",
hr);
1310 ok(
hr ==
S_OK,
"GetValueByIndex error %#lx\n",
hr);
1314 ok(
hr ==
S_OK,
"GetValueByIndex error %#lx\n",
hr);
1316 ok(
id.uiVal == 0xfe,
"unexpected id: %#x\n",
id.uiVal);
1320 ok(
hr ==
S_OK,
"GetValueByIndex error %#lx\n",
hr);
1322 ok(
value.uiVal == 1,
"unexpected id: %#x\n",
value.uiVal);
1328 PropVariantInit(&
schema);
1329 PropVariantInit(&
id);
1330 PropVariantInit(&
value);
1354 schema.ulVal = 0xdeadbeef;
1377 &IID_IWICMetadataReader, (
void**)&
reader);
1378 ok(
hr ==
S_OK,
"CoCreateInstance error %#lx\n",
hr);
1399 ok(
hr ==
S_OK,
"GetMetadataFormat error %#lx\n",
hr);
1402 hr = IWICMetadataReader_GetMetadataFormat(
reader,
NULL);
1405 IWICMetadataReader_Release(
reader);
1408 &IID_IWICMetadataWriter, (
void **)&writer);
1423 IWICMetadataWriter_Release(writer);
1435 &IID_IWICMetadataReader, (
void**)&
reader);
1460 IWICMetadataReader_Release(
reader);
1463 &IID_IWICMetadataWriter, (
void **)&writer);
1478 IWICMetadataWriter_Release(writer);
1490 &IID_IWICMetadataReader, (
void **)&
reader);
1515 IWICMetadataReader_Release(
reader);
1518 &IID_IWICMetadataWriter, (
void **)&writer);
1532 IWICMetadataWriter_Release(writer);
1545 &IID_IWICComponentFactory, (
void**)&
factory);
1546 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%lx\n",
hr);
1550 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
1555 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
1560 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
1565 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
1568 ok(
hr ==
S_OK,
"CreateMetadataReaderFromContainer failed, hr=%lx\n",
hr);
1579 ok(
hr ==
S_OK,
"GetCount failed, hr=%lx\n",
hr);
1583 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%lx\n",
hr);
1586 IWICMetadataReader_Release(
reader);
1589 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory,
1592 ok(
hr ==
S_OK,
"CreateMetadataReaderFromContainer failed, hr=%lx\n",
hr);
1597 ok(
hr ==
S_OK,
"GetCount failed, hr=%lx\n",
hr);
1601 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%lx\n",
hr);
1604 IWICMetadataReader_Release(
reader);
1607 hr = IWICComponentFactory_CreateMetadataReaderFromContainer(
factory, &GUID_ContainerFormatWmp,
1613 IWICComponentFactory_Release(
factory);
1628 &IID_IWICComponentFactory, (
void **)&
factory);
1645 ok(
stream == stream2,
"Unexpected stream.\n");
1646 IStream_Release(stream2);
1652 IWICMetadataReader_Release(
reader);
1658 hr = IWICComponentFactory_CreateMetadataReader(
factory, &GUID_MetadataFormatChunktEXt,
1669 IWICMetadataReader_Release(
reader);
1674 hr = IWICComponentFactory_CreateMetadataReader(
factory, &GUID_MetadataFormatChunktEXt,
NULL, 0,
1685 IWICMetadataReader_Release(
reader);
1707 IWICMetadataReader_Release(
reader);
1717 IWICMetadataReader_Release(
reader);
1729 hr = IWICComponentFactory_CreateMetadataReader(
factory, &GUID_MetadataFormatChunktEXt,
NULL,
1741 hr = IWICMetadataReader_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist_stream);
1744 hr = IWICPersistStream_LoadEx(persist_stream,
stream,
NULL, 0);
1753 ok(
stream == stream2,
"Unexpected stream.\n");
1754 IStream_Release(stream2);
1769 IWICPersistStream_Release(persist_stream);
1771 IWICMetadataReader_Release(
reader);
1775 IWICComponentFactory_Release(
factory);
1796 GUID containerformat;
1801 &IID_IWICBitmapDecoder, (
void**)&
decoder);
1802 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%lx\n",
hr);
1809 ok(
hr ==
S_OK,
"Initialize failed, hr=%lx\n",
hr);
1813 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &frame);
1814 ok(
hr ==
S_OK,
"GetFrame failed, hr=%lx\n",
hr);
1816 hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void**)&blockreader);
1817 ok(
hr ==
S_OK,
"QueryInterface failed, hr=%lx\n",
hr);
1821 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader,
NULL);
1824 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &containerformat);
1825 ok(
hr ==
S_OK,
"GetContainerFormat failed, hr=%lx\n",
hr);
1826 ok(
IsEqualGUID(&containerformat, &GUID_ContainerFormatPng),
"unexpected container format\n");
1828 hr = IWICMetadataBlockReader_GetCount(blockreader,
NULL);
1831 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
1832 ok(
hr ==
S_OK,
"GetCount failed, hr=%lx\n",
hr);
1838 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0,
NULL);
1842 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
1843 ok(
hr ==
S_OK,
"GetReaderByIndex failed, hr=%lx\n",
hr);
1847 hr = IWICMetadataReader_GetMetadataFormat(
reader, &containerformat);
1848 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
1849 ok(
IsEqualGUID(&containerformat, &GUID_MetadataFormatChunktIME) ||
1851 "unexpected container format\n");
1861 IWICMetadataReader_Release(
reader);
1864 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
1868 &IID_IWICComponentFactory, (
void**)&
factory);
1869 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%lx\n",
hr);
1871 hr = IWICComponentFactory_CreateQueryReaderFromBlockReader(
factory,
NULL, &queryreader);
1872 ok(
hr ==
E_INVALIDARG,
"CreateQueryReaderFromBlockReader should have failed: %08lx\n",
hr);
1874 hr = IWICComponentFactory_CreateQueryReaderFromBlockReader(
factory, blockreader,
NULL);
1875 ok(
hr ==
E_INVALIDARG,
"CreateQueryReaderFromBlockReader should have failed: %08lx\n",
hr);
1877 hr = IWICComponentFactory_CreateQueryReaderFromBlockReader(
factory, blockreader, &queryreader);
1878 ok(
hr ==
S_OK,
"CreateQueryReaderFromBlockReader failed: %08lx\n",
hr);
1880 IWICMetadataQueryReader_Release(queryreader);
1882 IWICComponentFactory_Release(
factory);
1884 IWICMetadataBlockReader_Release(blockreader);
1887 hr = IWICBitmapFrameDecode_GetMetadataQueryReader(frame, &queryreader);
1888 ok(
hr ==
S_OK,
"GetMetadataQueryReader failed: %08lx\n",
hr);
1892 IWICMetadataQueryReader_Release(queryreader);
1895 IWICBitmapFrameDecode_Release(frame);
1897 IWICBitmapDecoder_Release(
decoder);
1904 static const struct test_data gif_LSD[9] =
1906 {
VT_UI1|
VT_VECTOR, 0, 6, {
'G',
'I',
'F',
'8',
'7',
'a'},
NULL, {
'S',
'i',
'g',
'n',
'a',
't',
'u',
'r',
'e',0 } },
1907 {
VT_UI2, 0, 0, { 1 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1908 {
VT_UI2, 0, 0, { 1 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1909 {
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 } },
1910 {
VT_UI1, 0, 0, { 0 },
NULL, {
'C',
'o',
'l',
'o',
'r',
'R',
'e',
's',
'o',
'l',
'u',
't',
'i',
'o',
'n',0 } },
1911 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1912 {
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 } },
1913 {
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 } },
1914 {
VT_UI1, 0, 0, { 0 },
NULL, {
'P',
'i',
'x',
'e',
'l',
'A',
's',
'p',
'e',
'c',
't',
'R',
'a',
't',
'i',
'o',0 } }
1916 static const struct test_data gif_IMD[8] =
1918 {
VT_UI2, 0, 0, { 0 },
NULL, {
'L',
'e',
'f',
't',0 } },
1919 {
VT_UI2, 0, 0, { 0 },
NULL, {
'T',
'o',
'p',0 } },
1920 {
VT_UI2, 0, 0, { 1 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1921 {
VT_UI2, 0, 0, { 1 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1922 {
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 } },
1923 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'I',
'n',
't',
'e',
'r',
'l',
'a',
'c',
'e',
'F',
'l',
'a',
'g',0 } },
1924 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1925 {
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 } }
1927 static const struct test_data animated_gif_LSD[9] =
1929 {
VT_UI1|
VT_VECTOR, 0, 6, {
'G',
'I',
'F',
'8',
'9',
'a'},
NULL, {
'S',
'i',
'g',
'n',
'a',
't',
'u',
'r',
'e',0 } },
1930 {
VT_UI2, 0, 0, { 1 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1931 {
VT_UI2, 0, 0, { 1 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1932 {
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 } },
1933 {
VT_UI1, 0, 0, { 2 },
NULL, {
'C',
'o',
'l',
'o',
'r',
'R',
'e',
's',
'o',
'l',
'u',
't',
'i',
'o',
'n',0 } },
1934 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1935 {
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 } },
1936 {
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 } },
1937 {
VT_UI1, 0, 0, { 0 },
NULL, {
'P',
'i',
'x',
'e',
'l',
'A',
's',
'p',
'e',
'c',
't',
'R',
'a',
't',
'i',
'o',0 } }
1939 static const struct test_data animated_gif_IMD[8] =
1941 {
VT_UI2, 0, 0, { 0 },
NULL, {
'L',
'e',
'f',
't',0 } },
1942 {
VT_UI2, 0, 0, { 0 },
NULL, {
'T',
'o',
'p',0 } },
1943 {
VT_UI2, 0, 0, { 1 },
NULL, {
'W',
'i',
'd',
't',
'h',0 } },
1944 {
VT_UI2, 0, 0, { 1 },
NULL, {
'H',
'e',
'i',
'g',
'h',
't',0 } },
1945 {
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 } },
1946 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'I',
'n',
't',
'e',
'r',
'l',
'a',
'c',
'e',
'F',
'l',
'a',
'g',0 } },
1947 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'S',
'o',
'r',
't',
'F',
'l',
'a',
'g',0 } },
1948 {
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 } }
1950 static const struct test_data animated_gif_GCE[5] =
1952 {
VT_UI1, 0, 0, { 0 },
NULL, {
'D',
'i',
's',
'p',
'o',
's',
'a',
'l',0 } },
1953 {
VT_BOOL, 0, 0, { 0 },
NULL, {
'U',
's',
'e',
'r',
'I',
'n',
'p',
'u',
't',
'F',
'l',
'a',
'g',0 } },
1954 {
VT_BOOL, 0, 0, { 1 },
NULL, {
'T',
'r',
'a',
'n',
's',
'p',
'a',
'r',
'e',
'n',
'c',
'y',
'F',
'l',
'a',
'g',0 } },
1955 {
VT_UI2, 0, 0, { 10 },
NULL, {
'D',
'e',
'l',
'a',
'y',0 } },
1956 {
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 } }
1958 static const struct test_data animated_gif_APE[2] =
1960 {
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 } },
1961 {
VT_UI1|
VT_VECTOR, 0, 4, { 0x03,0x01,0x05,0x00 },
NULL, {
'D',
'a',
't',
'a',0 } }
1963 static const struct test_data animated_gif_comment_1[1] =
1965 {
VT_LPSTR, 0, 12, { 0 },
"Hello World!", {
'T',
'e',
'x',
't',
'E',
'n',
't',
'r',
'y',0 } }
1967 static const struct test_data animated_gif_comment_2[1] =
1969 {
VT_LPSTR, 0, 8, { 0 },
"image #1", {
'T',
'e',
'x',
't',
'E',
'n',
't',
'r',
'y',0 } }
1971 static const struct test_data animated_gif_plain_1[1] =
1973 {
VT_BLOB, 0, 17, { 0 },
"\x21\x01\x0d\x61nimation.gif" }
1975 static const struct test_data animated_gif_plain_2[1] =
1977 {
VT_BLOB, 0, 16, { 0 },
"\x21\x01\x0cplaintext #1" }
1993 &IID_IWICBitmapDecoder, (
void **)&
decoder);
1994 ok(
hr ==
S_OK,
"CoCreateInstance error %#lx\n",
hr);
1996 ok(
hr ==
S_OK,
"Initialize error %#lx\n",
hr);
2001 hr = IWICBitmapDecoder_QueryInterface(
decoder, &IID_IWICMetadataBlockReader, (
void **)&blockreader);
2006 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &
format);
2007 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
2011 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
2015 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
2016 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2021 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2033 IWICMetadataReader_Release(
reader);
2036 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
2039 IWICMetadataBlockReader_Release(blockreader);
2043 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &frame);
2046 hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void **)&blockreader);
2051 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader,
NULL);
2054 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &
format);
2055 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
2059 hr = IWICMetadataBlockReader_GetCount(blockreader,
NULL);
2062 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
2066 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
2067 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2072 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2082 IWICMetadataReader_Release(
reader);
2085 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
2088 IWICMetadataBlockReader_Release(blockreader);
2091 IWICBitmapFrameDecode_Release(frame);
2092 IWICBitmapDecoder_Release(
decoder);
2098 &IID_IWICBitmapDecoder, (
void **)&
decoder);
2099 ok(
hr ==
S_OK,
"CoCreateInstance error %#lx\n",
hr);
2101 ok(
hr ==
S_OK,
"Initialize error %#lx\n",
hr);
2106 hr = IWICBitmapDecoder_QueryInterface(
decoder, &IID_IWICMetadataBlockReader, (
void **)&blockreader);
2111 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &
format);
2112 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
2116 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
2120 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
2121 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2126 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2136 IWICMetadataReader_Release(
reader);
2139 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
2140 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2145 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2155 IWICMetadataReader_Release(
reader);
2158 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 2, &
reader);
2159 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2164 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2174 IWICMetadataReader_Release(
reader);
2177 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 3, &
reader);
2178 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2183 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2193 IWICMetadataReader_Release(
reader);
2196 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 4, &
reader);
2199 IWICMetadataBlockReader_Release(blockreader);
2203 hr = IWICBitmapDecoder_GetFrame(
decoder, 1, &frame);
2206 hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICMetadataBlockReader, (
void **)&blockreader);
2211 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader,
NULL);
2214 hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &
format);
2215 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
2219 hr = IWICMetadataBlockReader_GetCount(blockreader,
NULL);
2222 hr = IWICMetadataBlockReader_GetCount(blockreader, &
count);
2226 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 0, &
reader);
2227 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2232 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2242 IWICMetadataReader_Release(
reader);
2245 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 1, &
reader);
2246 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2251 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2261 IWICMetadataReader_Release(
reader);
2264 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 2, &
reader);
2265 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2270 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2281 IWICMetadataReader_Release(
reader);
2284 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 3, &
reader);
2285 ok(
hr ==
S_OK,
"GetReaderByIndex error %#lx\n",
hr);
2290 ok(
hr ==
S_OK,
"GetMetadataFormat failed, hr=%#lx\n",
hr);
2300 IWICMetadataReader_Release(
reader);
2303 hr = IWICMetadataBlockReader_GetReaderByIndex(blockreader, 4, &
reader);
2306 IWICMetadataBlockReader_Release(blockreader);
2309 hr = IWICBitmapDecoder_GetMetadataQueryReader(
decoder, &queryreader);
2311 "GetMetadataQueryReader error %#lx\n",
hr);
2344 hr = IWICMetadataQueryReader_GetContainerFormat(queryreader, &
format);
2345 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
2351 hr = IWICMetadataQueryReader_GetLocation(queryreader, 256,
name, &
len);
2352 ok(
hr ==
S_OK,
"GetLocation error %#lx\n",
hr);
2353 ok(
len == 2,
"expected 2, got %u\n",
len);
2364 hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW,
NULL);
2365 ok(
hr == decoder_data[
i].
hr,
"GetMetadataByName(%s) returned %#lx, expected %#lx\n",
wine_dbgstr_w(queryW),
hr, decoder_data[
i].
hr);
2367 PropVariantInit(&
value);
2368 hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW, &
value);
2369 ok(
hr == decoder_data[
i].
hr,
"GetMetadataByName(%s) returned %#lx, expected %#lx\n",
wine_dbgstr_w(queryW),
hr, decoder_data[
i].
hr);
2370 ok(
value.vt == decoder_data[
i].vt,
"expected %#x, got %#x\n", decoder_data[
i].vt,
value.vt);
2373 hr = IUnknown_QueryInterface(
value.punkVal, &IID_IWICMetadataQueryReader, (
void **)&meta_reader);
2374 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
2378 hr = IWICMetadataQueryReader_GetLocation(meta_reader, 256,
name, &
len);
2379 ok(
hr ==
S_OK,
"GetLocation error %#lx\n",
hr);
2392 hr = IWICMetadataQueryReader_GetMetadataByName(meta_reader, queryW +
len - 1, &
value);
2393 ok(
hr == decoder_data[
j].
hr,
"GetMetadataByName(%s) returned %#lx, expected %#lx\n",
wine_dbgstr_w(queryW +
len - 1),
hr, decoder_data[
j].
hr);
2394 ok(
value.vt == decoder_data[
j].vt,
"expected %#x, got %#x\n", decoder_data[
j].vt,
value.vt);
2398 IWICMetadataQueryReader_Release(meta_reader);
2404 IWICMetadataQueryReader_Release(queryreader);
2407 hr = IWICBitmapFrameDecode_GetMetadataQueryReader(frame, &queryreader);
2409 "GetMetadataQueryReader error %#lx\n",
hr);
2422 {
"/[0]grctlext/{str=delay}",
S_OK,
VT_UI2 },
2424 {
"/[0]grctlext/{wstr=delay}",
S_OK,
VT_UI2 },
2426 {
"/imgdesc/{STR=interlaceFLAG}",
S_OK,
VT_BOOL },
2427 {
"/imgdesc/{WSTR=interlaceFLAG}",
S_OK,
VT_BOOL },
2438 static const WCHAR guidW[] = {
'/',
'{',
'g',
'u',
'i',
'd',
'=',
'\\',0};
2444 hr = IWICMetadataQueryReader_GetContainerFormat(queryreader, &
format);
2445 ok(
hr ==
S_OK,
"GetContainerFormat error %#lx\n",
hr);
2451 hr = IWICMetadataQueryReader_GetLocation(queryreader, 256,
name, &
len);
2452 ok(
hr ==
S_OK,
"GetLocation error %#lx\n",
hr);
2453 ok(
len == 2,
"expected 2, got %u\n",
len);
2461 PropVariantInit(&
value);
2462 hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW, &
value);
2463 ok(
hr == frame_data[
i].
hr,
"GetMetadataByName(%s) returned %#lx, expected %#lx\n",
wine_dbgstr_w(queryW),
hr, frame_data[
i].
hr);
2464 ok(
value.vt == frame_data[
i].vt,
"expected %#x, got %#x\n", frame_data[
i].vt,
value.vt);
2467 hr = IUnknown_QueryInterface(
value.punkVal, &IID_IWICMetadataQueryReader, (
void **)&meta_reader);
2468 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
2472 hr = IWICMetadataQueryReader_GetLocation(meta_reader, 256,
name, &
len);
2473 ok(
hr ==
S_OK,
"GetLocation error %#lx\n",
hr);
2477 IWICMetadataQueryReader_Release(meta_reader);
2486 ok(
hr ==
S_OK,
"WICMapGuidToShortName error %#lx\n",
hr);
2491 ok(
hr ==
S_OK,
"WICMapGuidToShortName error %#lx\n",
hr);
2496 ok(
hr ==
S_OK,
"WICMapGuidToShortName error %#lx\n",
hr);
2501 memcpy(queryW, guidW,
sizeof(guidW) - 2);
2504 PropVariantInit(&
value);
2505 hr = IWICMetadataQueryReader_GetMetadataByName(queryreader, queryW, &
value);
2510 IWICMetadataQueryReader_Release(queryreader);
2513 IWICBitmapFrameDecode_Release(frame);
2514 IWICBitmapDecoder_Release(
decoder);
2519 static const char LSD_data[] =
"hello world!\x1\x2\x3\x4\xab\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf";
2522 {
VT_UI1|
VT_VECTOR, 0, 6, {
'w',
'o',
'r',
'l',
'd',
'!'},
NULL,
L"Signature" },
2525 {
VT_BOOL, 0, 0, { 1 },
NULL,
L"GlobalColorTableFlag" },
2526 {
VT_UI1, 0, 0, { 2 },
NULL,
L"ColorResolution" },
2528 {
VT_UI1, 0, 0, { 3 },
NULL,
L"GlobalColorTableSize" },
2529 {
VT_UI1, 0, 0, { 6 },
NULL,
L"BackgroundColorIndex" },
2530 {
VT_UI1, 0, 0, { 7 },
NULL,
L"PixelAspectRatio" }
2545 &IID_IWICMetadataReader, (
void **)&
reader);
2547 "CoCreateInstance error %#lx\n",
hr);
2562 ok(
hr ==
S_OK,
"IStream_Seek error %#lx\n",
hr);
2564 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
2565 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
2567 hr = IWICPersistStream_Load(persist,
stream);
2572 IWICPersistStream_Release(persist);
2581 ok(
hr ==
S_OK,
"GetMetadataFormat error %#lx\n",
hr);
2584 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
2585 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#lx\n",
hr);
2587 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
id);
2592 ok(
hr ==
S_OK,
"GetFriendlyName error %#lx\n",
hr);
2595 IWICMetadataHandlerInfo_Release(
info);
2596 IWICMetadataReader_Release(
reader);
2601 &IID_IWICMetadataWriter, (
void **)&writer);
2613 load_stream(writer, LSD_data,
sizeof(LSD_data), 0);
2616 IWICMetadataWriter_Release(writer);
2621 static const char IMD_data[] =
"hello world!\x1\x2\x3\x4\x5\x6\x7\x8\xed\xa\xb\xc\xd\xe\xf";
2628 {
VT_BOOL, 0, 0, { 1 },
NULL,
L"LocalColorTableFlag" },
2631 {
VT_UI1, 0, 0, { 5 },
NULL,
L"LocalColorTableSize" }
2646 &IID_IWICMetadataReader, (
void **)&
reader);
2648 "CoCreateInstance error %#lx\n",
hr);
2663 ok(
hr ==
S_OK,
"IStream_Seek error %#lx\n",
hr);
2665 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
2666 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
2668 hr = IWICPersistStream_Load(persist,
stream);
2673 IWICPersistStream_Release(persist);
2682 ok(
hr ==
S_OK,
"GetMetadataFormat error %#lx\n",
hr);
2685 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
2686 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#lx\n",
hr);
2688 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
id);
2693 ok(
hr ==
S_OK,
"GetFriendlyName error %#lx\n",
hr);
2696 IWICMetadataHandlerInfo_Release(
info);
2697 IWICMetadataReader_Release(
reader);
2702 &IID_IWICMetadataWriter, (
void **)&writer);
2714 load_stream(writer, IMD_data,
sizeof(IMD_data), 0);
2717 IWICMetadataWriter_Release(writer);
2722 static const char GCE_data[] =
"hello world!\xa\x2\x3\x4\x5\x6\x7\x8\xed\xa\xb\xc\xd\xe\xf";
2729 {
VT_UI1, 0, 0, { 4 },
NULL,
L"TransparentColorIndex" }
2744 &IID_IWICMetadataReader, (
void **)&
reader);
2746 "CoCreateInstance error %#lx\n",
hr);
2761 ok(
hr ==
S_OK,
"IStream_Seek error %#lx\n",
hr);
2763 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
2764 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
2766 hr = IWICPersistStream_Load(persist,
stream);
2771 IWICPersistStream_Release(persist);
2780 ok(
hr ==
S_OK,
"GetMetadataFormat error %#lx\n",
hr);
2783 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
2784 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#lx\n",
hr);
2786 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
id);
2791 ok(
hr ==
S_OK,
"GetFriendlyName error %#lx\n",
hr);
2794 IWICMetadataHandlerInfo_Release(
info);
2795 IWICMetadataReader_Release(
reader);
2800 &IID_IWICMetadataWriter, (
void **)&writer);
2812 load_stream(writer, GCE_data,
sizeof(GCE_data), 0);
2815 IWICMetadataWriter_Release(writer);
2820 static const char APE_data[] = { 0x21,0xff,0x0b,
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
2823 4,0x44,0x55,0x66,0x77,
2827 {
VT_UI1|
VT_VECTOR, 0, 11, {
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd' },
NULL,
L"Application" },
2828 {
VT_UI1|
VT_VECTOR, 0, 10, { 1,0x11,2,0x22,0x33,4,0x44,0x55,0x66,0x77 },
NULL,
L"Data" }
2830 WCHAR dataW[] = {
'd',
'a',
't',
'a',0 };
2844 &IID_IWICMetadataReader, (
void **)&
reader);
2846 "CoCreateInstance error %#lx\n",
hr);
2859 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
2860 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
2862 hr = IWICPersistStream_Load(persist,
stream);
2867 IWICPersistStream_Release(persist);
2876 ok(
hr ==
S_OK,
"GetMetadataFormat error %#lx\n",
hr);
2879 PropVariantInit(&
value);
2887 for (
i = 0;
i <
value.caub.cElems;
i++)
2891 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
2892 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#lx\n",
hr);
2894 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
clsid);
2899 ok(
hr ==
S_OK,
"GetFriendlyName error %#lx\n",
hr);
2902 IWICMetadataHandlerInfo_Release(
info);
2903 IWICMetadataReader_Release(
reader);
2908 &IID_IWICMetadataWriter, (
void **)&writer);
2920 load_stream(writer, APE_data,
sizeof(APE_data), 0);
2923 IWICMetadataWriter_Release(writer);
2928 static const char GIF_comment_data[] = { 0x21,0xfe,
2929 5,
'H',
'e',
'l',
'l',
'o',
2931 6,
'W',
'o',
'r',
'l',
'd',
'!',
2935 {
VT_LPSTR, 0, 12, { 0 },
"Hello World!",
L"TextEntry" }
2937 WCHAR text_entryW[] =
L"TEXTENTRY";
2951 &IID_IWICMetadataReader, (
void **)&
reader);
2953 "CoCreateInstance error %#lx\n",
hr);
2966 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
2967 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
2969 hr = IWICPersistStream_Load(persist,
stream);
2974 IWICPersistStream_Release(persist);
2983 ok(
hr ==
S_OK,
"GetMetadataFormat error %#lx\n",
hr);
2986 PropVariantInit(&
value);
2988 id.pwszVal = text_entryW;
2996 hr = IWICMetadataReader_GetMetadataHandlerInfo(
reader, &
info);
2997 ok(
hr ==
S_OK,
"GetMetadataHandlerInfo error %#lx\n",
hr);
2999 hr = IWICMetadataHandlerInfo_GetCLSID(
info, &
clsid);
3004 ok(
hr ==
S_OK,
"GetFriendlyName error %#lx\n",
hr);
3007 IWICMetadataHandlerInfo_Release(
info);
3008 IWICMetadataReader_Release(
reader);
3013 &IID_IWICMetadataWriter, (
void **)&writer);
3025 load_stream(writer, GIF_comment_data,
sizeof(GIF_comment_data), 0);
3028 IWICMetadataWriter_Release(writer);
3072 ok(
len == 0xdeadbeef,
"got %u\n",
len);
3079 ok(
len == 0xdeadbeef,
"got %u\n",
len);
3119 &GUID_ContainerFormatBmp,
3120 &GUID_ContainerFormatPng,
3121 &GUID_ContainerFormatIco,
3122 &GUID_ContainerFormatJpeg,
3123 &GUID_ContainerFormatTiff,
3124 &GUID_ContainerFormatGif,
3125 &GUID_ContainerFormatWmp,
3126 &GUID_MetadataFormatUnknown,
3127 &GUID_MetadataFormatIfd,
3128 &GUID_MetadataFormatSubIfd,
3129 &GUID_MetadataFormatExif,
3130 &GUID_MetadataFormatGps,
3131 &GUID_MetadataFormatInterop,
3132 &GUID_MetadataFormatApp0,
3133 &GUID_MetadataFormatApp1,
3134 &GUID_MetadataFormatApp13,
3135 &GUID_MetadataFormatIPTC,
3136 &GUID_MetadataFormatIRB,
3137 &GUID_MetadataFormat8BIMIPTC,
3138 &GUID_MetadataFormat8BIMResolutionInfo,
3139 &GUID_MetadataFormat8BIMIPTCDigest,
3140 &GUID_MetadataFormatXMP,
3141 &GUID_MetadataFormatThumbnail,
3142 &GUID_MetadataFormatChunktEXt,
3143 &GUID_MetadataFormatXMPStruct,
3144 &GUID_MetadataFormatXMPBag,
3145 &GUID_MetadataFormatXMPSeq,
3146 &GUID_MetadataFormatXMPAlt,
3147 &GUID_MetadataFormatLSD,
3148 &GUID_MetadataFormatIMD,
3149 &GUID_MetadataFormatGCE,
3150 &GUID_MetadataFormatAPE,
3151 &GUID_MetadataFormatJpegChrominance,
3152 &GUID_MetadataFormatJpegLuminance,
3153 &GUID_MetadataFormatJpegComment,
3154 &GUID_MetadataFormatGifComment,
3155 &GUID_MetadataFormatChunkgAMA,
3156 &GUID_MetadataFormatChunkbKGD,
3157 &GUID_MetadataFormatChunkiTXt,
3158 &GUID_MetadataFormatChunkcHRM,
3159 &GUID_MetadataFormatChunkhIST,
3160 &GUID_MetadataFormatChunkiCCP,
3161 &GUID_MetadataFormatChunksRGB,
3162 &GUID_MetadataFormatChunktIME
3165static 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 };
3166static 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 };
3167static WCHAR xmp_scheme[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
'x',
'a',
'p',
'/',
'1',
'.',
'0',
'/',0 };
3168static 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 };
3169static 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 };
3170static 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 };
3171static 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 };
3172static 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 };
3173static WCHAR pdf_scheme[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
'p',
'd',
'f',
'/',
'1',
'.',
'3',
'/',0 };
3174static 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 };
3175static WCHAR tiff_scheme[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
't',
'i',
'f',
'f',
'/',
'1',
'.',
'0',
'/',0 };
3176static WCHAR exif_scheme[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'n',
's',
'.',
'a',
'd',
'o',
'b',
'e',
'.',
'c',
'o',
'm',
'/',
'e',
'x',
'i',
'f',
'/',
'1',
'.',
'0',
'/',0 };
3177static 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 };
3178static 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 };
3179static 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 };
3180static 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 };
3181static 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 };
3182static 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 };
3183static 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 };
3184static 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 };
3185static 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 };
3186static 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 };
3187static 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 };
3188static 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 };
3189static 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 };
3190static 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 };
3224 static WCHAR schemaW[] =
L"http://ns.adobe.com/xap/1.0/";
3225 static WCHAR SCHEMAW[] =
L"HTTP://ns.adobe.com/xap/1.0/";
3258 ok(
len == 0xdeadbeef,
"got %u\n",
len);
3270 ok(
len == 0xdeadbeef,
"got %u\n",
len);
3276 ok(
len == 0xdeadbeef,
"got %u\n",
len);
3286 win_skip(
"Modern schemas are not supported\n");
3298 ok(
hr ==
S_OK,
"%u: %u: format %s does not support schema %s\n",
3372 ok(0,
"not implemented\n");
3387 ok(0,
"not implemented\n");
3398 if (value1)
return value1 < 0 ? -1 : 1;
3435 ok(0,
"unsupported schema vt %u\n",
schema->vt);
3498 ok(0,
"not implemented\n");
3520 IsEqualIID(iid, &IID_IWICMetadataBlockReader))
3569 if (index < current_metadata->
count)
3582 ok(0,
"not implemented\n");
3599static const char xmp[] =
"http://ns.adobe.com/xap/1.0/";
3600static const char dc[] =
"http://purl.org/dc/elements/1.1/";
3601static const char tiff[] =
"http://ns.adobe.com/tiff/1.0/";
3611 {
"xmp",
"Rating", 4, 5, 6 },
3612 {
NULL,
"Rating", 7, 8, 9 }
3626 {
xmp,
"Rating", 4, 5, 6 },
3629 {
NULL,
"RATING", 13, 14, 15 },
3630 {
NULL,
"R}ATING", 16, 17, 18 },
3631 {
NULL,
"xmp", 19, 20, 21 }
3636 { &GUID_MetadataFormatIfd, 1,
item1 }
3641 { &GUID_MetadataFormatXMP, 1,
item1 },
3642 { &GUID_MetadataFormatIfd, 3,
item2 }
3647 { &GUID_MetadataFormatXMP, 1,
item1 },
3648 { &GUID_MetadataFormatIfd, 3,
item2 },
3649 { &GUID_MetadataFormatXMP, 4,
item3 },
3650 { &GUID_MetadataFormatXMP, 7,
item4 },
3651 { &GUID_MetadataFormatIfd, 7,
item4 }
3656 &GUID_ContainerFormatGif,
3662 &GUID_ContainerFormatTiff,
3668 &GUID_ContainerFormatPng,
3681 const char *str_value;
3689 {
FALSE, &
data3,
L"/[1]ifd/{str=dc}:{uint=7}", 0xdeadbeef },
3690 {
FALSE, &
data3,
L"/[1]ifd/{str=http://purl.org/dc/elements/1.1/}:{longlong=7}",
S_OK, 8, 9,
NULL },
3691 {
FALSE, &
data3,
L"/[1]ifd/{str=http://ns.adobe.com/tiff/1.0/}:{int=10}",
S_OK, 11, 12,
NULL },
3693 {
FALSE, &
data3,
L"/[2]xmp/{str=xmp}:{ulong=4}", 0xdeadbeef },
3728 &IID_IWICComponentFactory, (
void **)&
factory);
3729 ok(
hr ==
S_OK,
"CoCreateInstance error %#lx\n",
hr);
3732 ok(
hr ==
S_OK,
"CreateQueryReaderFromBlockReader error %#lx\n",
hr);
3740 hr = IWICMetadataQueryReader_GetContainerFormat(
reader, &
format);
3745 PropVariantInit(&
value);
3760 hr = IUnknown_QueryInterface(
value.punkVal, &IID_IWICMetadataQueryReader, (
void **)&new_reader);
3761 ok(
hr ==
S_OK,
"QueryInterface error %#lx\n",
hr);
3765 hr = IWICMetadataQueryReader_GetLocation(new_reader, 256,
location, &
len);
3766 ok(
hr ==
S_OK,
"GetLocation error %#lx\n",
hr);
3770 hr = IWICMetadataQueryReader_GetLocation(new_reader, 256,
location,
NULL);
3775 hr = IWICMetadataQueryReader_GetLocation(new_reader, 3,
location, &
len);
3777 ok(
len == 0xdeadbeef,
"got %u\n",
len);
3782 hr = IWICMetadataQueryReader_GetLocation(new_reader, 0,
location, &
len);
3784 ok(
len == 0xdeadbeef,
"got %u\n",
len);
3788 hr = IWICMetadataQueryReader_GetLocation(new_reader, 0,
NULL, &
len);
3789 ok(
hr ==
S_OK,
"GetLocation error %#lx\n",
hr);
3793 hr = IWICMetadataQueryReader_GetLocation(new_reader, 3,
NULL, &
len);
3794 ok(
hr ==
S_OK,
"GetLocation error %#lx\n",
hr);
3797 hr = IWICMetadataQueryReader_GetLocation(new_reader, 0,
NULL,
NULL);
3800 IWICMetadataQueryReader_Release(new_reader);
3819 IWICMetadataQueryReader_Release(
reader);
3820 IWICComponentFactory_Release(
factory);
3828 BOOL wine_supports_encoder;
3829 BOOL metadata_supported;
3830 BOOL succeeds_uninitialized;
3835 {&CLSID_WICPngEncoder,
TRUE,
TRUE},
3836 {&CLSID_WICJpegEncoder,
TRUE,
TRUE},
3837 {&CLSID_WICGifEncoder,
TRUE,
TRUE},
3838 {&CLSID_WICTiffEncoder,
TRUE,
TRUE},
3859 &IID_IWICBitmapEncoder, (
void **)&
encoder);
3868 querywriter = querywriter2 =
NULL;
3871 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3873 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3874 hr = IWICBitmapEncoder_CreateNewFrame(
encoder, &frameencode,
NULL);
3875 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3877 hr = IWICBitmapFrameEncode_QueryInterface(frameencode, &IID_IWICMetadataBlockWriter, (
void**)&blockwriter);
3881 &IID_IWICComponentFactory, (
void**)&
factory);
3882 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3884 hr = IWICComponentFactory_CreateQueryWriterFromBlockWriter(
factory, blockwriter, &querywriter);
3887 hr = IWICBitmapFrameEncode_GetMetadataQueryWriter(frameencode, &querywriter2);
3889 "Got unexpected hr %#lx.\n",
hr);
3891 IWICMetadataQueryWriter_Release(querywriter2);
3893 hr = IWICBitmapFrameEncode_Initialize(frameencode,
NULL);
3894 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3896 hr = IWICBitmapFrameEncode_GetMetadataQueryWriter(frameencode, &querywriter2);
3898 "Got unexpected hr %#lx.\n",
hr);
3900 if (
tests[
i].metadata_supported)
3901 ok(querywriter2 != querywriter,
"Got unexpected interfaces %p, %p.\n", querywriter, querywriter2);
3903 IWICComponentFactory_Release(
factory);
3907 ok(
ref == 1,
"Got unexpected ref %lu.\n",
ref);
3909 hr = IWICMetadataQueryWriter_QueryInterface(querywriter, &
IID_IEnumString, (
void **)&enumstring);
3912 hr = IWICMetadataQueryWriter_GetEnumerator(querywriter, &enumstring);
3913 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3916 ok(
ref == 1,
"Got unexpected ref %lu.\n",
ref);
3918 hr = IEnumString_Skip(enumstring, 0);
3919 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3922 hr = IEnumString_Next(enumstring, 0,
NULL, &
count);
3924 ok(
count == 0xdeadbeef,
"Got unexpected count %lu.\n",
count);
3926 hr = IEnumString_Next(enumstring, 0, &olestring, &
count);
3930 hr = IEnumString_Next(enumstring, 1, &olestring, &
count);
3939 hr = IEnumString_Reset(enumstring);
3940 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3942 hr = IEnumString_Skip(enumstring, 1);
3943 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3945 IEnumString_Release(enumstring);
3947 IWICMetadataQueryWriter_Release(querywriter);
3948 IWICMetadataQueryWriter_Release(querywriter2);
3949 IWICMetadataBlockWriter_Release(blockwriter);
3951 IWICBitmapFrameEncode_Release(frameencode);
3953 IWICBitmapEncoder_Release(
encoder);
3959#include "pshpack2.h"
3981 {
'E',
'x',
'i',
'f',0,0 },
4017 IStream *app1_stream, *stream2;
4025 &IID_IWICMetadataReader, (
void **)&
reader);
4060 PropVariantInit(&
id);
4061 PropVariantInit(&
value);
4066 ok(
id.
vt ==
VT_UI2,
"Unexpected id type: %u.\n",
id.
vt);
4067 ok(
id.uiVal == 0,
"Unexpected id %u.\n",
id.uiVal);
4070 ok(!!
value.punkVal,
"Unexpected value.\n");
4072 hr = IUnknown_QueryInterface(
value.punkVal, &IID_IWICMetadataReader, (
void **)&ifd_reader);
4076 hr = IWICMetadataReader_GetMetadataFormat(ifd_reader, &
format);
4083 ok(!!stream2 && stream2 != app1_stream,
"Unexpected stream %p.\n", stream2);
4084 IStream_Release(stream2);
4086 hr = IWICMetadataReader_GetCount(ifd_reader, &
count);
4090 PropVariantInit(&
id);
4091 PropVariantInit(&
value);
4092 hr = IWICMetadataReader_GetValueByIndex(ifd_reader, 0,
NULL, &
id, &
value);
4095 ok(
id.
vt ==
VT_UI2,
"Unexpected id type: %u.\n",
id.
vt);
4096 ok(
id.uiVal == 0x100,
"Unexpected id %#x.\n",
id.uiVal);
4098 ok(
value.ulVal == 222,
"Unexpected value %lu.\n",
value.ulVal);
4100 PropVariantInit(&
id);
4101 PropVariantInit(&
value);
4102 hr = IWICMetadataReader_GetValueByIndex(ifd_reader, 1,
NULL, &
id, &
value);
4105 ok(
id.
vt ==
VT_UI2,
"Unexpected id type: %u.\n",
id.
vt);
4106 ok(
id.uiVal == 0x101,
"Unexpected id %#x.\n",
id.uiVal);
4108 ok(
value.ulVal == 333,
"Unexpected value %lu.\n",
value.ulVal);
4110 PropVariantInit(&
id);
4111 PropVariantInit(&
value);
4112 hr = IWICMetadataReader_GetValueByIndex(ifd_reader, 2,
NULL, &
id, &
value);
4115 ok(
id.
vt ==
VT_UI2,
"Unexpected id type: %u.\n",
id.
vt);
4116 ok(
id.uiVal == 0x8769,
"Unexpected id %#x.\n",
id.uiVal);
4118 hr = IUnknown_QueryInterface(
value.punkVal, &IID_IWICMetadataReader, (
void **)&exif_reader);
4123 hr = IWICMetadataReader_GetMetadataFormat(exif_reader, &
format);
4130 ok(!!stream2 && stream2 != app1_stream,
"Unexpected stream.\n");
4131 IStream_Release(stream2);
4133 hr = IWICMetadataReader_GetCount(exif_reader, &
count);
4137 PropVariantInit(&
id);
4138 PropVariantInit(&
value);
4139 hr = IWICMetadataReader_GetValueByIndex(exif_reader, 0,
NULL, &
id, &
value);
4142 ok(
id.
vt ==
VT_UI2,
"Unexpected id type: %u.\n",
id.
vt);
4143 ok(
id.uiVal == 0x200,
"Unexpected id %#x.\n",
id.uiVal);
4145 ok(
value.ulVal == 444,
"Unexpected value %lu.\n",
value.ulVal);
4147 PropVariantInit(&
id);
4148 PropVariantInit(&
value);
4149 hr = IWICMetadataReader_GetValueByIndex(ifd_reader, 3,
NULL, &
id, &
value);
4152 ok(
id.
vt ==
VT_UI2,
"Unexpected id type: %u.\n",
id.
vt);
4153 ok(
id.uiVal == 0x8825,
"Unexpected id %#x.\n",
id.uiVal);
4155 hr = IUnknown_QueryInterface(
value.punkVal, &IID_IWICMetadataReader, (
void **)&gps_reader);
4160 hr = IWICMetadataReader_GetMetadataFormat(gps_reader, &
format);
4167 ok(!!stream2 && stream2 != app1_stream,
"Unexpected stream.\n");
4168 IStream_Release(stream2);
4170 hr = IWICMetadataReader_GetCount(gps_reader, &
count);
4174 PropVariantInit(&
id);
4175 PropVariantInit(&
value);
4176 hr = IWICMetadataReader_GetValueByIndex(gps_reader, 0,
NULL, &
id, &
value);
4179 ok(
id.
vt ==
VT_UI2,
"Unexpected id type: %u.\n",
id.
vt);
4180 ok(
id.uiVal == 0x300,
"Unexpected id %#x.\n",
id.uiVal);
4182 ok(
value.ulVal == 555,
"Unexpected value %lu.\n",
value.ulVal);
4184 IWICMetadataReader_Release(gps_reader);
4185 IWICMetadataReader_Release(exif_reader);
4186 IWICMetadataReader_Release(ifd_reader);
4188 IStream_Release(app1_stream);
4189 IWICMetadataReader_Release(
reader);
4192 &IID_IWICMetadataWriter, (
void **)&writer);
4203 IWICMetadataWriter_Release(writer);
4219 &IID_IWICComponentFactory, (
void **)&
factory);
4223 hr = IWICComponentFactory_CreateMetadataReader(
factory, &GUID_MetadataFormatChunktEXt,
4234 IWICMetadataReader_Release(
reader);
4235 IWICComponentFactory_Release(
factory);
4239 IWICMetadataReader_Release(
reader);
4242 IWICMetadataWriter_Release(writer);
4246 hr = IWICComponentFactory_CreateMetadataReader(
factory, &GUID_MetadataFormatChunktEXt,
4255 hr = IWICComponentFactory_CreateMetadataWriterFromReader(
factory,
NULL,
NULL, &writer);
4270 PropVariantInit(&
id);
4271 PropVariantInit(&
value);
4281 hr = IWICMetadataWriter_GetMetadataFormat(writer, &
format);
4285 hr = IWICMetadataWriter_GetCount(writer, &
count);
4289 PropVariantInit(&
id);
4290 PropVariantInit(&
value);
4291 hr = IWICMetadataWriter_GetValueByIndex(writer, 0,
NULL, &
id, &
value);
4300 IWICMetadataWriter_Release(writer);
4301 IWICMetadataReader_Release(
reader);
4305 hr = IWICComponentFactory_CreateMetadataReader(
factory, &GUID_MetadataFormatApp1,
4316 hr = IWICMetadataWriter_GetCount(writer, &
count);
4320 PropVariantInit(&
id);
4321 PropVariantInit(&
value);
4324 ok(
id.
vt ==
VT_UI2,
"Unexpected id type %u.\n",
id.
vt);
4330 hr = IWICMetadataWriter_GetMetadataFormat(writer, &
format);
4334 hr = IWICMetadataWriter_GetCount(writer, &
count);
4338 PropVariantInit(&
id);
4339 PropVariantInit(&
value);
4340 hr = IWICMetadataWriter_GetValueByIndex(writer, 0,
NULL, &
id, &
value);
4342 ok(
id.
vt ==
VT_UI2,
"Unexpected id type %u.\n",
id.
vt);
4351 ok(stream2 !=
stream,
"Unexpected stream.\n");
4352 IStream_Release(stream2);
4354 IWICMetadataWriter_Release(writer);
4355 IWICMetadataReader_Release(
reader);
4363 hr = IWICComponentFactory_CreateMetadataReader(
factory, &GUID_MetadataFormatIfd,
4374 IWICMetadataWriter_Release(writer);
4376 IWICMetadataReader_Release(
reader);
4378 IWICComponentFactory_Release(
factory);
4383 static const struct options_test
4396 { &GUID_MetadataFormatApp1, 0x100 },
4407 &IID_IWICComponentFactory, (
void **)&
factory);
4412 const struct options_test *
test = &options_tests[
i];
4419 hr = IWICComponentFactory_CreateMetadataWriter(
factory, &GUID_MetadataFormatChunktEXt,
NULL, 0, &writer);
4424 IWICComponentFactory_Release(
factory);
4429 hr = IWICMetadataWriter_QueryInterface(writer, &IID_IWICStreamProvider, (
void **)&stream_provider);
4432 stream = (
void *)0xdeadbeef;
4433 hr = IWICStreamProvider_GetStream(stream_provider, &
stream);
4435 ok(
stream == (
void *)0xdeadbeef,
"Unexpected stream.\n");
4437 IWICStreamProvider_Release(stream_provider);
4439 hr = IWICMetadataWriter_GetMetadataFormat(writer, &
format);
4443 IWICMetadataWriter_Release(writer);
4448 hr = IWICMetadataWriter_GetMetadataFormat(writer, &
format);
4451 IWICMetadataWriter_Release(writer);
4453 writer = (
void *)0xdeadbeef;
4456 ok(writer == (
void *)0xdeadbeef,
"Unexpected pointer.\n");
4459 hr = IWICComponentFactory_CreateMetadataWriter(
factory, &GUID_MetadataFormatApp1,
NULL, 0, &writer);
4462 IWICMetadataWriter_Release(writer);
4465 hr = IWICComponentFactory_CreateMetadataWriter(
factory, &GUID_MetadataFormatIfd,
NULL, 0, &writer);
4468 IWICMetadataWriter_Release(writer);
4470 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)
#define ERROR_INSUFFICIENT_BUFFER
static const struct pixel_format_desc formats[]
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
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)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
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)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
static struct test_info tests[]
#define todo_wine_if(is_todo)
@ COINIT_APARTMENTTHREADED
const GUID IID_IEnumString
const GUID IID_IPersistStream
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
static __inline const char * wine_dbgstr_guid(const GUID *id)
void __winetest_cdecl winetest_push_context(const char *fmt,...)
void winetest_pop_context(void)
struct _ULARGE_INTEGER::@4266 u
struct IFD_entry exif_ifd[1]
struct IFD_entry gps_ifd[1]
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)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
@ WICBitmapEncoderNoCache
@ WICDecodeMetadataCacheOnLoad
@ WICMetadataCreationFailUnknown
@ WICPersistOptionBigEndian
@ WICPersistOptionDefault
@ WICPersistOptionLittleEndian
@ WICPersistOptionNoCacheStream
#define REGDB_E_CLASSNOTREG
#define WINCODEC_ERR_COMPONENTNOTFOUND
#define WINCODEC_ERR_WRONGSTATE
#define WINCODEC_ERR_UNSUPPORTEDOPERATION
#define WINCODEC_ERR_NOTINITIALIZED
#define WINCODEC_ERR_INVALIDQUERYCHARACTER
#define WINCODEC_ERR_PROPERTYNOTSUPPORTED
#define HRESULT_FROM_WIN32(x)
#define WINCODEC_ERR_VALUEOUTOFRANGE
#define DISP_E_TYPEMISMATCH
#define WINCODEC_ERR_BADMETADATAHEADER
#define WINCODEC_ERR_INSUFFICIENTBUFFER
#define WINCODEC_ERR_REQUESTONLYVALIDATMETADATAROOT
#define WINCODEC_ERR_PROPERTYNOTFOUND
#define WINCODEC_ERR_STREAMNOTAVAILABLE