mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 04:48:36 +00:00
msado15: Implement _Recordset get/put CacheSize.
This commit is contained in:
parent
9dd9c455d3
commit
794e1f1884
|
@ -50,6 +50,7 @@ struct recordset
|
|||
CursorTypeEnum cursor_type;
|
||||
IRowset *row_set;
|
||||
EditModeEnum editmode;
|
||||
LONG cache_size;
|
||||
VARIANT filter;
|
||||
|
||||
DBTYPE *columntypes;
|
||||
|
@ -1449,14 +1450,20 @@ static HRESULT WINAPI recordset_put_Bookmark( _Recordset *iface, VARIANT bookmar
|
|||
|
||||
static HRESULT WINAPI recordset_get_CacheSize( _Recordset *iface, LONG *size )
|
||||
{
|
||||
FIXME( "%p, %p\n", iface, size );
|
||||
return E_NOTIMPL;
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
TRACE( "%p, %p\n", iface, size );
|
||||
|
||||
*size = recordset->cache_size;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI recordset_put_CacheSize( _Recordset *iface, LONG size )
|
||||
{
|
||||
FIXME( "%p, %ld\n", iface, size );
|
||||
return E_NOTIMPL;
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
TRACE( "%p, %ld\n", iface, size );
|
||||
|
||||
recordset->cache_size = size;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI recordset_get_CursorType( _Recordset *iface, CursorTypeEnum *cursor_type )
|
||||
|
@ -2792,6 +2799,7 @@ HRESULT Recordset_create( void **obj )
|
|||
recordset->cursor_type = adOpenForwardOnly;
|
||||
recordset->row_set = NULL;
|
||||
recordset->editmode = adEditNone;
|
||||
recordset->cache_size = 1;
|
||||
VariantInit( &recordset->filter );
|
||||
recordset->columntypes = NULL;
|
||||
recordset->haccessors = NULL;
|
||||
|
|
|
@ -61,6 +61,7 @@ static void test_Recordset(void)
|
|||
HRESULT hr;
|
||||
VARIANT bookmark, filter, active;
|
||||
EditModeEnum editmode;
|
||||
LONG cache_size;
|
||||
|
||||
hr = CoCreateInstance( &CLSID_Recordset, NULL, CLSCTX_INPROC_SERVER, &IID__Recordset, (void **)&recordset );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
@ -111,6 +112,21 @@ static void test_Recordset(void)
|
|||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( cursor == adOpenForwardOnly, "got %d\n", cursor );
|
||||
|
||||
cache_size = 0;
|
||||
hr = _Recordset_get_CacheSize( recordset, &cache_size );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( cache_size == 1, "got %ld\n", cache_size );
|
||||
|
||||
hr = _Recordset_put_CacheSize( recordset, 5 );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
hr = _Recordset_get_CacheSize( recordset, &cache_size );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( cache_size == 5, "got %ld\n", cache_size );
|
||||
|
||||
hr = _Recordset_put_CacheSize( recordset, 1 );
|
||||
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