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
246b3002
Commit
246b3002
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/filemoniker: Fix argument handling in Reduce().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b7cab789
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
+18
-13
filemoniker.c
dlls/ole32/filemoniker.c
+6
-11
moniker.c
dlls/ole32/tests/moniker.c
+12
-2
No files found.
dlls/ole32/filemoniker.c
View file @
246b3002
...
...
@@ -608,21 +608,16 @@ FileMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLef
return
E_NOTIMPL
;
}
/******************************************************************************
* FileMoniker_Reduce
******************************************************************************/
static
HRESULT
WINAPI
FileMonikerImpl_Reduce
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
DWORD
dwReduceHowFar
,
IMoniker
**
ppmkToLeft
,
IMoniker
**
ppmkReduced
)
static
HRESULT
WINAPI
FileMonikerImpl_Reduce
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
DWORD
howfar
,
IMoniker
**
toleft
,
IMoniker
**
reduced
)
{
TRACE
(
"
(%p,%p,%d,%p,%p)
\n
"
,
iface
,
pbc
,
dwReduceHowFar
,
ppmkToLeft
,
ppmkR
educed
);
TRACE
(
"
%p, %p, %d, %p, %p.
\n
"
,
iface
,
pbc
,
howfar
,
toleft
,
r
educed
);
if
(
ppmkReduced
==
NULL
)
return
E_
POINTER
;
if
(
!
pbc
||
!
reduced
)
return
E_
INVALIDARG
;
IMoniker_AddRef
(
iface
);
*
ppmkReduced
=
iface
;
*
reduced
=
iface
;
return
MK_S_REDUCED_TO_SELF
;
}
...
...
dlls/ole32/tests/moniker.c
View file @
246b3002
...
...
@@ -2098,7 +2098,7 @@ todo_wine
static
void
test_file_moniker
(
WCHAR
*
path
)
{
IMoniker
*
moniker1
=
NULL
,
*
moniker2
=
NULL
,
*
inverse
,
*
reduced
,
*
anti
;
IMoniker
*
moniker1
=
NULL
,
*
moniker2
=
NULL
,
*
m3
,
*
inverse
,
*
reduced
,
*
anti
;
IEnumMoniker
*
enummoniker
;
IBindCtx
*
bind_ctx
;
IStream
*
stream
;
...
...
@@ -2142,9 +2142,19 @@ static void test_file_moniker(WCHAR* path)
ok
(
hr
==
S_OK
,
"Failed to create bind context, hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_Reduce
(
moniker1
,
NULL
,
MKRREDUCE_ALL
,
NULL
,
&
reduced
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_Reduce
(
moniker1
,
bind_ctx
,
MKRREDUCE_ALL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
m3
=
anti
=
create_antimoniker
(
1
);
hr
=
IMoniker_Reduce
(
moniker1
,
bind_ctx
,
MKRREDUCE_ALL
,
&
m3
,
&
reduced
);
ok
(
hr
==
MK_S_REDUCED_TO_SELF
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
reduced
==
moniker1
,
"Unexpected moniker.
\n
"
);
ok
(
m3
==
anti
,
"Unexpected pointer.
\n
"
);
IMoniker_Release
(
reduced
);
IMoniker_Release
(
anti
);
hr
=
IMoniker_Reduce
(
moniker1
,
bind_ctx
,
MKRREDUCE_ALL
,
NULL
,
&
reduced
);
ok
(
hr
==
MK_S_REDUCED_TO_SELF
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
reduced
==
moniker1
,
"Unexpected moniker.
\n
"
);
...
...
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