windowscodecs: Implement IWICStream_Commit.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f704c36568
commit
98c2c9a9c9
|
@ -189,12 +189,11 @@ static HRESULT WINAPI StreamOnMemory_CopyTo(IStream *iface,
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/* Commit isn't implemented in the native windowscodecs DLL either */
|
||||
static HRESULT WINAPI StreamOnMemory_Commit(IStream *iface,
|
||||
DWORD grfCommitFlags)
|
||||
{
|
||||
TRACE("(%p, %#x)\n", iface, grfCommitFlags);
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* Revert isn't implemented in the native windowscodecs DLL either */
|
||||
|
@ -375,7 +374,7 @@ static HRESULT WINAPI StreamOnFileHandle_Commit(IStream *iface,
|
|||
DWORD grfCommitFlags)
|
||||
{
|
||||
TRACE("(%p, %#x)\n", iface, grfCommitFlags);
|
||||
return E_NOTIMPL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI StreamOnFileHandle_Revert(IStream *iface)
|
||||
|
@ -655,8 +654,9 @@ static HRESULT WINAPI StreamOnStreamRange_CopyTo(IStream *iface,
|
|||
static HRESULT WINAPI StreamOnStreamRange_Commit(IStream *iface,
|
||||
DWORD grfCommitFlags)
|
||||
{
|
||||
TRACE("(%p, %#x)\n", iface, grfCommitFlags);
|
||||
return E_NOTIMPL;
|
||||
StreamOnStreamRange *This = StreamOnStreamRange_from_IStream(iface);
|
||||
TRACE("(%p, %#x)\n", This, grfCommitFlags);
|
||||
return IStream_Commit(This->stream, grfCommitFlags);
|
||||
}
|
||||
|
||||
/* Revert isn't implemented in the native windowscodecs DLL either */
|
||||
|
|
|
@ -326,19 +326,19 @@ static void test_StreamOnMemory(void)
|
|||
|
||||
/* Commit */
|
||||
hr = IWICStream_Commit(pStream, STGC_DEFAULT);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(pStream, STGC_OVERWRITE);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(pStream, STGC_ONLYIFCURRENT);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(pStream, STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(pStream, STGC_CONSOLIDATE);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
|
||||
/* Revert */
|
||||
|
@ -643,19 +643,19 @@ static void test_StreamOnStreamRange(void)
|
|||
|
||||
/* Commit */
|
||||
hr = IWICStream_Commit(pSubStream, STGC_DEFAULT);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(pSubStream, STGC_OVERWRITE);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(pSubStream, STGC_ONLYIFCURRENT);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(pSubStream, STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(pSubStream, STGC_CONSOLIDATE);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
|
||||
/* Revert */
|
||||
|
@ -953,19 +953,19 @@ static void test_StreamOnIStream(void)
|
|||
|
||||
/* Commit */
|
||||
hr = IWICStream_Commit(substream, STGC_DEFAULT);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(substream, STGC_OVERWRITE);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(substream, STGC_ONLYIFCURRENT);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(substream, STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
hr = IWICStream_Commit(substream, STGC_CONSOLIDATE);
|
||||
todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
|
||||
|
||||
/* Revert */
|
||||
IWICStream_Write(substream, buff + 5, 6, NULL);
|
||||
|
|
Loading…
Reference in New Issue