mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 06:58:15 +00:00
msado15: Implement _Recordset::get_ActiveConnection.
This commit is contained in:
parent
e06780c3a7
commit
a1610861ff
|
@ -39,6 +39,7 @@ struct recordset
|
|||
ADORecordsetConstruction ADORecordsetConstruction_iface;
|
||||
ISupportErrorInfo ISupportErrorInfo_iface;
|
||||
LONG refs;
|
||||
VARIANT active_connection;
|
||||
LONG state;
|
||||
struct fields *fields;
|
||||
LONG count;
|
||||
|
@ -1401,8 +1402,9 @@ static HRESULT WINAPI recordset_put_ActiveConnection( _Recordset *iface, VARIANT
|
|||
|
||||
static HRESULT WINAPI recordset_get_ActiveConnection( _Recordset *iface, VARIANT *connection )
|
||||
{
|
||||
FIXME( "%p, %p\n", iface, connection );
|
||||
return E_NOTIMPL;
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
TRACE( "%p, %p\n", iface, connection );
|
||||
return VariantCopy(connection, &recordset->active_connection);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI recordset_get_BOF( _Recordset *iface, VARIANT_BOOL *bof )
|
||||
|
@ -2737,6 +2739,8 @@ HRESULT Recordset_create( void **obj )
|
|||
recordset->Recordset_iface.lpVtbl = &recordset_vtbl;
|
||||
recordset->ISupportErrorInfo_iface.lpVtbl = &recordset_supporterrorinfo_vtbl;
|
||||
recordset->ADORecordsetConstruction_iface.lpVtbl = &rsconstruction_vtbl;
|
||||
V_VT(&recordset->active_connection) = VT_DISPATCH;
|
||||
V_DISPATCH(&recordset->active_connection) = NULL;
|
||||
recordset->refs = 1;
|
||||
recordset->index = -1;
|
||||
recordset->cursor_location = adUseServer;
|
||||
|
|
|
@ -59,7 +59,7 @@ static void test_Recordset(void)
|
|||
CursorTypeEnum cursor;
|
||||
BSTR name;
|
||||
HRESULT hr;
|
||||
VARIANT bookmark, filter;
|
||||
VARIANT bookmark, filter, active;
|
||||
EditModeEnum editmode;
|
||||
|
||||
hr = CoCreateInstance( &CLSID_Recordset, NULL, CLSCTX_INPROC_SERVER, &IID__Recordset, (void **)&recordset );
|
||||
|
@ -222,6 +222,18 @@ static void test_Recordset(void)
|
|||
ok( is_eof( recordset ), "not eof\n" );
|
||||
ok( is_bof( recordset ), "not bof\n" );
|
||||
|
||||
if (0)
|
||||
{ /* Causes a crash */
|
||||
hr = _Recordset_get_ActiveConnection( recordset, NULL );
|
||||
}
|
||||
|
||||
VariantInit(&active);
|
||||
hr = _Recordset_get_ActiveConnection( recordset, &active );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( V_VT(&active) == VT_DISPATCH, "got %d\n", V_VT(&active) );
|
||||
ok( V_DISPATCH(&active) == NULL, "got %p\n", V_DISPATCH(&active) );
|
||||
VariantClear(&active);
|
||||
|
||||
editmode = -1;
|
||||
hr = _Recordset_get_EditMode( recordset, &editmode );
|
||||
ok( hr == MAKE_ADO_HRESULT( adErrNoCurrentRecord ), "got %08lx\n", hr );
|
||||
|
|
Loading…
Reference in a new issue