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
19df4c56
Commit
19df4c56
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/itemmoniker: Fix argument handling in RelativePathTo().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
63769f7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
9 deletions
+26
-9
itemmoniker.c
dlls/ole32/itemmoniker.c
+5
-8
moniker.c
dlls/ole32/tests/moniker.c
+21
-1
No files found.
dlls/ole32/itemmoniker.c
View file @
19df4c56
...
...
@@ -714,17 +714,14 @@ static HRESULT WINAPI ItemMonikerImpl_CommonPrefixWith(IMoniker *iface, IMoniker
return
MonikerCommonPrefixWith
(
iface
,
other
,
prefix
);
}
/******************************************************************************
* ItemMoniker_RelativePathTo
******************************************************************************/
static
HRESULT
WINAPI
ItemMonikerImpl_RelativePathTo
(
IMoniker
*
iface
,
IMoniker
*
pmOther
,
IMoniker
**
ppmkRelPath
)
static
HRESULT
WINAPI
ItemMonikerImpl_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
;
if
(
!
other
||
!
result
)
return
E_
INVALIDARG
;
*
ppmkRelPath
=
0
;
*
result
=
NULL
;
return
MK_E_NOTBINDABLE
;
}
...
...
dlls/ole32/tests/moniker.c
View file @
19df4c56
...
...
@@ -2376,7 +2376,7 @@ static void test_item_moniker(void)
"Moniker_IsRunning"
,
NULL
};
IMoniker
*
moniker
,
*
moniker2
,
*
moniker3
,
*
reduced
,
*
anti
,
*
inverse
,
*
c
;
IMoniker
*
moniker
,
*
moniker
1
,
*
moniker
2
,
*
moniker3
,
*
reduced
,
*
anti
,
*
inverse
,
*
c
;
DWORD
i
,
hash
,
eaten
,
cookie
;
HRESULT
hr
;
IBindCtx
*
bindctx
;
...
...
@@ -2757,6 +2757,26 @@ todo_wine
IMoniker_Release
(
moniker2
);
IMoniker_Release
(
moniker
);
/* RelativePathTo() */
hr
=
create_moniker_from_desc
(
"I1"
,
&
moniker
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
create_moniker_from_desc
(
"I2"
,
&
moniker1
);
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
,
&
moniker2
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_RelativePathTo
(
moniker
,
moniker1
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
moniker2
=
(
void
*
)
0xdeadbeef
;
hr
=
IMoniker_RelativePathTo
(
moniker
,
moniker1
,
&
moniker2
);
ok
(
hr
==
MK_E_NOTBINDABLE
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
moniker2
,
"Unexpected pointer.
\n
"
);
IMoniker_Release
(
moniker1
);
IMoniker_Release
(
moniker
);
}
static
void
stream_write_dword
(
IStream
*
stream
,
DWORD
value
)
...
...
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