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
a456e8ff
Commit
a456e8ff
authored
Jan 22, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Fix bind speed used in BindToObject() of item moniker.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
efb5c108
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
itemmoniker.c
dlls/ole32/itemmoniker.c
+21
-11
moniker.c
dlls/ole32/tests/moniker.c
+0
-3
No files found.
dlls/ole32/itemmoniker.c
View file @
a456e8ff
...
...
@@ -329,6 +329,18 @@ static HRESULT WINAPI ItemMonikerImpl_GetSizeMax(IMoniker* iface, ULARGE_INTEGER
return
S_OK
;
}
static
DWORD
get_bind_speed_from_bindctx
(
IBindCtx
*
pbc
)
{
DWORD
bind_speed
=
BINDSPEED_INDEFINITE
;
BIND_OPTS
bind_opts
;
bind_opts
.
cbStruct
=
sizeof
(
bind_opts
);
if
(
SUCCEEDED
(
IBindCtx_GetBindOptions
(
pbc
,
&
bind_opts
))
&&
bind_opts
.
dwTickCountDeadline
)
bind_speed
=
bind_opts
.
dwTickCountDeadline
<
2500
?
BINDSPEED_IMMEDIATE
:
BINDSPEED_MODERATE
;
return
bind_speed
;
}
/******************************************************************************
* ItemMoniker_BindToObject
******************************************************************************/
...
...
@@ -339,9 +351,8 @@ static HRESULT WINAPI ItemMonikerImpl_BindToObject(IMoniker* iface,
VOID
**
ppvResult
)
{
ItemMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
);
HRESULT
res
;
IID
refid
=
IID_IOleItemContainer
;
IOleItemContainer
*
poic
=
0
;
IOleItemContainer
*
container
;
HRESULT
hr
;
TRACE
(
"(%p,%p,%p,%s,%p)
\n
"
,
iface
,
pbc
,
pmkToLeft
,
debugstr_guid
(
riid
),
ppvResult
);
...
...
@@ -353,16 +364,15 @@ static HRESULT WINAPI ItemMonikerImpl_BindToObject(IMoniker* iface,
*
ppvResult
=
0
;
res
=
IMoniker_BindToObject
(
pmkToLeft
,
pbc
,
NULL
,
&
refid
,(
void
**
)
&
poic
);
if
(
SUCCEEDED
(
res
)){
res
=
IOleItemContainer_GetObject
(
poic
,
This
->
itemName
,
BINDSPEED_MODERATE
,
pbc
,
riid
,
ppvResult
);
IOleItemContainer_Release
(
poic
);
hr
=
IMoniker_BindToObject
(
pmkToLeft
,
pbc
,
NULL
,
&
IID_IOleItemContainer
,
(
void
**
)
&
container
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IOleItemContainer_GetObject
(
container
,
This
->
itemName
,
get_bind_speed_from_bindctx
(
pbc
),
pbc
,
riid
,
ppvResult
);
IOleItemContainer_Release
(
container
);
}
return
res
;
return
hr
;
}
/******************************************************************************
...
...
dlls/ole32/tests/moniker.c
View file @
a456e8ff
...
...
@@ -2105,7 +2105,6 @@ todo_wine
container_moniker
=
create_test_moniker
();
hr
=
IMoniker_BindToObject
(
moniker
,
bindctx
,
&
container_moniker
->
IMoniker_iface
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
todo_wine
ok
(
hr
==
(
0x8bee0000
|
BINDSPEED_INDEFINITE
),
"Unexpected hr %#x.
\n
"
,
hr
);
bind_opts
.
cbStruct
=
sizeof
(
bind_opts
);
...
...
@@ -2116,14 +2115,12 @@ todo_wine
hr
=
IBindCtx_SetBindOptions
(
bindctx
,
&
bind_opts
);
ok
(
hr
==
S_OK
,
"Failed to set bind options, hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_BindToObject
(
moniker
,
bindctx
,
&
container_moniker
->
IMoniker_iface
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
todo_wine
ok
(
hr
==
(
0x8bee0000
|
BINDSPEED_IMMEDIATE
),
"Unexpected hr %#x.
\n
"
,
hr
);
bind_opts
.
dwTickCountDeadline
=
2499
;
hr
=
IBindCtx_SetBindOptions
(
bindctx
,
&
bind_opts
);
ok
(
hr
==
S_OK
,
"Failed to set bind options, hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_BindToObject
(
moniker
,
bindctx
,
&
container_moniker
->
IMoniker_iface
,
&
IID_IUnknown
,
(
void
**
)
&
unknown
);
todo_wine
ok
(
hr
==
(
0x8bee0000
|
BINDSPEED_IMMEDIATE
),
"Unexpected hr %#x.
\n
"
,
hr
);
bind_opts
.
dwTickCountDeadline
=
2500
;
...
...
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