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
3c34f073
Commit
3c34f073
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: Support IRowsetInfo in IRowset interface.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6649396a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
session.c
dlls/msdasql/session.c
+63
-0
provider.c
dlls/msdasql/tests/provider.c
+12
-0
No files found.
dlls/msdasql/session.c
View file @
3c34f073
...
...
@@ -412,6 +412,7 @@ static HRESULT WINAPI command_Cancel(ICommandText *iface)
struct
msdasql_rowset
{
IRowset
IRowset_iface
;
IRowsetInfo
IRowsetInfo_iface
;
LONG
refs
;
};
...
...
@@ -420,6 +421,11 @@ static inline struct msdasql_rowset *impl_from_IRowset( IRowset *iface )
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_rowset
,
IRowset_iface
);
}
static
inline
struct
msdasql_rowset
*
impl_from_IRowsetInfo
(
IRowsetInfo
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_rowset
,
IRowsetInfo_iface
);
}
static
HRESULT
WINAPI
msdasql_rowset_QueryInterface
(
IRowset
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IRowset
(
iface
);
...
...
@@ -432,6 +438,10 @@ static HRESULT WINAPI msdasql_rowset_QueryInterface(IRowset *iface, REFIID riid,
{
*
ppv
=
&
rowset
->
IRowset_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IRowsetInfo
,
riid
))
{
*
ppv
=
&
rowset
->
IRowsetInfo_iface
;
}
if
(
*
ppv
)
{
...
...
@@ -515,6 +525,58 @@ static const struct IRowsetVtbl msdasql_rowset_vtbl =
msdasql_rowset_RestartPosition
};
static
HRESULT
WINAPI
rowset_info_QueryInterface
(
IRowsetInfo
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IRowsetInfo
(
iface
);
return
IRowset_QueryInterface
(
&
rowset
->
IRowset_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
rowset_info_AddRef
(
IRowsetInfo
*
iface
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IRowsetInfo
(
iface
);
return
IRowset_AddRef
(
&
rowset
->
IRowset_iface
);
}
static
ULONG
WINAPI
rowset_info_Release
(
IRowsetInfo
*
iface
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IRowsetInfo
(
iface
);
return
IRowset_Release
(
&
rowset
->
IRowset_iface
);
}
static
HRESULT
WINAPI
rowset_info_GetProperties
(
IRowsetInfo
*
iface
,
const
ULONG
count
,
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
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
rowset_info_GetReferencedRowset
(
IRowsetInfo
*
iface
,
DBORDINAL
ordinal
,
REFIID
riid
,
IUnknown
**
unk
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IRowsetInfo
(
iface
);
FIXME
(
"%p, %ld, %s, %p
\n
"
,
rowset
,
ordinal
,
debugstr_guid
(
riid
),
unk
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
rowset_info_GetSpecification
(
IRowsetInfo
*
iface
,
REFIID
riid
,
IUnknown
**
specification
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IRowsetInfo
(
iface
);
FIXME
(
"%p, %s, %p
\n
"
,
rowset
,
debugstr_guid
(
riid
),
specification
);
return
E_NOTIMPL
;
}
struct
IRowsetInfoVtbl
rowset_info_vtbl
=
{
rowset_info_QueryInterface
,
rowset_info_AddRef
,
rowset_info_Release
,
rowset_info_GetProperties
,
rowset_info_GetReferencedRowset
,
rowset_info_GetSpecification
};
static
HRESULT
WINAPI
command_Execute
(
ICommandText
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
DBPARAMS
*
params
,
DBROWCOUNT
*
affected
,
IUnknown
**
rowset
)
{
...
...
@@ -529,6 +591,7 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI
return
E_OUTOFMEMORY
;
msrowset
->
IRowset_iface
.
lpVtbl
=
&
msdasql_rowset_vtbl
;
msrowset
->
IRowsetInfo_iface
.
lpVtbl
=
&
rowset_info_vtbl
;
msrowset
->
refs
=
1
;
if
(
affected
)
...
...
dlls/msdasql/tests/provider.c
View file @
3c34f073
...
...
@@ -222,6 +222,16 @@ static void test_command_dbsession(IUnknown *cmd, IUnknown *session)
ICommandText_Release
(
comand_text
);
}
static
void
test_rowset_interfaces
(
IRowset
*
rowset
)
{
IRowsetInfo
*
info
;
HRESULT
hr
;
hr
=
IRowset_QueryInterface
(
rowset
,
&
IID_IRowsetInfo
,
(
void
**
)
&
info
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IRowsetInfo_Release
(
info
);
}
static
void
test_command_rowset
(
IUnknown
*
cmd
)
{
ICommandText
*
comand_text
;
...
...
@@ -258,6 +268,8 @@ static void test_command_rowset(IUnknown *cmd)
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IRowset
,
(
void
**
)
&
rowset
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
test_rowset_interfaces
(
rowset
);
IRowset_Release
(
rowset
);
IUnknown_Release
(
unk
);
}
...
...
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