Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e2f8a3e4
Commit
e2f8a3e4
authored
Sep 14, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Simplify CommonPrefixWith() for class moniker.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5e1a8ada
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
24 deletions
+12
-24
classmoniker.c
dlls/ole32/classmoniker.c
+12
-24
No files found.
dlls/ole32/classmoniker.c
View file @
e2f8a3e4
...
...
@@ -452,39 +452,27 @@ static HRESULT WINAPI ClassMoniker_Inverse(IMoniker* iface,IMoniker** ppmk)
return
CreateAntiMoniker
(
ppmk
);
}
/******************************************************************************
* ClassMoniker_CommonPrefixWith
******************************************************************************/
static
HRESULT
WINAPI
ClassMoniker_CommonPrefixWith
(
IMoniker
*
iface
,
IMoniker
*
pmkOther
,
IMoniker
**
ppmkPrefix
)
static
HRESULT
WINAPI
ClassMoniker_CommonPrefixWith
(
IMoniker
*
iface
,
IMoniker
*
other
,
IMoniker
**
prefix
)
{
DWORD
mkSys
;
TRACE
(
"(%p, %p)
\n
"
,
pmkOther
,
ppmkPrefix
);
ClassMoniker
*
moniker
=
impl_from_IMoniker
(
iface
),
*
other_moniker
;
*
ppmkPrefix
=
NULL
;
TRACE
(
"%p, %p, %p
\n
"
,
iface
,
other
,
prefix
)
;
IMoniker_IsSystemMoniker
(
pmkOther
,
&
mkSys
)
;
*
prefix
=
NULL
;
/* If the other moniker is an class moniker that is equal to this moniker, this method sets *ppmkPrefix */
/* to this moniker and returns MK_S_US */
other_moniker
=
unsafe_impl_from_IMoniker
(
other
);
if
(
mkSys
==
MKSYS_CLASSMONIKER
)
if
(
other_moniker
)
{
if
(
IMoniker_IsEqual
(
iface
,
pmkOther
)
==
S_OK
)
{
*
ppmkPrefix
=
iface
;
if
(
!
IsEqualGUID
(
&
moniker
->
clsid
,
&
other_moniker
->
clsid
))
return
MK_E_NOPREFIX
;
IMoniker_AddRef
(
iface
);
*
prefix
=
iface
;
IMoniker_AddRef
(
iface
);
return
MK_S_US
;
}
else
return
MK_E_NOPREFIX
;
return
MK_S_US
;
}
else
/* otherwise, the method calls the MonikerCommonPrefixWith function. This function correctly handles */
/* the case where the other moniker is a generic composite. */
return
MonikerCommonPrefixWith
(
iface
,
pmkOther
,
ppmkPrefix
);
return
MonikerCommonPrefixWith
(
iface
,
other
,
prefix
);
}
/******************************************************************************
...
...
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