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
35cf06c3
Commit
35cf06c3
authored
Feb 01, 2022
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Add ITransaction to session interface.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0b977672
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
3 deletions
+70
-3
session.c
dlls/msdasql/session.c
+68
-0
provider.c
dlls/msdasql/tests/provider.c
+2
-3
No files found.
dlls/msdasql/session.c
View file @
35cf06c3
...
...
@@ -44,6 +44,7 @@ struct msdasql_session
ISessionProperties
ISessionProperties_iface
;
IDBCreateCommand
IDBCreateCommand_iface
;
ITransactionJoin
ITransactionJoin_iface
;
ITransaction
ITransaction_iface
;
LONG
refs
;
IUnknown
*
datasource
;
...
...
@@ -81,6 +82,11 @@ static inline struct msdasql_session *impl_from_ITransactionJoin( ITransactionJo
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_session
,
ITransactionJoin_iface
);
}
static
inline
struct
msdasql_session
*
impl_from_ITransaction
(
ITransaction
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_session
,
ITransaction_iface
);
}
static
HRESULT
WINAPI
session_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
msdasql_session
*
session
=
impl_from_IUnknown
(
iface
);
...
...
@@ -118,6 +124,11 @@ static HRESULT WINAPI session_QueryInterface(IUnknown *iface, REFIID riid, void
TRACE
(
"(%p)->(ITransactionJoin %p)
\n
"
,
iface
,
ppv
);
*
ppv
=
&
session
->
ITransactionJoin_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_ITransaction
,
riid
))
{
TRACE
(
"(%p)->(ITransaction %p)
\n
"
,
iface
,
ppv
);
*
ppv
=
&
session
->
ITransaction_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IBindResource
,
riid
))
{
TRACE
(
"(%p)->(IID_IBindResource not support)
\n
"
,
iface
);
...
...
@@ -1248,6 +1259,61 @@ static const ITransactionJoinVtbl transactionjoinVtbl =
transjoin_JoinTransaction
};
static
HRESULT
WINAPI
transaction_QueryInterface
(
ITransaction
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
msdasql_session
*
session
=
impl_from_ITransaction
(
iface
);
return
IUnknown_QueryInterface
(
&
session
->
session_iface
,
riid
,
out
);
}
static
ULONG
WINAPI
transaction_AddRef
(
ITransaction
*
iface
)
{
struct
msdasql_session
*
session
=
impl_from_ITransaction
(
iface
);
return
IUnknown_AddRef
(
&
session
->
session_iface
);
}
static
ULONG
WINAPI
transaction_Release
(
ITransaction
*
iface
)
{
struct
msdasql_session
*
session
=
impl_from_ITransaction
(
iface
);
return
IUnknown_Release
(
&
session
->
session_iface
);
}
static
HRESULT
WINAPI
transaction_Commit
(
ITransaction
*
iface
,
BOOL
retaining
,
DWORD
tc
,
DWORD
rm
)
{
struct
msdasql_session
*
session
=
impl_from_ITransaction
(
iface
);
FIXME
(
"%p, %d, %ld, %ld
\n
"
,
session
,
retaining
,
tc
,
rm
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
transaction_Abort
(
ITransaction
*
iface
,
BOID
*
reason
,
BOOL
retaining
,
BOOL
async
)
{
struct
msdasql_session
*
session
=
impl_from_ITransaction
(
iface
);
FIXME
(
"%p, %p, %d, %d
\n
"
,
session
,
reason
,
retaining
,
async
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
transaction_GetTransactionInfo
(
ITransaction
*
iface
,
XACTTRANSINFO
*
info
)
{
struct
msdasql_session
*
session
=
impl_from_ITransaction
(
iface
);
FIXME
(
"%p, %p
\n
"
,
session
,
info
);
return
E_NOTIMPL
;
}
static
const
ITransactionVtbl
transactionVtbl
=
{
transaction_QueryInterface
,
transaction_AddRef
,
transaction_Release
,
transaction_Commit
,
transaction_Abort
,
transaction_GetTransactionInfo
};
HRESULT
create_db_session
(
REFIID
riid
,
IUnknown
*
datasource
,
HDBC
hdbc
,
void
**
unk
)
{
struct
msdasql_session
*
session
;
...
...
@@ -1263,6 +1329,8 @@ HRESULT create_db_session(REFIID riid, IUnknown *datasource, HDBC hdbc, void **u
session
->
ISessionProperties_iface
.
lpVtbl
=
&
propertiesVtbl
;
session
->
IDBCreateCommand_iface
.
lpVtbl
=
&
createcommandVtbl
;
session
->
ITransactionJoin_iface
.
lpVtbl
=
&
transactionjoinVtbl
;
session
->
ITransaction_iface
.
lpVtbl
=
&
transactionVtbl
;
IUnknown_QueryInterface
(
datasource
,
&
IID_IUnknown
,
(
void
**
)
&
session
->
datasource
);
session
->
refs
=
1
;
session
->
hdbc
=
hdbc
;
...
...
dlls/msdasql/tests/provider.c
View file @
35cf06c3
...
...
@@ -481,9 +481,8 @@ static void test_sessions(void)
IGetDataSource_Release
(
datasource
);
hr
=
IUnknown_QueryInterface
(
session
,
&
IID_ITransaction
,
(
void
**
)
&
transaction
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
ITransaction_Release
(
transaction
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ITransaction_Release
(
transaction
);
hr
=
IUnknown_QueryInterface
(
session
,
&
IID_ITransactionLocal
,
(
void
**
)
&
local
);
todo_wine
ok
(
hr
==
S_OK
,
"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