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
7bdef00a
Commit
7bdef00a
authored
Jan 26, 2022
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Add ITransactionJoin to session interface.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1f5b3b9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
3 deletions
+60
-3
session.c
dlls/msdasql/session.c
+58
-0
provider.c
dlls/msdasql/tests/provider.c
+2
-3
No files found.
dlls/msdasql/session.c
View file @
7bdef00a
...
...
@@ -43,6 +43,7 @@ struct msdasql_session
IOpenRowset
IOpenRowset_iface
;
ISessionProperties
ISessionProperties_iface
;
IDBCreateCommand
IDBCreateCommand_iface
;
ITransactionJoin
ITransactionJoin_iface
;
LONG
refs
;
IUnknown
*
datasource
;
...
...
@@ -75,6 +76,11 @@ static inline struct msdasql_session *impl_from_IDBCreateCommand( IDBCreateComma
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_session
,
IDBCreateCommand_iface
);
}
static
inline
struct
msdasql_session
*
impl_from_ITransactionJoin
(
ITransactionJoin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_session
,
ITransactionJoin_iface
);
}
static
HRESULT
WINAPI
session_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
msdasql_session
*
session
=
impl_from_IUnknown
(
iface
);
...
...
@@ -107,6 +113,11 @@ static HRESULT WINAPI session_QueryInterface(IUnknown *iface, REFIID riid, void
TRACE
(
"(%p)->(IDBCreateCommand_iface %p)
\n
"
,
iface
,
ppv
);
*
ppv
=
&
session
->
IDBCreateCommand_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_ITransactionJoin
,
riid
))
{
TRACE
(
"(%p)->(ITransactionJoin %p)
\n
"
,
iface
,
ppv
);
*
ppv
=
&
session
->
ITransactionJoin_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IBindResource
,
riid
))
{
TRACE
(
"(%p)->(IID_IBindResource not support)
\n
"
,
iface
);
...
...
@@ -1191,6 +1202,52 @@ static const IDBCreateCommandVtbl createcommandVtbl =
createcommand_CreateCommand
};
static
HRESULT
WINAPI
transjoin_QueryInterface
(
ITransactionJoin
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
msdasql_session
*
session
=
impl_from_ITransactionJoin
(
iface
);
return
IUnknown_QueryInterface
(
&
session
->
session_iface
,
riid
,
out
);
}
static
ULONG
WINAPI
transjoin_AddRef
(
ITransactionJoin
*
iface
)
{
struct
msdasql_session
*
session
=
impl_from_ITransactionJoin
(
iface
);
return
IUnknown_AddRef
(
&
session
->
session_iface
);
}
static
ULONG
WINAPI
transjoin_Release
(
ITransactionJoin
*
iface
)
{
struct
msdasql_session
*
session
=
impl_from_ITransactionJoin
(
iface
);
return
IUnknown_Release
(
&
session
->
session_iface
);
}
static
HRESULT
WINAPI
transjoin_GetOptionsObject
(
ITransactionJoin
*
iface
,
ITransactionOptions
**
options
)
{
struct
msdasql_session
*
session
=
impl_from_ITransactionJoin
(
iface
);
FIXME
(
"%p, %p
\n
"
,
session
,
options
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
transjoin_JoinTransaction
(
ITransactionJoin
*
iface
,
IUnknown
*
unk
,
ISOLEVEL
level
,
ULONG
flags
,
ITransactionOptions
*
options
)
{
struct
msdasql_session
*
session
=
impl_from_ITransactionJoin
(
iface
);
FIXME
(
"%p, %p, %d, 0x%08x, %p
\n
"
,
session
,
unk
,
level
,
flags
,
options
);
return
E_NOTIMPL
;
}
static
const
ITransactionJoinVtbl
transactionjoinVtbl
=
{
transjoin_QueryInterface
,
transjoin_AddRef
,
transjoin_Release
,
transjoin_GetOptionsObject
,
transjoin_JoinTransaction
};
HRESULT
create_db_session
(
REFIID
riid
,
IUnknown
*
datasource
,
HDBC
hdbc
,
void
**
unk
)
{
struct
msdasql_session
*
session
;
...
...
@@ -1205,6 +1262,7 @@ HRESULT create_db_session(REFIID riid, IUnknown *datasource, HDBC hdbc, void **u
session
->
IOpenRowset_iface
.
lpVtbl
=
&
openrowsetVtbl
;
session
->
ISessionProperties_iface
.
lpVtbl
=
&
propertiesVtbl
;
session
->
IDBCreateCommand_iface
.
lpVtbl
=
&
createcommandVtbl
;
session
->
ITransactionJoin_iface
.
lpVtbl
=
&
transactionjoinVtbl
;
IUnknown_QueryInterface
(
datasource
,
&
IID_IUnknown
,
(
void
**
)
&
session
->
datasource
);
session
->
refs
=
1
;
session
->
hdbc
=
hdbc
;
...
...
dlls/msdasql/tests/provider.c
View file @
7bdef00a
...
...
@@ -494,9 +494,8 @@ static void test_sessions(void)
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IUnknown_QueryInterface
(
session
,
&
IID_ITransactionJoin
,
(
void
**
)
&
join
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
ITransactionJoin_Release
(
join
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ITransactionJoin_Release
(
join
);
hr
=
IUnknown_QueryInterface
(
session
,
&
IID_IBindResource
,
(
void
**
)
&
unimplemented
);
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