windowscodecs: Support writing to memory streams in IWICStream.

This commit is contained in:
Tony Wasserka 2009-08-21 11:08:10 +02:00 committed by Alexandre Julliard
parent bb83fb264b
commit 0b6df19375
1 changed files with 13 additions and 2 deletions

View File

@ -107,8 +107,19 @@ static HRESULT WINAPI StreamOnMemory_Read(IStream *iface,
static HRESULT WINAPI StreamOnMemory_Write(IStream *iface,
void const *pv, ULONG cb, ULONG *pcbWritten)
{
FIXME("(%p): stub\n", iface);
return E_NOTIMPL;
StreamOnMemory *This = (StreamOnMemory*)iface;
TRACE("(%p)\n", This);
if (!pv) return E_INVALIDARG;
if (cb > This->dwMemsize - This->dwCurPos) return STG_E_MEDIUMFULL;
if (cb) {
memcpy(This->pbMemory + This->dwCurPos, pv, cb);
This->dwCurPos += cb;
}
if (pcbWritten) *pcbWritten = cb;
return S_OK;
}
static HRESULT WINAPI StreamOnMemory_Seek(IStream *iface,