Commit 98c2c9a9 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

windowscodecs: Implement IWICStream_Commit.

parent f704c365
...@@ -189,12 +189,11 @@ static HRESULT WINAPI StreamOnMemory_CopyTo(IStream *iface, ...@@ -189,12 +189,11 @@ static HRESULT WINAPI StreamOnMemory_CopyTo(IStream *iface,
return E_NOTIMPL; return E_NOTIMPL;
} }
/* Commit isn't implemented in the native windowscodecs DLL either */
static HRESULT WINAPI StreamOnMemory_Commit(IStream *iface, static HRESULT WINAPI StreamOnMemory_Commit(IStream *iface,
DWORD grfCommitFlags) DWORD grfCommitFlags)
{ {
TRACE("(%p, %#x)\n", iface, grfCommitFlags); TRACE("(%p, %#x)\n", iface, grfCommitFlags);
return E_NOTIMPL; return S_OK;
} }
/* Revert isn't implemented in the native windowscodecs DLL either */ /* Revert isn't implemented in the native windowscodecs DLL either */
...@@ -375,7 +374,7 @@ static HRESULT WINAPI StreamOnFileHandle_Commit(IStream *iface, ...@@ -375,7 +374,7 @@ static HRESULT WINAPI StreamOnFileHandle_Commit(IStream *iface,
DWORD grfCommitFlags) DWORD grfCommitFlags)
{ {
TRACE("(%p, %#x)\n", iface, grfCommitFlags); TRACE("(%p, %#x)\n", iface, grfCommitFlags);
return E_NOTIMPL; return S_OK;
} }
static HRESULT WINAPI StreamOnFileHandle_Revert(IStream *iface) static HRESULT WINAPI StreamOnFileHandle_Revert(IStream *iface)
...@@ -655,8 +654,9 @@ static HRESULT WINAPI StreamOnStreamRange_CopyTo(IStream *iface, ...@@ -655,8 +654,9 @@ static HRESULT WINAPI StreamOnStreamRange_CopyTo(IStream *iface,
static HRESULT WINAPI StreamOnStreamRange_Commit(IStream *iface, static HRESULT WINAPI StreamOnStreamRange_Commit(IStream *iface,
DWORD grfCommitFlags) DWORD grfCommitFlags)
{ {
TRACE("(%p, %#x)\n", iface, grfCommitFlags); StreamOnStreamRange *This = StreamOnStreamRange_from_IStream(iface);
return E_NOTIMPL; TRACE("(%p, %#x)\n", This, grfCommitFlags);
return IStream_Commit(This->stream, grfCommitFlags);
} }
/* Revert isn't implemented in the native windowscodecs DLL either */ /* Revert isn't implemented in the native windowscodecs DLL either */
......
...@@ -326,19 +326,19 @@ static void test_StreamOnMemory(void) ...@@ -326,19 +326,19 @@ static void test_StreamOnMemory(void)
/* Commit */ /* Commit */
hr = IWICStream_Commit(pStream, STGC_DEFAULT); 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); 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); 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); 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); 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 */ /* Revert */
...@@ -643,19 +643,19 @@ static void test_StreamOnStreamRange(void) ...@@ -643,19 +643,19 @@ static void test_StreamOnStreamRange(void)
/* Commit */ /* Commit */
hr = IWICStream_Commit(pSubStream, STGC_DEFAULT); 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); 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); 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); 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); 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 */ /* Revert */
...@@ -953,19 +953,19 @@ static void test_StreamOnIStream(void) ...@@ -953,19 +953,19 @@ static void test_StreamOnIStream(void)
/* Commit */ /* Commit */
hr = IWICStream_Commit(substream, STGC_DEFAULT); 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); 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); 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); 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); 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 */ /* Revert */
IWICStream_Write(substream, buff + 5, 6, NULL); IWICStream_Write(substream, buff + 5, 6, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment