Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/msado15/recordset.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 5ad593dce5c..2a4c23055a8 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -46,6 +46,7 @@ struct recordset VARIANT *data; CursorLocationEnum cursor_location; CursorTypeEnum cursor_type; + IUnknown *row_set; };
struct fields @@ -757,6 +758,8 @@ static void close_recordset( struct recordset *recordset ) { ULONG row, col, col_count;
+ if (recordset->row_set) IUnknown_Release(recordset->row_set); + if (!recordset->fields) return; col_count = get_column_count( recordset );
@@ -1611,15 +1614,26 @@ static HRESULT WINAPI rsconstruction_Invoke(ADORecordsetConstruction *iface, DIS static HRESULT WINAPI rsconstruction_get_Rowset(ADORecordsetConstruction *iface, IUnknown **row_set) { struct recordset *recordset = impl_from_ADORecordsetConstruction( iface ); - FIXME("%p, %p\n", recordset, row_set); - return E_NOTIMPL; + + TRACE("%p, %p\n", recordset, row_set); + + *row_set = recordset->row_set; + if (recordset->row_set) IUnknown_AddRef(recordset->row_set); + + return S_OK; }
static HRESULT WINAPI rsconstruction_put_Rowset(ADORecordsetConstruction *iface, IUnknown *row_set) { struct recordset *recordset = impl_from_ADORecordsetConstruction( iface ); - FIXME("%p, %p\n", recordset, row_set); - return E_NOTIMPL; + + TRACE("%p, %p\n", recordset, row_set); + + if (recordset->row_set) IUnknown_Release(recordset->row_set); + recordset->row_set = row_set; + if (recordset->row_set) IUnknown_AddRef(recordset->row_set); + + return S_OK; }
static HRESULT WINAPI rsconstruction_get_Chapter(ADORecordsetConstruction *iface, LONG *chapter) @@ -1679,6 +1693,7 @@ HRESULT Recordset_create( void **obj ) recordset->index = -1; recordset->cursor_location = adUseServer; recordset->cursor_type = adOpenForwardOnly; + recordset->row_set = NULL;
*obj = &recordset->Recordset_iface; TRACE( "returning iface %p\n", *obj );