mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 05:31:39 +00:00
msado15: Implement _Recordset get/put MaxRecords.
This commit is contained in:
parent
794e1f1884
commit
c483e5d456
|
@ -51,6 +51,7 @@ struct recordset
|
|||
IRowset *row_set;
|
||||
EditModeEnum editmode;
|
||||
LONG cache_size;
|
||||
ADO_LONGPTR max_records;
|
||||
VARIANT filter;
|
||||
|
||||
DBTYPE *columntypes;
|
||||
|
@ -1532,14 +1533,20 @@ static HRESULT WINAPI recordset_put_LockType( _Recordset *iface, LockTypeEnum lo
|
|||
|
||||
static HRESULT WINAPI recordset_get_MaxRecords( _Recordset *iface, ADO_LONGPTR *max_records )
|
||||
{
|
||||
FIXME( "%p, %p\n", iface, max_records );
|
||||
return E_NOTIMPL;
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
TRACE( "%p, %p\n", iface, max_records );
|
||||
|
||||
*max_records = recordset->max_records;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI recordset_put_MaxRecords( _Recordset *iface, ADO_LONGPTR max_records )
|
||||
{
|
||||
FIXME( "%p, %Id\n", iface, max_records );
|
||||
return E_NOTIMPL;
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
TRACE( "%p, %Id\n", iface, max_records );
|
||||
|
||||
recordset->max_records = max_records;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI recordset_get_RecordCount( _Recordset *iface, ADO_LONGPTR *count )
|
||||
|
@ -2800,6 +2807,7 @@ HRESULT Recordset_create( void **obj )
|
|||
recordset->row_set = NULL;
|
||||
recordset->editmode = adEditNone;
|
||||
recordset->cache_size = 1;
|
||||
recordset->max_records = 0;
|
||||
VariantInit( &recordset->filter );
|
||||
recordset->columntypes = NULL;
|
||||
recordset->haccessors = NULL;
|
||||
|
|
|
@ -53,7 +53,7 @@ static void test_Recordset(void)
|
|||
Properties *props;
|
||||
Property *prop;
|
||||
LONG count, state;
|
||||
ADO_LONGPTR rec_count;
|
||||
ADO_LONGPTR rec_count, max_records;
|
||||
VARIANT missing, val, index;
|
||||
CursorLocationEnum location;
|
||||
CursorTypeEnum cursor;
|
||||
|
@ -127,6 +127,21 @@ static void test_Recordset(void)
|
|||
hr = _Recordset_put_CacheSize( recordset, 1 );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
max_records = 0;
|
||||
hr = _Recordset_get_MaxRecords( recordset, &max_records );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( max_records == 0, "got %Id\n", max_records );
|
||||
|
||||
hr = _Recordset_put_MaxRecords( recordset, 5 );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
hr = _Recordset_get_MaxRecords( recordset, &max_records );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( max_records == 5, "got %Id\n", max_records );
|
||||
|
||||
hr = _Recordset_put_MaxRecords( recordset, 0 );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
editmode = -1;
|
||||
hr = _Recordset_get_EditMode( recordset, &editmode );
|
||||
ok( hr == MAKE_ADO_HRESULT( adErrObjectClosed ), "got %08lx\n", hr );
|
||||
|
|
Loading…
Reference in a new issue