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
82b3d35b
Commit
82b3d35b
authored
Aug 24, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Cleanup ItemMonikerImpl_QueryInterface().
parent
d3c934ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
22 deletions
+15
-22
itemmoniker.c
dlls/ole32/itemmoniker.c
+15
-22
No files found.
dlls/ole32/itemmoniker.c
View file @
82b3d35b
...
...
@@ -67,23 +67,17 @@ static HRESULT WINAPI ItemMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid
{
ItemMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
/* Perform a sanity check on the parameters.*/
if
(
(
This
==
0
)
||
(
ppvObject
==
0
)
)
return
E_INVALIDARG
;
/* Initialize the return parameter */
*
ppvObject
=
0
;
/* Compare the riid with the interface IDs implemented by this object.*/
if
(
IsEqualIID
(
&
IID_IUnknown
,
riid
)
||
IsEqualIID
(
&
IID_IPersist
,
riid
)
||
IsEqualIID
(
&
IID_IPersistStream
,
riid
)
||
IsEqualIID
(
&
IID_IMoniker
,
riid
)
)
*
ppvObject
=
iface
;
if
(
!
ppvObject
)
return
E_INVALIDARG
;
/* Compare the riid with the interface IDs implemented by this object.*/
if
(
IsEqualIID
(
&
IID_IUnknown
,
riid
)
||
IsEqualIID
(
&
IID_IPersist
,
riid
)
||
IsEqualIID
(
&
IID_IPersistStream
,
riid
)
||
IsEqualIID
(
&
IID_IMoniker
,
riid
))
*
ppvObject
=
iface
;
else
if
(
IsEqualIID
(
&
IID_IROTData
,
riid
))
*
ppvObject
=
&
This
->
IROTData_iface
;
else
if
(
IsEqualIID
(
&
IID_IMarshal
,
riid
))
...
...
@@ -95,15 +89,14 @@ static HRESULT WINAPI ItemMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid
return
hr
;
return
IUnknown_QueryInterface
(
This
->
pMarshal
,
riid
,
ppvObject
);
}
/* Check that we obtained an interface.*/
if
((
*
ppvObject
)
==
0
)
else
{
*
ppvObject
=
NULL
;
return
E_NOINTERFACE
;
}
/* Query Interface always increases the reference count by one when it is successful */
IMoniker_AddRef
(
iface
);
return
S_OK
;
IMoniker_AddRef
(
iface
);
return
S_OK
;
}
/******************************************************************************
...
...
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