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
0187babc
Commit
0187babc
authored
Jan 28, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Lock item container on BindToStorage().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
25ad349d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
19 deletions
+20
-19
itemmoniker.c
dlls/ole32/itemmoniker.c
+16
-18
moniker.c
dlls/ole32/tests/moniker.c
+4
-1
No files found.
dlls/ole32/itemmoniker.c
View file @
0187babc
...
...
@@ -462,33 +462,31 @@ static HRESULT WINAPI ItemMonikerImpl_BindToObject(IMoniker* iface,
/******************************************************************************
* ItemMoniker_BindToStorage
******************************************************************************/
static
HRESULT
WINAPI
ItemMonikerImpl_BindToStorage
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
REFIID
riid
,
VOID
**
ppvResult
)
static
HRESULT
WINAPI
ItemMonikerImpl_BindToStorage
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
REFIID
riid
,
void
**
ppvResult
)
{
ItemMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
);
HRESULT
res
;
IOleItemContainer
*
poic
=
0
;
ItemMonikerImpl
*
moniker
=
impl_from_IMoniker
(
iface
);
IOleItemContainer
*
container
;
HRESULT
hr
;
TRACE
(
"
(%p,%p,%p,%s,%p)
\n
"
,
iface
,
pbc
,
pmkToLeft
,
debugstr_guid
(
riid
),
ppvResult
);
TRACE
(
"
%p, %p, %p, %s, %p.
\n
"
,
iface
,
pbc
,
pmkToLeft
,
debugstr_guid
(
riid
),
ppvResult
);
*
ppvResult
=
0
;
*
ppvResult
=
0
;
if
(
pmkToLeft
==
NULL
)
if
(
!
pmkToLeft
)
return
E_INVALIDARG
;
res
=
IMoniker_BindToObject
(
pmkToLeft
,
pbc
,
NULL
,
&
IID_IOleItemContainer
,(
void
**
)
&
poic
);
if
(
SUCCEEDED
(
res
))
{
res
=
IOleItemContainer_GetObjectStorage
(
poic
,
This
->
itemName
,
pbc
,
riid
,
ppvResult
);
hr
=
IMoniker_BindToObject
(
pmkToLeft
,
pbc
,
NULL
,
&
IID_IOleItemContainer
,
(
void
**
)
&
container
);
if
(
SUCCEEDED
(
hr
))
{
if
(
FAILED
(
hr
=
set_container_lock
(
container
,
pbc
)))
WARN
(
"Failed to lock container, hr %#x.
\n
"
,
hr
);
IOleItemContainer_Release
(
poic
);
hr
=
IOleItemContainer_GetObjectStorage
(
container
,
moniker
->
itemName
,
pbc
,
riid
,
ppvResult
);
IOleItemContainer_Release
(
container
);
}
return
res
;
return
hr
;
}
/******************************************************************************
...
...
dlls/ole32/tests/moniker.c
View file @
0187babc
...
...
@@ -380,7 +380,7 @@ static HRESULT WINAPI test_item_container_GetObject(IOleItemContainer *iface, LP
static
HRESULT
WINAPI
test_item_container_GetObjectStorage
(
IOleItemContainer
*
iface
,
LPOLESTR
item
,
IBindCtx
*
pbc
,
REFIID
riid
,
void
**
obj
)
{
return
E_NOTIMPL
;
return
0x8bee0001
;
}
static
HRESULT
WINAPI
test_item_container_IsRunning
(
IOleItemContainer
*
iface
,
LPOLESTR
item
)
...
...
@@ -2235,6 +2235,9 @@ todo_wine
hr
=
IMoniker_BindToStorage
(
moniker
,
bindctx
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_BindToStorage
(
moniker
,
bindctx
,
&
container_moniker
->
IMoniker_iface
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
ok
(
hr
==
0x8bee0001
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* ParseDisplayName() */
hr
=
IMoniker_ParseDisplayName
(
moniker
,
bindctx
,
NULL
,
displayname
,
&
eaten
,
&
moniker2
);
ok
(
hr
==
MK_E_SYNTAX
,
"Unexpected hr %#x.
\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