[PATCH 06/12] windowscodecs: Support Stat for memory streams in IWICStream

Tony Wasserka tony.wasserka at freenet.de
Tue Aug 18 08:19:15 CDT 2009


---
 dlls/windowscodecs/stream.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/windowscodecs/stream.c b/dlls/windowscodecs/stream.c
index c2a87f9..674cc6b 100644
--- a/dlls/windowscodecs/stream.c
+++ b/dlls/windowscodecs/stream.c
@@ -178,8 +178,16 @@ static HRESULT WINAPI StreamOnMemory_UnlockRegion(IStream *iface,
 static HRESULT WINAPI StreamOnMemory_Stat(IStream *iface,
     STATSTG *pstatstg, DWORD grfStatFlag)
 {
-    FIXME("(%p): stub\n", iface);
-    return E_NOTIMPL;
+    StreamOnMemory *This = (StreamOnMemory*)iface;
+    TRACE("(%p)\n", This);
+
+    if (!pstatstg) return E_INVALIDARG;
+
+    ZeroMemory(pstatstg, sizeof(STATSTG));
+    pstatstg->type = STGTY_STREAM;
+    pstatstg->cbSize.QuadPart = This->dwMemsize;
+
+    return S_OK;
 }
 
 /* Clone isn't implemented in the native windowscodecs DLL either */
-- 
1.6.3.3


--------------050802020109040005000709--



More information about the wine-patches mailing list