Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c56b4389
Commit
c56b4389
authored
Nov 02, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Nov 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Add IColumnsRowset support to rowset.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5edd6742
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
session.c
dlls/msdasql/session.c
+55
-0
provider.c
dlls/msdasql/tests/provider.c
+5
-0
No files found.
dlls/msdasql/session.c
View file @
c56b4389
...
...
@@ -415,6 +415,7 @@ struct msdasql_rowset
IRowsetInfo
IRowsetInfo_iface
;
IColumnsInfo
IColumnsInfo_iface
;
IAccessor
IAccessor_iface
;
IColumnsRowset
IColumnsRowset_iface
;
LONG
refs
;
};
...
...
@@ -438,6 +439,11 @@ static inline struct msdasql_rowset *impl_from_IAccessor ( IAccessor *iface )
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_rowset
,
IAccessor_iface
);
}
static
inline
struct
msdasql_rowset
*
impl_from_IColumnsRowset
(
IColumnsRowset
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_rowset
,
IColumnsRowset_iface
);
}
static
HRESULT
WINAPI
msdasql_rowset_QueryInterface
(
IRowset
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IRowset
(
iface
);
...
...
@@ -462,6 +468,10 @@ static HRESULT WINAPI msdasql_rowset_QueryInterface(IRowset *iface, REFIID riid,
{
*
ppv
=
&
rowset
->
IAccessor_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IColumnsRowset
,
riid
))
{
*
ppv
=
&
rowset
->
IColumnsRowset_iface
;
}
if
(
*
ppv
)
{
...
...
@@ -700,6 +710,50 @@ struct IAccessorVtbl accessor_vtbl =
rowset_accessor_ReleaseAccessor
};
static
HRESULT
WINAPI
column_rs_QueryInterface
(
IColumnsRowset
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IColumnsRowset
(
iface
);
return
IRowset_QueryInterface
(
&
rowset
->
IRowset_iface
,
riid
,
out
);
}
static
ULONG
WINAPI
column_rs_AddRef
(
IColumnsRowset
*
iface
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IColumnsRowset
(
iface
);
return
IRowset_AddRef
(
&
rowset
->
IRowset_iface
);
}
static
ULONG
WINAPI
column_rs_Release
(
IColumnsRowset
*
iface
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IColumnsRowset
(
iface
);
return
IRowset_Release
(
&
rowset
->
IRowset_iface
);
}
static
HRESULT
WINAPI
column_rs_GetAvailableColumns
(
IColumnsRowset
*
iface
,
DBORDINAL
*
count
,
DBID
**
columns
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IColumnsRowset
(
iface
);
FIXME
(
"%p, %p, %p
\n
"
,
rowset
,
count
,
columns
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
column_rs_GetColumnsRowset
(
IColumnsRowset
*
iface
,
IUnknown
*
outer
,
DBORDINAL
count
,
const
DBID
columns
[],
REFIID
riid
,
ULONG
property_cnt
,
DBPROPSET
property_sets
[],
IUnknown
**
unk_rs
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IColumnsRowset
(
iface
);
FIXME
(
"(%p)->(%p %ld %p %s %u, %p %p): stub
\n
"
,
rowset
,
outer
,
count
,
columns
,
debugstr_guid
(
riid
),
property_cnt
,
property_sets
,
unk_rs
);
return
E_NOTIMPL
;
}
struct
IColumnsRowsetVtbl
columnrs_rs_vtbl
=
{
column_rs_QueryInterface
,
column_rs_AddRef
,
column_rs_Release
,
column_rs_GetAvailableColumns
,
column_rs_GetColumnsRowset
};
static
HRESULT
WINAPI
command_Execute
(
ICommandText
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
DBPARAMS
*
params
,
DBROWCOUNT
*
affected
,
IUnknown
**
rowset
)
{
...
...
@@ -717,6 +771,7 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI
msrowset
->
IRowsetInfo_iface
.
lpVtbl
=
&
rowset_info_vtbl
;
msrowset
->
IColumnsInfo_iface
.
lpVtbl
=
&
rowset_columninfo_vtbll
;
msrowset
->
IAccessor_iface
.
lpVtbl
=
&
accessor_vtbl
;
msrowset
->
IColumnsRowset_iface
.
lpVtbl
=
&
columnrs_rs_vtbl
;
msrowset
->
refs
=
1
;
if
(
affected
)
...
...
dlls/msdasql/tests/provider.c
View file @
c56b4389
...
...
@@ -226,6 +226,7 @@ static void test_rowset_interfaces(IRowset *rowset)
{
IRowsetInfo
*
info
;
IColumnsInfo
*
col_info
;
IColumnsRowset
*
col_rs
;
IAccessor
*
accessor
;
HRESULT
hr
;
...
...
@@ -240,6 +241,10 @@ static void test_rowset_interfaces(IRowset *rowset)
hr
=
IRowset_QueryInterface
(
rowset
,
&
IID_IAccessor
,
(
void
**
)
&
accessor
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IAccessor_Release
(
accessor
);
hr
=
IRowset_QueryInterface
(
rowset
,
&
IID_IColumnsRowset
,
(
void
**
)
&
col_rs
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IColumnsRowset_Release
(
col_rs
);
}
static
void
test_command_rowset
(
IUnknown
*
cmd
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment