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
ba40bbfc
Commit
ba40bbfc
authored
Mar 25, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Implement IHlinkBrowseContext_GetHlink().
parent
a083415d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
8 deletions
+38
-8
browse_ctx.c
dlls/hlink/browse_ctx.c
+31
-8
browse_ctx.c
dlls/hlink/tests/browse_ctx.c
+7
-0
No files found.
dlls/hlink/browse_ctx.c
View file @
ba40bbfc
...
@@ -234,20 +234,43 @@ static HRESULT WINAPI IHlinkBC_QueryHlink( IHlinkBrowseContext* iface,
...
@@ -234,20 +234,43 @@ static HRESULT WINAPI IHlinkBC_QueryHlink( IHlinkBrowseContext* iface,
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
HRESULT
WINAPI
IHlinkBC_GetHlink
(
IHlinkBrowseContext
*
iface
,
static
HRESULT
WINAPI
IHlinkBC_GetHlink
(
IHlinkBrowseContext
*
iface
,
ULONG
hlid
,
IHlink
**
ret
)
ULONG
uHLID
,
IHlink
**
ppihl
)
{
{
HlinkBCImpl
*
This
=
impl_from_IHlinkBrowseContext
(
iface
);
HlinkBCImpl
*
This
=
impl_from_IHlinkBrowseContext
(
iface
);
struct
link_entry
*
link
;
struct
list
*
entry
;
TRACE
(
"(%p)->(
%x %p)
\n
"
,
This
,
uHLID
,
ppihl
);
TRACE
(
"(%p)->(
0x%x %p)
\n
"
,
This
,
hlid
,
ret
);
if
(
uHLID
!=
HLID_CURRENT
)
{
switch
(
hlid
)
FIXME
(
"Only HLID_CURRENT implemented, given: %x
\n
"
,
uHLID
);
{
return
E_NOTIMPL
;
case
HLID_PREVIOUS
:
entry
=
list_prev
(
&
This
->
links
,
&
This
->
current
->
entry
);
break
;
case
HLID_NEXT
:
entry
=
list_next
(
&
This
->
links
,
&
This
->
current
->
entry
);
break
;
case
HLID_CURRENT
:
entry
=
&
This
->
current
->
entry
;
break
;
case
HLID_STACKBOTTOM
:
entry
=
list_tail
(
&
This
->
links
);
break
;
case
HLID_STACKTOP
:
entry
=
list_head
(
&
This
->
links
);
break
;
default:
WARN
(
"unknown id 0x%x
\n
"
,
hlid
);
entry
=
NULL
;
}
}
*
ppihl
=
This
->
current
->
link
;
if
(
!
entry
)
IHlink_AddRef
(
*
ppihl
);
return
E_FAIL
;
link
=
LIST_ENTRY
(
entry
,
struct
link_entry
,
entry
);
*
ret
=
link
->
link
;
IHlink_AddRef
(
*
ret
);
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/hlink/tests/browse_ctx.c
View file @
ba40bbfc
...
@@ -56,6 +56,13 @@ static void test_SetInitialHlink(void)
...
@@ -56,6 +56,13 @@ static void test_SetInitialHlink(void)
hres
=
IHlinkBrowseContext_SetInitialHlink
(
bc
,
dummy
,
five
,
NULL
);
hres
=
IHlinkBrowseContext_SetInitialHlink
(
bc
,
dummy
,
five
,
NULL
);
ok
(
hres
==
CO_E_ALREADYINITIALIZED
,
"got 0x%08x
\n
"
,
hres
);
ok
(
hres
==
CO_E_ALREADYINITIALIZED
,
"got 0x%08x
\n
"
,
hres
);
/* there's only one */
hres
=
IHlinkBrowseContext_GetHlink
(
bc
,
HLID_PREVIOUS
,
&
found_hlink
);
ok
(
hres
==
E_FAIL
,
"got 0x%08x
\n
"
,
hres
);
hres
=
IHlinkBrowseContext_GetHlink
(
bc
,
HLID_NEXT
,
&
found_hlink
);
ok
(
hres
==
E_FAIL
,
"got 0x%08x
\n
"
,
hres
);
hres
=
IHlinkBrowseContext_GetHlink
(
bc
,
HLID_CURRENT
,
&
found_hlink
);
hres
=
IHlinkBrowseContext_GetHlink
(
bc
,
HLID_CURRENT
,
&
found_hlink
);
ok
(
hres
==
S_OK
,
"GetHlink failed: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"GetHlink failed: 0x%08x
\n
"
,
hres
);
...
...
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