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
015ad98f
Commit
015ad98f
authored
Nov 11, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comsvcs: Add Reduce() for "new" moniker.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0fbf3688
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
main.c
dlls/comsvcs/main.c
+8
-2
comsvcs.c
dlls/comsvcs/tests/comsvcs.c
+17
-1
No files found.
dlls/comsvcs/main.c
View file @
015ad98f
...
...
@@ -600,9 +600,15 @@ static HRESULT WINAPI new_moniker_BindToStorage(IMoniker *iface, IBindCtx *pbc,
static
HRESULT
WINAPI
new_moniker_Reduce
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
DWORD
flags
,
IMoniker
**
ppmkToLeft
,
IMoniker
**
ret
)
{
FIXM
E
(
"%p, %p, %d, %p, %p.
\n
"
,
iface
,
pbc
,
flags
,
ppmkToLeft
,
ret
);
TRAC
E
(
"%p, %p, %d, %p, %p.
\n
"
,
iface
,
pbc
,
flags
,
ppmkToLeft
,
ret
);
return
E_NOTIMPL
;
if
(
!
ret
)
return
E_POINTER
;
*
ret
=
iface
;
IMoniker_AddRef
(
iface
);
return
MK_S_REDUCED_TO_SELF
;
}
static
HRESULT
WINAPI
new_moniker_ComposeWith
(
IMoniker
*
iface
,
IMoniker
*
mkRight
,
BOOL
fOnlyIfNotGeneric
,
...
...
dlls/comsvcs/tests/comsvcs.c
View file @
015ad98f
...
...
@@ -295,7 +295,7 @@ static void create_dispenser(void)
static
void
test_new_moniker
(
void
)
{
IMoniker
*
moniker
,
*
moniker2
,
*
inverse
,
*
class_moniker
;
IMoniker
*
moniker
,
*
moniker2
,
*
inverse
,
*
class_moniker
,
*
moniker_left
;
IRunningObjectTable
*
rot
;
IUnknown
*
obj
,
*
obj2
;
BIND_OPTS2
bind_opts
;
...
...
@@ -356,6 +356,22 @@ static void test_new_moniker(void)
IMoniker_Release
(
class_moniker
);
/* Reducing. */
moniker_left
=
(
void
*
)
0xdeadbeef
;
hr
=
IMoniker_Reduce
(
moniker
,
bindctx
,
MKRREDUCE_ONE
,
&
moniker_left
,
&
moniker2
);
ok
(
hr
==
MK_S_REDUCED_TO_SELF
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
moniker_left
==
(
void
*
)
0xdeadbeef
,
"Unexpected left moniker.
\n
"
);
ok
(
moniker2
==
moniker
,
"Unexpected returned moniker.
\n
"
);
IMoniker_Release
(
moniker2
);
hr
=
IMoniker_Reduce
(
moniker
,
bindctx
,
MKRREDUCE_ONE
,
NULL
,
&
moniker2
);
ok
(
hr
==
MK_S_REDUCED_TO_SELF
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
moniker2
==
moniker
,
"Unexpected returned moniker.
\n
"
);
IMoniker_Release
(
moniker2
);
hr
=
IMoniker_Reduce
(
moniker
,
bindctx
,
MKRREDUCE_ONE
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Hashing */
hash
=
0
;
hr
=
IMoniker_Hash
(
moniker
,
&
hash
);
...
...
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