From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/windowscodecs/metadatahandler.c | 15 +++++++++++---- dlls/windowscodecs/tests/metadata.c | 7 ++----- 2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/dlls/windowscodecs/metadatahandler.c b/dlls/windowscodecs/metadatahandler.c index 3218f763ca9..9b8ba2d2c91 100644 --- a/dlls/windowscodecs/metadatahandler.c +++ b/dlls/windowscodecs/metadatahandler.c @@ -469,11 +469,18 @@ static ULONG WINAPI MetadataHandler_PersistStream_Release(IWICPersistStream *ifa return IWICMetadataWriter_Release(&This->IWICMetadataWriter_iface); }
-static HRESULT WINAPI MetadataHandler_GetClassID(IWICPersistStream *iface, - CLSID *pClassID) +static HRESULT WINAPI MetadataHandler_GetClassID(IWICPersistStream *iface, CLSID *clsid) { - FIXME("(%p,%p): stub\n", iface, pClassID); - return E_NOTIMPL; + MetadataHandler *handler = impl_from_IWICPersistStream(iface); + + TRACE("(%p,%p)\n", iface, clsid); + + if (!clsid) + return E_INVALIDARG; + + *clsid = *handler->vtable->clsid; + + return S_OK; }
static HRESULT WINAPI MetadataHandler_IsDirty(IWICPersistStream *iface) diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 8d0d3021e8f..ec9f821654f 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -102,14 +102,11 @@ static void check_persist_classid_(unsigned int line, void *iface_ptr, const CLS ok_(__FILE__, line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IWICPersistStream_GetClassID(persist_stream, NULL); - todo_wine ok_(__FILE__, line)(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IWICPersistStream_GetClassID(persist_stream, &clsid); - todo_wine ok_(__FILE__, line)(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok_(__FILE__, line)(IsEqualCLSID(&clsid, check_clsid), "Unexpected class id %s vs %s.\n", - wine_dbgstr_guid(&clsid), wine_dbgstr_guid(check_clsid)); + ok_(__FILE__, line)(IsEqualCLSID(&clsid, check_clsid), "Unexpected class id %s vs %s.\n", + wine_dbgstr_guid(&clsid), wine_dbgstr_guid(check_clsid));
IWICPersistStream_Release(persist_stream); }