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
9e76b504
Commit
9e76b504
authored
Nov 03, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Nov 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Support IAccessor in IRowset for Enumeration.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cf82bc54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
1 deletion
+82
-1
msdasql_main.c
dlls/msdasql/msdasql_main.c
+81
-0
database.c
dlls/oledb32/tests/database.c
+1
-1
No files found.
dlls/msdasql/msdasql_main.c
View file @
9e76b504
...
...
@@ -609,6 +609,7 @@ static ULONG WINAPI msdasql_enum_Release(ISourcesRowset *iface)
struct
msdasql_enum_rowset
{
IRowset
IRowset_iface
;
IAccessor
IAccessor_iface
;
LONG
ref
;
};
...
...
@@ -617,6 +618,11 @@ static inline struct msdasql_enum_rowset *msdasql_rs_from_IRowset(IRowset *iface
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_enum_rowset
,
IRowset_iface
);
}
static
inline
struct
msdasql_enum_rowset
*
msdasql_enum_from_IAccessor
(
IAccessor
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_enum_rowset
,
IAccessor_iface
);
}
static
HRESULT
WINAPI
enum_rowset_QueryInterface
(
IRowset
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
msdasql_enum_rowset
*
rowset
=
msdasql_rs_from_IRowset
(
iface
);
...
...
@@ -629,6 +635,10 @@ static HRESULT WINAPI enum_rowset_QueryInterface(IRowset *iface, REFIID riid, v
{
*
ppv
=
&
rowset
->
IRowset_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IAccessor
,
riid
))
{
*
ppv
=
&
rowset
->
IAccessor_iface
;
}
if
(
*
ppv
)
{
...
...
@@ -729,6 +739,76 @@ static const struct IRowsetVtbl enum_rowset_vtbl =
enum_rowset_RestartPosition
};
static
HRESULT
WINAPI
enum_rs_accessor_QueryInterface
(
IAccessor
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
msdasql_enum_rowset
*
rowset
=
msdasql_enum_from_IAccessor
(
iface
);
return
IRowset_QueryInterface
(
&
rowset
->
IRowset_iface
,
riid
,
out
);
}
static
ULONG
WINAPI
enum_rs_accessor_AddRef
(
IAccessor
*
iface
)
{
struct
msdasql_enum_rowset
*
rowset
=
msdasql_enum_from_IAccessor
(
iface
);
return
IRowset_AddRef
(
&
rowset
->
IRowset_iface
);
}
static
ULONG
WINAPI
enum_rs_accessor_Release
(
IAccessor
*
iface
)
{
struct
msdasql_enum_rowset
*
rowset
=
msdasql_enum_from_IAccessor
(
iface
);
return
IRowset_Release
(
&
rowset
->
IRowset_iface
);
}
static
HRESULT
WINAPI
enum_rs_accessor_AddRefAccessor
(
IAccessor
*
iface
,
HACCESSOR
accessor
,
DBREFCOUNT
*
count
)
{
struct
msdasql_enum_rowset
*
rowset
=
msdasql_enum_from_IAccessor
(
iface
);
FIXME
(
"%p, %lu, %p
\n
"
,
rowset
,
accessor
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
enum_rs_accessor_CreateAccessor
(
IAccessor
*
iface
,
DBACCESSORFLAGS
flags
,
DBCOUNTITEM
count
,
const
DBBINDING
bindings
[],
DBLENGTH
row_size
,
HACCESSOR
*
accessor
,
DBBINDSTATUS
status
[])
{
struct
msdasql_enum_rowset
*
rowset
=
msdasql_enum_from_IAccessor
(
iface
);
FIXME
(
"%p 0x%08x, %lu, %p, %lu, %p, %p
\n
"
,
rowset
,
flags
,
count
,
bindings
,
row_size
,
accessor
,
status
);
if
(
accessor
)
*
accessor
=
0xdeadbeef
;
return
S_OK
;
}
static
HRESULT
WINAPI
enum_rs_accessor_GetBindings
(
IAccessor
*
iface
,
HACCESSOR
accessor
,
DBACCESSORFLAGS
*
flags
,
DBCOUNTITEM
*
count
,
DBBINDING
**
bindings
)
{
struct
msdasql_enum_rowset
*
rowset
=
msdasql_enum_from_IAccessor
(
iface
);
FIXME
(
"%p %lu, %p, %p, %p
\n
"
,
rowset
,
accessor
,
flags
,
count
,
bindings
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
enum_rs_accessor_ReleaseAccessor
(
IAccessor
*
iface
,
HACCESSOR
accessor
,
DBREFCOUNT
*
count
)
{
struct
msdasql_enum_rowset
*
rowset
=
msdasql_enum_from_IAccessor
(
iface
);
FIXME
(
"%p, %lu, %p
\n
"
,
rowset
,
accessor
,
count
);
if
(
count
)
*
count
=
0
;
return
S_OK
;
}
struct
IAccessorVtbl
enum_accessor_vtbl
=
{
enum_rs_accessor_QueryInterface
,
enum_rs_accessor_AddRef
,
enum_rs_accessor_Release
,
enum_rs_accessor_AddRefAccessor
,
enum_rs_accessor_CreateAccessor
,
enum_rs_accessor_GetBindings
,
enum_rs_accessor_ReleaseAccessor
};
static
HRESULT
WINAPI
msdasql_enum_GetSourcesRowset
(
ISourcesRowset
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
ULONG
sets
,
DBPROPSET
properties
[],
IUnknown
**
rowset
)
{
...
...
@@ -740,6 +820,7 @@ static HRESULT WINAPI msdasql_enum_GetSourcesRowset(ISourcesRowset *iface, IUnkn
enum_rs
=
malloc
(
sizeof
(
*
enum_rs
));
enum_rs
->
IRowset_iface
.
lpVtbl
=
&
enum_rowset_vtbl
;
enum_rs
->
IAccessor_iface
.
lpVtbl
=
&
enum_accessor_vtbl
;
enum_rs
->
ref
=
1
;
hr
=
IRowset_QueryInterface
(
&
enum_rs
->
IRowset_iface
,
riid
,
(
void
**
)
rowset
);
...
...
dlls/oledb32/tests/database.c
View file @
9e76b504
...
...
@@ -1080,7 +1080,7 @@ static void test_odbc_enumerator(void)
IRowsetInfo
*
info
;
hr
=
IRowset_QueryInterface
(
rowset
,
&
IID_IAccessor
,
(
void
**
)
&
accessor
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IAccessor_Release
(
accessor
);
...
...
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