[PATCH v2] msado15: Semi-stub _Recordset Open
Hans Leidekker
hans at codeweavers.com
Wed Feb 24 04:03:46 CST 2021
On Wed, 2021-02-24 at 20:30 +1100, Alistair Leslie-Hughes wrote:
> diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c
> index 12bb9680258..6064908bb28 100644
> --- a/dlls/msado15/recordset.c
> +++ b/dlls/msado15/recordset.c
> @@ -1182,15 +1182,62 @@ static HRESULT WINAPI recordset_Open( _Recordset *iface, VARIANT source, VARIANT
> CursorTypeEnum cursor_type, LockTypeEnum lock_type, LONG options )
> {
> struct recordset *recordset = impl_from_Recordset( iface );
> + ADOConnectionConstruction15 *construct;
> + IUnknown *session;
> + ICommandText *command_text;
> + DBROWCOUNT affected;
> + IUnknown *rowset;
> + HRESULT hr;
>
> - FIXME( "%p, %s, %s, %d, %d, %d\n", recordset, debugstr_variant(&source), debugstr_variant(&active_connection),
> + FIXME( "%p, %s, %s, %d, %d, %d Semi-stub\n", recordset, debugstr_variant(&source), debugstr_variant(&active_connection),
> cursor_type, lock_type, options );
>
> - if (!recordset->fields) return MAKE_ADO_HRESULT( adErrInvalidConnection );
> if (recordset->state == adStateOpen) return MAKE_ADO_HRESULT( adErrObjectOpen );
>
> + if (recordset->fields)
> + {
> + recordset->state = adStateOpen;
> + return S_OK;
> + }
> +
> + if (V_VT(&active_connection) != VT_DISPATCH)
> + {
> + FIXME("Unsupported Active connection type %d\n", V_VT(&active_connection));
> + return MAKE_ADO_HRESULT( adErrInvalidConnection );
> + }
> +
> + hr = IDispatch_QueryInterface(V_DISPATCH(&active_connection), &IID_ADOConnectionConstruction15, (void**)&construct);
> + if (FAILED(hr))
> + return E_FAIL;
> +
> + hr = ADOConnectionConstruction15_get_Session(construct, &session);
> + ADOConnectionConstruction15_Release(construct);
> + if (FAILED(hr))
> + return E_FAIL;
> +
> + if (V_VT(&source) != VT_BSTR)
> + {
> + FIXME("Unsupported source type!\n");
> + return E_FAIL;
> + }
session should be released here.
More information about the wine-devel
mailing list