diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 721b10e1d60..5cde4946c24 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -156,6 +156,7 @@ static void test_metadata_unknown(void) HRESULT hr; IWICMetadataReader *reader; IWICEnumMetadataItem *enumerator; + IWICMetadataBlockReader *blockreader; PROPVARIANT schema, id, value; ULONG items_returned; @@ -197,6 +198,12 @@ static void test_metadata_unknown(void) IWICEnumMetadataItem_Release(enumerator); } + hr = IWICMetadataReader_QueryInterface(reader, &IID_IWICMetadataBlockReader, (void**)&blockreader); + todo_wine ok(hr == E_NOINTERFACE, "QueryInterface failed, hr=%x\n", hr); + + if (SUCCEEDED(hr)) + IWICMetadataBlockReader_Release(blockreader); + IWICMetadataReader_Release(reader); } @@ -335,6 +342,7 @@ static void test_metadata_IFD(void) }; HRESULT hr; IWICMetadataReader *reader; + IWICMetadataBlockReader *blockreader; IWICEnumMetadataItem *enumerator; PROPVARIANT schema, id, value; ULONG items_returned, count, i; @@ -427,6 +435,40 @@ static void test_metadata_IFD(void) hr = IWICMetadataReader_GetValueByIndex(reader, count, &schema, NULL, NULL); ok(hr == E_INVALIDARG, "GetValueByIndex should fail\n"); + hr = IWICMetadataReader_QueryInterface(reader, &IID_IWICMetadataBlockReader, (void**)&blockreader); + ok(hr == E_NOINTERFACE, "QueryInterface failed, hr=%x\n", hr); + + if (SUCCEEDED(hr)) + IWICMetadataBlockReader_Release(blockreader); + + IWICMetadataReader_Release(reader); +} + +static void test_metadata_Exif(void) +{ + HRESULT hr; + IWICMetadataReader *reader; + IWICMetadataBlockReader *blockreader; + UINT count=0; + + hr = CoCreateInstance(&CLSID_WICExifMetadataReader, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void**)&reader); + todo_wine ok(hr == S_OK, "CoCreateInstance error %#x\n", hr); + if (FAILED(hr)) return; + + hr = IWICMetadataReader_GetCount(reader, NULL); + ok(hr == E_INVALIDARG, "GetCount error %#x\n", hr); + + hr = IWICMetadataReader_GetCount(reader, &count); + ok(hr == S_OK, "GetCount error %#x\n", hr); + ok(count == 0, "unexpected count %u\n", count); + + hr = IWICMetadataReader_QueryInterface(reader, &IID_IWICMetadataBlockReader, (void**)&blockreader); + ok(hr == E_NOINTERFACE, "QueryInterface failed, hr=%x\n", hr); + + if (SUCCEEDED(hr)) + IWICMetadataBlockReader_Release(blockreader); + IWICMetadataReader_Release(reader); } @@ -495,6 +537,7 @@ START_TEST(metadata) test_metadata_unknown(); test_metadata_tEXt(); test_metadata_IFD(); + test_metadata_Exif(); test_create_reader(); CoUninitialize(); diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index 5cca0a5cb11..55e365416ce 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -38,12 +38,14 @@ typedef enum WICMetadataCreationOptions { cpp_quote("DEFINE_GUID(GUID_MetadataFormatUnknown, 0xa45e592f,0x9078,0x4a7c,0xad,0xb5,0x4e,0xdc,0x4f,0xd6,0x1b,0x1f);") cpp_quote("DEFINE_GUID(GUID_MetadataFormatChunktEXt, 0x568d8936,0xc0a9,0x4923,0x90,0x5d,0xdf,0x2b,0x38,0x23,0x8f,0xbc);") cpp_quote("DEFINE_GUID(GUID_MetadataFormatIfd, 0x537396c6,0x2d8a,0x4bb6,0x9b,0xf8,0x2f,0x0a,0x8e,0x2a,0x3a,0xdf);") +cpp_quote("DEFINE_GUID(GUID_MetadataFormatExif, 0x1c3c4f9d,0xb84a,0x467d,0x94,0x93,0x36,0xcf,0xbd,0x59,0xea,0x57);") cpp_quote("DEFINE_GUID(CLSID_WICUnknownMetadataReader, 0x699745c2,0x5066,0x4b82,0xa8,0xe3,0xd4,0x04,0x78,0xdb,0xec,0x8c);") cpp_quote("DEFINE_GUID(CLSID_WICUnknownMetadataWriter, 0xa09cca86,0x27ba,0x4f39,0x90,0x53,0x12,0x1f,0xa4,0xdc,0x08,0xfc);") cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataReader, 0x4b59afcc,0xb8c3,0x408a,0xb6,0x70,0x89,0xe5,0xfa,0xb6,0xfd,0xa7);") cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataWriter, 0xb5ebafb9,0x253e,0x4a72,0xa7,0x44,0x07,0x62,0xd2,0x68,0x56,0x83);") cpp_quote("DEFINE_GUID(CLSID_WICIfdMetadataReader, 0x8f914656,0x9d0a,0x4eb2,0x90,0x19,0x0b,0xf9,0x6d,0x8a,0x9e,0xe6);") +cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataReader, 0xd9403860,0x297f,0x4a49,0xbf,0x9b,0x77,0x89,0x81,0x50,0xa4,0x42);") [ object,