Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d9e0dde2
Commit
d9e0dde2
authored
Oct 29, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Oct 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Add IColumnsInfo interface for ICommandText.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e18045a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
3 deletions
+56
-3
session.c
dlls/msdasql/session.c
+54
-0
provider.c
dlls/msdasql/tests/provider.c
+2
-3
No files found.
dlls/msdasql/session.c
View file @
d9e0dde2
...
...
@@ -279,6 +279,7 @@ struct command
{
ICommandText
ICommandText_iface
;
ICommandProperties
ICommandProperties_iface
;
IColumnsInfo
IColumnsInfo_iface
;
LONG
refs
;
};
...
...
@@ -292,6 +293,11 @@ static inline struct command *impl_from_ICommandProperties( ICommandProperties *
return
CONTAINING_RECORD
(
iface
,
struct
command
,
ICommandProperties_iface
);
}
static
inline
struct
command
*
impl_from_IColumnsInfo
(
IColumnsInfo
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
command
,
IColumnsInfo_iface
);
}
static
HRESULT
WINAPI
command_QueryInterface
(
ICommandText
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
command
*
command
=
impl_from_ICommandText
(
iface
);
...
...
@@ -309,6 +315,10 @@ static HRESULT WINAPI command_QueryInterface(ICommandText *iface, REFIID riid, v
{
*
ppv
=
&
command
->
ICommandProperties_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IColumnsInfo
,
riid
))
{
*
ppv
=
&
command
->
IColumnsInfo_iface
;
}
if
(
*
ppv
)
{
...
...
@@ -457,6 +467,49 @@ static const ICommandPropertiesVtbl commonpropsVtbl =
command_prop_SetProperties
};
static
HRESULT
WINAPI
colsinfo_QueryInterface
(
IColumnsInfo
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
command
*
command
=
impl_from_IColumnsInfo
(
iface
);
return
ICommandText_QueryInterface
(
&
command
->
ICommandText_iface
,
riid
,
out
);
}
static
ULONG
WINAPI
colsinfo_AddRef
(
IColumnsInfo
*
iface
)
{
struct
command
*
command
=
impl_from_IColumnsInfo
(
iface
);
return
ICommandText_AddRef
(
&
command
->
ICommandText_iface
);
}
static
ULONG
WINAPI
colsinfo_Release
(
IColumnsInfo
*
iface
)
{
struct
command
*
command
=
impl_from_IColumnsInfo
(
iface
);
return
ICommandText_Release
(
&
command
->
ICommandText_iface
);
}
static
HRESULT
WINAPI
colsinfo_GetColumnInfo
(
IColumnsInfo
*
iface
,
DBORDINAL
*
columns
,
DBCOLUMNINFO
**
colinfo
,
OLECHAR
**
stringsbuffer
)
{
struct
command
*
command
=
impl_from_IColumnsInfo
(
iface
);
FIXME
(
"%p, %p, %p, %p
\n
"
,
command
,
columns
,
colinfo
,
stringsbuffer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
colsinfo_MapColumnIDs
(
IColumnsInfo
*
iface
,
DBORDINAL
column_ids
,
const
DBID
*
dbids
,
DBORDINAL
*
columns
)
{
struct
command
*
command
=
impl_from_IColumnsInfo
(
iface
);
FIXME
(
"%p, %lu, %p, %p
\n
"
,
command
,
column_ids
,
dbids
,
columns
);
return
E_NOTIMPL
;
}
static
struct
IColumnsInfoVtbl
columninfoVtbl
=
{
colsinfo_QueryInterface
,
colsinfo_AddRef
,
colsinfo_Release
,
colsinfo_GetColumnInfo
,
colsinfo_MapColumnIDs
};
static
HRESULT
WINAPI
createcommand_CreateCommand
(
IDBCreateCommand
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
IUnknown
**
out
)
{
...
...
@@ -475,6 +528,7 @@ static HRESULT WINAPI createcommand_CreateCommand(IDBCreateCommand *iface, IUnkn
command
->
ICommandText_iface
.
lpVtbl
=
&
commandVtbl
;
command
->
ICommandProperties_iface
.
lpVtbl
=
&
commonpropsVtbl
;
command
->
IColumnsInfo_iface
.
lpVtbl
=
&
columninfoVtbl
;
command
->
refs
=
1
;
hr
=
ICommandText_QueryInterface
(
&
command
->
ICommandText_iface
,
riid
,
(
void
**
)
out
);
...
...
dlls/msdasql/tests/provider.c
View file @
d9e0dde2
...
...
@@ -140,9 +140,8 @@ static void test_command_interfaces(IUnknown *cmd)
ICommandPrepare_Release
(
commandprepare
);
hr
=
IUnknown_QueryInterface
(
cmd
,
&
IID_IColumnsInfo
,
(
void
**
)
&
colinfo
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IColumnsInfo_Release
(
colinfo
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IColumnsInfo_Release
(
colinfo
);
hr
=
IUnknown_QueryInterface
(
cmd
,
&
IID_ICommandStream
,
(
void
**
)
&
commandstream
);
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x
\n
"
,
hr
);
...
...
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