> +static HRESULT WINAPI StreamOnStream_Seek(IStream *iface,
> + LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
> +{
> + StreamOnStream *This = StreamOnStream_from_IStream(iface);
> + HRESULT hr=S_OK;
> + TRACE("(%p)\n", This);
> +
> + EnterCriticalSection(&This->lock);
> + hr = IStream_Seek(This->stream, dlibMove, dwOrigin, plibNewPosition);
> + LeaveCriticalSection(&This->lock);
> +
> + return hr;
> +}
The IWICStream needs to have an independent position from the underlying stream.
Also, why not just forward to InitializeFromIStreamRegion?