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
b7e4a5bc
Commit
b7e4a5bc
authored
Sep 24, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/classmoniker: Always use generic composition in ComposeWith().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
59bf44b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
67 deletions
+11
-67
classmoniker.c
dlls/ole32/classmoniker.c
+11
-67
No files found.
dlls/ole32/classmoniker.c
View file @
b7e4a5bc
...
...
@@ -298,79 +298,23 @@ static HRESULT WINAPI ClassMoniker_Reduce(IMoniker* iface,
return
MK_S_REDUCED_TO_SELF
;
}
/******************************************************************************
* ClassMoniker_ComposeWith
******************************************************************************/
static
HRESULT
WINAPI
ClassMoniker_ComposeWith
(
IMoniker
*
iface
,
IMoniker
*
pmkRight
,
BOOL
fOnlyIfNotGeneric
,
IMoniker
**
ppmkComposite
)
{
HRESULT
res
=
S_OK
;
DWORD
mkSys
,
mkSys2
;
IEnumMoniker
*
penumMk
=
0
;
IMoniker
*
pmostLeftMk
=
0
;
IMoniker
*
tempMkComposite
=
0
;
TRACE
(
"(%p,%d,%p)
\n
"
,
pmkRight
,
fOnlyIfNotGeneric
,
ppmkComposite
);
if
((
ppmkComposite
==
NULL
)
||
(
pmkRight
==
NULL
))
return
E_POINTER
;
*
ppmkComposite
=
0
;
IMoniker_IsSystemMoniker
(
pmkRight
,
&
mkSys
);
/* If pmkRight is an anti-moniker, the returned moniker is NULL */
if
(
mkSys
==
MKSYS_ANTIMONIKER
)
return
res
;
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. */
if
(
mkSys
==
MKSYS_GENERICCOMPOSITE
){
res
=
IMoniker_Enum
(
pmkRight
,
TRUE
,
&
penumMk
);
if
(
FAILED
(
res
))
return
res
;
res
=
IEnumMoniker_Next
(
penumMk
,
1
,
&
pmostLeftMk
,
NULL
);
IMoniker_IsSystemMoniker
(
pmostLeftMk
,
&
mkSys2
);
if
(
mkSys2
==
MKSYS_ANTIMONIKER
){
IMoniker_Release
(
pmostLeftMk
);
tempMkComposite
=
iface
;
IMoniker_AddRef
(
iface
);
static
HRESULT
WINAPI
ClassMoniker_ComposeWith
(
IMoniker
*
iface
,
IMoniker
*
right
,
BOOL
only_if_not_generic
,
IMoniker
**
result
)
{
DWORD
order
;
while
(
IEnumMoniker_Next
(
penumMk
,
1
,
&
pmostLeftMk
,
NULL
)
==
S_OK
){
TRACE
(
"%p, %p, %d, %p.
\n
"
,
iface
,
right
,
only_if_not_generic
,
result
);
res
=
CreateGenericComposite
(
tempMkComposite
,
pmostLeftMk
,
ppmkComposite
);
if
(
!
result
||
!
right
)
return
E_POINTER
;
IMoniker_Release
(
tempMkComposite
);
IMoniker_Release
(
pmostLeftMk
);
*
result
=
NULL
;
tempMkComposite
=*
ppmkComposite
;
IMoniker_AddRef
(
tempMkComposite
);
}
return
res
;
}
else
return
CreateGenericComposite
(
iface
,
pmkRight
,
ppmkComposite
);
}
/* If pmkRight is not an anti-moniker, the method combines the two monikers into a generic
composite if fOnlyIfNotGeneric is FALSE; if fOnlyIfNotGeneric is TRUE, the method returns
a NULL moniker and a return value of MK_E_NEEDGENERIC */
else
if
(
!
fOnlyIfNotGeneric
)
return
CreateGenericComposite
(
iface
,
pmkRight
,
ppmkComposite
);
if
(
is_anti_moniker
(
right
,
&
order
))
return
S_OK
;
else
return
MK_E_NEEDGENERIC
;
return
only_if_not_generic
?
MK_E_NEEDGENERIC
:
CreateGenericComposite
(
iface
,
right
,
result
);
}
/******************************************************************************
...
...
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