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
c94b31ee
Commit
c94b31ee
authored
Jan 29, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Fix (pointer moniker + antimoniker) composing.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2a93a8ad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
13 deletions
+27
-13
antimoniker.c
dlls/ole32/antimoniker.c
+16
-1
moniker.h
dlls/ole32/moniker.h
+2
-0
pointermoniker.c
dlls/ole32/pointermoniker.c
+8
-7
moniker.c
dlls/ole32/tests/moniker.c
+1
-5
No files found.
dlls/ole32/antimoniker.c
View file @
c94b31ee
...
...
@@ -56,6 +56,21 @@ static inline AntiMonikerImpl *impl_from_IROTData(IROTData *iface)
static
AntiMonikerImpl
*
unsafe_impl_from_IMoniker
(
IMoniker
*
iface
);
BOOL
is_anti_moniker
(
IMoniker
*
iface
,
DWORD
*
order
)
{
AntiMonikerImpl
*
moniker
=
unsafe_impl_from_IMoniker
(
iface
);
if
(
!
moniker
)
{
*
order
=
0
;
return
FALSE
;
}
*
order
=
moniker
->
count
;
return
TRUE
;
}
/*******************************************************************************
* AntiMoniker_QueryInterface
*******************************************************************************/
...
...
@@ -607,7 +622,7 @@ static const IROTDataVtbl VT_ROTDataImpl =
AntiMonikerROTDataImpl_GetComparisonData
};
static
HRESULT
create_anti_moniker
(
DWORD
order
,
IMoniker
**
ret
)
HRESULT
create_anti_moniker
(
DWORD
order
,
IMoniker
**
ret
)
{
AntiMonikerImpl
*
moniker
;
...
...
dlls/ole32/moniker.h
View file @
c94b31ee
...
...
@@ -48,5 +48,7 @@ HRESULT ClassMoniker_CreateFromDisplayName(LPBC pbc, LPCOLESTR szDisplayName,
HRESULT
MonikerMarshal_Create
(
IMoniker
*
inner
,
IUnknown
**
outer
)
DECLSPEC_HIDDEN
;
BOOL
is_anti_moniker
(
IMoniker
*
iface
,
DWORD
*
order
)
DECLSPEC_HIDDEN
;
HRESULT
create_anti_moniker
(
DWORD
order
,
IMoniker
**
ret
)
DECLSPEC_HIDDEN
;
#endif
/* __WINE_MONIKER_H__ */
dlls/ole32/pointermoniker.c
View file @
c94b31ee
...
...
@@ -262,7 +262,7 @@ PointerMonikerImpl_ComposeWith(IMoniker* iface, IMoniker* pmkRight,
{
HRESULT
res
=
S_OK
;
DWORD
mkSys
,
mkSys2
;
DWORD
mkSys
,
mkSys2
,
order
;
IEnumMoniker
*
penumMk
=
0
;
IMoniker
*
pmostLeftMk
=
0
;
IMoniker
*
tempMkComposite
=
0
;
...
...
@@ -274,15 +274,15 @@ PointerMonikerImpl_ComposeWith(IMoniker* iface, IMoniker* pmkRight,
*
ppmkComposite
=
0
;
IMoniker_IsSystemMoniker
(
pmkRight
,
&
mkSys
);
/* If pmkRight is an anti-moniker, the returned moniker is NULL */
if
(
mkSys
==
MKSYS_ANTIMONIKER
)
return
res
;
if
(
is_anti_moniker
(
pmkRight
,
&
order
))
{
return
order
>
1
?
create_anti_moniker
(
order
-
1
,
ppmkComposite
)
:
S_OK
;
}
else
{
/* if pmkRight is a composite whose leftmost component is an anti-moniker, */
/* the returned moniker is the composite after the leftmost anti-moniker is removed. */
IMoniker_IsSystemMoniker
(
pmkRight
,
&
mkSys
);
if
(
mkSys
==
MKSYS_GENERICCOMPOSITE
){
...
...
@@ -326,6 +326,7 @@ PointerMonikerImpl_ComposeWith(IMoniker* iface, IMoniker* pmkRight,
else
return
MK_E_NEEDGENERIC
;
}
}
/******************************************************************************
...
...
dlls/ole32/tests/moniker.c
View file @
c94b31ee
...
...
@@ -3072,13 +3072,9 @@ todo_wine
anti
=
create_antimoniker
(
2
);
hr
=
IMoniker_ComposeWith
(
moniker
,
anti
,
TRUE
,
&
moniker2
);
ok
(
hr
==
S_OK
,
"Failed to compose, hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
!!
moniker2
,
"Unexpected pointer.
\n
"
);
if
(
moniker2
)
{
TEST_MONIKER_TYPE
(
moniker2
,
MKSYS_ANTIMONIKER
);
IMoniker_Release
(
moniker2
);
}
IMoniker_Release
(
anti
);
IMoniker_Release
(
moniker
);
...
...
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