Commit 79d14397 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

windowscodecs: Return correct error codes from BmpFrameEncode_GetMetadataQueryWriter().

parent 7f88d691
......@@ -397,10 +397,16 @@ static HRESULT WINAPI BmpFrameEncode_Commit(IWICBitmapFrameEncode *iface)
}
static HRESULT WINAPI BmpFrameEncode_GetMetadataQueryWriter(IWICBitmapFrameEncode *iface,
IWICMetadataQueryWriter **ppIMetadataQueryWriter)
IWICMetadataQueryWriter **query_writer)
{
FIXME("(%p, %p): stub\n", iface, ppIMetadataQueryWriter);
return E_NOTIMPL;
BmpFrameEncode *encoder = impl_from_IWICBitmapFrameEncode(iface);
TRACE("iface %p, query_writer %p.\n", iface, query_writer);
if (!encoder->initialized)
return WINCODEC_ERR_NOTINITIALIZED;
return WINCODEC_ERR_UNSUPPORTEDOPERATION;
}
static const IWICBitmapFrameEncodeVtbl BmpFrameEncode_Vtbl = {
......
......@@ -3106,7 +3106,7 @@ static void test_metadata_writer(void)
ok(hr == (tests[i].metadata_supported ? S_OK : E_INVALIDARG), "Got unexpected hr %#x, i %u.\n", hr, i);
hr = IWICBitmapFrameEncode_GetMetadataQueryWriter(frameencode, &querywriter2);
todo_wine_if(!i) ok(hr == (tests[i].succeeds_unitialized ? S_OK : WINCODEC_ERR_NOTINITIALIZED),
ok(hr == (tests[i].succeeds_unitialized ? S_OK : WINCODEC_ERR_NOTINITIALIZED),
"Got unexpected hr %#x, i %u.\n", hr, i);
if (hr == S_OK)
IWICMetadataQueryWriter_Release(querywriter2);
......@@ -3115,7 +3115,7 @@ static void test_metadata_writer(void)
ok(hr == S_OK, "Got unexpected hr %#x, i %u.\n", hr, i);
hr = IWICBitmapFrameEncode_GetMetadataQueryWriter(frameencode, &querywriter2);
todo_wine_if(!i) ok(hr == (tests[i].metadata_supported ? S_OK : WINCODEC_ERR_UNSUPPORTEDOPERATION),
ok(hr == (tests[i].metadata_supported ? S_OK : WINCODEC_ERR_UNSUPPORTEDOPERATION),
"Got unexpected hr %#x, i %u.\n", hr, i);
if (tests[i].metadata_supported)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment