Hans Leidekker : msado15: Implement _Recordset_get_State.
Module: wine Branch: master Commit: 435d0924eb8099d85745c9c514cdb2fb838004ec URL: https://source.winehq.org/git/wine.git/?a=commit;h=435d0924eb8099d85745c9c51... Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Dec 13 15:52:25 2019 +0100 msado15: Implement _Recordset_get_State. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msado15/recordset.c | 8 ++++++-- dlls/msado15/tests/msado15.c | 13 +++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index f1c864cdd9..0f0cb24759 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -1075,8 +1075,12 @@ static HRESULT WINAPI recordset_get_Status( _Recordset *iface, LONG *status ) static HRESULT WINAPI recordset_get_State( _Recordset *iface, LONG *state ) { - FIXME( "%p, %p\n", iface, state ); - return E_NOTIMPL; + struct recordset *recordset = impl_from_Recordset( iface ); + + TRACE( "%p, %p\n", recordset, state ); + + *state = recordset->state; + return S_OK; } static HRESULT WINAPI recordset__xClone( _Recordset *iface, _Recordset **obj ) diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index 3b1e953dc7..b0ca9cf2a5 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -100,8 +100,8 @@ static void test_Recordset(void) state = -1; hr = _Recordset_get_State( recordset, &state ); - todo_wine ok( hr == S_OK, "got %08x\n", hr ); - todo_wine ok( state == adStateClosed, "got %d\n", state ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( state == adStateClosed, "got %d\n", state ); VariantInit( &missing ); hr = _Recordset_AddNew( recordset, missing, missing ); @@ -125,8 +125,8 @@ static void test_Recordset(void) state = -1; hr = _Recordset_get_State( recordset, &state ); - todo_wine ok( hr == S_OK, "got %08x\n", hr ); - todo_wine ok( state == adStateOpen, "got %d\n", state ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( state == adStateOpen, "got %d\n", state ); hr = _Recordset_AddNew( recordset, missing, missing ); ok( hr == S_OK, "got %08x\n", hr ); @@ -134,6 +134,11 @@ static void test_Recordset(void) hr = _Recordset_Close( recordset ); ok( hr == S_OK, "got %08x\n", hr ); + state = -1; + hr = _Recordset_get_State( recordset, &state ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( state == adStateClosed, "got %d\n", state ); + Fields_Release( fields ); _Recordset_Release( recordset ); }
participants (1)
-
Alexandre Julliard