mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 21:51:00 +00:00
msdasql: Support IColumnsInfo in Rowset.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3c34f073c0
commit
60c97a57c2
|
@ -413,6 +413,7 @@ struct msdasql_rowset
|
|||
{
|
||||
IRowset IRowset_iface;
|
||||
IRowsetInfo IRowsetInfo_iface;
|
||||
IColumnsInfo IColumnsInfo_iface;
|
||||
LONG refs;
|
||||
};
|
||||
|
||||
|
@ -426,6 +427,11 @@ static inline struct msdasql_rowset *impl_from_IRowsetInfo( IRowsetInfo *iface )
|
|||
return CONTAINING_RECORD( iface, struct msdasql_rowset, IRowsetInfo_iface );
|
||||
}
|
||||
|
||||
static inline struct msdasql_rowset *rowset_impl_from_IColumnsInfo( IColumnsInfo *iface )
|
||||
{
|
||||
return CONTAINING_RECORD( iface, struct msdasql_rowset, IColumnsInfo_iface );
|
||||
}
|
||||
|
||||
static HRESULT WINAPI msdasql_rowset_QueryInterface(IRowset *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
struct msdasql_rowset *rowset = impl_from_IRowset( iface );
|
||||
|
@ -442,6 +448,10 @@ static HRESULT WINAPI msdasql_rowset_QueryInterface(IRowset *iface, REFIID riid,
|
|||
{
|
||||
*ppv = &rowset->IRowsetInfo_iface;
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IColumnsInfo, riid))
|
||||
{
|
||||
*ppv = &rowset->IColumnsInfo_iface;
|
||||
}
|
||||
|
||||
if(*ppv)
|
||||
{
|
||||
|
@ -547,7 +557,7 @@ static HRESULT WINAPI rowset_info_GetProperties(IRowsetInfo *iface, const ULONG
|
|||
const DBPROPIDSET propertyidsets[], ULONG *out_count, DBPROPSET **propertysets)
|
||||
{
|
||||
struct msdasql_rowset *rowset = impl_from_IRowsetInfo( iface );
|
||||
FIXME("%p, %ld, %p, %p, %p\n", rowset, count, propertyidsets, out_count, propertysets);
|
||||
FIXME("%p, %d, %p, %p, %p\n", rowset, count, propertyidsets, out_count, propertysets);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -577,6 +587,49 @@ struct IRowsetInfoVtbl rowset_info_vtbl =
|
|||
rowset_info_GetSpecification
|
||||
};
|
||||
|
||||
static HRESULT WINAPI rowset_colsinfo_QueryInterface(IColumnsInfo *iface, REFIID riid, void **out)
|
||||
{
|
||||
struct msdasql_rowset *rowset = rowset_impl_from_IColumnsInfo( iface );
|
||||
return IRowset_QueryInterface(&rowset->IRowset_iface, riid, out);
|
||||
}
|
||||
|
||||
static ULONG WINAPI rowset_colsinfo_AddRef(IColumnsInfo *iface)
|
||||
{
|
||||
struct msdasql_rowset *rowset = rowset_impl_from_IColumnsInfo( iface );
|
||||
return IRowset_AddRef(&rowset->IRowset_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI rowset_colsinfo_Release(IColumnsInfo *iface)
|
||||
{
|
||||
struct msdasql_rowset *rowset = rowset_impl_from_IColumnsInfo( iface );
|
||||
return IRowset_Release(&rowset->IRowset_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI rowset_colsinfo_GetColumnInfo(IColumnsInfo *iface, DBORDINAL *columns,
|
||||
DBCOLUMNINFO **colinfo, OLECHAR **stringsbuffer)
|
||||
{
|
||||
struct msdasql_rowset *rowset = rowset_impl_from_IColumnsInfo( iface );
|
||||
FIXME("%p, %p, %p, %p\n", rowset, columns, colinfo, stringsbuffer);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI rowset_colsinfo_MapColumnIDs(IColumnsInfo *iface, DBORDINAL column_ids,
|
||||
const DBID *dbids, DBORDINAL *columns)
|
||||
{
|
||||
struct msdasql_rowset *rowset = rowset_impl_from_IColumnsInfo( iface );
|
||||
FIXME("%p, %lu, %p, %p\n", rowset, column_ids, dbids, columns);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static struct IColumnsInfoVtbl rowset_columninfo_vtbll =
|
||||
{
|
||||
rowset_colsinfo_QueryInterface,
|
||||
rowset_colsinfo_AddRef,
|
||||
rowset_colsinfo_Release,
|
||||
rowset_colsinfo_GetColumnInfo,
|
||||
rowset_colsinfo_MapColumnIDs
|
||||
};
|
||||
|
||||
static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFIID riid,
|
||||
DBPARAMS *params, DBROWCOUNT *affected, IUnknown **rowset)
|
||||
{
|
||||
|
@ -592,6 +645,7 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI
|
|||
|
||||
msrowset->IRowset_iface.lpVtbl = &msdasql_rowset_vtbl;
|
||||
msrowset->IRowsetInfo_iface.lpVtbl = &rowset_info_vtbl;
|
||||
msrowset->IColumnsInfo_iface.lpVtbl = &rowset_columninfo_vtbll;
|
||||
msrowset->refs = 1;
|
||||
|
||||
if (affected)
|
||||
|
|
|
@ -225,11 +225,16 @@ static void test_command_dbsession(IUnknown *cmd, IUnknown *session)
|
|||
static void test_rowset_interfaces(IRowset *rowset)
|
||||
{
|
||||
IRowsetInfo *info;
|
||||
IColumnsInfo *col_info;
|
||||
HRESULT hr;
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IRowsetInfo, (void**)&info);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
IRowsetInfo_Release(info);
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IColumnsInfo, (void**)&col_info);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
IColumnsInfo_Release(col_info);
|
||||
}
|
||||
|
||||
static void test_command_rowset(IUnknown *cmd)
|
||||
|
|
Loading…
Reference in a new issue