[PATCH 5/5] windowscodecs: Support Stat for memory streams in IWICStream
Tony Wasserka
tony.wasserka at freenet.de
Fri Aug 21 04:12:03 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 1989f81..20b0758 100644
--- a/dlls/windowscodecs/stream.c
+++ b/dlls/windowscodecs/stream.c
@@ -197,8 +197,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
--------------060603030609050304080705--
More information about the wine-patches
mailing list