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
63769f7e
Commit
63769f7e
authored
Sep 28, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/antimoniker: Fix argument handling in RelativePathTo().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
558e8466
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
11 deletions
+35
-11
antimoniker.c
dlls/ole32/antimoniker.c
+6
-11
moniker.c
dlls/ole32/tests/moniker.c
+29
-0
No files found.
dlls/ole32/antimoniker.c
View file @
63769f7e
...
...
@@ -438,20 +438,15 @@ static HRESULT WINAPI AntiMonikerImpl_CommonPrefixWith(IMoniker *iface, IMoniker
return
MonikerCommonPrefixWith
(
iface
,
other
,
prefix
);
}
/******************************************************************************
* AntiMoniker_RelativePathTo
******************************************************************************/
static
HRESULT
WINAPI
AntiMonikerImpl_RelativePathTo
(
IMoniker
*
iface
,
IMoniker
*
pmOther
,
IMoniker
**
ppmkRelPath
)
static
HRESULT
WINAPI
AntiMonikerImpl_RelativePathTo
(
IMoniker
*
iface
,
IMoniker
*
other
,
IMoniker
**
result
)
{
TRACE
(
"
(%p,%p,%p)
\n
"
,
iface
,
pmOther
,
ppmkRelPath
);
TRACE
(
"
%p, %p, %p.
\n
"
,
iface
,
other
,
result
);
if
(
ppmkRelPath
==
NULL
)
return
E_POINTER
;
IMoniker_AddRef
(
pmOther
);
if
(
!
other
||
!
result
)
return
E_INVALIDARG
;
*
ppmkRelPath
=
pmOther
;
IMoniker_AddRef
(
other
);
*
result
=
other
;
return
MK_S_HIM
;
}
...
...
dlls/ole32/tests/moniker.c
View file @
63769f7e
...
...
@@ -3026,6 +3026,35 @@ todo_wine
IBindCtx_Release
(
bindctx
);
IMoniker_Release
(
moniker
);
IMoniker_Release
(
moniker2
);
/* RelativePathTo() */
moniker
=
create_antimoniker
(
1
);
hr
=
create_moniker_from_desc
(
"I1"
,
&
moniker2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_RelativePathTo
(
moniker
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_RelativePathTo
(
moniker
,
NULL
,
&
moniker3
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_RelativePathTo
(
moniker
,
moniker2
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_RelativePathTo
(
moniker
,
moniker2
,
&
moniker3
);
ok
(
hr
==
MK_S_HIM
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
moniker3
==
moniker2
,
"Unexpected object.
\n
"
);
IMoniker_Release
(
moniker3
);
IMoniker_Release
(
moniker2
);
moniker2
=
create_antimoniker
(
2
);
hr
=
IMoniker_RelativePathTo
(
moniker
,
moniker2
,
&
moniker3
);
ok
(
hr
==
MK_S_HIM
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
moniker3
==
moniker2
,
"Unexpected object.
\n
"
);
IMoniker_Release
(
moniker3
);
hr
=
IMoniker_RelativePathTo
(
moniker2
,
moniker
,
&
moniker3
);
ok
(
hr
==
MK_S_HIM
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
moniker3
==
moniker
,
"Unexpected object.
\n
"
);
IMoniker_Release
(
moniker3
);
IMoniker_Release
(
moniker2
);
IMoniker_Release
(
moniker
);
}
static
void
test_generic_composite_moniker
(
void
)
...
...
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