Module: wine Branch: master Commit: 5e10f2e0ec896a275d69b77bfe699e841dc0b7c8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5e10f2e0ec896a275d69b77bfe...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri Nov 23 11:48:49 2012 +0800
windowscodecs: Implement QueryCapability of the ICO decoder.
---
dlls/windowscodecs/icoformat.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c index 6606341..7aec245 100644 --- a/dlls/windowscodecs/icoformat.c +++ b/dlls/windowscodecs/icoformat.c @@ -489,11 +489,20 @@ static ULONG WINAPI IcoDecoder_Release(IWICBitmapDecoder *iface) return ref; }
-static HRESULT WINAPI IcoDecoder_QueryCapability(IWICBitmapDecoder *iface, IStream *pIStream, - DWORD *pdwCapability) +static HRESULT WINAPI IcoDecoder_QueryCapability(IWICBitmapDecoder *iface, IStream *stream, + DWORD *capability) { - FIXME("(%p,%p,%p): stub\n", iface, pIStream, pdwCapability); - return E_NOTIMPL; + HRESULT hr; + + TRACE("(%p,%p,%p)\n", iface, stream, capability); + + if (!stream || !capability) return E_INVALIDARG; + + hr = IWICBitmapDecoder_Initialize(iface, stream, WICDecodeMetadataCacheOnDemand); + if (hr != S_OK) return hr; + + *capability = WICBitmapDecoderCapabilityCanDecodeAllImages; + return S_OK; }
static HRESULT WINAPI IcoDecoder_Initialize(IWICBitmapDecoder *iface, IStream *pIStream,