Hans Leidekker : msado15: Implement _Stream_SetEOS.

Alexandre Julliard julliard at winehq.org
Wed Dec 11 16:35:01 CST 2019


Module: wine
Branch: master
Commit: aa0e7aa1fd6b34b223b48ce84d65e437a00d0693
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=aa0e7aa1fd6b34b223b48ce84d65e437a00d0693

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Dec 11 17:18:25 2019 +0100

msado15: Implement _Stream_SetEOS.

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msado15/stream.c        |  7 +++++--
 dlls/msado15/tests/msado15.c | 13 +++++++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/dlls/msado15/stream.c b/dlls/msado15/stream.c
index 52f35afe3c..c6add70b1b 100644
--- a/dlls/msado15/stream.c
+++ b/dlls/msado15/stream.c
@@ -370,8 +370,11 @@ static HRESULT WINAPI stream_Write( _Stream *iface, VARIANT buf )
 
 static HRESULT WINAPI stream_SetEOS( _Stream *iface )
 {
-    FIXME( "%p\n", iface );
-    return E_NOTIMPL;
+    struct stream *stream = impl_from_Stream( iface );
+
+    TRACE( "%p\n", stream );
+
+    return resize_buffer( stream, stream->pos );
 }
 
 static HRESULT WINAPI stream_CopyTo( _Stream *iface, _Stream *dst, LONG size )
diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c
index a63ab445a1..3f297f4ce2 100644
--- a/dlls/msado15/tests/msado15.c
+++ b/dlls/msado15/tests/msado15.c
@@ -210,6 +210,19 @@ static void test_Stream(void)
     hr = _Stream_put_Position( stream, 2 );
     ok( hr == S_OK, "got %08x\n", hr );
 
+    hr = _Stream_SetEOS( stream );
+    ok( hr == S_OK, "got %08x\n", hr );
+
+    pos = -1;
+    hr = _Stream_get_Position( stream, &pos );
+    ok( hr == S_OK, "got %08x\n", hr );
+    ok( pos == 2, "got %d\n", pos );
+
+    size = -1;
+    hr = _Stream_get_Size( stream, &size );
+    ok( hr == S_OK, "got %08x\n", hr );
+    ok( size == 2, "got %d\n", size );
+
     hr = _Stream_Close( stream );
     ok( hr == S_OK, "got %08x\n", hr );
 




More information about the wine-cvs mailing list