[2/5] windowscodecs: Implement MetadataReaderInfo_GetContainerFormats.

Vincent Povirk madewokherd at gmail.com
Wed Nov 12 16:07:46 CST 2014


-------------- next part --------------
From c058fb6c5ccea5304a8f2ad0bae0f355e9df1e56 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Thu, 6 Nov 2014 16:07:54 -0600
Subject: [PATCH 2/7] windowscodecs: Implement
 MetadataReaderInfo_GetContainerFormats.

---
 dlls/windowscodecs/info.c       | 8 +++++---
 dlls/windowscodecs/tests/info.c | 2 --
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c
index d42d726..ea81dba 100644
--- a/dlls/windowscodecs/info.c
+++ b/dlls/windowscodecs/info.c
@@ -56,6 +56,7 @@ static const WCHAR supportstransparency_valuename[] = {'S','u','p','p','o','r','
 static const WCHAR requiresfullstream_valuename[] = {'R','e','q','u','i','r','e','s','F','u','l','l','S','t','r','e','a','m',0};
 static const WCHAR supportspadding_valuename[] = {'S','u','p','p','o','r','t','s','P','a','d','d','i','n','g',0};
 static const WCHAR fileextensions_valuename[] = {'F','i','l','e','E','x','t','e','n','s','i','o','n','s',0};
+static const WCHAR containers_keyname[] = {'C','o','n','t','a','i','n','e','r','s',0};
 
 static HRESULT ComponentInfo_GetStringValue(HKEY classkey, LPCWSTR value,
     UINT buffer_size, WCHAR *buffer, UINT *actual_size)
@@ -1635,10 +1636,11 @@ static HRESULT WINAPI MetadataReaderInfo_GetMetadataFormat(IWICMetadataReaderInf
 static HRESULT WINAPI MetadataReaderInfo_GetContainerFormats(IWICMetadataReaderInfo *iface,
     UINT length, GUID *formats, UINT *actual_length)
 {
-    if (!actual_length) return E_INVALIDARG;
+    MetadataReaderInfo *This = impl_from_IWICMetadataReaderInfo(iface);
+    TRACE("(%p,%u,%p,%p)\n", iface, length, formats, actual_length);
 
-    FIXME("(%p,%u,%p,%p): stub\n", iface, length, formats, actual_length);
-    return E_NOTIMPL;
+    return ComponentInfo_GetGuidList(This->classkey, containers_keyname, length,
+        formats, actual_length);
 }
 
 static HRESULT WINAPI MetadataReaderInfo_GetDeviceManufacturer(IWICMetadataReaderInfo *iface,
diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c
index 5753f6b..98c06ec 100644
--- a/dlls/windowscodecs/tests/info.c
+++ b/dlls/windowscodecs/tests/info.c
@@ -415,9 +415,7 @@ static void test_reader_info(void)
 
     count = 0xdeadbeef;
     hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count);
-todo_wine
     ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr);
-todo_wine
     ok(count == 0, "unexpected count %d\n", count);
 
     hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng,
-- 
2.1.0



More information about the wine-patches mailing list