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
5edd6742
Commit
5edd6742
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 IAccessor to rowset.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
60c97a57
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
0 deletions
+76
-0
session.c
dlls/msdasql/session.c
+71
-0
provider.c
dlls/msdasql/tests/provider.c
+5
-0
No files found.
dlls/msdasql/session.c
View file @
5edd6742
...
@@ -414,6 +414,7 @@ struct msdasql_rowset
...
@@ -414,6 +414,7 @@ struct msdasql_rowset
IRowset
IRowset_iface
;
IRowset
IRowset_iface
;
IRowsetInfo
IRowsetInfo_iface
;
IRowsetInfo
IRowsetInfo_iface
;
IColumnsInfo
IColumnsInfo_iface
;
IColumnsInfo
IColumnsInfo_iface
;
IAccessor
IAccessor_iface
;
LONG
refs
;
LONG
refs
;
};
};
...
@@ -432,6 +433,11 @@ static inline struct msdasql_rowset *rowset_impl_from_IColumnsInfo( IColumnsInfo
...
@@ -432,6 +433,11 @@ static inline struct msdasql_rowset *rowset_impl_from_IColumnsInfo( IColumnsInfo
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_rowset
,
IColumnsInfo_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_rowset
,
IColumnsInfo_iface
);
}
}
static
inline
struct
msdasql_rowset
*
impl_from_IAccessor
(
IAccessor
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_rowset
,
IAccessor_iface
);
}
static
HRESULT
WINAPI
msdasql_rowset_QueryInterface
(
IRowset
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
msdasql_rowset_QueryInterface
(
IRowset
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
{
struct
msdasql_rowset
*
rowset
=
impl_from_IRowset
(
iface
);
struct
msdasql_rowset
*
rowset
=
impl_from_IRowset
(
iface
);
...
@@ -452,6 +458,10 @@ static HRESULT WINAPI msdasql_rowset_QueryInterface(IRowset *iface, REFIID riid,
...
@@ -452,6 +458,10 @@ static HRESULT WINAPI msdasql_rowset_QueryInterface(IRowset *iface, REFIID riid,
{
{
*
ppv
=
&
rowset
->
IColumnsInfo_iface
;
*
ppv
=
&
rowset
->
IColumnsInfo_iface
;
}
}
else
if
(
IsEqualGUID
(
&
IID_IAccessor
,
riid
))
{
*
ppv
=
&
rowset
->
IAccessor_iface
;
}
if
(
*
ppv
)
if
(
*
ppv
)
{
{
...
@@ -630,6 +640,66 @@ static struct IColumnsInfoVtbl rowset_columninfo_vtbll =
...
@@ -630,6 +640,66 @@ static struct IColumnsInfoVtbl rowset_columninfo_vtbll =
rowset_colsinfo_MapColumnIDs
rowset_colsinfo_MapColumnIDs
};
};
static
HRESULT
WINAPI
rowset_accessor_QueryInterface
(
IAccessor
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IAccessor
(
iface
);
return
IRowset_QueryInterface
(
&
rowset
->
IRowset_iface
,
riid
,
out
);
}
static
ULONG
WINAPI
rowset_accessor_AddRef
(
IAccessor
*
iface
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IAccessor
(
iface
);
return
IRowset_AddRef
(
&
rowset
->
IRowset_iface
);
}
static
ULONG
WINAPI
rowset_accessor_Release
(
IAccessor
*
iface
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IAccessor
(
iface
);
return
IRowset_Release
(
&
rowset
->
IRowset_iface
);
}
static
HRESULT
WINAPI
rowset_accessor_AddRefAccessor
(
IAccessor
*
iface
,
HACCESSOR
accessor
,
DBREFCOUNT
*
count
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IAccessor
(
iface
);
FIXME
(
"%p, %lu, %p
\n
"
,
rowset
,
accessor
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
rowset_accessor_CreateAccessor
(
IAccessor
*
iface
,
DBACCESSORFLAGS
flags
,
DBCOUNTITEM
count
,
const
DBBINDING
bindings
[],
DBLENGTH
row_size
,
HACCESSOR
*
accessor
,
DBBINDSTATUS
status
[])
{
struct
msdasql_rowset
*
rowset
=
impl_from_IAccessor
(
iface
);
FIXME
(
"%p 0x%08x, %lu, %p, %lu, %p, %p
\n
"
,
rowset
,
flags
,
count
,
bindings
,
row_size
,
accessor
,
status
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
rowset_accessor_GetBindings
(
IAccessor
*
iface
,
HACCESSOR
accessor
,
DBACCESSORFLAGS
*
flags
,
DBCOUNTITEM
*
count
,
DBBINDING
**
bindings
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IAccessor
(
iface
);
FIXME
(
"%p %lu, %p, %p, %p
\n
"
,
rowset
,
accessor
,
flags
,
count
,
bindings
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
rowset_accessor_ReleaseAccessor
(
IAccessor
*
iface
,
HACCESSOR
accessor
,
DBREFCOUNT
*
count
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IAccessor
(
iface
);
FIXME
(
"%p, %lu, %p
\n
"
,
rowset
,
accessor
,
count
);
return
E_NOTIMPL
;
}
struct
IAccessorVtbl
accessor_vtbl
=
{
rowset_accessor_QueryInterface
,
rowset_accessor_AddRef
,
rowset_accessor_Release
,
rowset_accessor_AddRefAccessor
,
rowset_accessor_CreateAccessor
,
rowset_accessor_GetBindings
,
rowset_accessor_ReleaseAccessor
};
static
HRESULT
WINAPI
command_Execute
(
ICommandText
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
static
HRESULT
WINAPI
command_Execute
(
ICommandText
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
DBPARAMS
*
params
,
DBROWCOUNT
*
affected
,
IUnknown
**
rowset
)
DBPARAMS
*
params
,
DBROWCOUNT
*
affected
,
IUnknown
**
rowset
)
{
{
...
@@ -646,6 +716,7 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI
...
@@ -646,6 +716,7 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI
msrowset
->
IRowset_iface
.
lpVtbl
=
&
msdasql_rowset_vtbl
;
msrowset
->
IRowset_iface
.
lpVtbl
=
&
msdasql_rowset_vtbl
;
msrowset
->
IRowsetInfo_iface
.
lpVtbl
=
&
rowset_info_vtbl
;
msrowset
->
IRowsetInfo_iface
.
lpVtbl
=
&
rowset_info_vtbl
;
msrowset
->
IColumnsInfo_iface
.
lpVtbl
=
&
rowset_columninfo_vtbll
;
msrowset
->
IColumnsInfo_iface
.
lpVtbl
=
&
rowset_columninfo_vtbll
;
msrowset
->
IAccessor_iface
.
lpVtbl
=
&
accessor_vtbl
;
msrowset
->
refs
=
1
;
msrowset
->
refs
=
1
;
if
(
affected
)
if
(
affected
)
...
...
dlls/msdasql/tests/provider.c
View file @
5edd6742
...
@@ -226,6 +226,7 @@ static void test_rowset_interfaces(IRowset *rowset)
...
@@ -226,6 +226,7 @@ static void test_rowset_interfaces(IRowset *rowset)
{
{
IRowsetInfo
*
info
;
IRowsetInfo
*
info
;
IColumnsInfo
*
col_info
;
IColumnsInfo
*
col_info
;
IAccessor
*
accessor
;
HRESULT
hr
;
HRESULT
hr
;
hr
=
IRowset_QueryInterface
(
rowset
,
&
IID_IRowsetInfo
,
(
void
**
)
&
info
);
hr
=
IRowset_QueryInterface
(
rowset
,
&
IID_IRowsetInfo
,
(
void
**
)
&
info
);
...
@@ -235,6 +236,10 @@ static void test_rowset_interfaces(IRowset *rowset)
...
@@ -235,6 +236,10 @@ static void test_rowset_interfaces(IRowset *rowset)
hr
=
IRowset_QueryInterface
(
rowset
,
&
IID_IColumnsInfo
,
(
void
**
)
&
col_info
);
hr
=
IRowset_QueryInterface
(
rowset
,
&
IID_IColumnsInfo
,
(
void
**
)
&
col_info
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IColumnsInfo_Release
(
col_info
);
IColumnsInfo_Release
(
col_info
);
hr
=
IRowset_QueryInterface
(
rowset
,
&
IID_IAccessor
,
(
void
**
)
&
accessor
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IAccessor_Release
(
accessor
);
}
}
static
void
test_command_rowset
(
IUnknown
*
cmd
)
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