Vincent Povirk : windowscodecs: Implement IWICImagingFactory_CreateDecoderFromFilename.
Alexandre Julliard
julliard at winehq.org
Tue Apr 27 16:59:33 CDT 2010
Module: wine
Branch: master
Commit: b468c29de10d29d9b3a7717bbc8b8dc631a4ca83
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b468c29de10d29d9b3a7717bbc8b8dc631a4ca83
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Tue Apr 27 10:40:40 2010 -0500
windowscodecs: Implement IWICImagingFactory_CreateDecoderFromFilename.
---
dlls/windowscodecs/imgfactory.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c
index a98aeb8..e3dcca0 100644
--- a/dlls/windowscodecs/imgfactory.c
+++ b/dlls/windowscodecs/imgfactory.c
@@ -26,6 +26,7 @@
#include "winbase.h"
#include "winreg.h"
#include "objbase.h"
+#include "shellapi.h"
#include "wincodec.h"
#include "wincodecs_private.h"
@@ -89,9 +90,27 @@ static HRESULT WINAPI ImagingFactory_CreateDecoderFromFilename(
DWORD dwDesiredAccess, WICDecodeOptions metadataOptions,
IWICBitmapDecoder **ppIDecoder)
{
- FIXME("(%p,%s,%s,%u,%u,%p): stub\n", iface, debugstr_w(wzFilename),
+ IWICStream *stream;
+ HRESULT hr;
+
+ TRACE("(%p,%s,%s,%u,%u,%p)\n", iface, debugstr_w(wzFilename),
debugstr_guid(pguidVendor), dwDesiredAccess, metadataOptions, ppIDecoder);
- return E_NOTIMPL;
+
+ hr = StreamImpl_Create(&stream);
+ if (SUCCEEDED(hr))
+ {
+ hr = IWICStream_InitializeFromFilename(stream, wzFilename, dwDesiredAccess);
+
+ if (SUCCEEDED(hr))
+ {
+ hr = IWICImagingFactory_CreateDecoderFromStream(iface, (IStream*)stream,
+ pguidVendor, metadataOptions, ppIDecoder);
+ }
+
+ IWICStream_Release(stream);
+ }
+
+ return hr;
}
static HRESULT WINAPI ImagingFactory_CreateDecoderFromStream(
More information about the wine-cvs
mailing list