[PATCH 2/8] msado15: Implement _Recordset_get_State.
Hans Leidekker
hans at codeweavers.com
Fri Dec 13 08:52:25 CST 2019
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
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 83bea8ca78..855f138e47 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 );
hr = _Recordset_AddNew( recordset, missing, missing );
ok( hr == MAKE_ADO_HRESULT( adErrObjectClosed ), "got %08x\n", hr );
@@ -124,8 +124,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 );
@@ -133,6 +133,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 );
}
--
2.20.1
More information about the wine-devel
mailing list