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
0d29647f
Commit
0d29647f
authored
Nov 16, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Nov 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Add ICommandWithParameters to command interface.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b2f12a34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
0 deletions
+67
-0
session.c
dlls/msdasql/session.c
+62
-0
provider.c
dlls/msdasql/tests/provider.c
+5
-0
No files found.
dlls/msdasql/session.c
View file @
0d29647f
...
...
@@ -426,6 +426,7 @@ struct msdasql_rowset
IColumnsInfo
IColumnsInfo_iface
;
IAccessor
IAccessor_iface
;
IColumnsRowset
IColumnsRowset_iface
;
ICommandWithParameters
ICommandWithParameters_iface
;
IUnknown
*
caller
;
LONG
refs
;
};
...
...
@@ -455,6 +456,11 @@ static inline struct msdasql_rowset *impl_from_IColumnsRowset ( IColumnsRowset *
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_rowset
,
IColumnsRowset_iface
);
}
static
inline
struct
msdasql_rowset
*
impl_from_ICommandWithParameters
(
ICommandWithParameters
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_rowset
,
ICommandWithParameters_iface
);
}
static
HRESULT
WINAPI
msdasql_rowset_QueryInterface
(
IRowset
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_IRowset
(
iface
);
...
...
@@ -483,6 +489,10 @@ static HRESULT WINAPI msdasql_rowset_QueryInterface(IRowset *iface, REFIID riid,
{
*
ppv
=
&
rowset
->
IColumnsRowset_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_ICommandWithParameters
,
riid
))
{
*
ppv
=
&
rowset
->
ICommandWithParameters_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IRowsetChange
,
riid
))
{
TRACE
(
"IID_IRowsetChange not supported
\n
"
);
...
...
@@ -791,6 +801,57 @@ struct IColumnsRowsetVtbl columnrs_rs_vtbl =
column_rs_GetColumnsRowset
};
static
HRESULT
WINAPI
cmd_with_params_QueryInterface
(
ICommandWithParameters
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_ICommandWithParameters
(
iface
);
return
IRowset_QueryInterface
(
&
rowset
->
IRowset_iface
,
riid
,
out
);
}
static
ULONG
WINAPI
cmd_with_params_AddRef
(
ICommandWithParameters
*
iface
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_ICommandWithParameters
(
iface
);
return
IRowset_AddRef
(
&
rowset
->
IRowset_iface
);
}
static
ULONG
WINAPI
cmd_with_params_Release
(
ICommandWithParameters
*
iface
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_ICommandWithParameters
(
iface
);
return
IRowset_Release
(
&
rowset
->
IRowset_iface
);
}
static
HRESULT
WINAPI
cmd_with_params_GetParameterInfo
(
ICommandWithParameters
*
iface
,
DB_UPARAMS
*
uparams
,
DBPARAMINFO
**
info
,
OLECHAR
**
buffer
)
{
struct
msdasql_rowset
*
rowset
=
impl_from_ICommandWithParameters
(
iface
);
FIXME
(
"%p, %p, %p, %p
\n
"
,
rowset
,
uparams
,
info
,
buffer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
cmd_with_params_MapParameterNames
(
ICommandWithParameters
*
iface
,
DB_UPARAMS
uparams
,
LPCWSTR
names
[],
DB_LPARAMS
ordinals
[])
{
struct
msdasql_rowset
*
rowset
=
impl_from_ICommandWithParameters
(
iface
);
FIXME
(
"%p, %ld, %p, %p
\n
"
,
rowset
,
uparams
,
names
,
ordinals
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
cmd_with_params_SetParameterInfo
(
ICommandWithParameters
*
iface
,
DB_UPARAMS
uparams
,
const
DB_UPARAMS
ordinals
[],
const
DBPARAMBINDINFO
bindinfo
[])
{
struct
msdasql_rowset
*
rowset
=
impl_from_ICommandWithParameters
(
iface
);
FIXME
(
"%p, %ld, %p, %p
\n
"
,
rowset
,
uparams
,
ordinals
,
bindinfo
);
return
E_NOTIMPL
;
}
struct
ICommandWithParametersVtbl
command_with_params_vtbl
=
{
cmd_with_params_QueryInterface
,
cmd_with_params_AddRef
,
cmd_with_params_Release
,
cmd_with_params_GetParameterInfo
,
cmd_with_params_MapParameterNames
,
cmd_with_params_SetParameterInfo
};
static
HRESULT
WINAPI
command_Execute
(
ICommandText
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
DBPARAMS
*
params
,
DBROWCOUNT
*
affected
,
IUnknown
**
rowset
)
...
...
@@ -810,6 +871,7 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI
msrowset
->
IColumnsInfo_iface
.
lpVtbl
=
&
rowset_columninfo_vtbll
;
msrowset
->
IAccessor_iface
.
lpVtbl
=
&
accessor_vtbl
;
msrowset
->
IColumnsRowset_iface
.
lpVtbl
=
&
columnrs_rs_vtbl
;
msrowset
->
ICommandWithParameters_iface
.
lpVtbl
=
&
command_with_params_vtbl
;
msrowset
->
refs
=
1
;
ICommandText_QueryInterface
(
iface
,
&
IID_IUnknown
,
(
void
**
)
&
msrowset
->
caller
);
...
...
dlls/msdasql/tests/provider.c
View file @
0d29647f
...
...
@@ -193,12 +193,17 @@ static void test_command_interfaces(IUnknown *cmd)
ICommandStream
*
commandstream
;
IColumnsInfo
*
colinfo
;
IMultipleResults
*
multiple
;
ICommandWithParameters
*
cmdwithparams
;
IUnknown
*
unk
;
hr
=
IUnknown_QueryInterface
(
cmd
,
&
IID_ICommandProperties
,
(
void
**
)
&
commandProp
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ICommandProperties_Release
(
commandProp
);
hr
=
IUnknown_QueryInterface
(
cmd
,
&
IID_ICommandWithParameters
,
(
void
**
)
&
cmdwithparams
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ICommandWithParameters_Release
(
cmdwithparams
);
hr
=
IUnknown_QueryInterface
(
cmd
,
&
IID_ICommandText
,
(
void
**
)
&
comand_text
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ICommandText_Release
(
comand_text
);
...
...
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