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
b06281c2
Commit
b06281c2
authored
Jan 31, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Respond to CLSID in file moniker interface query.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3d2c8ef4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
19 deletions
+10
-19
filemoniker.c
dlls/ole32/filemoniker.c
+8
-13
moniker.c
dlls/ole32/tests/moniker.c
+2
-6
No files found.
dlls/ole32/filemoniker.c
View file @
b06281c2
...
...
@@ -64,28 +64,25 @@ static HRESULT FileMonikerImpl_Destroy(FileMonikerImpl* iface);
/*******************************************************************************
* FileMoniker_QueryInterface
*/
static
HRESULT
WINAPI
FileMonikerImpl_QueryInterface
(
IMoniker
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
static
HRESULT
WINAPI
FileMonikerImpl_QueryInterface
(
IMoniker
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
FileMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
);
TRACE
(
"
(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
TRACE
(
"
%p, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObject
);
/* Perform a sanity check on the parameters.*/
if
(
ppvObject
==
0
)
if
(
!
ppvObject
)
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
)
)
IsEqualIID
(
&
IID_IMoniker
,
riid
)
||
IsEqualGUID
(
&
CLSID_FileMoniker
,
riid
))
{
*
ppvObject
=
iface
;
}
else
if
(
IsEqualIID
(
&
IID_IROTData
,
riid
))
*
ppvObject
=
&
This
->
IROTData_iface
;
else
if
(
IsEqualIID
(
&
IID_IMarshal
,
riid
))
...
...
@@ -98,11 +95,9 @@ FileMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
return
IUnknown_QueryInterface
(
This
->
pMarshal
,
riid
,
ppvObject
);
}
/* Check that we obtained an interface.*/
if
((
*
ppvObject
)
==
0
)
if
(
!*
ppvObject
)
return
E_NOINTERFACE
;
/* Query Interface always increases the reference count by one when it is successful */
IMoniker_AddRef
(
iface
);
return
S_OK
;
...
...
dlls/ole32/tests/moniker.c
View file @
b06281c2
...
...
@@ -1877,13 +1877,9 @@ static void test_file_moniker(WCHAR* path)
ok_ole_success
(
hr
,
CreateFileMoniker
);
hr
=
IMoniker_QueryInterface
(
moniker1
,
&
CLSID_FileMoniker
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
unk
==
(
IUnknown
*
)
moniker1
,
"Unexpected interface.
\n
"
);
IUnknown_Release
(
unk
);
}
ok
(
unk
==
(
IUnknown
*
)
moniker1
,
"Unexpected interface.
\n
"
);
IUnknown_Release
(
unk
);
hr
=
IMoniker_Inverse
(
moniker1
,
&
inverse
);
ok
(
hr
==
S_OK
,
"Failed to get inverse, hr %#x.
\n
"
,
hr
);
...
...
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