Commit 06c35e8b authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

windowscodecs: Implement IWICComponentInfo::GetCLSID.

parent a53a57b7
......@@ -132,8 +132,15 @@ static HRESULT WINAPI BitmapDecoderInfo_GetComponentType(IWICBitmapDecoderInfo *
static HRESULT WINAPI BitmapDecoderInfo_GetCLSID(IWICBitmapDecoderInfo *iface, CLSID *pclsid)
{
FIXME("(%p,%p): stub\n", iface, pclsid);
return E_NOTIMPL;
BitmapDecoderInfo *This = (BitmapDecoderInfo*)iface;
TRACE("(%p,%p)\n", iface, pclsid);
if (!pclsid)
return E_INVALIDARG;
memcpy(pclsid, &This->clsid, sizeof(CLSID));
return S_OK;
}
static HRESULT WINAPI BitmapDecoderInfo_GetSigningStatus(IWICBitmapDecoderInfo *iface, DWORD *pStatus)
......@@ -564,8 +571,15 @@ static HRESULT WINAPI BitmapEncoderInfo_GetComponentType(IWICBitmapEncoderInfo *
static HRESULT WINAPI BitmapEncoderInfo_GetCLSID(IWICBitmapEncoderInfo *iface, CLSID *pclsid)
{
FIXME("(%p,%p): stub\n", iface, pclsid);
return E_NOTIMPL;
BitmapEncoderInfo *This = (BitmapEncoderInfo*)iface;
TRACE("(%p,%p)\n", iface, pclsid);
if (!pclsid)
return E_INVALIDARG;
memcpy(pclsid, &This->clsid, sizeof(CLSID));
return S_OK;
}
static HRESULT WINAPI BitmapEncoderInfo_GetSigningStatus(IWICBitmapEncoderInfo *iface, DWORD *pStatus)
......@@ -821,8 +835,15 @@ static HRESULT WINAPI FormatConverterInfo_GetComponentType(IWICFormatConverterIn
static HRESULT WINAPI FormatConverterInfo_GetCLSID(IWICFormatConverterInfo *iface, CLSID *pclsid)
{
FIXME("(%p,%p): stub\n", iface, pclsid);
return E_NOTIMPL;
FormatConverterInfo *This = (FormatConverterInfo*)iface;
TRACE("(%p,%p)\n", iface, pclsid);
if (!pclsid)
return E_INVALIDARG;
memcpy(pclsid, &This->clsid, sizeof(CLSID));
return S_OK;
}
static HRESULT WINAPI FormatConverterInfo_GetSigningStatus(IWICFormatConverterInfo *iface, DWORD *pStatus)
......
......@@ -35,6 +35,7 @@ static void test_decoder_info(void)
ULONG len;
WCHAR value[256];
const WCHAR expected_mimetype[] = {'i','m','a','g','e','/','b','m','p',0};
CLSID clsid;
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void**)&factory);
......@@ -47,6 +48,13 @@ static void test_decoder_info(void)
hr = IWICComponentInfo_QueryInterface(info, &IID_IWICBitmapDecoderInfo, (void**)&decoder_info);
ok(hr == S_OK, "QueryInterface failed, hr=%x\n", hr);
hr = IWICBitmapDecoderInfo_GetCLSID(decoder_info, NULL);
ok(hr == E_INVALIDARG, "GetCLSID failed, hr=%x\n", hr);
hr = IWICBitmapDecoderInfo_GetCLSID(decoder_info, &clsid);
ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr);
ok(IsEqualGUID(&CLSID_WICBmpDecoder, &clsid), "GetCLSID returned wrong result\n");
hr = IWICBitmapDecoderInfo_GetMimeTypes(decoder_info, 0, NULL, NULL);
ok(hr == E_INVALIDARG, "GetMimeType failed, hr=%x\n", hr);
......
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