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
b062977f
Commit
b062977f
authored
May 04, 2013
by
Daniel Jelinski
Committed by
Alexandre Julliard
May 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xolehlp: Implement TransactionOptions.
parent
9cc5cdc1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
111 additions
and
3 deletions
+111
-3
xolehlp.c
dlls/xolehlp/xolehlp.c
+111
-3
No files found.
dlls/xolehlp/xolehlp.c
View file @
b062977f
...
...
@@ -145,6 +145,114 @@ static HRESULT ResourceManager_Create(REFIID riid, void **ppv)
/* Resource manager end */
/* Transaction options start */
typedef
struct
{
ITransactionOptions
ITransactionOptions_iface
;
LONG
ref
;
XACTOPT
opts
;
}
TransactionOptions
;
static
inline
TransactionOptions
*
impl_from_ITransactionOptions
(
ITransactionOptions
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
TransactionOptions
,
ITransactionOptions_iface
);
}
static
HRESULT
WINAPI
TransactionOptions_QueryInterface
(
ITransactionOptions
*
iface
,
REFIID
iid
,
void
**
ppv
)
{
TransactionOptions
*
This
=
impl_from_ITransactionOptions
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
iid
),
ppv
);
if
(
!
ppv
)
return
E_INVALIDARG
;
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_ITransactionOptions
,
iid
))
{
*
ppv
=
&
This
->
ITransactionOptions_iface
;
}
else
{
FIXME
(
"(%s): not implemented
\n
"
,
debugstr_guid
(
iid
));
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
TransactionOptions_AddRef
(
ITransactionOptions
*
iface
)
{
TransactionOptions
*
This
=
impl_from_ITransactionOptions
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
TransactionOptions_Release
(
ITransactionOptions
*
iface
)
{
TransactionOptions
*
This
=
impl_from_ITransactionOptions
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
TransactionOptions_SetOptions
(
ITransactionOptions
*
iface
,
XACTOPT
*
pOptions
)
{
TransactionOptions
*
This
=
impl_from_ITransactionOptions
(
iface
);
if
(
!
pOptions
)
return
E_INVALIDARG
;
TRACE
(
"(%p, %u, %s)
\n
"
,
iface
,
pOptions
->
ulTimeout
,
debugstr_a
(
pOptions
->
szDescription
));
This
->
opts
=
*
pOptions
;
return
S_OK
;
}
static
HRESULT
WINAPI
TransactionOptions_GetOptions
(
ITransactionOptions
*
iface
,
XACTOPT
*
pOptions
)
{
TransactionOptions
*
This
=
impl_from_ITransactionOptions
(
iface
);
TRACE
(
"(%p, %p)
\n
"
,
iface
,
pOptions
);
if
(
!
pOptions
)
return
E_INVALIDARG
;
*
pOptions
=
This
->
opts
;
return
S_OK
;
}
static
const
ITransactionOptionsVtbl
TransactionOptions_Vtbl
=
{
TransactionOptions_QueryInterface
,
TransactionOptions_AddRef
,
TransactionOptions_Release
,
TransactionOptions_SetOptions
,
TransactionOptions_GetOptions
};
static
HRESULT
TransactionOptions_Create
(
ITransactionOptions
**
ppv
)
{
TransactionOptions
*
This
;
if
(
!
ppv
)
return
E_INVALIDARG
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
TransactionOptions
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
ITransactionOptions_iface
.
lpVtbl
=
&
TransactionOptions_Vtbl
;
This
->
ref
=
1
;
*
ppv
=
&
This
->
ITransactionOptions_iface
;
return
S_OK
;
}
/* Transaction options end */
/* DTC Proxy Core Object start */
...
...
@@ -226,10 +334,10 @@ static ULONG WINAPI TransactionDispenser_Release(ITransactionDispenser *iface)
static
HRESULT
WINAPI
TransactionDispenser_GetOptionsObject
(
ITransactionDispenser
*
iface
,
ITransactionOptions
**
ppOptions
)
{
FIXME
(
"(%p, %p): stub
\n
"
,
iface
,
ppOptions
);
TRACE
(
"(%p, %p)
\n
"
,
iface
,
ppOptions
);
if
(
!
ppOptions
)
return
E_INVALIDARG
;
*
ppOptions
=
NULL
;
return
E_NOTIMPL
;
return
TransactionOptions_Create
(
ppOptions
);
}
static
HRESULT
WINAPI
TransactionDispenser_BeginTransaction
(
ITransactionDispenser
*
iface
,
IUnknown
*
punkOuter
,
...
...
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