Hans Leidekker : msado15: Implement _Stream_get_State.
Alexandre Julliard
julliard at winehq.org
Mon Dec 9 16:57:38 CST 2019
Module: wine
Branch: master
Commit: 6463db0c4b294069b1d0367f366aff2e2d660cce
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6463db0c4b294069b1d0367f366aff2e2d660cce
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Dec 9 11:24:30 2019 +0100
msado15: Implement _Stream_get_State.
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 | 16 ++++++++++++++++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/msado15/stream.c b/dlls/msado15/stream.c
index 3c9d885edf..cc67e930a4 100644
--- a/dlls/msado15/stream.c
+++ b/dlls/msado15/stream.c
@@ -162,8 +162,11 @@ static HRESULT WINAPI stream_put_LineSeparator( _Stream *iface, LineSeparatorEnu
static HRESULT WINAPI stream_get_State( _Stream *iface, ObjectStateEnum *state )
{
- FIXME( "%p, %p\n", iface, state );
- return E_NOTIMPL;
+ struct stream *stream = impl_from_Stream( iface );
+ TRACE( "%p, %p\n", stream, state );
+
+ *state = stream->state;
+ return S_OK;
}
static HRESULT WINAPI stream_get_Mode( _Stream *iface, ConnectModeEnum *mode )
diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c
index e562c2299f..9733116151 100644
--- a/dlls/msado15/tests/msado15.c
+++ b/dlls/msado15/tests/msado15.c
@@ -30,6 +30,7 @@ static void test_Stream(void)
_Stream *stream;
StreamTypeEnum type;
LONG refs;
+ ObjectStateEnum state;
VARIANT missing;
HRESULT hr;
@@ -54,6 +55,11 @@ static void test_Stream(void)
hr = _Stream_put_Type( stream, adTypeText );
ok( hr == S_OK, "got %08x\n", hr );
+ state = 0xdeadbeef;
+ hr = _Stream_get_State( stream, &state );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( state == adStateClosed, "got %u\n", state );
+
V_VT( &missing ) = VT_ERROR;
V_ERROR( &missing ) = DISP_E_PARAMNOTFOUND;
hr = _Stream_Open( stream, missing, adModeUnknown, adOpenStreamUnspecified, NULL, NULL );
@@ -62,9 +68,19 @@ static void test_Stream(void)
hr = _Stream_Open( stream, missing, adModeUnknown, adOpenStreamUnspecified, NULL, NULL );
ok( hr == MAKE_ADO_HRESULT( adErrObjectOpen ), "got %08x\n", hr );
+ state = 0xdeadbeef;
+ hr = _Stream_get_State( stream, &state );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( state == adStateOpen, "got %u\n", state );
+
hr = _Stream_Close( stream );
ok( hr == S_OK, "got %08x\n", hr );
+ state = 0xdeadbeef;
+ hr = _Stream_get_State( stream, &state );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( state == adStateClosed, "got %u\n", state );
+
hr = _Stream_Close( stream );
ok( hr == MAKE_ADO_HRESULT( adErrObjectClosed ), "got %08x\n", hr );
More information about the wine-cvs
mailing list