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
281021d8
Commit
281021d8
authored
Sep 27, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/composite: Fix argument handling in ComposeWith().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
068ddc5b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
19 deletions
+23
-19
compositemoniker.c
dlls/ole32/compositemoniker.c
+5
-19
moniker.c
dlls/ole32/tests/moniker.c
+18
-0
No files found.
dlls/ole32/compositemoniker.c
View file @
281021d8
...
...
@@ -485,28 +485,14 @@ CompositeMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc, DWORD dwReduceHowFar
}
}
/******************************************************************************
* CompositeMoniker_ComposeWith
******************************************************************************/
static
HRESULT
WINAPI
CompositeMonikerImpl_ComposeWith
(
IMoniker
*
iface
,
IMoniker
*
pmkRight
,
BOOL
fOnlyIfNotGeneric
,
IMoniker
**
ppmkComposite
)
static
HRESULT
WINAPI
CompositeMonikerImpl_ComposeWith
(
IMoniker
*
iface
,
IMoniker
*
right
,
BOOL
only_if_not_generic
,
IMoniker
**
composite
)
{
TRACE
(
"(%p,%p,%d,%p)
\n
"
,
iface
,
pmkRight
,
fOnlyIfNotGeneric
,
ppmkComposite
);
if
((
ppmkComposite
==
NULL
)
||
(
pmkRight
==
NULL
))
return
E_POINTER
;
*
ppmkComposite
=
0
;
/* If fOnlyIfNotGeneric is TRUE, this method sets *pmkComposite to NULL and returns MK_E_NEEDGENERIC; */
/* otherwise, the method returns the result of combining the two monikers by calling the */
/* CreateGenericComposite function */
TRACE
(
"%p, %p, %d, %p.
\n
"
,
iface
,
right
,
only_if_not_generic
,
composite
);
if
(
fOnlyIfNotGeneric
)
return
MK_E_NEEDGENERIC
;
*
composite
=
NULL
;
return
CreateGenericComposite
(
iface
,
pmkRight
,
ppmkC
omposite
);
return
only_if_not_generic
?
MK_E_NEEDGENERIC
:
CreateGenericComposite
(
iface
,
right
,
c
omposite
);
}
static
void
composite_get_components
(
IMoniker
*
moniker
,
IMoniker
**
components
,
unsigned
int
*
index
)
...
...
dlls/ole32/tests/moniker.c
View file @
281021d8
...
...
@@ -3359,6 +3359,24 @@ todo_wine
IMoniker_Release
(
moniker2
);
IMoniker_Release
(
moniker1
);
/* ComposeWith() */
hr
=
create_moniker_from_desc
(
"CI1I2"
,
&
moniker1
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
create_moniker_from_desc
(
"I3"
,
&
moniker2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_ComposeWith
(
moniker1
,
NULL
,
FALSE
,
&
moniker
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
moniker
==
moniker1
,
"Unexpected pointer.
\n
"
);
IMoniker_Release
(
moniker
);
hr
=
IMoniker_ComposeWith
(
moniker1
,
NULL
,
TRUE
,
&
moniker
);
ok
(
hr
==
MK_E_NEEDGENERIC
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
moniker
,
"Unexpected pointer.
\n
"
);
IMoniker_Release
(
moniker2
);
IMoniker_Release
(
moniker1
);
IBindCtx_Release
(
bindctx
);
}
...
...
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