Commit aa0e7aa1 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msado15: Implement _Stream_SetEOS.

parent dade5b7e
......@@ -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 )
......
......@@ -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 );
......
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