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
759e2eff
Commit
759e2eff
authored
Apr 11, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Return requested interface when creating IHlinkBrowseContext instance.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0dad77af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
browse_ctx.c
dlls/hlink/browse_ctx.c
+14
-8
browse_ctx.c
dlls/hlink/tests/browse_ctx.c
+10
-0
No files found.
dlls/hlink/browse_ctx.c
View file @
759e2eff
...
...
@@ -53,14 +53,17 @@ static HRESULT WINAPI IHlinkBC_fnQueryInterface( IHlinkBrowseContext *iface,
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IHlinkBrowseContext
))
*
ppvObj
=
This
;
if
(
*
ppvObj
)
{
IUnknown_AddRef
((
IUnknown
*
)(
*
ppvObj
));
return
S_OK
;
*
ppvObj
=
&
This
->
IHlinkBrowseContext_iface
;
}
return
E_NOINTERFACE
;
else
{
*
ppvObj
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppvObj
);
return
S_OK
;
}
static
ULONG
WINAPI
IHlinkBC_fnAddRef
(
IHlinkBrowseContext
*
iface
)
...
...
@@ -368,6 +371,7 @@ static const IHlinkBrowseContextVtbl hlvt =
HRESULT
HLinkBrowseContext_Constructor
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
{
HlinkBCImpl
*
hl
;
HRESULT
hr
;
TRACE
(
"unkOut=%p riid=%s
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
));
*
ppv
=
NULL
;
...
...
@@ -383,6 +387,8 @@ HRESULT HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid, void **
hl
->
IHlinkBrowseContext_iface
.
lpVtbl
=
&
hlvt
;
list_init
(
&
hl
->
links
);
*
ppv
=
hl
;
return
S_OK
;
hr
=
IHlinkBrowseContext_QueryInterface
(
&
hl
->
IHlinkBrowseContext_iface
,
riid
,
ppv
);
IHlinkBrowseContext_Release
(
&
hl
->
IHlinkBrowseContext_iface
);
return
hr
;
}
dlls/hlink/tests/browse_ctx.c
View file @
759e2eff
...
...
@@ -197,10 +197,20 @@ static void test_GetObject(void)
IMoniker_Release
(
dummy
);
}
static
void
test_interfaces
(
void
)
{
IHlinkBrowseContext
*
bc
;
HRESULT
hr
;
hr
=
HlinkCreateBrowseContext
(
NULL
,
&
IID_IMoniker
,
(
void
**
)
&
bc
);
ok
(
hr
==
E_NOINTERFACE
,
"Unexpected hr %#lx.
\n
"
,
hr
);
}
START_TEST
(
browse_ctx
)
{
CoInitialize
(
NULL
);
test_interfaces
();
test_SetInitialHlink
();
test_BrowseWindowInfo
();
test_GetObject
();
...
...
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